GNUnet  0.20.0
gnunet_transport_plugin.h File Reference

Transport service plugin API. More...

Include dependency graph for gnunet_transport_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_TRANSPORT_PluginEnvironment
 The transport service will pass a pointer to a struct of this type as the first and only argument to the entry point of each transport plugin. More...
 
struct  GNUNET_TRANSPORT_PluginFunctions
 Each plugin is required to return a pointer to a struct of this type as the return value from its entry point. More...
 

Macros

#define TRANSPORT_SESSION_INBOUND_STRING   "<inbound>"
 

Typedefs

typedef void(* GNUNET_TRANSPORT_SessionEnd) (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
 Function that will be called whenever the plugin internally cleans up a session pointer and hence the service needs to discard all of those sessions as well. More...
 
typedef void(* GNUNET_TRANSPORT_SessionStart) (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, enum GNUNET_NetworkType net)
 Plugin tells transport service about a new inbound session. More...
 
typedef struct GNUNET_TIME_Relative(* GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
 Function called by the transport for each received message. More...
 
typedef enum GNUNET_NetworkType(* GNUNET_TRANSPORT_AddressToType) (void *cls, const struct sockaddr *addr, size_t addrlen)
 Function that can be called by plugins to figure if an address is an loopback, LAN or WAN address. More...
 
typedef void(* GNUNET_TRANSPORT_UpdateAddressDistance) (void *cls, const struct GNUNET_HELLO_Address *address, uint32_t distance)
 Function called when distance of an address changes. More...
 
typedef void(* GNUNET_TRANSPORT_AddressNotification) (void *cls, int add_remove, const struct GNUNET_HELLO_Address *address)
 Function that will be called for each address the transport is aware that it might be reachable under. More...
 
typedef struct GNUNET_TIME_Relative(* GNUNET_TRANSPORT_TrafficReport) (void *cls, const struct GNUNET_PeerIdentity *peer, size_t amount_recved)
 Function that will be called whenever the plugin receives data over the network and wants to determine how long it should wait until the next time it reads from the given peer. More...
 
typedef const struct GNUNET_MessageHeader *(* GNUNET_TRANSPORT_GetHelloCallback) (void)
 Function that returns a HELLO message. More...
 
typedef void(* GNUNET_TRANSPORT_TransmitContinuation) (void *cls, const struct GNUNET_PeerIdentity *target, int result, size_t size_payload, size_t size_on_wire)
 Function called by the GNUNET_TRANSPORT_TransmitFunction upon "completion". More...
 
typedef ssize_t(* GNUNET_TRANSPORT_TransmitFunction) (void *cls, struct GNUNET_ATS_Session *session, const char *msgbuf, size_t msgbuf_size, unsigned int priority, struct GNUNET_TIME_Relative to, GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls)
 The new send function with just the session and no address. More...
 
typedef int(* GNUNET_TRANSPORT_DisconnectSessionFunction) (void *cls, struct GNUNET_ATS_Session *session)
 Function that can be called to force a disconnect from the specified neighbour for the given session only. More...
 
typedef unsigned int(* GNUNET_TRANSPORT_QueryKeepaliveFactorFunction) (void *cls)
 Function that is called to get the keepalive factor. More...
 
typedef void(* GNUNET_TRANSPORT_DisconnectPeerFunction) (void *cls, const struct GNUNET_PeerIdentity *target)
 Function that can be called to force a disconnect from the specified neighbour. More...
 
typedef void(* GNUNET_TRANSPORT_AddressStringCallback) (void *cls, const char *address, int res)
 Function called by the pretty printer for the resolved address for each human-readable address obtained. More...
 
typedef void(* GNUNET_TRANSPORT_AddressPrettyPrinter) (void *cls, const char *type, const void *addr, size_t addrlen, int numeric, struct GNUNET_TIME_Relative timeout, GNUNET_TRANSPORT_AddressStringCallback asc, void *asc_cls)
 Convert the transports address to a nice, human-readable format. More...
 
typedef int(* GNUNET_TRANSPORT_CheckAddress) (void *cls, const void *addr, size_t addrlen)
 Another peer has suggested an address for this peer and transport plugin. More...
 
typedef struct GNUNET_ATS_Session *(* GNUNET_TRANSPORT_CreateSession) (void *cls, const struct GNUNET_HELLO_Address *address)
 Create a new session to transmit data to the target This session will used to send data to this peer and the plugin will notify us by calling the env->session_end function. More...
 
typedef void(* GNUNET_TRANSPORT_UpdateSessionTimeout) (void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_ATS_Session *session)
 Function that will be called whenever the transport service wants to notify the plugin that a session is still active and in use and therefore the session timeout for this session has to be updated. More...
 
typedef void(* GNUNET_TRANSPORT_UpdateInboundDelay) (void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_ATS_Session *session, struct GNUNET_TIME_Relative delay)
 Function that will be called whenever the transport service wants to notify the plugin that the inbound quota changed and that the plugin should update it's delay for the next receive value. More...
 
typedef const char *(* GNUNET_TRANSPORT_AddressToString) (void *cls, const void *addr, size_t addrlen)
 Function called for a quick conversion of the binary address to a numeric address. More...
 
typedef int(* GNUNET_TRANSPORT_StringToAddress) (void *cls, const char *addr, uint16_t addrlen, void **buf, size_t *added)
 Function called to convert a string address to a binary address. More...
 
typedef enum GNUNET_NetworkType(* GNUNET_TRANSPORT_GetNetworkType) (void *cls, struct GNUNET_ATS_Session *session)
 Function to obtain the network type for a session. More...
 
typedef enum GNUNET_NetworkType(* GNUNET_TRANSPORT_GetNetworkTypeForAddress) (void *cls, const struct GNUNET_HELLO_Address *address)
 Function to obtain the network type for an address. More...
 
typedef void(* GNUNET_TRANSPORT_SessionInfoCallback) (void *cls, struct GNUNET_ATS_Session *session, const struct GNUNET_TRANSPORT_SessionInfo *info)
 Function called by the plugin with information about the current sessions managed by the plugin (for monitoring). More...
 
typedef void(* GNUNET_TRANSPORT_SessionMonitorSetup) (void *cls, GNUNET_TRANSPORT_SessionInfoCallback sic, void *sic_cls)
 Begin monitoring sessions of a plugin. More...
 

Detailed Description

Transport service plugin API.

Definition in file gnunet_transport_plugin.h.