GNUnet debian-0.24.3-28-g4f2a77692
 
Loading...
Searching...
No Matches
COre Next Generation service

Secure Communication with other peers. More...

Collaboration diagram for COre Next Generation service:

Macros

#define GNUNET_CORE_UNDERLAY_VERSION   0x00000000
 Version number of the core underlay API.
 

Typedefs

typedef void *(* GNUNET_CORE_UNDERLAY_NotifyConnect) (void *cls, uint32_t num_addresses;const char *addresses[static num_addresses], struct GNUNET_MQ_Handle *mq)
 Function called to notify core underlay users that another peer connected to us.
 
typedef void(* GNUNET_CORE_UNDERLAY_NotifyDisconnect) (void *cls, void *handler_cls)
 Function called to notify core underlay users that another peer disconnected from us.
 
typedef void(* GNUNET_CORE_UNDERLAY_NotifyAddressChange) (void *cls, struct GNUNET_HashCode network_location_hash, struct uint64_t network_generation_id)
 Function called to notify core of the now available addresses.
 

Functions

struct GNUNET_CORE_UNDERLAY_Handle * GNUNET_CORE_UNDERLAY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_MQ_MessageHandler *handlers, void *cls, GNUNET_CORE_UNDERLAY_NotifyConnect nc, GNUNET_CORE_UNDERLAY_NotifyDisconnect nd, GNUNET_CORE_UNDERLAY_NotifyAddressChange na)
 Connect to the core underlay service.
 
void GNUNET_CORE_UNDERLAY_disconnect (struct GNUNET_CORE_UNDERLAY_Handle *handle)
 Disconnect from the core underlay service.
 

Detailed Description

Secure Communication with other peers.

See also
Documentation TODO

Macro Definition Documentation

◆ GNUNET_CORE_UNDERLAY_VERSION

#define GNUNET_CORE_UNDERLAY_VERSION   0x00000000

Version number of the core underlay API.

Definition at line 53 of file gnunet_core_underlay.h.

Typedef Documentation

◆ GNUNET_CORE_UNDERLAY_NotifyConnect

typedef void *(* GNUNET_CORE_UNDERLAY_NotifyConnect) (void *cls, uint32_t num_addresses;const char *addresses[static num_addresses], struct GNUNET_MQ_Handle *mq)

Function called to notify core underlay users that another peer connected to us.

Parameters
clsclosure
num_addressesnumber of addresses of the connecting peer
addressesaddress URIs of the connecting peer
mqmessage queue to use to transmit to peer
Returns
closure to use in MQ handlers

Definition at line 72 of file gnunet_core_underlay.h.

◆ GNUNET_CORE_UNDERLAY_NotifyDisconnect

typedef void(* GNUNET_CORE_UNDERLAY_NotifyDisconnect) (void *cls, void *handler_cls)

Function called to notify core underlay users that another peer disconnected from us.

The message queue that was given to the connect notification will be destroyed and must not be used henceforth.

Parameters
clsclosure from GNUNET_CORE_UNDERLAY_connect
handlers_clsclosure of the handlers, was returned from the connect notification callback

Definition at line 89 of file gnunet_core_underlay.h.

◆ GNUNET_CORE_UNDERLAY_NotifyAddressChange

typedef void(* GNUNET_CORE_UNDERLAY_NotifyAddressChange) (void *cls, struct GNUNET_HashCode network_location_hash, struct uint64_t network_generation_id)

Function called to notify core of the now available addresses.

Core will update its peer identity accordingly.

Parameters
clsclosure from GNUNET_CORE_UNDERLAY_connect
network_location_hashhash of the address URIs representing our current network location
network_generation_idthe id of the current network generation (this id changes each time the network location changes)

Definition at line 105 of file gnunet_core_underlay.h.

Function Documentation

◆ GNUNET_CORE_UNDERLAY_connect()

struct GNUNET_CORE_UNDERLAY_Handle * GNUNET_CORE_UNDERLAY_connect ( const struct GNUNET_CONFIGURATION_Handle cfg,
const struct GNUNET_MQ_MessageHandler handlers,
void *  cls,
GNUNET_CORE_UNDERLAY_NotifyConnect  nc,
GNUNET_CORE_UNDERLAY_NotifyDisconnect  nd,
GNUNET_CORE_UNDERLAY_NotifyAddressChange  na 
)

Connect to the core underlay service.

Note that the connection may complete (or fail) asynchronously.

Parameters
cfgconfiguration to use
handlersarray of message handlers or NULL; note that the closures provided will be ignored and replaced with the respective return value from nc
clsclosure for the nc, nd and na callbacks
ncfunction to call on connect events, or NULL
ndfunction to call on disconnect events, or NULL
nafunction to call on address changes, or NULL
Returns
NULL on error

◆ GNUNET_CORE_UNDERLAY_disconnect()

void GNUNET_CORE_UNDERLAY_disconnect ( struct GNUNET_CORE_UNDERLAY_Handle *  handle)

Disconnect from the core underlay service.

Parameters
handlehandle returned from connect