GNUnet  0.19.4
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 624 of file gnunet_transport_plugin.h.

Field Documentation

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

Referenced by GST_plugins_load(), GST_validation_handle_ping(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), libgnunet_plugin_transport_udp_init(), multicast_pong(), send_syn(), send_syn_ack_message(), and transmit_ping_if_allowed().

◆ disconnect_peer

GNUNET_TRANSPORT_DisconnectPeerFunction GNUNET_TRANSPORT_PluginFunctions::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).

Definition at line 645 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), and libgnunet_plugin_transport_udp_init().

◆ disconnect_session

GNUNET_TRANSPORT_DisconnectSessionFunction GNUNET_TRANSPORT_PluginFunctions::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).

Definition at line 652 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), kill_session_task(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), libgnunet_plugin_transport_udp_init(), and switch_address_bl_check_cont().

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

Referenced by GST_neighbours_calculate_receive_delay(), GST_plugins_load(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), and libgnunet_plugin_transport_udp_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 666 of file gnunet_transport_plugin.h.

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

◆ query_keepalive_factor

GNUNET_TRANSPORT_QueryKeepaliveFactorFunction GNUNET_TRANSPORT_PluginFunctions::query_keepalive_factor

Function that is used to query keepalive factor.

GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to calculate the interval between keepalive packets.

Definition at line 673 of file gnunet_transport_plugin.h.

Referenced by GST_plugins_load(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), and libgnunet_plugin_transport_udp_init().

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

Referenced by GST_plugins_load(), GST_validation_handle_ping(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), and libgnunet_plugin_transport_udp_init().

◆ address_to_string

GNUNET_TRANSPORT_AddressToString GNUNET_TRANSPORT_PluginFunctions::address_to_string

Function that will be called to convert a binary address to a string (numeric conversion only).

Definition at line 695 of file gnunet_transport_plugin.h.

Referenced by add_address_to_uri(), add_valid_address(), GST_plugins_a2s(), GST_plugins_load(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), and libgnunet_plugin_transport_udp_init().

◆ string_to_address

GNUNET_TRANSPORT_StringToAddress GNUNET_TRANSPORT_PluginFunctions::string_to_address

Function that will be called to convert a string address to binary (numeric conversion only).

Definition at line 701 of file gnunet_transport_plugin.h.

Referenced by add_address_to_hello(), GST_plugins_load(), libgnunet_plugin_transport_http_client_init(), libgnunet_plugin_transport_tcp_init(), and libgnunet_plugin_transport_udp_init().

◆ 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: