runs the gnunet-helper-nat-server More...
Go to the source code of this file.
Typedefs | |
typedef void(* | GN_ReversalCallback) (void *cls, const struct sockaddr_in *ra) |
Function called whenever we get a connection reversal request from another peer. More... | |
Functions | |
struct HelperContext * | GN_start_gnunet_nat_server_ (const struct in_addr *internal_address, GN_ReversalCallback cb, void *cb_cls, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Start the gnunet-helper-nat-server and process incoming requests. More... | |
void | GN_stop_gnunet_nat_server_ (struct HelperContext *h) |
Start the gnunet-helper-nat-server and process incoming requests. More... | |
int | GN_request_connection_reversal (const struct in_addr *internal_address, uint16_t internal_port, const struct in_addr *remote_v4, const struct GNUNET_CONFIGURATION_Handle *cfg) |
We want to connect to a peer that is behind NAT. More... | |
runs the gnunet-helper-nat-server
Definition in file gnunet-service-nat_helper.h.
typedef void(* GN_ReversalCallback) (void *cls, const struct sockaddr_in *ra) |
Function called whenever we get a connection reversal request from another peer.
cls | closure |
ra | IP address of the peer who wants us to connect to it |
Definition at line 44 of file gnunet-service-nat_helper.h.
struct HelperContext * GN_start_gnunet_nat_server_ | ( | const struct in_addr * | internal_address, |
GN_ReversalCallback | cb, | ||
void * | cb_cls, | ||
const struct GNUNET_CONFIGURATION_Handle * | cfg | ||
) |
Start the gnunet-helper-nat-server and process incoming requests.
internal_address | |
cb | function to call if we receive a request |
cb_cls | closure for cb |
cfg | handle to the GNUnet configuration |
Definition at line 269 of file gnunet-service-nat_helper.c.
References HelperContext::cb, HelperContext::cb_cls, cfg, GNUNET_ARM_Handle::cfg, GN_stop_gnunet_nat_server_(), GNUNET_new, h, HelperContext::internal_address, and restart_nat_server().
Referenced by run_scan().
void GN_stop_gnunet_nat_server_ | ( | struct HelperContext * | h | ) |
Start the gnunet-helper-nat-server and process incoming requests.
h | helper context to stop |
Definition at line 298 of file gnunet-service-nat_helper.c.
References GNUNET_DISK_pipe_close(), GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log_strerror, GNUNET_OS_process_destroy(), GNUNET_OS_process_kill(), GNUNET_OS_process_wait(), GNUNET_SCHEDULER_cancel(), GNUNET_TERM_SIG, and h.
Referenced by free_lal(), and GN_start_gnunet_nat_server_().
int GN_request_connection_reversal | ( | const struct in_addr * | internal_address, |
uint16_t | internal_port, | ||
const struct in_addr * | remote_v4, | ||
const struct GNUNET_CONFIGURATION_Handle * | cfg | ||
) |
We want to connect to a peer that is behind NAT.
Run the gnunet-helper-nat-client to send dummy ICMP responses to cause that peer to connect to us (connection reversal).
internal_address | out internal address to use |
internal_port | internal port to use |
remote_v4 | the address of the peer (IPv4-only) |
cfg | handle to the GNUnet configuration |
Run the gnunet-helper-nat-client to send dummy ICMP responses to cause that peer to connect to us (connection reversal).
internal_address | out internal address to use |
internal_port | port to use |
remote_v4 | the address of the peer (IPv4-only) |
cfg | handle to the GNUnet configuration |
Definition at line 339 of file gnunet-service-nat_helper.c.
References cfg, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_log_strerror, GNUNET_OK, GNUNET_OS_get_suid_binary_path(), GNUNET_OS_INHERIT_STD_NONE, GNUNET_OS_process_destroy(), GNUNET_OS_process_wait(), GNUNET_OS_start_process(), GNUNET_snprintf(), and GNUNET_SYSERR.
Referenced by handle_request_connection_reversal().