GNUnet  0.10.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 
40 
45 
50 
55 
60 
65 
69 #define GNUNET_NT_COUNT 6
70 };
71 
72 
79 const char *
81 
82 
87 
88 
99  const struct sockaddr *addr,
100  socklen_t addrlen);
101 
102 
110 
111 
117 void
119 
120 
121 #endif
122  /* end of group */
Handle to the interface scanner.
Definition: nt.c:108
Local area network.
Definition: gnunet_nt_lib.h:49
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:306
const char * GNUNET_NT_to_string(enum GNUNET_NetworkType net)
Convert a enum GNUNET_NetworkType to a string.
Definition: nt.c:43
Wide area network (i.e.
Definition: gnunet_nt_lib.h:54
Wireless LAN (i.e.
Definition: gnunet_nt_lib.h:59
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:64
void GNUNET_NT_scanner_done(struct GNUNET_NT_InterfaceScanner *is)
Terminate interface scanner.
Definition: nt.c:419
struct GNUNET_NT_InterfaceScanner * GNUNET_NT_scanner_init(void)
Initialize the address characterization client handle.
Definition: nt.c:399
Loopback (same host).
Definition: gnunet_nt_lib.h:44
Category of last resort.
Definition: gnunet_nt_lib.h:39