GNUnet  0.10.x
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 
51 void
54  GNUNET_TRANSPORT_SessionStart session_start_cb,
55  GNUNET_TRANSPORT_SessionEnd session_end_cb);
56 
60 void
61 GST_plugins_unload(void);
62 
63 
71 GST_plugins_find(const char *name);
72 
73 
85 GST_plugins_printer_find(const char *name);
86 
87 
95 const char *
97 
98 
105 void
107  void *cb_cls);
108 
109 
110 #endif
111 /* end of file gnunet-service-transport_plugins.h */
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...
void GST_plugins_monitor_subscribe(GNUNET_TRANSPORT_SessionInfoCallback cb, void *cb_cls)
Register callback with all plugins to monitor their status.
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...
const char * GST_plugins_a2s(const struct GNUNET_HELLO_Address *address)
Convert a given address to a human-readable format.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
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
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_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.
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 ...
const char * name
struct GNUNET_TRANSPORT_PluginFunctions * GST_plugins_find(const char *name)
Obtain the plugin API based on a plugin name.
An address for communicating with a peer.
void GST_plugins_unload(void)
Unload 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(* 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.
static char * address
GNS address for this phone.