105 for (pos = strtok (plugs,
" "); pos != NULL; pos = strtok (NULL,
" "))
124 if (plug->
api == NULL)
127 _ (
"Failed to load transport plugin for `%s'\n"),
170 char *sep = strchr (stripped,
'_');
178 char *head_sep = strchr (head_stripped,
'_');
179 if (NULL != head_sep)
181 if (0 == strcmp (head_stripped, stripped))
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static struct PendingResolutions * head
Head of list of pending resolution requests.
struct GNUNET_TRANSPORT_PluginFunctions * GPI_plugins_find(const char *name)
Obtain the plugin API based on a plugin name.
void GPI_plugins_load(const struct GNUNET_CONFIGURATION_Handle *cfg)
Load and initialize all plugins.
static struct TransportPlugin * plugins_head
Head of DLL of all loaded plugins.
void GPI_plugins_unload()
Unload all plugins.
static struct TransportPlugin * plugins_tail
Head of DLL of all loaded plugins.
Helper library for handling HELLOs.
Transport service plugin API.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_string(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be a string.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
#define GNUNET_log(kind,...)
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_ERROR
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
void * GNUNET_PLUGIN_load(const char *library_name, void *arg)
Setup plugin (runs the "init" callback and returns whatever "init" returned).
The transport service will pass a pointer to a struct of this type as the first and only argument to ...
void * cls
Closure for the various callbacks.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
struct PendingResolutions * next
Kept in a DLL.
Entry in doubly-linked list of all of our plugins.
struct TransportPlugin * next
This is a doubly-linked list.
struct TransportPlugin * prev
This is a doubly-linked list.
struct GNUNET_TRANSPORT_PluginEnvironment env
Environment this transport service is using for this plugin.
char * short_name
Short name for the plugin (e.g.
char * lib_name
Name of the library (e.g.
struct GNUNET_TRANSPORT_PluginFunctions * api
API of the transport as returned by the plugin's initialization function.