GNUnet  0.20.0
GNUNET_TRANSPORT_PluginEnvironment Struct Reference

The transport service will pass a pointer to a struct of this type as the first and only argument to the entry point of each transport plugin. More...

#include <gnunet_transport_plugin.h>

Collaboration diagram for GNUNET_TRANSPORT_PluginEnvironment:
[legend]

Data Fields

const struct GNUNET_CONFIGURATION_Handlecfg
 Configuration to use. More...
 
const struct GNUNET_PeerIdentitymy_identity
 Identity of this peer. More...
 
void * cls
 Closure for the various callbacks. More...
 
struct GNUNET_STATISTICS_Handlestats
 Handle for reporting statistics. More...
 
GNUNET_TRANSPORT_PluginReceiveCallback receive
 Function that should be called by the transport plugin whenever a message is received. More...
 
GNUNET_TRANSPORT_GetHelloCallback get_our_hello
 Function that returns our HELLO. More...
 
GNUNET_TRANSPORT_AddressNotification notify_address
 Function that must be called by each plugin to notify the transport service about the addresses under which the transport provided by the plugin can be reached. More...
 
GNUNET_TRANSPORT_SessionEnd session_end
 Function that must be called by the plugin when a non-NULL session handle stops being valid (is destroyed). More...
 
GNUNET_TRANSPORT_SessionStart session_start
 Function called by the plugin when a new (incoming) session was created not explicitly created using the the get_session function. More...
 
GNUNET_TRANSPORT_AddressToType get_address_type
 Function that will be called to figure if an address is an loopback, LAN, WAN etc. More...
 
GNUNET_TRANSPORT_UpdateAddressDistance update_address_distance
 Function that will be called by DV to update distance for an address. More...
 
uint32_t max_connections
 What is the maximum number of connections that this transport should allow? Transports that do not have sessions (such as UDP) can ignore this value. More...
 

Detailed Description

The transport service will pass a pointer to a struct of this type as the first and only argument to the entry point of each transport plugin.

Definition at line 214 of file gnunet_transport_plugin.h.

Field Documentation

◆ cfg

◆ my_identity

const struct GNUNET_PeerIdentity* GNUNET_TRANSPORT_PluginEnvironment::my_identity

Identity of this peer.

Definition at line 224 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ cls

◆ stats

struct GNUNET_STATISTICS_Handle* GNUNET_TRANSPORT_PluginEnvironment::stats

Handle for reporting statistics.

Definition at line 234 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ receive

GNUNET_TRANSPORT_PluginReceiveCallback GNUNET_TRANSPORT_PluginEnvironment::receive

Function that should be called by the transport plugin whenever a message is received.

If this field is "NULL", the plugin should load in 'stub' mode and NOT fully initialize and instead only return an API with the address_pretty_printer, address_to_string and string_to_address functions.

Definition at line 244 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ get_our_hello

GNUNET_TRANSPORT_GetHelloCallback GNUNET_TRANSPORT_PluginEnvironment::get_our_hello

Function that returns our HELLO.

Definition at line 249 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ notify_address

GNUNET_TRANSPORT_AddressNotification GNUNET_TRANSPORT_PluginEnvironment::notify_address

Function that must be called by each plugin to notify the transport service about the addresses under which the transport provided by the plugin can be reached.

Definition at line 256 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ session_end

GNUNET_TRANSPORT_SessionEnd GNUNET_TRANSPORT_PluginEnvironment::session_end

Function that must be called by the plugin when a non-NULL session handle stops being valid (is destroyed).

Definition at line 262 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ session_start

GNUNET_TRANSPORT_SessionStart GNUNET_TRANSPORT_PluginEnvironment::session_start

Function called by the plugin when a new (incoming) session was created not explicitly created using the the get_session function.

Definition at line 268 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ get_address_type

GNUNET_TRANSPORT_AddressToType GNUNET_TRANSPORT_PluginEnvironment::get_address_type

Function that will be called to figure if an address is an loopback, LAN, WAN etc.

address

Definition at line 274 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ update_address_distance

GNUNET_TRANSPORT_UpdateAddressDistance GNUNET_TRANSPORT_PluginEnvironment::update_address_distance

Function that will be called by DV to update distance for an address.

Definition at line 280 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().

◆ max_connections

uint32_t GNUNET_TRANSPORT_PluginEnvironment::max_connections

What is the maximum number of connections that this transport should allow? Transports that do not have sessions (such as UDP) can ignore this value.

Definition at line 287 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().


The documentation for this struct was generated from the following file: