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. More... | |
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. More... | |
struct GNUNET_NT_InterfaceScanner * | GNUNET_NT_scanner_init (void) |
Initialize the address characterization client handle. More... | |
void | GNUNET_NT_scanner_done (struct GNUNET_NT_InterfaceScanner *is) |
Terminate interface scanner. More... | |
enum GNUNET_NetworkType |
Types of networks (with separate quotas) we support.
Definition at line 38 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 38 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 distribute_bandwidth_in_network(), enforce_add_address(), GNUNET_ATS_solvers_load_quotas(), GST_ats_add_inbound_address(), libgnunet_plugin_ats_proportional_init(), load_quota(), load_quotas(), parse_quota(), print_quotas(), and transport_addr_to_str_cb().
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 284 of file nt.c.
Referenced by boot_queue(), iface_proc(), mq_init(), 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 406 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(), 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 427 of file nt.c.
References delete_networks(), GNUNET_free, GNUNET_SCHEDULER_cancel(), and is.
Referenced by do_shutdown(), and shutdown_task().