GNUnet 0.22.2
gnunet_transport_communication_service.h File Reference

API of the transport service towards the communicator processes. More...

#include "gnunet_util_lib.h"
Include dependency graph for gnunet_transport_communication_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GNUNET_TRANSPORT_COMMUNICATION_VERSION   0x00000000
 Version number of the transport communication API. More...
 
#define GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED   UINT64_MAX
 Queue length. More...
 

Typedefs

typedef int(* GNUNET_TRANSPORT_CommunicatorMqInit) (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address)
 Function called by the transport service to initialize a message queue given address information about another peer. More...
 
typedef void(* GNUNET_TRANSPORT_CommunicatorNotify) (void *cls, const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *msg)
 Function called when the transport service has received a backchannel message for this communicator (!) via a different return path. More...
 
typedef void(* GNUNET_TRANSPORT_StartBurstNotify) (const char *address, struct GNUNET_TIME_Relative rtt, struct GNUNET_PeerIdentity *peer)
 Function to start burst, if request by transport service. More...
 
typedef void(* GNUNET_TRANSPORT_MessageCompletedCallback) (void *cls, int success)
 Function called to notify communicator that we have received and processed the message. More...
 

Enumerations

enum  GNUNET_TRANSPORT_CommunicatorCharacteristics { GNUNET_TRANSPORT_CC_UNKNOWN = 0 , GNUNET_TRANSPORT_CC_RELIABLE = 1 , GNUNET_TRANSPORT_CC_UNRELIABLE = 2 }
 What characteristics does this communicator have? More...
 
enum  GNUNET_TRANSPORT_ConnectionStatus { GNUNET_TRANSPORT_CS_DOWN = -1 , GNUNET_TRANSPORT_CS_OUTBOUND = 0 , GNUNET_TRANSPORT_CS_INBOUND = 1 }
 Possible states of a connection. More...
 

Functions

struct GNUNET_TRANSPORT_CommunicatorHandleGNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *config_section_name, const char *addr_prefix, enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, GNUNET_TRANSPORT_CommunicatorMqInit mq_init, void *mq_init_cls, GNUNET_TRANSPORT_CommunicatorNotify notify_cb, void *notify_cb_cls, GNUNET_TRANSPORT_StartBurstNotify sb)
 Connect to the transport service. More...
 
void GNUNET_TRANSPORT_communicator_disconnect (struct GNUNET_TRANSPORT_CommunicatorHandle *ch)
 Disconnect from the transport service. More...
 
int GNUNET_TRANSPORT_communicator_receive (struct GNUNET_TRANSPORT_CommunicatorHandle *handle, const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *msg, struct GNUNET_TIME_Relative expected_addr_validity, GNUNET_TRANSPORT_MessageCompletedCallback cb, void *cb_cls)
 Notify transport service that the communicator has received a message. More...
 
void GNUNET_TRANSPORT_communicator_burst_finished (struct GNUNET_TRANSPORT_CommunicatorHandle *ch)
 The communicator tells the transport service that it finished the burst. More...
 
struct GNUNET_TRANSPORT_QueueHandleGNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, const struct GNUNET_PeerIdentity *peer, const char *address, uint32_t mtu, uint64_t q_len, uint32_t priority, enum GNUNET_NetworkType nt, enum GNUNET_TRANSPORT_ConnectionStatus cs, struct GNUNET_MQ_Handle *mq)
 Notify transport service that a MQ became available due to an "inbound" connection or because the communicator discovered the presence of another peer. More...
 
void GNUNET_TRANSPORT_communicator_mq_update (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, const struct GNUNET_TRANSPORT_QueueHandle *u_qh, uint64_t q_len, uint32_t priority)
 Notify transport service that an MQ was updated. More...
 
void GNUNET_TRANSPORT_communicator_mq_del (struct GNUNET_TRANSPORT_QueueHandle *qh)
 Notify transport service that an MQ became unavailable due to a disconnect or timeout. More...
 
struct GNUNET_TRANSPORT_AddressIdentifierGNUNET_TRANSPORT_communicator_address_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, const char *address, enum GNUNET_NetworkType nt, struct GNUNET_TIME_Relative expiration)
 Notify transport service about an address that this communicator provides for this peer. More...
 
void GNUNET_TRANSPORT_communicator_address_remove (struct GNUNET_TRANSPORT_AddressIdentifier *ai)
 Notify transport service about an address that this communicator no longer provides for this peer. More...
 
void GNUNET_TRANSPORT_communicator_address_remove_all (struct GNUNET_TRANSPORT_CommunicatorHandle *ch)
 Notify transport service that this communicator no longer provides all its addresses for this peer. More...
 
void GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, const struct GNUNET_PeerIdentity *pid, const char *comm, const struct GNUNET_MessageHeader *header)
 The communicator asks the transport service to route a message via a different path to another communicator service at another peer. More...
 

Detailed Description

API of the transport service towards the communicator processes.

Definition in file gnunet_transport_communication_service.h.