diff options
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 52f454560..d5932bb30 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1292,6 +1292,25 @@ wlan_plugin_get_network (void *cls, | |||
1292 | 1292 | ||
1293 | 1293 | ||
1294 | /** | 1294 | /** |
1295 | * Function obtain the network type for an address. | ||
1296 | * | ||
1297 | * @param cls closure (`struct Plugin *`) | ||
1298 | * @param address the address | ||
1299 | * @return the network type | ||
1300 | */ | ||
1301 | static enum GNUNET_ATS_Network_Type | ||
1302 | wlan_plugin_get_network_for_address (void *cls, | ||
1303 | const struct GNUNET_HELLO_Address *address) | ||
1304 | { | ||
1305 | #if BUILD_WLAN | ||
1306 | return GNUNET_ATS_NET_WLAN; | ||
1307 | #else | ||
1308 | return GNUNET_ATS_NET_BT; | ||
1309 | #endif | ||
1310 | } | ||
1311 | |||
1312 | |||
1313 | /** | ||
1295 | * Creates a new outbound session the transport service will use to | 1314 | * Creates a new outbound session the transport service will use to |
1296 | * send data to the peer | 1315 | * send data to the peer |
1297 | * | 1316 | * |
@@ -2332,6 +2351,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) | |||
2332 | api->address_to_string = &wlan_plugin_address_to_string; | 2351 | api->address_to_string = &wlan_plugin_address_to_string; |
2333 | api->string_to_address = &wlan_plugin_string_to_address; | 2352 | api->string_to_address = &wlan_plugin_string_to_address; |
2334 | api->get_network = &wlan_plugin_get_network; | 2353 | api->get_network = &wlan_plugin_get_network; |
2354 | api->get_network_for_address = &wlan_plugin_get_network_for_address; | ||
2335 | api->update_session_timeout = &wlan_plugin_update_session_timeout; | 2355 | api->update_session_timeout = &wlan_plugin_update_session_timeout; |
2336 | api->update_inbound_delay = &wlan_plugin_update_inbound_delay; | 2356 | api->update_inbound_delay = &wlan_plugin_update_inbound_delay; |
2337 | api->setup_monitor = &wlan_plugin_setup_monitor; | 2357 | api->setup_monitor = &wlan_plugin_setup_monitor; |