31 #ifndef GNUNET_VPN_SERVICE_H 32 #define GNUNET_VPN_SERVICE_H int result_af
Desired address family for the result.
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
void(* GNUNET_VPN_AllocationCallback)(void *cls, int af, const void *address)
Callback invoked from the VPN service once a redirection is available.
struct GNUNET_TIME_Absolute expiration_time
At what time should the created service mapping expire?
GNUNET_VPN_AllocationCallback cb
Function to call with the designated IP address.
void GNUNET_VPN_disconnect(struct GNUNET_VPN_Handle *vh)
Disconnect from the VPN service.
void GNUNET_VPN_cancel_request(struct GNUNET_VPN_RedirectionRequest *rr)
Cancel redirection request with the service.
struct GNUNET_VPN_RedirectionRequest * GNUNET_VPN_redirect_to_peer(struct GNUNET_VPN_Handle *vh, int result_af, uint8_t protocol, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HashCode *serv, struct GNUNET_TIME_Absolute expiration_time, GNUNET_VPN_AllocationCallback cb, void *cb_cls)
Tell the VPN that a forwarding to a particular peer offering a particular service is requested...
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
Opaque redirection request handle.
struct GNUNET_VPN_Handle * GNUNET_VPN_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the VPN service.
The identity of the host (wraps the signing key of the peer).
uint8_t protocol
For service redirection, IPPROT_UDP or IPPROTO_TCP.
void * cb_cls
Closure for cb.
Time for absolute times used by GNUnet, in microseconds.
int addr_af
Address family of addr.
static char * address
GNS address for this phone.
struct GNUNET_HashCode serv
For service redirection, service descriptor.
const void * addr
Target IP address for the redirection, or NULL for redirection to service.
struct GNUNET_VPN_Handle * vh
Pointer to the VPN struct.
struct GNUNET_VPN_RedirectionRequest * GNUNET_VPN_redirect_to_ip(struct GNUNET_VPN_Handle *vh, int result_af, int addr_af, const void *addr, struct GNUNET_TIME_Absolute expiration_time, GNUNET_VPN_AllocationCallback cb, void *cb_cls)
Tell the VPN that forwarding to the Internet via some exit node is requested.