GNUnet 0.21.1
gnunet_nt_lib.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2010-2015, 2018 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
21#if !defined (__GNUNET_UTIL_LIB_H_INSIDE__)
22#error "Only <gnunet_util_lib.h> can be included directly."
23#endif
24
37#ifndef GNUNET_NT_LIB_H
38#define GNUNET_NT_LIB_H
39
44{
49
54
59
64
69
73 GNUNET_NT_BT = 5
74
78#define GNUNET_NT_COUNT 6
79};
80
81
88const char *
90
91
96
97
108 const struct sockaddr *addr,
109 socklen_t addrlen);
110
111
119
120
126void
128
129
130#endif
131 /* end of group */
133 /* end of group addition to backbone */
static struct GNUNET_TESTING_Interpreter * is
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:44
void GNUNET_NT_scanner_done(struct GNUNET_NT_InterfaceScanner *is)
Terminate interface scanner.
Definition: nt.c:426
struct GNUNET_NT_InterfaceScanner * GNUNET_NT_scanner_init(void)
Initialize the address characterization client handle.
Definition: nt.c:405
enum GNUNET_NetworkType GNUNET_NT_scanner_get_type(struct GNUNET_NT_InterfaceScanner *is, const struct sockaddr *addr, socklen_t addrlen)
Returns where the address is located: loopback, LAN or WAN.
Definition: nt.c:307
const char * GNUNET_NT_to_string(enum GNUNET_NetworkType net)
Convert a enum GNUNET_NetworkType to a string.
Definition: nt.c:37
@ GNUNET_NT_WLAN
Wireless LAN (i.e.
Definition: gnunet_nt_lib.h:68
@ GNUNET_NT_WAN
Wide area network (i.e.
Definition: gnunet_nt_lib.h:63
@ GNUNET_NT_UNSPECIFIED
Category of last resort.
Definition: gnunet_nt_lib.h:48
@ GNUNET_NT_LAN
Local area network.
Definition: gnunet_nt_lib.h:58
@ GNUNET_NT_LOOPBACK
Loopback (same host).
Definition: gnunet_nt_lib.h:53
@ GNUNET_NT_BT
Bluetooth LAN.
Definition: gnunet_nt_lib.h:73
Handle to the interface scanner.
Definition: nt.c:104