aboutsummaryrefslogtreecommitdiff
path: root/src/dv
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/dv
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/dv')
-rw-r--r--src/dv/plugin_transport_dv.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c
index 7d5da645e..a1565f09a 100644
--- a/src/dv/plugin_transport_dv.c
+++ b/src/dv/plugin_transport_dv.c
@@ -860,6 +860,21 @@ dv_get_network (void *cls,
860 860
861 861
862/** 862/**
863 * Function obtain the network type for an address.
864 *
865 * @param cls closure (`struct Plugin *`)
866 * @param address the address
867 * @return the network type
868 */
869static enum GNUNET_ATS_Network_Type
870dv_plugin_get_network_for_address (void *cls,
871 const struct GNUNET_HELLO_Address *address)
872{
873 return GNUNET_ATS_NET_WAN; /* FOR NOW */
874}
875
876
877/**
863 * Function that is called to get the keepalive factor. 878 * Function that is called to get the keepalive factor.
864 * #GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to 879 * #GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to
865 * calculate the interval between keepalive packets. 880 * calculate the interval between keepalive packets.
@@ -975,6 +990,7 @@ libgnunet_plugin_transport_dv_init (void *cls)
975 api->query_keepalive_factor = &dv_plugin_query_keepalive_factor; 990 api->query_keepalive_factor = &dv_plugin_query_keepalive_factor;
976 api->get_session = &dv_get_session; 991 api->get_session = &dv_get_session;
977 api->get_network = &dv_get_network; 992 api->get_network = &dv_get_network;
993 api->get_network_for_address = &dv_get_network_for_address;
978 api->update_session_timeout = &dv_plugin_update_session_timeout; 994 api->update_session_timeout = &dv_plugin_update_session_timeout;
979 api->setup_monitor = &dv_plugin_setup_monitor; 995 api->setup_monitor = &dv_plugin_setup_monitor;
980 return api; 996 return api;