diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-04 14:17:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-04 14:17:40 +0000 |
commit | 3ba21d7f05658f4c9a090a41ffbe04c6729d0916 (patch) | |
tree | 2e23aa6d04a917987f393048b7d007e488d7f1a8 /src/transport/gnunet-service-transport_plugins.h | |
parent | 58cc7545c068d1deb7f7085822646313d5271b0f (diff) | |
download | gnunet-3ba21d7f05658f4c9a090a41ffbe04c6729d0916.tar.gz gnunet-3ba21d7f05658f4c9a090a41ffbe04c6729d0916.zip |
implementing new HELLO api
Diffstat (limited to 'src/transport/gnunet-service-transport_plugins.h')
-rw-r--r-- | src/transport/gnunet-service-transport_plugins.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h index 0d62bbf79..3ad09b7f6 100644 --- a/src/transport/gnunet-service-transport_plugins.h +++ b/src/transport/gnunet-service-transport_plugins.h | |||
@@ -33,7 +33,17 @@ | |||
33 | 33 | ||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Load and initialize all plugins. The respective functions will be | ||
37 | * invoked by the plugins when the respective events happen. The | ||
38 | * closure will be set to a 'const char*' containing the name of the | ||
39 | * plugin that caused the call. | ||
36 | * | 40 | * |
41 | * @param recv_cb function to call when data is received | ||
42 | * @param address_cb function to call when our public addresses changed | ||
43 | * @param traffic_cb function to call for flow control | ||
44 | * @param session_end_cb function to call when a session was terminated | ||
45 | * @param cost_cb function to call about ATS cost changes | ||
46 | * @return GNUNET_OK on success | ||
37 | */ | 47 | */ |
38 | int | 48 | int |
39 | GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, | 49 | GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, |
@@ -44,19 +54,36 @@ GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, | |||
44 | 54 | ||
45 | 55 | ||
46 | /** | 56 | /** |
47 | * | 57 | * Unload all plugins |
48 | */ | 58 | */ |
49 | int | 59 | void |
50 | GST_plugins_unload (void); | 60 | GST_plugins_unload (void); |
51 | 61 | ||
52 | 62 | ||
53 | /** | 63 | /** |
64 | * Obtain the plugin API based on a plugin name. | ||
54 | * | 65 | * |
66 | * @param name name of the plugin | ||
67 | * @return the plugin's API, NULL if the plugin is not loaded | ||
55 | */ | 68 | */ |
56 | struct GNUNET_TRANSPORT_PluginFunctions * | 69 | struct GNUNET_TRANSPORT_PluginFunctions * |
57 | GST_plugins_find (const char *name); | 70 | GST_plugins_find (const char *name); |
58 | 71 | ||
59 | 72 | ||
73 | /** | ||
74 | * Convert a given address to a human-readable format. Note that the | ||
75 | * return value will be overwritten on the next call to this function. | ||
76 | * | ||
77 | * @param name plugin name | ||
78 | * @param addr binary address in plugin-specific format | ||
79 | * @param addrlen number of bytes in 'addr' | ||
80 | * @return statically allocated (!) human-readable address | ||
81 | */ | ||
82 | const char * | ||
83 | GST_plugins_a2s (const char *name, | ||
84 | const void *addr, | ||
85 | size_t addrlen); | ||
86 | |||
60 | 87 | ||
61 | #endif | 88 | #endif |
62 | /* end of file gnunet-service-transport_plugins.h */ | 89 | /* end of file gnunet-service-transport_plugins.h */ |