aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-07 14:15:38 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-07 14:15:38 +0000
commite5bd8fb4aa72717b8707a4652f14c0735acb52c4 (patch)
tree08398e22b9408cc24b6b9e6cb360fe04b9eeae05 /src/transport/plugin_transport_http_server.c
parent572bab1ace57fb9d7acbd218d6940cb1e9a0797b (diff)
downloadgnunet-e5bd8fb4aa72717b8707a4652f14c0735acb52c4.tar.gz
gnunet-e5bd8fb4aa72717b8707a4652f14c0735acb52c4.zip
determine network scope for ATS even if we do not yet have a session and only have an address
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 0000a604d..db483098a 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -3251,7 +3251,7 @@ http_server_plugin_address_to_string (void *cls,
3251/** 3251/**
3252 * Function obtain the network type for a session 3252 * Function obtain the network type for a session
3253 * 3253 *
3254 * @param cls closure ('struct HTTP_Server_Plugin*') 3254 * @param cls closure (`struct HTTP_Server_Plugin *`)
3255 * @param session the session 3255 * @param session the session
3256 * @return the network type in HBO or #GNUNET_SYSERR 3256 * @return the network type in HBO or #GNUNET_SYSERR
3257 */ 3257 */
@@ -3264,6 +3264,24 @@ http_server_plugin_get_network (void *cls,
3264 3264
3265 3265
3266/** 3266/**
3267 * Function obtain the network type for an address.
3268 *
3269 * @param cls closure (`struct Plugin *`)
3270 * @param address the address
3271 * @return the network type
3272 */
3273static enum GNUNET_ATS_Network_Type
3274http_server_plugin_get_network_for_address (void *cls,
3275 const struct GNUNET_HELLO_Address *address)
3276{
3277 struct HTTP_Server_Plugin *plugin = cls;
3278
3279 return http_common_get_network_for_address (plugin->env,
3280 address);
3281}
3282
3283
3284/**
3267 * Function that will be called whenever the transport service wants to 3285 * Function that will be called whenever the transport service wants to
3268 * notify the plugin that the inbound quota changed and that the plugin 3286 * notify the plugin that the inbound quota changed and that the plugin
3269 * should update it's delay for the next receive value 3287 * should update it's delay for the next receive value
@@ -3393,6 +3411,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
3393 api->string_to_address = &http_common_plugin_string_to_address; 3411 api->string_to_address = &http_common_plugin_string_to_address;
3394 api->address_pretty_printer = &http_common_plugin_address_pretty_printer; 3412 api->address_pretty_printer = &http_common_plugin_address_pretty_printer;
3395 api->get_network = &http_server_plugin_get_network; 3413 api->get_network = &http_server_plugin_get_network;
3414 api->get_network_for_address = &http_server_plugin_get_network_for_address;
3396 api->update_session_timeout = &http_server_plugin_update_session_timeout; 3415 api->update_session_timeout = &http_server_plugin_update_session_timeout;
3397 api->update_inbound_delay = &http_server_plugin_update_inbound_delay; 3416 api->update_inbound_delay = &http_server_plugin_update_inbound_delay;
3398 api->setup_monitor = &http_server_plugin_setup_monitor; 3417 api->setup_monitor = &http_server_plugin_setup_monitor;