From e5bd8fb4aa72717b8707a4652f14c0735acb52c4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 7 Oct 2015 14:15:38 +0000 Subject: determine network scope for ATS even if we do not yet have a session and only have an address --- src/transport/plugin_transport_unix.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/transport/plugin_transport_unix.c') diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index a664941e0..c6ac0e508 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -804,6 +804,22 @@ unix_plugin_get_network (void *cls, } +/** + * Function obtain the network type for a session + * + * @param cls closure (`struct Plugin *`) + * @param address the address + * @return the network type + */ +static enum GNUNET_ATS_Network_Type +unix_plugin_get_network_for_address (void *cls, + const struct GNUNET_HELLO_Address *address) + +{ + return GNUNET_ATS_NET_LOOPBACK; +} + + /** * Creates a new outbound session the transport service will use to send data to the * peer @@ -1798,6 +1814,7 @@ libgnunet_plugin_transport_unix_init (void *cls) api->check_address = &unix_plugin_check_address; api->string_to_address = &unix_plugin_string_to_address; api->get_network = &unix_plugin_get_network; + api->get_network_for_address = &unix_plugin_get_network_for_address; api->update_session_timeout = &unix_plugin_update_session_timeout; api->setup_monitor = &unix_plugin_setup_monitor; sockets_created = unix_transport_server_start (plugin); -- cgit v1.2.3