The datastore service will pass a pointer to a struct of this type as the first and only argument to the entry point of each datastore plugin. More...
#include <gnunet_dhtu_plugin.h>
Data Fields | |
const struct GNUNET_CONFIGURATION_Handle * | cfg |
Configuration to use. More... | |
void * | cls |
Closure to use for callbacks. More... | |
void(* | address_add_cb )(void *cls, const char *address, struct GNUNET_DHTU_Source *source, void **ctx) |
Function to call with new addresses of this peer. More... | |
void(* | address_del_cb )(void *ctx) |
Function to call with expired addresses of this peer. More... | |
void(* | network_size_cb )(void *cls, struct GNUNET_TIME_Absolute timestamp, double logestimate, double std_dev) |
We have a new estimate on the size of the underlay. More... | |
void(* | connect_cb )(void *cls, struct GNUNET_DHTU_Target *target, const struct GNUNET_PeerIdentity *pid, void **ctx) |
Function to call when we connect to a peer and can henceforth transmit to that peer. More... | |
void(* | disconnect_cb )(void *ctx) |
Function to call when we disconnected from a peer and can henceforth cannot transmit to that peer anymore. More... | |
void(* | receive_cb )(void *cls, void **tctx, void **sctx, const void *message, size_t message_size) |
Function to call when we receive a message. More... | |
The datastore service will pass a pointer to a struct of this type as the first and only argument to the entry point of each datastore plugin.
Definition at line 67 of file gnunet_dhtu_plugin.h.
const struct GNUNET_CONFIGURATION_Handle* GNUNET_DHTU_PluginEnvironment::cfg |
Configuration to use.
Definition at line 72 of file gnunet_dhtu_plugin.h.
void* GNUNET_DHTU_PluginEnvironment::cls |
Closure to use for callbacks.
Definition at line 77 of file gnunet_dhtu_plugin.h.
void(* GNUNET_DHTU_PluginEnvironment::address_add_cb) (void *cls, const char *address, struct GNUNET_DHTU_Source *source, void **ctx) |
Function to call with new addresses of this peer.
cls | the closure | |
address | address under which we are likely reachable, pointer will remain valid until address_del_cb is called; to be used for HELLOs. Example: "ip+udp://1.1.1.1:2086/" | |
source | handle for sending from this address, NULL if we can only receive | |
[out] | ctx | storage space for DHT to use in association with this address |
Definition at line 88 of file gnunet_dhtu_plugin.h.
void(* GNUNET_DHTU_PluginEnvironment::address_del_cb) (void *ctx) |
Function to call with expired addresses of this peer.
[in] | ctx | storage space used by the DHT in association with this address |
Definition at line 99 of file gnunet_dhtu_plugin.h.
void(* GNUNET_DHTU_PluginEnvironment::network_size_cb) (void *cls, struct GNUNET_TIME_Absolute timestamp, double logestimate, double std_dev) |
We have a new estimate on the size of the underlay.
cls | closure |
timestamp | time when the estimate was received from the server (or created by the server) |
logestimate | the log(Base 2) value of the current network size estimate |
std_dev | standard deviation for the estimate, negative if unavailable |
Definition at line 110 of file gnunet_dhtu_plugin.h.
void(* GNUNET_DHTU_PluginEnvironment::connect_cb) (void *cls, struct GNUNET_DHTU_Target *target, const struct GNUNET_PeerIdentity *pid, void **ctx) |
Function to call when we connect to a peer and can henceforth transmit to that peer.
cls | the closure | |
target | handle to the target, pointer will remain valid until disconnect_cb is called | |
pid | peer identity, pointer will remain valid until disconnect_cb is called | |
[out] | ctx | storage space for DHT to use in association with this target |
Definition at line 127 of file gnunet_dhtu_plugin.h.
void(* GNUNET_DHTU_PluginEnvironment::disconnect_cb) (void *ctx) |
Function to call when we disconnected from a peer and can henceforth cannot transmit to that peer anymore.
[in] | ctx | storage space used by the DHT in association with this target |
Definition at line 140 of file gnunet_dhtu_plugin.h.
void(* GNUNET_DHTU_PluginEnvironment::receive_cb) (void *cls, void **tctx, void **sctx, const void *message, size_t message_size) |
Function to call when we receive a message.
cls | the closure | |
origin | where the message originated from | |
[in,out] | tctx | ctx of target address where we received the message from |
[in,out] | sctx | ctx of our own source address at which we received the message |
message | the message we received | |
message_size | number of bytes in message |
Definition at line 153 of file gnunet_dhtu_plugin.h.