Enumerations | |
| enum | GNUNET_NetworkType { GNUNET_NT_UNSPECIFIED = 0 , GNUNET_NT_LOOPBACK = 1 , GNUNET_NT_LAN = 2 , GNUNET_NT_WAN = 3 , GNUNET_NT_WLAN = 4 , GNUNET_NT_BT } |
| Types of networks (with separate quotas) we support. More... | |
Functions | |
| const char * | GNUNET_NT_to_string (enum GNUNET_NetworkType net) |
Convert a enum GNUNET_NetworkType to a string. | |
| 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. | |
| struct GNUNET_NT_InterfaceScanner * | GNUNET_NT_scanner_init (void) |
| Initialize the address characterization client handle. | |
| void | GNUNET_NT_scanner_done (struct GNUNET_NT_InterfaceScanner *is) |
| Terminate interface scanner. | |
| enum GNUNET_NetworkType |
Types of networks (with separate quotas) we support.
Definition at line 43 of file gnunet_nt_lib.h.
| const char * GNUNET_NT_to_string | ( | enum GNUNET_NetworkType | net | ) |
Convert a enum GNUNET_NetworkType to a string.
| net | the network type |
Definition at line 37 of file nt.c.
References GNUNET_NT_BT, GNUNET_NT_LAN, GNUNET_NT_LOOPBACK, GNUNET_NT_UNSPECIFIED, GNUNET_NT_WAN, and GNUNET_NT_WLAN.
Referenced by GNUNET_NT_scanner_get_type().
| 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.
| is | handle from #GNUNET_ATS_interface_scanner_init() |
| addr | address |
| addrlen | address length |
Returns where the address is located: loopback, LAN or WAN.
| is | the interface scanner handle |
| addr | address |
| addrlen | address length |
Definition at line 309 of file nt.c.
References GNUNET_a2s(), GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log_from, GNUNET_NO, GNUNET_NT_LAN, GNUNET_NT_LOOPBACK, GNUNET_NT_to_string(), GNUNET_NT_UNSPECIFIED, GNUNET_NT_WAN, GNUNET_YES, is, NT_Network::length, NT_Network::netmask, NT_Network::network, NT_Network::next, res, and type.
Referenced by boot_queue(), boot_queue(), create_receiver(), iface_proc(), mq_init(), mq_init(), nat_address_cb(), nat_address_cb(), nat_address_cb(), nat_address_cb(), setup_sender(), and sock_read().
| struct GNUNET_NT_InterfaceScanner * GNUNET_NT_scanner_init | ( | void | ) |
Initialize the address characterization client handle.
Initialize the address characterization client handle.
Definition at line 407 of file nt.c.
References get_addresses(), GNUNET_new, GNUNET_OS_network_interfaces_list(), GNUNET_SCHEDULER_add_delayed(), interface_proc(), INTERFACE_PROCESSING_INTERVAL, and is.
Referenced by init_socket(), init_socket(), run(), run(), and run().
| void GNUNET_NT_scanner_done | ( | struct GNUNET_NT_InterfaceScanner * | is | ) |
Terminate interface scanner.
| is | scanner we are done with |
Terminate interface scanner.
| is | handle to release |
Definition at line 428 of file nt.c.
References delete_networks(), GNUNET_free, GNUNET_SCHEDULER_cancel(), and is.
Referenced by do_shutdown(), do_shutdown(), do_shutdown(), and do_shutdown().