GNUnet  0.20.0
gnunet-service-transport_plugins.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010,2011 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
26 #ifndef GNUNET_SERVICE_TRANSPORT_PLUGINS_H
27 #define GNUNET_SERVICE_TRANSPORT_PLUGINS_H
28 
32 #include "gnunet_util_lib.h"
33 #include "gnunet_hello_lib.h"
34 
35 
47 void
50  GNUNET_TRANSPORT_SessionStart session_start_cb,
51  GNUNET_TRANSPORT_SessionEnd session_end_cb);
52 
56 void
57 GST_plugins_unload (void);
58 
59 
67 GST_plugins_find (const char *name);
68 
69 
81 GST_plugins_printer_find (const char *name);
82 
83 
91 const char *
93 
94 
101 void
103  void *cb_cls);
104 
105 
106 #endif
107 /* end of file gnunet-service-transport_plugins.h */
static char * address
GNS address for this phone.
static void address_cb(void *cls, void **app_ctx, int add_remove, enum GNUNET_NAT_AddressClass ac, const struct sockaddr *addr, socklen_t addrlen)
Signature of the callback passed to GNUNET_NAT_register() for a function to call whenever our set of ...
Definition: gnunet-nat.c:122
struct GNUNET_TRANSPORT_PluginFunctions * GST_plugins_find(const char *name)
Obtain the plugin API based on a plugin name.
void GST_plugins_load(GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, GNUNET_TRANSPORT_AddressNotification address_cb, GNUNET_TRANSPORT_SessionStart session_start_cb, GNUNET_TRANSPORT_SessionEnd session_end_cb)
Load and initialize all plugins.
struct GNUNET_TRANSPORT_PluginFunctions * GST_plugins_printer_find(const char *name)
Obtain the plugin API based on a the stripped plugin name after the underscore.
void GST_plugins_monitor_subscribe(GNUNET_TRANSPORT_SessionInfoCallback cb, void *cb_cls)
Register callback with all plugins to monitor their status.
const char * GST_plugins_a2s(const struct GNUNET_HELLO_Address *address)
Convert a given address to a human-readable format.
void GST_plugins_unload(void)
Unload all plugins.
Helper library for handling HELLOs.
API to create, modify and access statistics.
Transport service plugin API.
void(* GNUNET_TRANSPORT_SessionInfoCallback)(void *cls, struct GNUNET_ATS_Session *session, const struct GNUNET_TRANSPORT_SessionInfo *info)
Function called by the plugin with information about the current sessions managed by the plugin (for ...
void(* GNUNET_TRANSPORT_AddressNotification)(void *cls, int add_remove, const struct GNUNET_HELLO_Address *address)
Function that will be called for each address the transport is aware that it might be reachable under...
void(* GNUNET_TRANSPORT_SessionStart)(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, enum GNUNET_NetworkType net)
Plugin tells transport service about a new inbound session.
void(* GNUNET_TRANSPORT_SessionEnd)(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Function that will be called whenever the plugin internally cleans up a session pointer and hence the...
struct GNUNET_TIME_Relative(* GNUNET_TRANSPORT_PluginReceiveCallback)(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
Function called by the transport for each received message.
const char * name
An address for communicating with a peer.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...