GNUnet  0.11.x
Data Fields
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 210 of file gnunet_transport_plugin.h.

Field Documentation

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* GNUNET_TRANSPORT_PluginEnvironment::cfg

◆ my_identity

const struct GNUNET_PeerIdentity* GNUNET_TRANSPORT_PluginEnvironment::my_identity

◆ cls

void* GNUNET_TRANSPORT_PluginEnvironment::cls

◆ stats

struct GNUNET_STATISTICS_Handle* GNUNET_TRANSPORT_PluginEnvironment::stats

◆ 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 240 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_http_server_init(), LIBGNUNET_PLUGIN_TRANSPORT_INIT(), libgnunet_plugin_transport_tcp_init(), libgnunet_plugin_transport_template_init(), libgnunet_plugin_transport_udp_init(), libgnunet_plugin_transport_unix_init(), and server_receive_mst_cb().

◆ get_our_hello

GNUNET_TRANSPORT_GetHelloCallback GNUNET_TRANSPORT_PluginEnvironment::get_our_hello

Function that returns our HELLO.

Definition at line 245 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 252 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), libgnunet_plugin_transport_http_server_done(), server_add_address(), server_notify_external_hostname(), and server_remove_address().

◆ 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 258 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), http_client_plugin_session_disconnect(), and server_delete_session().

◆ 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 264 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), server_lookup_connection(), and server_receive_mst_cb().

◆ 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 270 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), http_client_plugin_get_session(), http_common_get_network_for_address(), and server_lookup_connection().

◆ 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 276 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 283 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load().


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