#include "gnunet_util_lib.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | GNUNET_NAT_AddressCallback) (void *cls, void **app_ctx, int add_remove, enum GNUNET_NAT_AddressClass ac, const struct sockaddr *addr, socklen_t addrlen) |
Signature of the callback passed to GNUNET_NAT_register() for a function to call whenever our set of 'valid' addresses changes. More... | |
typedef void(* | GNUNET_NAT_ReversalCallback) (void *cls, const struct sockaddr *remote_addr, socklen_t remote_addrlen) |
Signature of the callback passed to GNUNET_NAT_register(). More... | |
typedef void(* | GNUNET_NAT_TestCallback) (void *cls, enum GNUNET_NAT_StatusCode result) |
Function called to report success or failure for NAT configuration test. More... | |
Functions | |
struct GNUNET_NAT_Handle * | GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *config_section, uint8_t proto, unsigned int num_addrs, const struct sockaddr **addrs, const socklen_t *addrlens, GNUNET_NAT_AddressCallback address_callback, GNUNET_NAT_ReversalCallback reversal_callback, void *callback_cls) |
Attempt to enable port redirection and detect public IP address contacting UPnP or NAT-PMP routers on the local network. More... | |
void | GNUNET_NAT_add_global_address (struct GNUNET_NAT_Handle *nh, char *addr, unsigned int address_length) |
Add global address to the list of addresses and notify clients. More... | |
int | GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *nh, const void *addr, socklen_t addrlen) |
Test if the given address is (currently) a plausible IP address for this peer. More... | |
int | GNUNET_NAT_request_reversal (struct GNUNET_NAT_Handle *nh, const struct sockaddr_in *local_sa, const struct sockaddr_in *remote_sa) |
We learned about a peer (possibly behind NAT) so run the gnunet-nat-client to send dummy ICMP responses to cause that peer to connect to us (connection reversal). More... | |
void | GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh) |
Stop port redirection and public IP address detection for the given handle. More... | |
int | GNUNET_NAT_stun_handle_packet (struct GNUNET_NAT_Handle *nh, const struct sockaddr *sender_addr, size_t sender_addr_len, const void *data, size_t data_size) |
Handle an incoming STUN message. More... | |
struct GNUNET_NAT_STUN_Handle * | GNUNET_NAT_stun_make_request (const char *server, uint16_t port, struct GNUNET_NETWORK_Handle *sock, GNUNET_NAT_TestCallback cb, void *cb_cls) |
Make Generic STUN request. More... | |
void | GNUNET_NAT_stun_make_request_cancel (struct GNUNET_NAT_STUN_Handle *rh) |
Cancel active STUN request. More... | |
Service for handling UPnP and NAT-PMP port forwarding and external IP address retrieval
Definition in file gnunet_nat_service.h.