Secure Communication with other peers. More...
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. | |
Secure Communication with other peers.
#define GNUNET_CORE_UNDERLAY_VERSION 0x00000000 |
Version number of the core underlay API.
Definition at line 53 of file gnunet_core_underlay.h.
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.
cls | closure |
num_addresses | number of addresses of the connecting peer |
addresses | address URIs of the connecting peer |
mq | message queue to use to transmit to peer |
Definition at line 72 of file gnunet_core_underlay.h.
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.
cls | closure from GNUNET_CORE_UNDERLAY_connect |
handlers_cls | closure of the handlers, was returned from the connect notification callback |
Definition at line 89 of file gnunet_core_underlay.h.
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.
cls | closure from GNUNET_CORE_UNDERLAY_connect |
network_location_hash | hash of the address URIs representing our current network location |
network_generation_id | the 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.
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.
cfg | configuration to use |
handlers | array of message handlers or NULL; note that the closures provided will be ignored and replaced with the respective return value from nc |
cls | closure for the nc, nd and na callbacks |
nc | function to call on connect events, or NULL |
nd | function to call on disconnect events, or NULL |
na | function to call on address changes, or NULL |
void GNUNET_CORE_UNDERLAY_disconnect | ( | struct GNUNET_CORE_UNDERLAY_Handle * | handle | ) |
Disconnect from the core underlay service.
handle | handle returned from connect |