GNUnet  0.11.x
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  */
29 #ifndef GNUNET_NT_LIB_H
30 #define GNUNET_NT_LIB_H
31 
36 {
41 
46 
51 
56 
61 
66 
70 #define GNUNET_NT_COUNT 6
71 };
72 
73 
80 const char *
82 
83 
88 
89 
100  const struct sockaddr *addr,
101  socklen_t addrlen);
102 
103 
111 
112 
118 void
120 
121 
122 #endif
123  /* end of group */
Handle to the interface scanner.
Definition: nt.c:110
Local area network.
Definition: gnunet_nt_lib.h:50
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:314
const char * GNUNET_NT_to_string(enum GNUNET_NetworkType net)
Convert a enum GNUNET_NetworkType to a string.
Definition: nt.c:44
Wide area network (i.e.
Definition: gnunet_nt_lib.h:55
Wireless LAN (i.e.
Definition: gnunet_nt_lib.h:60
static struct GNUNET_NT_InterfaceScanner * is
Network scanner to determine network types.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:35
Bluetooth LAN.
Definition: gnunet_nt_lib.h:65
void GNUNET_NT_scanner_done(struct GNUNET_NT_InterfaceScanner *is)
Terminate interface scanner.
Definition: nt.c:433
struct GNUNET_NT_InterfaceScanner * GNUNET_NT_scanner_init(void)
Initialize the address characterization client handle.
Definition: nt.c:412
Loopback (same host).
Definition: gnunet_nt_lib.h:45
Category of last resort.
Definition: gnunet_nt_lib.h:40