GNUnet  0.11.x
Data Fields
GNUNET_TRANSPORT_PluginFunctions Struct Reference

Each plugin is required to return a pointer to a struct of this type as the return value from its entry point. More...

#include <gnunet_transport_plugin.h>

Collaboration diagram for GNUNET_TRANSPORT_PluginFunctions:
[legend]

Data Fields

void * cls
 Closure for all of the callbacks. More...
 
GNUNET_TRANSPORT_TransmitFunction send
 Function that the transport service will use to transmit data to another peer. More...
 
GNUNET_TRANSPORT_DisconnectPeerFunction disconnect_peer
 Function that can be used to force the plugin to disconnect from the given peer and cancel all previous transmissions (and their continuations). More...
 
GNUNET_TRANSPORT_DisconnectSessionFunction disconnect_session
 Function that can be used to force the plugin to disconnect from the given peer and cancel all previous transmissions (and their continuations). More...
 
GNUNET_TRANSPORT_UpdateSessionTimeout update_session_timeout
 Function that will be called whenever the transport service wants to notify the plugin that a session is still active and in use and therefore the session timeout for this session has to be updated. More...
 
GNUNET_TRANSPORT_UpdateInboundDelay update_inbound_delay
 Function that will be called whenever the transport service wants to notify the plugin that the inbound quota changed and that the plugin should update it's delay for the next receive value. More...
 
GNUNET_TRANSPORT_QueryKeepaliveFactorFunction query_keepalive_factor
 Function that is used to query keepalive factor. More...
 
GNUNET_TRANSPORT_AddressPrettyPrinter address_pretty_printer
 Function to pretty-print addresses. More...
 
GNUNET_TRANSPORT_CheckAddress check_address
 Function that will be called to check if a binary address for this plugin is well-formed and corresponds to an address for THIS peer (as per our configuration). More...
 
GNUNET_TRANSPORT_AddressToString address_to_string
 Function that will be called to convert a binary address to a string (numeric conversion only). More...
 
GNUNET_TRANSPORT_StringToAddress string_to_address
 Function that will be called to convert a string address to binary (numeric conversion only). More...
 
GNUNET_TRANSPORT_CreateSession get_session
 Function that will be called tell the plugin to create a session object. More...
 
GNUNET_TRANSPORT_GetNetworkType get_network
 Function to obtain the network type for a session. More...
 
GNUNET_TRANSPORT_GetNetworkTypeForAddress get_network_for_address
 Function to obtain the network type for an address. More...
 
GNUNET_TRANSPORT_SessionMonitorSetup setup_monitor
 Function to monitor the sessions managed by the plugin. More...
 

Detailed Description

Each plugin is required to return a pointer to a struct of this type as the return value from its entry point.

Definition at line 620 of file gnunet_transport_plugin.h.

Field Documentation

◆ cls

void* GNUNET_TRANSPORT_PluginFunctions::cls

◆ send

GNUNET_TRANSPORT_TransmitFunction GNUNET_TRANSPORT_PluginFunctions::send

Function that the transport service will use to transmit data to another peer.

May be NULL for plugins that only support receiving data. After this call, the plugin call the specified continuation with success or error before notifying us about the target having disconnected.

Definition at line 634 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), GST_validation_handle_ping(), 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(), multicast_pong(), send_syn(), send_syn_ack_message(), send_with_session(), and transmit_ping_if_allowed().

◆ disconnect_peer

GNUNET_TRANSPORT_DisconnectPeerFunction GNUNET_TRANSPORT_PluginFunctions::disconnect_peer

◆ disconnect_session

GNUNET_TRANSPORT_DisconnectSessionFunction GNUNET_TRANSPORT_PluginFunctions::disconnect_session

◆ update_session_timeout

GNUNET_TRANSPORT_UpdateSessionTimeout GNUNET_TRANSPORT_PluginFunctions::update_session_timeout

Function that will be called whenever the transport service wants to notify the plugin that a session is still active and in use and therefore the session timeout for this session has to be updated.

Definition at line 655 of file gnunet_transport_plugin.h.

Referenced by GST_neighbours_keepalive_response(), 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(), and libgnunet_plugin_transport_unix_init().

◆ update_inbound_delay

GNUNET_TRANSPORT_UpdateInboundDelay GNUNET_TRANSPORT_PluginFunctions::update_inbound_delay

Function that will be called whenever the transport service wants to notify the plugin that the inbound quota changed and that the plugin should update it's delay for the next receive value.

Definition at line 662 of file gnunet_transport_plugin.h.

Referenced by inbound_bw_tracker_update(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_http_server_init(), LIBGNUNET_PLUGIN_TRANSPORT_INIT(), and libgnunet_plugin_transport_tcp_init().

◆ query_keepalive_factor

GNUNET_TRANSPORT_QueryKeepaliveFactorFunction GNUNET_TRANSPORT_PluginFunctions::query_keepalive_factor

◆ address_pretty_printer

GNUNET_TRANSPORT_AddressPrettyPrinter GNUNET_TRANSPORT_PluginFunctions::address_pretty_printer

◆ check_address

GNUNET_TRANSPORT_CheckAddress GNUNET_TRANSPORT_PluginFunctions::check_address

Function that will be called to check if a binary address for this plugin is well-formed and corresponds to an address for THIS peer (as per our configuration).

Naturally, if absolutely necessary, plugins can be a bit conservative in their answer, but in general plugins should make sure that the address does not redirect traffic to a 3rd party that might try to man-in-the-middle our traffic.

Definition at line 685 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), GST_validation_handle_ping(), 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(), and libgnunet_plugin_transport_unix_init().

◆ address_to_string

GNUNET_TRANSPORT_AddressToString GNUNET_TRANSPORT_PluginFunctions::address_to_string

◆ string_to_address

GNUNET_TRANSPORT_StringToAddress GNUNET_TRANSPORT_PluginFunctions::string_to_address

◆ get_session

GNUNET_TRANSPORT_CreateSession GNUNET_TRANSPORT_PluginFunctions::get_session

◆ get_network

GNUNET_TRANSPORT_GetNetworkType GNUNET_TRANSPORT_PluginFunctions::get_network

◆ get_network_for_address

GNUNET_TRANSPORT_GetNetworkTypeForAddress GNUNET_TRANSPORT_PluginFunctions::get_network_for_address

◆ setup_monitor

GNUNET_TRANSPORT_SessionMonitorSetup GNUNET_TRANSPORT_PluginFunctions::setup_monitor

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