GNUnet  0.19.5
gnunet_transport_service.h File Reference

Low-level P2P IO. More...

Include dependency graph for gnunet_transport_service.h:

Go to the source code of this file.

Data Structures

struct  GNUNET_TRANSPORT_SessionInfo
 Information about a plugin's session. More...
 

Macros

#define GNUNET_TRANSPORT_VERSION   0x00000003
 Version number of the transport API. More...
 

Typedefs

typedef void(* GNUNET_TRANSPORT_AddressToStringCallback) (void *cls, const char *address, int res)
 Function to call with a textual representation of an address. More...
 
typedef void(* GNUNET_TRANSPORT_PeerIterateCallback) (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, enum GNUNET_TRANSPORT_PeerState state, struct GNUNET_TIME_Absolute state_timeout)
 Function to call with information about a peer. More...
 
typedef int(* GNUNET_TRANSPORT_BlacklistCallback) (void *cls, const struct GNUNET_PeerIdentity *pid)
 Function that decides if a connection is acceptable or not. More...
 
typedef void(* GNUNET_TRANSPORT_SessionMonitorCallback) (void *cls, struct GNUNET_TRANSPORT_PluginSession *session, void **session_ctx, 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_NotifyConnect) (void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_MQ_Handle *mq)
 Function called to notify transport users that another peer connected to us. More...
 
typedef void(* GNUNET_TRANSPORT_NotifyDisconnect) (void *cls, const struct GNUNET_PeerIdentity *peer, void *handler_cls)
 Function called to notify transport users that another peer disconnected from us. More...
 
typedef void(* GNUNET_TRANSPORT_NotifyExcessBandwidth) (void *cls, const struct GNUNET_PeerIdentity *neighbour, void *handlers_cls)
 Function called if we have "excess" bandwidth to a peer. More...
 

Enumerations

enum  GNUNET_TRANSPORT_PeerState {
  GNUNET_TRANSPORT_PS_NOT_CONNECTED = 0 , GNUNET_TRANSPORT_PS_INIT_ATS , GNUNET_TRANSPORT_PS_SYN_SENT , GNUNET_TRANSPORT_PS_SYN_RECV_ATS ,
  GNUNET_TRANSPORT_PS_SYN_RECV_ACK , GNUNET_TRANSPORT_PS_CONNECTED , GNUNET_TRANSPORT_PS_RECONNECT_ATS , GNUNET_TRANSPORT_PS_RECONNECT_SENT ,
  GNUNET_TRANSPORT_PS_SWITCH_SYN_SENT , GNUNET_TRANSPORT_PS_DISCONNECT , GNUNET_TRANSPORT_PS_DISCONNECT_FINISHED
}
 Possible state of a neighbour. More...
 
enum  GNUNET_TRANSPORT_SessionState {
  GNUNET_TRANSPORT_SS_INIT , GNUNET_TRANSPORT_SS_HANDSHAKE , GNUNET_TRANSPORT_SS_UP , GNUNET_TRANSPORT_SS_UPDATE ,
  GNUNET_TRANSPORT_SS_DONE
}
 Possible states of a session in a plugin. More...
 

Functions

struct GNUNET_TRANSPORT_OfferHelloHandleGNUNET_TRANSPORT_offer_hello (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_MessageHeader *hello, GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
 Offer the transport service the HELLO of another peer. More...
 
void GNUNET_TRANSPORT_offer_hello_cancel (struct GNUNET_TRANSPORT_OfferHelloHandle *ohh)
 Cancel the request to transport to offer the HELLO message. More...
 
struct GNUNET_TRANSPORT_AddressToStringContextGNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_HELLO_Address *address, int numeric, struct GNUNET_TIME_Relative timeout, GNUNET_TRANSPORT_AddressToStringCallback aluc, void *aluc_cls)
 Convert a binary address into a human readable address. More...
 
void GNUNET_TRANSPORT_address_to_string_cancel (struct GNUNET_TRANSPORT_AddressToStringContext *alc)
 Cancel request for address conversion. More...
 
const char * GNUNET_TRANSPORT_ps2s (enum GNUNET_TRANSPORT_PeerState state)
 Convert a transport state to a human readable string. More...
 
int GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state)
 Check if a state is defined as connected. More...
 
struct GNUNET_TRANSPORT_PeerMonitoringContextGNUNET_TRANSPORT_monitor_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_PeerIdentity *peer, int one_shot, GNUNET_TRANSPORT_PeerIterateCallback peer_callback, void *peer_callback_cls)
 Return information about a specific peer or all peers currently known to transport service once or in monitoring mode. More...
 
void GNUNET_TRANSPORT_monitor_peers_cancel (struct GNUNET_TRANSPORT_PeerMonitoringContext *pic)
 Cancel request to monitor peers. More...
 
struct GNUNET_TRANSPORT_BlacklistGNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_TRANSPORT_BlacklistCallback cb, void *cb_cls)
 Install a blacklist callback. More...
 
void GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br)
 Abort the blacklist. More...
 
struct GNUNET_TRANSPORT_PluginMonitorGNUNET_TRANSPORT_monitor_plugins (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_TRANSPORT_SessionMonitorCallback cb, void *cb_cls)
 Install a plugin session state monitor callback. More...
 
void GNUNET_TRANSPORT_monitor_plugins_cancel (struct GNUNET_TRANSPORT_PluginMonitor *pm)
 Cancel monitoring the plugin session state. More...
 
struct GNUNET_TRANSPORT_CoreHandleGNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_PeerIdentity *self, const struct GNUNET_MQ_MessageHandler *handlers, void *cls, GNUNET_TRANSPORT_NotifyConnect nc, GNUNET_TRANSPORT_NotifyDisconnect nd, GNUNET_TRANSPORT_NotifyExcessBandwidth neb)
 Connect to the transport service. More...
 
void GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
 Disconnect from the transport service. More...
 
struct GNUNET_MQ_HandleGNUNET_TRANSPORT_core_get_mq (struct GNUNET_TRANSPORT_CoreHandle *handle, const struct GNUNET_PeerIdentity *peer)
 Checks if a given peer is connected to us and get the message queue. More...
 

Detailed Description

Low-level P2P IO.

Definition in file gnunet_transport_service.h.