aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-23 17:19:53 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-23 17:19:53 +0100
commit61787bfa37e0ac5998e01d9c4806600033c19c74 (patch)
tree1ceb843f63aa076682ebfa2de2250dc32ee65004 /src/transport
parent4a3be482811fe8ed1502fea2c12a8449b560a99e (diff)
downloadgnunet-61787bfa37e0ac5998e01d9c4806600033c19c74.tar.gz
gnunet-61787bfa37e0ac5998e01d9c4806600033c19c74.zip
rename fest: use new libgnunetnt instead of old libgnunetats logic for network type classification
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/Makefile.am1
-rw-r--r--src/transport/gnunet-communicator-unix.c4
-rw-r--r--src/transport/gnunet-service-tng.c12
-rw-r--r--src/transport/gnunet-service-transport.c10
-rw-r--r--src/transport/gnunet-service-transport.h2
-rw-r--r--src/transport/gnunet-service-transport_ats.c6
-rw-r--r--src/transport/gnunet-service-transport_plugins.c6
-rw-r--r--src/transport/gnunet-service-transport_validation.c8
-rw-r--r--src/transport/plugin_transport_http_client.c14
-rw-r--r--src/transport/plugin_transport_http_common.c6
-rw-r--r--src/transport/plugin_transport_http_common.h2
-rw-r--r--src/transport/plugin_transport_http_server.c8
-rw-r--r--src/transport/plugin_transport_tcp.c16
-rw-r--r--src/transport/plugin_transport_template.c8
-rw-r--r--src/transport/plugin_transport_udp.c30
-rw-r--r--src/transport/plugin_transport_udp.h2
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c8
-rw-r--r--src/transport/plugin_transport_unix.c10
-rw-r--r--src/transport/plugin_transport_wlan.c16
-rw-r--r--src/transport/plugin_transport_xt.c16
-rw-r--r--src/transport/plugin_transport_xu.c26
-rw-r--r--src/transport/test_plugin_transport.c4
-rw-r--r--src/transport/test_quota_compliance.c6
-rw-r--r--src/transport/transport.h6
-rw-r--r--src/transport/transport_api2_communication.c8
-rw-r--r--src/transport/transport_api2_monitor.c2
26 files changed, 119 insertions, 118 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 0693a0b9f..73296abf9 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -314,6 +314,7 @@ gnunet_service_transport_LDADD = \
314 libgnunettransport.la \ 314 libgnunettransport.la \
315 $(top_builddir)/src/ats/libgnunetats.la \ 315 $(top_builddir)/src/ats/libgnunetats.la \
316 $(top_builddir)/src/hello/libgnunethello.la \ 316 $(top_builddir)/src/hello/libgnunethello.la \
317 $(top_builddir)/src/nt/libgnunetnt.la \
317 $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ 318 $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
318 $(top_builddir)/src/statistics/libgnunetstatistics.la \ 319 $(top_builddir)/src/statistics/libgnunetstatistics.la \
319 $(top_builddir)/src/util/libgnunetutil.la \ 320 $(top_builddir)/src/util/libgnunetutil.la \
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c
index a97560ad4..0df3fd45d 100644
--- a/src/transport/gnunet-communicator-unix.c
+++ b/src/transport/gnunet-communicator-unix.c
@@ -680,7 +680,7 @@ setup_queue (const struct GNUNET_PeerIdentity *target,
680 &queue->target, 680 &queue->target,
681 foreign_addr, 681 foreign_addr,
682 UNIX_MTU, 682 UNIX_MTU,
683 GNUNET_ATS_NET_LOOPBACK, 683 GNUNET_NT_LOOPBACK,
684 0 /* distance */, 684 0 /* distance */,
685 cs, 685 cs,
686 queue->mq); 686 queue->mq);
@@ -1100,7 +1100,7 @@ run (void *cls,
1100 GNUNET_free (unix_socket_path); 1100 GNUNET_free (unix_socket_path);
1101 ai = GNUNET_TRANSPORT_communicator_address_add (ch, 1101 ai = GNUNET_TRANSPORT_communicator_address_add (ch,
1102 my_addr, 1102 my_addr,
1103 GNUNET_ATS_NET_LOOPBACK, 1103 GNUNET_NT_LOOPBACK,
1104 GNUNET_TIME_UNIT_FOREVER_REL); 1104 GNUNET_TIME_UNIT_FOREVER_REL);
1105 GNUNET_free (my_addr); 1105 GNUNET_free (my_addr);
1106} 1106}
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 3e08900bb..b184a0600 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -162,7 +162,7 @@ struct Queue
162 /** 162 /**
163 * Network type offered by this queue. 163 * Network type offered by this queue.
164 */ 164 */
165 enum GNUNET_ATS_Network_Type nt; 165 enum GNUNET_NetworkType nt;
166 166
167 /** 167 /**
168 * Connection status for this queue. 168 * Connection status for this queue.
@@ -322,7 +322,7 @@ struct AddressListEntry
322 /** 322 /**
323 * Network type offered by this address. 323 * Network type offered by this address.
324 */ 324 */
325 enum GNUNET_ATS_Network_Type nt; 325 enum GNUNET_NetworkType nt;
326 326
327}; 327};
328 328
@@ -549,7 +549,7 @@ static void
549notify_monitor (struct TransportClient *tc, 549notify_monitor (struct TransportClient *tc,
550 const struct GNUNET_PeerIdentity *peer, 550 const struct GNUNET_PeerIdentity *peer,
551 const char *address, 551 const char *address,
552 enum GNUNET_ATS_Network_Type nt, 552 enum GNUNET_NetworkType nt,
553 const struct MonitorEvent *me) 553 const struct MonitorEvent *me)
554{ 554{
555 struct GNUNET_MQ_Envelope *env; 555 struct GNUNET_MQ_Envelope *env;
@@ -588,7 +588,7 @@ notify_monitor (struct TransportClient *tc,
588static void 588static void
589notify_monitors (const struct GNUNET_PeerIdentity *peer, 589notify_monitors (const struct GNUNET_PeerIdentity *peer,
590 const char *address, 590 const char *address,
591 enum GNUNET_ATS_Network_Type nt, 591 enum GNUNET_NetworkType nt,
592 const struct MonitorEvent *me) 592 const struct MonitorEvent *me)
593{ 593{
594 static struct GNUNET_PeerIdentity zero; 594 static struct GNUNET_PeerIdentity zero;
@@ -1255,7 +1255,7 @@ handle_add_address (void *cls,
1255 ale->address = (const char *) &ale[1]; 1255 ale->address = (const char *) &ale[1];
1256 ale->expiration = GNUNET_TIME_relative_ntoh (aam->expiration); 1256 ale->expiration = GNUNET_TIME_relative_ntoh (aam->expiration);
1257 ale->aid = aam->aid; 1257 ale->aid = aam->aid;
1258 ale->nt = (enum GNUNET_ATS_Network_Type) ntohl (aam->nt); 1258 ale->nt = (enum GNUNET_NetworkType) ntohl (aam->nt);
1259 memcpy (&ale[1], 1259 memcpy (&ale[1],
1260 &aam[1], 1260 &aam[1],
1261 slen); 1261 slen);
@@ -1427,7 +1427,7 @@ handle_add_queue_message (void *cls,
1427 queue->qid = aqm->qid; 1427 queue->qid = aqm->qid;
1428 queue->mtu = ntohl (aqm->mtu); 1428 queue->mtu = ntohl (aqm->mtu);
1429 queue->distance = ntohl (aqm->distance); 1429 queue->distance = ntohl (aqm->distance);
1430 queue->nt = (enum GNUNET_ATS_Network_Type) ntohl (aqm->nt); 1430 queue->nt = (enum GNUNET_NetworkType) ntohl (aqm->nt);
1431 queue->cs = (enum GNUNET_TRANSPORT_ConnectionStatus) ntohl (aqm->cs); 1431 queue->cs = (enum GNUNET_TRANSPORT_ConnectionStatus) ntohl (aqm->cs);
1432 queue->neighbour = neighbour; 1432 queue->neighbour = neighbour;
1433 memcpy (&queue[1], 1433 memcpy (&queue[1],
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 2d9803651..2c1ee12fe 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -415,7 +415,7 @@ static struct GNUNET_ATS_SessionKiller *sk_tail;
415/** 415/**
416 * Interface scanner determines our LAN address range(s). 416 * Interface scanner determines our LAN address range(s).
417 */ 417 */
418struct GNUNET_ATS_InterfaceScanner *GST_is; 418struct GNUNET_NT_InterfaceScanner *GST_is;
419 419
420 420
421/** 421/**
@@ -1975,7 +1975,7 @@ static void
1975plugin_env_session_start (void *cls, 1975plugin_env_session_start (void *cls,
1976 const struct GNUNET_HELLO_Address *address, 1976 const struct GNUNET_HELLO_Address *address,
1977 struct GNUNET_ATS_Session *session, 1977 struct GNUNET_ATS_Session *session,
1978 enum GNUNET_ATS_Network_Type scope) 1978 enum GNUNET_NetworkType scope)
1979{ 1979{
1980 struct GNUNET_ATS_Properties prop; 1980 struct GNUNET_ATS_Properties prop;
1981 1981
@@ -2005,7 +2005,7 @@ plugin_env_session_start (void *cls,
2005 memset (&prop, 2005 memset (&prop,
2006 0, 2006 0,
2007 sizeof (prop)); 2007 sizeof (prop));
2008 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != scope); 2008 GNUNET_break (GNUNET_NT_UNSPECIFIED != scope);
2009 prop.scope = scope; 2009 prop.scope = scope;
2010 GST_ats_add_inbound_address (address, 2010 GST_ats_add_inbound_address (address,
2011 session, 2011 session,
@@ -2261,7 +2261,7 @@ shutdown_task (void *cls)
2261 GST_ats = NULL; 2261 GST_ats = NULL;
2262 GNUNET_ATS_connectivity_done (GST_ats_connect); 2262 GNUNET_ATS_connectivity_done (GST_ats_connect);
2263 GST_ats_connect = NULL; 2263 GST_ats_connect = NULL;
2264 GNUNET_ATS_scanner_done (GST_is); 2264 GNUNET_NT_scanner_done (GST_is);
2265 GST_is = NULL; 2265 GST_is = NULL;
2266 while (NULL != (cur = a2s_head)) 2266 while (NULL != (cur = a2s_head))
2267 { 2267 {
@@ -2859,7 +2859,7 @@ run (void *cls,
2859 /* start subsystems */ 2859 /* start subsystems */
2860 read_blacklist_configuration (GST_cfg, 2860 read_blacklist_configuration (GST_cfg,
2861 &GST_my_identity); 2861 &GST_my_identity);
2862 GST_is = GNUNET_ATS_scanner_init (); 2862 GST_is = GNUNET_NT_scanner_init ();
2863 GST_ats_connect = GNUNET_ATS_connectivity_init (GST_cfg); 2863 GST_ats_connect = GNUNET_ATS_connectivity_init (GST_cfg);
2864 GST_ats = GNUNET_ATS_scheduling_init (GST_cfg, 2864 GST_ats = GNUNET_ATS_scheduling_init (GST_cfg,
2865 &ats_request_address_change, 2865 &ats_request_address_change,
diff --git a/src/transport/gnunet-service-transport.h b/src/transport/gnunet-service-transport.h
index fd852f027..253b785e3 100644
--- a/src/transport/gnunet-service-transport.h
+++ b/src/transport/gnunet-service-transport.h
@@ -69,7 +69,7 @@ extern struct GNUNET_ATS_ConnectivityHandle *GST_ats_connect;
69/** 69/**
70 * Interface scanner determines our LAN address range(s). 70 * Interface scanner determines our LAN address range(s).
71 */ 71 */
72extern struct GNUNET_ATS_InterfaceScanner *GST_is; 72extern struct GNUNET_NT_InterfaceScanner *GST_is;
73 73
74 74
75/** 75/**
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c
index 8b3b998c8..358ed95c3 100644
--- a/src/transport/gnunet-service-transport_ats.c
+++ b/src/transport/gnunet-service-transport_ats.c
@@ -442,7 +442,7 @@ GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address,
442 GNUNET_break(0); 442 GNUNET_break(0);
443 return; 443 return;
444 } 444 }
445 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope); 445 GNUNET_break (GNUNET_NT_UNSPECIFIED != prop->scope);
446 GNUNET_assert (GNUNET_YES == 446 GNUNET_assert (GNUNET_YES ==
447 GNUNET_HELLO_address_check_option (address, 447 GNUNET_HELLO_address_check_option (address,
448 GNUNET_HELLO_ADDRESS_INFO_INBOUND)); 448 GNUNET_HELLO_ADDRESS_INFO_INBOUND));
@@ -461,7 +461,7 @@ GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address,
461 GNUNET_i2s (&address->peer), 461 GNUNET_i2s (&address->peer),
462 GST_plugins_a2s (address), 462 GST_plugins_a2s (address),
463 session, 463 session,
464 GNUNET_ATS_print_network_type (prop->scope)); 464 GNUNET_NT_to_string (prop->scope));
465 ar = GNUNET_ATS_address_add (GST_ats, 465 ar = GNUNET_ATS_address_add (GST_ats,
466 address, 466 address,
467 session, 467 session,
@@ -510,7 +510,7 @@ GST_ats_add_address (const struct GNUNET_HELLO_Address *address,
510 GNUNET_HELLO_ADDRESS_INFO_INBOUND)); 510 GNUNET_HELLO_ADDRESS_INFO_INBOUND));
511 ai = find_ai_no_session (address); 511 ai = find_ai_no_session (address);
512 GNUNET_assert (NULL == ai); 512 GNUNET_assert (NULL == ai);
513 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope); 513 GNUNET_break (GNUNET_NT_UNSPECIFIED != prop->scope);
514 514
515 /* address seems sane, let's tell ATS */ 515 /* address seems sane, let's tell ATS */
516 LOG (GNUNET_ERROR_TYPE_INFO, 516 LOG (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c
index 9c3044450..6ea59e29c 100644
--- a/src/transport/gnunet-service-transport_plugins.c
+++ b/src/transport/gnunet-service-transport_plugins.c
@@ -104,7 +104,7 @@ plugin_env_update_distance (void *cls,
104 * @param addrlen length of the @a addr 104 * @param addrlen length of the @a addr
105 * @return type of the network @a addr belongs to 105 * @return type of the network @a addr belongs to
106 */ 106 */
107static enum GNUNET_ATS_Network_Type 107static enum GNUNET_NetworkType
108plugin_env_address_to_type (void *cls, 108plugin_env_address_to_type (void *cls,
109 const struct sockaddr *addr, 109 const struct sockaddr *addr,
110 size_t addrlen) 110 size_t addrlen)
@@ -112,9 +112,9 @@ plugin_env_address_to_type (void *cls,
112 if (NULL == GST_is) 112 if (NULL == GST_is)
113 { 113 {
114 GNUNET_break(0); 114 GNUNET_break(0);
115 return GNUNET_ATS_NET_UNSPECIFIED; 115 return GNUNET_NT_UNSPECIFIED;
116 } 116 }
117 return GNUNET_ATS_scanner_address_get_type (GST_is, 117 return GNUNET_NT_scanner_get_type (GST_is,
118 addr, 118 addr,
119 addrlen); 119 addrlen);
120} 120}
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index eecc54efa..fc02da5b4 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -317,7 +317,7 @@ struct ValidationEntry
317 /** 317 /**
318 * Which network type does our address belong to? 318 * Which network type does our address belong to?
319 */ 319 */
320 enum GNUNET_ATS_Network_Type network; 320 enum GNUNET_NetworkType network;
321}; 321};
322 322
323 323
@@ -654,7 +654,7 @@ transmit_ping_if_allowed (void *cls,
654 ve->address->transport_name); 654 ve->address->transport_name);
655 ve->network = papi->get_network (papi->cls, 655 ve->network = papi->get_network (papi->cls,
656 session); 656 session);
657 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != ve->network); 657 GNUNET_break (GNUNET_NT_UNSPECIFIED != ve->network);
658 GST_neighbours_notify_data_sent (ve->address, 658 GST_neighbours_notify_data_sent (ve->address,
659 session, 659 session,
660 tsize); 660 tsize);
@@ -905,7 +905,7 @@ add_valid_address (void *cls,
905 ve = find_validation_entry (address); 905 ve = find_validation_entry (address);
906 ve->network = papi->get_network_for_address (papi->cls, 906 ve->network = papi->get_network_for_address (papi->cls,
907 address); 907 address);
908 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != ve->network); 908 GNUNET_break (GNUNET_NT_UNSPECIFIED != ve->network);
909 ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until, 909 ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until,
910 expiration); 910 expiration);
911 if (NULL == ve->revalidation_task) 911 if (NULL == ve->revalidation_task)
@@ -1589,7 +1589,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
1589 struct GNUNET_ATS_Properties prop; 1589 struct GNUNET_ATS_Properties prop;
1590 1590
1591 memset (&prop, 0, sizeof (prop)); 1591 memset (&prop, 0, sizeof (prop));
1592 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != ve->network); 1592 GNUNET_break (GNUNET_NT_UNSPECIFIED != ve->network);
1593 prop.scope = ve->network; 1593 prop.scope = ve->network;
1594 prop.delay = GNUNET_TIME_relative_divide (ve->latency, 2); 1594 prop.delay = GNUNET_TIME_relative_divide (ve->latency, 2);
1595 GNUNET_assert (GNUNET_NO == 1595 GNUNET_assert (GNUNET_NO ==
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 0afb54943..e88e2c69f 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -266,7 +266,7 @@ struct GNUNET_ATS_Session
266 /** 266 /**
267 * ATS network type. 267 * ATS network type.
268 */ 268 */
269 enum GNUNET_ATS_Network_Type scope; 269 enum GNUNET_NetworkType scope;
270}; 270};
271 271
272 272
@@ -1920,7 +1920,7 @@ client_connect (struct GNUNET_ATS_Session *s)
1920 * @param session the session 1920 * @param session the session
1921 * @return the network type 1921 * @return the network type
1922 */ 1922 */
1923static enum GNUNET_ATS_Network_Type 1923static enum GNUNET_NetworkType
1924http_client_plugin_get_network (void *cls, 1924http_client_plugin_get_network (void *cls,
1925 struct GNUNET_ATS_Session *session) 1925 struct GNUNET_ATS_Session *session)
1926{ 1926{
@@ -1935,7 +1935,7 @@ http_client_plugin_get_network (void *cls,
1935 * @param address the address 1935 * @param address the address
1936 * @return the network type 1936 * @return the network type
1937 */ 1937 */
1938static enum GNUNET_ATS_Network_Type 1938static enum GNUNET_NetworkType
1939http_client_plugin_get_network_for_address (void *cls, 1939http_client_plugin_get_network_for_address (void *cls,
1940 const struct GNUNET_HELLO_Address *address) 1940 const struct GNUNET_HELLO_Address *address)
1941{ 1941{
@@ -1997,7 +1997,7 @@ http_client_plugin_get_session (void *cls,
1997 struct HTTP_Client_Plugin *plugin = cls; 1997 struct HTTP_Client_Plugin *plugin = cls;
1998 struct GNUNET_ATS_Session *s; 1998 struct GNUNET_ATS_Session *s;
1999 struct sockaddr *sa; 1999 struct sockaddr *sa;
2000 enum GNUNET_ATS_Network_Type net_type; 2000 enum GNUNET_NetworkType net_type;
2001 size_t salen = 0; 2001 size_t salen = 0;
2002 int res; 2002 int res;
2003 2003
@@ -2020,7 +2020,7 @@ http_client_plugin_get_session (void *cls,
2020 } 2020 }
2021 2021
2022 /* Determine network location */ 2022 /* Determine network location */
2023 net_type = GNUNET_ATS_NET_UNSPECIFIED; 2023 net_type = GNUNET_NT_UNSPECIFIED;
2024 sa = http_common_socket_from_address (address->address, 2024 sa = http_common_socket_from_address (address->address,
2025 address->address_length, 2025 address->address_length,
2026 &res); 2026 &res);
@@ -2043,9 +2043,9 @@ http_client_plugin_get_session (void *cls,
2043 else if (GNUNET_NO == res) 2043 else if (GNUNET_NO == res)
2044 { 2044 {
2045 /* Cannot convert to sockaddr -> is external hostname */ 2045 /* Cannot convert to sockaddr -> is external hostname */
2046 net_type = GNUNET_ATS_NET_WAN; 2046 net_type = GNUNET_NT_WAN;
2047 } 2047 }
2048 if (GNUNET_ATS_NET_UNSPECIFIED == net_type) 2048 if (GNUNET_NT_UNSPECIFIED == net_type)
2049 { 2049 {
2050 GNUNET_break (0); 2050 GNUNET_break (0);
2051 return NULL; 2051 return NULL;
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index e9576d72b..3f0452d0b 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -896,17 +896,17 @@ http_common_cmp_addresses (const void *addr1,
896 * @param address the address 896 * @param address the address
897 * @return the network type 897 * @return the network type
898 */ 898 */
899enum GNUNET_ATS_Network_Type 899enum GNUNET_NetworkType
900http_common_get_network_for_address (struct GNUNET_TRANSPORT_PluginEnvironment *env, 900http_common_get_network_for_address (struct GNUNET_TRANSPORT_PluginEnvironment *env,
901 const struct GNUNET_HELLO_Address *address) 901 const struct GNUNET_HELLO_Address *address)
902{ 902{
903 903
904 struct sockaddr *sa; 904 struct sockaddr *sa;
905 enum GNUNET_ATS_Network_Type net_type; 905 enum GNUNET_NetworkType net_type;
906 size_t salen = 0; 906 size_t salen = 0;
907 int res; 907 int res;
908 908
909 net_type = GNUNET_ATS_NET_UNSPECIFIED; 909 net_type = GNUNET_NT_UNSPECIFIED;
910 sa = http_common_socket_from_address (address->address, 910 sa = http_common_socket_from_address (address->address,
911 address->address_length, 911 address->address_length,
912 &res); 912 &res);
diff --git a/src/transport/plugin_transport_http_common.h b/src/transport/plugin_transport_http_common.h
index ac62f6ee4..f758015e1 100644
--- a/src/transport/plugin_transport_http_common.h
+++ b/src/transport/plugin_transport_http_common.h
@@ -253,7 +253,7 @@ http_common_cmp_addresses (const void *addr1,
253 * @param address the address 253 * @param address the address
254 * @return the network type 254 * @return the network type
255 */ 255 */
256enum GNUNET_ATS_Network_Type 256enum GNUNET_NetworkType
257http_common_get_network_for_address (struct GNUNET_TRANSPORT_PluginEnvironment *env, 257http_common_get_network_for_address (struct GNUNET_TRANSPORT_PluginEnvironment *env,
258 const struct GNUNET_HELLO_Address *address); 258 const struct GNUNET_HELLO_Address *address);
259 259
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index abf60280a..8c657503a 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -260,7 +260,7 @@ struct GNUNET_ATS_Session
260 /** 260 /**
261 * ATS network type. 261 * ATS network type.
262 */ 262 */
263 enum GNUNET_ATS_Network_Type scope; 263 enum GNUNET_NetworkType scope;
264 264
265 /** 265 /**
266 * #GNUNET_YES if this session is known to the service. 266 * #GNUNET_YES if this session is known to the service.
@@ -1382,7 +1382,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1382 uint32_t options; 1382 uint32_t options;
1383 int direction = GNUNET_SYSERR; 1383 int direction = GNUNET_SYSERR;
1384 unsigned int to; 1384 unsigned int to;
1385 enum GNUNET_ATS_Network_Type scope; 1385 enum GNUNET_NetworkType scope;
1386 1386
1387 conn_info = MHD_get_connection_info (mhd_connection, 1387 conn_info = MHD_get_connection_info (mhd_connection,
1388 MHD_CONNECTION_INFO_CLIENT_ADDRESS); 1388 MHD_CONNECTION_INFO_CLIENT_ADDRESS);
@@ -3344,7 +3344,7 @@ http_server_plugin_address_to_string (void *cls,
3344 * @param session the session 3344 * @param session the session
3345 * @return the network type in HBO or #GNUNET_SYSERR 3345 * @return the network type in HBO or #GNUNET_SYSERR
3346 */ 3346 */
3347static enum GNUNET_ATS_Network_Type 3347static enum GNUNET_NetworkType
3348http_server_plugin_get_network (void *cls, 3348http_server_plugin_get_network (void *cls,
3349 struct GNUNET_ATS_Session *session) 3349 struct GNUNET_ATS_Session *session)
3350{ 3350{
@@ -3359,7 +3359,7 @@ http_server_plugin_get_network (void *cls,
3359 * @param address the address 3359 * @param address the address
3360 * @return the network type 3360 * @return the network type
3361 */ 3361 */
3362static enum GNUNET_ATS_Network_Type 3362static enum GNUNET_NetworkType
3363http_server_plugin_get_network_for_address (void *cls, 3363http_server_plugin_get_network_for_address (void *cls,
3364 const struct GNUNET_HELLO_Address *address) 3364 const struct GNUNET_HELLO_Address *address)
3365{ 3365{
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 75a885535..c056946b6 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -859,7 +859,7 @@ struct GNUNET_ATS_Session
859 /** 859 /**
860 * Network type of the address. 860 * Network type of the address.
861 */ 861 */
862 enum GNUNET_ATS_Network_Type scope; 862 enum GNUNET_NetworkType scope;
863 863
864 /** 864 /**
865 * Are we still expecting the welcome message? (#GNUNET_YES/#GNUNET_NO) 865 * Are we still expecting the welcome message? (#GNUNET_YES/#GNUNET_NO)
@@ -1890,7 +1890,7 @@ reschedule_session_timeout (struct GNUNET_ATS_Session *s)
1890static struct GNUNET_ATS_Session * 1890static struct GNUNET_ATS_Session *
1891create_session (struct Plugin *plugin, 1891create_session (struct Plugin *plugin,
1892 const struct GNUNET_HELLO_Address *address, 1892 const struct GNUNET_HELLO_Address *address,
1893 enum GNUNET_ATS_Network_Type scope, 1893 enum GNUNET_NetworkType scope,
1894 struct GNUNET_SERVER_Client *client, 1894 struct GNUNET_SERVER_Client *client,
1895 int is_nat) 1895 int is_nat)
1896{ 1896{
@@ -2436,7 +2436,7 @@ tcp_plugin_get_session (void *cls,
2436 const struct IPv4TcpAddress *t4; 2436 const struct IPv4TcpAddress *t4;
2437 const struct IPv6TcpAddress *t6; 2437 const struct IPv6TcpAddress *t6;
2438 unsigned int options; 2438 unsigned int options;
2439 enum GNUNET_ATS_Network_Type net_type; 2439 enum GNUNET_NetworkType net_type;
2440 unsigned int is_natd = GNUNET_NO; 2440 unsigned int is_natd = GNUNET_NO;
2441 size_t addrlen; 2441 size_t addrlen;
2442#ifdef TCP_STEALTH 2442#ifdef TCP_STEALTH
@@ -2539,7 +2539,7 @@ tcp_plugin_get_session (void *cls,
2539 net_type = plugin->env->get_address_type (plugin->env->cls, 2539 net_type = plugin->env->get_address_type (plugin->env->cls,
2540 sb, 2540 sb,
2541 sbs); 2541 sbs);
2542 GNUNET_break (net_type != GNUNET_ATS_NET_UNSPECIFIED); 2542 GNUNET_break (net_type != GNUNET_NT_UNSPECIFIED);
2543 2543
2544 if ( (is_natd == GNUNET_YES) && 2544 if ( (is_natd == GNUNET_YES) &&
2545 (addrlen == sizeof(struct IPv6TcpAddress)) ) 2545 (addrlen == sizeof(struct IPv6TcpAddress)) )
@@ -3263,7 +3263,7 @@ handle_tcp_welcome (void *cls,
3263 alen), 3263 alen),
3264 client, 3264 client,
3265 GNUNET_NO); 3265 GNUNET_NO);
3266 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != session->scope); 3266 GNUNET_break (GNUNET_NT_UNSPECIFIED != session->scope);
3267 GNUNET_HELLO_address_free (address); 3267 GNUNET_HELLO_address_free (address);
3268 LOG (GNUNET_ERROR_TYPE_DEBUG, 3268 LOG (GNUNET_ERROR_TYPE_DEBUG,
3269 "Creating new%s session %p for peer `%s' client %p\n", 3269 "Creating new%s session %p for peer `%s' client %p\n",
@@ -3623,7 +3623,7 @@ try_connection_reversal (void *cls,
3623 * @param session the session 3623 * @param session the session
3624 * @return the network type in HBO or #GNUNET_SYSERR 3624 * @return the network type in HBO or #GNUNET_SYSERR
3625 */ 3625 */
3626static enum GNUNET_ATS_Network_Type 3626static enum GNUNET_NetworkType
3627tcp_plugin_get_network (void *cls, 3627tcp_plugin_get_network (void *cls,
3628 struct GNUNET_ATS_Session *session) 3628 struct GNUNET_ATS_Session *session)
3629{ 3629{
@@ -3638,7 +3638,7 @@ tcp_plugin_get_network (void *cls,
3638 * @param address the address 3638 * @param address the address
3639 * @return the network type 3639 * @return the network type
3640 */ 3640 */
3641static enum GNUNET_ATS_Network_Type 3641static enum GNUNET_NetworkType
3642tcp_plugin_get_network_for_address (void *cls, 3642tcp_plugin_get_network_for_address (void *cls,
3643 const struct GNUNET_HELLO_Address *address) 3643 const struct GNUNET_HELLO_Address *address)
3644{ 3644{
@@ -3683,7 +3683,7 @@ tcp_plugin_get_network_for_address (void *cls,
3683 else 3683 else
3684 { 3684 {
3685 GNUNET_break (0); 3685 GNUNET_break (0);
3686 return GNUNET_ATS_NET_UNSPECIFIED; 3686 return GNUNET_NT_UNSPECIFIED;
3687 } 3687 }
3688 return plugin->env->get_address_type (plugin->env->cls, 3688 return plugin->env->get_address_type (plugin->env->cls,
3689 sb, 3689 sb,
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index 679d83daa..be2dfb1c8 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -284,12 +284,12 @@ template_plugin_query_keepalive_factor (void *cls)
284 * @param session the session 284 * @param session the session
285 * @return the network type in HBO or #GNUNET_SYSERR 285 * @return the network type in HBO or #GNUNET_SYSERR
286 */ 286 */
287static enum GNUNET_ATS_Network_Type 287static enum GNUNET_NetworkType
288template_plugin_get_network (void *cls, 288template_plugin_get_network (void *cls,
289 struct GNUNET_ATS_Session *session) 289 struct GNUNET_ATS_Session *session)
290{ 290{
291 GNUNET_assert (NULL != session); 291 GNUNET_assert (NULL != session);
292 return GNUNET_ATS_NET_UNSPECIFIED; /* Change to correct network type */ 292 return GNUNET_NT_UNSPECIFIED; /* Change to correct network type */
293} 293}
294 294
295 295
@@ -300,11 +300,11 @@ template_plugin_get_network (void *cls,
300 * @param address the address 300 * @param address the address
301 * @return the network type 301 * @return the network type
302 */ 302 */
303static enum GNUNET_ATS_Network_Type 303static enum GNUNET_NetworkType
304template_plugin_get_network_for_address (void *cls, 304template_plugin_get_network_for_address (void *cls,
305 const struct GNUNET_HELLO_Address *address) 305 const struct GNUNET_HELLO_Address *address)
306{ 306{
307 return GNUNET_ATS_NET_WAN; /* FOR NOW */ 307 return GNUNET_NT_WAN; /* FOR NOW */
308} 308}
309 309
310 310
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index abbcca2ae..9fed9b429 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -234,7 +234,7 @@ struct GNUNET_ATS_Session
234 /** 234 /**
235 * Network type of the address. 235 * Network type of the address.
236 */ 236 */
237 enum GNUNET_ATS_Network_Type scope; 237 enum GNUNET_NetworkType scope;
238 238
239 /** 239 /**
240 * Is this session about to be destroyed (sometimes we cannot 240 * Is this session about to be destroyed (sometimes we cannot
@@ -290,7 +290,7 @@ struct DefragContext
290 /** 290 /**
291 * Network type the address belongs to. 291 * Network type the address belongs to.
292 */ 292 */
293 enum GNUNET_ATS_Network_Type network_type; 293 enum GNUNET_NetworkType network_type;
294 294
295 /** 295 /**
296 * Has the @e sender field been initialized yet? 296 * Has the @e sender field been initialized yet?
@@ -660,7 +660,7 @@ udp_query_keepalive_factor (void *cls)
660 * @param session the session 660 * @param session the session
661 * @return the network type 661 * @return the network type
662 */ 662 */
663static enum GNUNET_ATS_Network_Type 663static enum GNUNET_NetworkType
664udp_plugin_get_network (void *cls, 664udp_plugin_get_network (void *cls,
665 struct GNUNET_ATS_Session *session) 665 struct GNUNET_ATS_Session *session)
666{ 666{
@@ -675,7 +675,7 @@ udp_plugin_get_network (void *cls,
675 * @param address the address 675 * @param address the address
676 * @return the network type 676 * @return the network type
677 */ 677 */
678static enum GNUNET_ATS_Network_Type 678static enum GNUNET_NetworkType
679udp_plugin_get_network_for_address (void *cls, 679udp_plugin_get_network_for_address (void *cls,
680 const struct GNUNET_HELLO_Address *address) 680 const struct GNUNET_HELLO_Address *address)
681{ 681{
@@ -720,7 +720,7 @@ udp_plugin_get_network_for_address (void *cls,
720 else 720 else
721 { 721 {
722 GNUNET_break (0); 722 GNUNET_break (0);
723 return GNUNET_ATS_NET_UNSPECIFIED; 723 return GNUNET_NT_UNSPECIFIED;
724 } 724 }
725 return plugin->env->get_address_type (plugin->env->cls, 725 return plugin->env->get_address_type (plugin->env->cls,
726 sb, 726 sb,
@@ -2627,7 +2627,7 @@ session_timeout (void *cls)
2627static struct GNUNET_ATS_Session * 2627static struct GNUNET_ATS_Session *
2628udp_plugin_create_session (void *cls, 2628udp_plugin_create_session (void *cls,
2629 const struct GNUNET_HELLO_Address *address, 2629 const struct GNUNET_HELLO_Address *address,
2630 enum GNUNET_ATS_Network_Type network_type) 2630 enum GNUNET_NetworkType network_type)
2631{ 2631{
2632 struct Plugin *plugin = cls; 2632 struct Plugin *plugin = cls;
2633 struct GNUNET_ATS_Session *s; 2633 struct GNUNET_ATS_Session *s;
@@ -2687,7 +2687,7 @@ udp_plugin_get_session (void *cls,
2687{ 2687{
2688 struct Plugin *plugin = cls; 2688 struct Plugin *plugin = cls;
2689 struct GNUNET_ATS_Session *s; 2689 struct GNUNET_ATS_Session *s;
2690 enum GNUNET_ATS_Network_Type network_type = GNUNET_ATS_NET_UNSPECIFIED; 2690 enum GNUNET_NetworkType network_type = GNUNET_NT_UNSPECIFIED;
2691 const struct IPv4UdpAddress *udp_v4; 2691 const struct IPv4UdpAddress *udp_v4;
2692 const struct IPv6UdpAddress *udp_v6; 2692 const struct IPv6UdpAddress *udp_v6;
2693 2693
@@ -2739,7 +2739,7 @@ udp_plugin_get_session (void *cls,
2739 (const struct sockaddr *) &v6, 2739 (const struct sockaddr *) &v6,
2740 sizeof (v6)); 2740 sizeof (v6));
2741 } 2741 }
2742 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network_type); 2742 GNUNET_break (GNUNET_NT_UNSPECIFIED != network_type);
2743 return udp_plugin_create_session (cls, 2743 return udp_plugin_create_session (cls,
2744 address, 2744 address,
2745 network_type); 2745 network_type);
@@ -2760,12 +2760,12 @@ process_udp_message (struct Plugin *plugin,
2760 const struct UDPMessage *msg, 2760 const struct UDPMessage *msg,
2761 const union UdpAddress *udp_addr, 2761 const union UdpAddress *udp_addr,
2762 size_t udp_addr_len, 2762 size_t udp_addr_len,
2763 enum GNUNET_ATS_Network_Type network_type) 2763 enum GNUNET_NetworkType network_type)
2764{ 2764{
2765 struct GNUNET_ATS_Session *s; 2765 struct GNUNET_ATS_Session *s;
2766 struct GNUNET_HELLO_Address *address; 2766 struct GNUNET_HELLO_Address *address;
2767 2767
2768 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network_type); 2768 GNUNET_break (GNUNET_NT_UNSPECIFIED != network_type);
2769 if (0 != ntohl (msg->reserved)) 2769 if (0 != ntohl (msg->reserved))
2770 { 2770 {
2771 GNUNET_break_op(0); 2771 GNUNET_break_op(0);
@@ -2992,7 +2992,7 @@ read_process_fragment (struct Plugin *plugin,
2992 const struct GNUNET_MessageHeader *msg, 2992 const struct GNUNET_MessageHeader *msg,
2993 const union UdpAddress *udp_addr, 2993 const union UdpAddress *udp_addr,
2994 size_t udp_addr_len, 2994 size_t udp_addr_len,
2995 enum GNUNET_ATS_Network_Type network_type) 2995 enum GNUNET_NetworkType network_type)
2996{ 2996{
2997 struct DefragContext *d_ctx; 2997 struct DefragContext *d_ctx;
2998 struct GNUNET_TIME_Absolute now; 2998 struct GNUNET_TIME_Absolute now;
@@ -3092,7 +3092,7 @@ udp_select_read (struct Plugin *plugin,
3092 const struct sockaddr_in6 *sa6; 3092 const struct sockaddr_in6 *sa6;
3093 const union UdpAddress *int_addr; 3093 const union UdpAddress *int_addr;
3094 size_t int_addr_len; 3094 size_t int_addr_len;
3095 enum GNUNET_ATS_Network_Type network_type; 3095 enum GNUNET_NetworkType network_type;
3096 3096
3097 fromlen = sizeof (addr); 3097 fromlen = sizeof (addr);
3098 memset (&addr, 3098 memset (&addr,
@@ -3345,13 +3345,13 @@ analyze_send_error (struct Plugin *plugin,
3345 socklen_t slen, 3345 socklen_t slen,
3346 int error) 3346 int error)
3347{ 3347{
3348 enum GNUNET_ATS_Network_Type type; 3348 enum GNUNET_NetworkType type;
3349 3349
3350 type = plugin->env->get_address_type (plugin->env->cls, 3350 type = plugin->env->get_address_type (plugin->env->cls,
3351 sa, 3351 sa,
3352 slen); 3352 slen);
3353 if ( ( (GNUNET_ATS_NET_LAN == type) || 3353 if ( ( (GNUNET_NT_LAN == type) ||
3354 (GNUNET_ATS_NET_WAN == type) ) && 3354 (GNUNET_NT_WAN == type) ) &&
3355 ( (ENETUNREACH == errno) || 3355 ( (ENETUNREACH == errno) ||
3356 (ENETDOWN == errno) ) ) 3356 (ENETDOWN == errno) ) )
3357 { 3357 {
diff --git a/src/transport/plugin_transport_udp.h b/src/transport/plugin_transport_udp.h
index 5a2fa6f05..7a6e09329 100644
--- a/src/transport/plugin_transport_udp.h
+++ b/src/transport/plugin_transport_udp.h
@@ -338,7 +338,7 @@ udp_broadcast_receive (struct Plugin *plugin,
338 ssize_t size, 338 ssize_t size,
339 const union UdpAddress *udp_addr, 339 const union UdpAddress *udp_addr,
340 size_t udp_addr_len, 340 size_t udp_addr_len,
341 enum GNUNET_ATS_Network_Type network_type); 341 enum GNUNET_NetworkType network_type);
342 342
343 343
344void 344void
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index bcb622a46..c802304aa 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -117,7 +117,7 @@ struct MstContext
117 /** 117 /**
118 * ATS network type. 118 * ATS network type.
119 */ 119 */
120 enum GNUNET_ATS_Network_Type ats_address_network_type; 120 enum GNUNET_NetworkType ats_address_network_type;
121}; 121};
122 122
123 123
@@ -186,7 +186,7 @@ udp_broadcast_receive (struct Plugin *plugin,
186 ssize_t size, 186 ssize_t size,
187 const union UdpAddress *udp_addr, 187 const union UdpAddress *udp_addr,
188 size_t udp_addr_len, 188 size_t udp_addr_len,
189 enum GNUNET_ATS_Network_Type network_type) 189 enum GNUNET_NetworkType network_type)
190{ 190{
191 struct GNUNET_MessageStreamTokenizer *broadcast_mst; 191 struct GNUNET_MessageStreamTokenizer *broadcast_mst;
192 struct MstContext mc; 192 struct MstContext mc;
@@ -410,7 +410,7 @@ iface_proc (void *cls,
410{ 410{
411 struct Plugin *plugin = cls; 411 struct Plugin *plugin = cls;
412 struct BroadcastAddress *ba; 412 struct BroadcastAddress *ba;
413 enum GNUNET_ATS_Network_Type network; 413 enum GNUNET_NetworkType network;
414 414
415 if (NULL == addr) 415 if (NULL == addr)
416 return GNUNET_OK; 416 return GNUNET_OK;
@@ -426,7 +426,7 @@ iface_proc (void *cls,
426 GNUNET_a2s (netmask, addrlen), name, netmask); 426 GNUNET_a2s (netmask, addrlen), name, netmask);
427 427
428 network = plugin->env->get_address_type (plugin->env->cls, broadcast_addr, addrlen); 428 network = plugin->env->get_address_type (plugin->env->cls, broadcast_addr, addrlen);
429 if (GNUNET_ATS_NET_LOOPBACK == network) 429 if (GNUNET_NT_LOOPBACK == network)
430 { 430 {
431 /* Broadcasting on loopback does not make sense */ 431 /* Broadcasting on loopback does not make sense */
432 return GNUNET_YES; 432 return GNUNET_YES;
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 3d177e703..19961d792 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -791,12 +791,12 @@ resend:
791 * @param session the session 791 * @param session the session
792 * @return the network type in HBO or #GNUNET_SYSERR 792 * @return the network type in HBO or #GNUNET_SYSERR
793 */ 793 */
794static enum GNUNET_ATS_Network_Type 794static enum GNUNET_NetworkType
795unix_plugin_get_network (void *cls, 795unix_plugin_get_network (void *cls,
796 struct GNUNET_ATS_Session *session) 796 struct GNUNET_ATS_Session *session)
797{ 797{
798 GNUNET_assert (NULL != session); 798 GNUNET_assert (NULL != session);
799 return GNUNET_ATS_NET_LOOPBACK; 799 return GNUNET_NT_LOOPBACK;
800} 800}
801 801
802 802
@@ -807,12 +807,12 @@ unix_plugin_get_network (void *cls,
807 * @param address the address 807 * @param address the address
808 * @return the network type 808 * @return the network type
809 */ 809 */
810static enum GNUNET_ATS_Network_Type 810static enum GNUNET_NetworkType
811unix_plugin_get_network_for_address (void *cls, 811unix_plugin_get_network_for_address (void *cls,
812 const struct GNUNET_HELLO_Address *address) 812 const struct GNUNET_HELLO_Address *address)
813 813
814{ 814{
815 return GNUNET_ATS_NET_LOOPBACK; 815 return GNUNET_NT_LOOPBACK;
816} 816}
817 817
818 818
@@ -982,7 +982,7 @@ unix_demultiplexer (struct Plugin *plugin,
982 plugin->env->session_start (NULL, 982 plugin->env->session_start (NULL,
983 session->address, 983 session->address,
984 session, 984 session,
985 GNUNET_ATS_NET_LOOPBACK); 985 GNUNET_NT_LOOPBACK);
986 } 986 }
987 else 987 else
988 { 988 {
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 13d2ca466..e34143c59 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -126,9 +126,9 @@ typedef int
126 * Which network scope do we belong to? 126 * Which network scope do we belong to?
127 */ 127 */
128#if BUILD_WLAN 128#if BUILD_WLAN
129static const enum GNUNET_ATS_Network_Type scope = GNUNET_ATS_NET_WLAN; 129static const enum GNUNET_NetworkType scope = GNUNET_NT_WLAN;
130#else 130#else
131static const enum GNUNET_ATS_Network_Type scope = GNUNET_ATS_NET_BT; 131static const enum GNUNET_NetworkType scope = GNUNET_NT_BT;
132#endif 132#endif
133 133
134 134
@@ -1297,14 +1297,14 @@ create_macendpoint (struct Plugin *plugin,
1297 * @param session the session 1297 * @param session the session
1298 * @return the network type in HBO or #GNUNET_SYSERR 1298 * @return the network type in HBO or #GNUNET_SYSERR
1299 */ 1299 */
1300static enum GNUNET_ATS_Network_Type 1300static enum GNUNET_NetworkType
1301wlan_plugin_get_network (void *cls, 1301wlan_plugin_get_network (void *cls,
1302 struct GNUNET_ATS_Session *session) 1302 struct GNUNET_ATS_Session *session)
1303{ 1303{
1304#if BUILD_WLAN 1304#if BUILD_WLAN
1305 return GNUNET_ATS_NET_WLAN; 1305 return GNUNET_NT_WLAN;
1306#else 1306#else
1307 return GNUNET_ATS_NET_BT; 1307 return GNUNET_NT_BT;
1308#endif 1308#endif
1309} 1309}
1310 1310
@@ -1316,14 +1316,14 @@ wlan_plugin_get_network (void *cls,
1316 * @param address the address 1316 * @param address the address
1317 * @return the network type 1317 * @return the network type
1318 */ 1318 */
1319static enum GNUNET_ATS_Network_Type 1319static enum GNUNET_NetworkType
1320wlan_plugin_get_network_for_address (void *cls, 1320wlan_plugin_get_network_for_address (void *cls,
1321 const struct GNUNET_HELLO_Address *address) 1321 const struct GNUNET_HELLO_Address *address)
1322{ 1322{
1323#if BUILD_WLAN 1323#if BUILD_WLAN
1324 return GNUNET_ATS_NET_WLAN; 1324 return GNUNET_NT_WLAN;
1325#else 1325#else
1326 return GNUNET_ATS_NET_BT; 1326 return GNUNET_NT_BT;
1327#endif 1327#endif
1328} 1328}
1329 1329
diff --git a/src/transport/plugin_transport_xt.c b/src/transport/plugin_transport_xt.c
index 0f517dd0c..08f59bd70 100644
--- a/src/transport/plugin_transport_xt.c
+++ b/src/transport/plugin_transport_xt.c
@@ -859,7 +859,7 @@ struct GNUNET_ATS_Session
859 /** 859 /**
860 * Network type of the address. 860 * Network type of the address.
861 */ 861 */
862 enum GNUNET_ATS_Network_Type scope; 862 enum GNUNET_NetworkType scope;
863 863
864 /** 864 /**
865 * Are we still expecting the welcome message? (#GNUNET_YES/#GNUNET_NO) 865 * Are we still expecting the welcome message? (#GNUNET_YES/#GNUNET_NO)
@@ -1896,7 +1896,7 @@ reschedule_session_timeout (struct GNUNET_ATS_Session *s)
1896static struct GNUNET_ATS_Session * 1896static struct GNUNET_ATS_Session *
1897create_session (struct Plugin *plugin, 1897create_session (struct Plugin *plugin,
1898 const struct GNUNET_HELLO_Address *address, 1898 const struct GNUNET_HELLO_Address *address,
1899 enum GNUNET_ATS_Network_Type scope, 1899 enum GNUNET_NetworkType scope,
1900 struct GNUNET_SERVER_Client *client, 1900 struct GNUNET_SERVER_Client *client,
1901 int is_nat) 1901 int is_nat)
1902{ 1902{
@@ -2442,7 +2442,7 @@ tcp_plugin_get_session (void *cls,
2442 const struct IPv4TcpAddress *t4; 2442 const struct IPv4TcpAddress *t4;
2443 const struct IPv6TcpAddress *t6; 2443 const struct IPv6TcpAddress *t6;
2444 unsigned int options; 2444 unsigned int options;
2445 enum GNUNET_ATS_Network_Type net_type; 2445 enum GNUNET_NetworkType net_type;
2446 unsigned int is_natd = GNUNET_NO; 2446 unsigned int is_natd = GNUNET_NO;
2447 size_t addrlen; 2447 size_t addrlen;
2448#ifdef TCP_STEALTH 2448#ifdef TCP_STEALTH
@@ -2545,7 +2545,7 @@ tcp_plugin_get_session (void *cls,
2545 net_type = plugin->env->get_address_type (plugin->env->cls, 2545 net_type = plugin->env->get_address_type (plugin->env->cls,
2546 sb, 2546 sb,
2547 sbs); 2547 sbs);
2548 GNUNET_break (net_type != GNUNET_ATS_NET_UNSPECIFIED); 2548 GNUNET_break (net_type != GNUNET_NT_UNSPECIFIED);
2549 2549
2550 if ( (is_natd == GNUNET_YES) && 2550 if ( (is_natd == GNUNET_YES) &&
2551 (addrlen == sizeof(struct IPv6TcpAddress)) ) 2551 (addrlen == sizeof(struct IPv6TcpAddress)) )
@@ -3269,7 +3269,7 @@ handle_tcp_welcome (void *cls,
3269 alen), 3269 alen),
3270 client, 3270 client,
3271 GNUNET_NO); 3271 GNUNET_NO);
3272 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != session->scope); 3272 GNUNET_break (GNUNET_NT_UNSPECIFIED != session->scope);
3273 GNUNET_HELLO_address_free (address); 3273 GNUNET_HELLO_address_free (address);
3274 LOG (GNUNET_ERROR_TYPE_DEBUG, 3274 LOG (GNUNET_ERROR_TYPE_DEBUG,
3275 "Creating new%s session %p for peer `%s' client %p\n", 3275 "Creating new%s session %p for peer `%s' client %p\n",
@@ -3629,7 +3629,7 @@ try_connection_reversal (void *cls,
3629 * @param session the session 3629 * @param session the session
3630 * @return the network type in HBO or #GNUNET_SYSERR 3630 * @return the network type in HBO or #GNUNET_SYSERR
3631 */ 3631 */
3632static enum GNUNET_ATS_Network_Type 3632static enum GNUNET_NetworkType
3633tcp_plugin_get_network (void *cls, 3633tcp_plugin_get_network (void *cls,
3634 struct GNUNET_ATS_Session *session) 3634 struct GNUNET_ATS_Session *session)
3635{ 3635{
@@ -3644,7 +3644,7 @@ tcp_plugin_get_network (void *cls,
3644 * @param address the address 3644 * @param address the address
3645 * @return the network type 3645 * @return the network type
3646 */ 3646 */
3647static enum GNUNET_ATS_Network_Type 3647static enum GNUNET_NetworkType
3648tcp_plugin_get_network_for_address (void *cls, 3648tcp_plugin_get_network_for_address (void *cls,
3649 const struct GNUNET_HELLO_Address *address) 3649 const struct GNUNET_HELLO_Address *address)
3650{ 3650{
@@ -3689,7 +3689,7 @@ tcp_plugin_get_network_for_address (void *cls,
3689 else 3689 else
3690 { 3690 {
3691 GNUNET_break (0); 3691 GNUNET_break (0);
3692 return GNUNET_ATS_NET_UNSPECIFIED; 3692 return GNUNET_NT_UNSPECIFIED;
3693 } 3693 }
3694 return plugin->env->get_address_type (plugin->env->cls, 3694 return plugin->env->get_address_type (plugin->env->cls,
3695 sb, 3695 sb,
diff --git a/src/transport/plugin_transport_xu.c b/src/transport/plugin_transport_xu.c
index 59e00f80e..639b38671 100644
--- a/src/transport/plugin_transport_xu.c
+++ b/src/transport/plugin_transport_xu.c
@@ -203,7 +203,7 @@ struct GNUNET_ATS_Session
203 /** 203 /**
204 * Network type of the address. 204 * Network type of the address.
205 */ 205 */
206 enum GNUNET_ATS_Network_Type scope; 206 enum GNUNET_NetworkType scope;
207 207
208 /** 208 /**
209 * Is this session about to be destroyed (sometimes we cannot 209 * Is this session about to be destroyed (sometimes we cannot
@@ -362,7 +362,7 @@ xu_query_keepalive_factor (void *cls)
362 * @param session the session 362 * @param session the session
363 * @return the network type 363 * @return the network type
364 */ 364 */
365static enum GNUNET_ATS_Network_Type 365static enum GNUNET_NetworkType
366xu_plugin_get_network (void *cls, 366xu_plugin_get_network (void *cls,
367 struct GNUNET_ATS_Session *session) 367 struct GNUNET_ATS_Session *session)
368{ 368{
@@ -378,7 +378,7 @@ xu_plugin_get_network (void *cls,
378 * @param address the address 378 * @param address the address
379 * @return the network type 379 * @return the network type
380 */ 380 */
381static enum GNUNET_ATS_Network_Type 381static enum GNUNET_NetworkType
382xu_plugin_get_network_for_address (void *cls, 382xu_plugin_get_network_for_address (void *cls,
383 const struct GNUNET_HELLO_Address *address) 383 const struct GNUNET_HELLO_Address *address)
384{ 384{
@@ -423,7 +423,7 @@ xu_plugin_get_network_for_address (void *cls,
423 else 423 else
424 { 424 {
425 GNUNET_break (0); 425 GNUNET_break (0);
426 return GNUNET_ATS_NET_UNSPECIFIED; 426 return GNUNET_NT_UNSPECIFIED;
427 } 427 }
428 return plugin->env->get_address_type (plugin->env->cls, 428 return plugin->env->get_address_type (plugin->env->cls,
429 sb, 429 sb,
@@ -1215,13 +1215,13 @@ analyze_send_error (struct Plugin *plugin,
1215 socklen_t slen, 1215 socklen_t slen,
1216 int error) 1216 int error)
1217{ 1217{
1218 enum GNUNET_ATS_Network_Type type; 1218 enum GNUNET_NetworkType type;
1219 1219
1220 type = plugin->env->get_address_type (plugin->env->cls, 1220 type = plugin->env->get_address_type (plugin->env->cls,
1221 sa, 1221 sa,
1222 slen); 1222 slen);
1223 if ( ( (GNUNET_ATS_NET_LAN == type) || 1223 if ( ( (GNUNET_NT_LAN == type) ||
1224 (GNUNET_ATS_NET_WAN == type) ) && 1224 (GNUNET_NT_WAN == type) ) &&
1225 ( (ENETUNREACH == errno) || 1225 ( (ENETUNREACH == errno) ||
1226 (ENETDOWN == errno) ) ) 1226 (ENETDOWN == errno) ) )
1227 { 1227 {
@@ -1619,7 +1619,7 @@ session_timeout (void *cls)
1619static struct GNUNET_ATS_Session * 1619static struct GNUNET_ATS_Session *
1620xu_plugin_create_session (void *cls, 1620xu_plugin_create_session (void *cls,
1621 const struct GNUNET_HELLO_Address *address, 1621 const struct GNUNET_HELLO_Address *address,
1622 enum GNUNET_ATS_Network_Type network_type) 1622 enum GNUNET_NetworkType network_type)
1623{ 1623{
1624 struct Plugin *plugin = cls; 1624 struct Plugin *plugin = cls;
1625 struct GNUNET_ATS_Session *s; 1625 struct GNUNET_ATS_Session *s;
@@ -1679,7 +1679,7 @@ xu_plugin_get_session (void *cls,
1679{ 1679{
1680 struct Plugin *plugin = cls; 1680 struct Plugin *plugin = cls;
1681 struct GNUNET_ATS_Session *s; 1681 struct GNUNET_ATS_Session *s;
1682 enum GNUNET_ATS_Network_Type network_type = GNUNET_ATS_NET_UNSPECIFIED; 1682 enum GNUNET_NetworkType network_type = GNUNET_NT_UNSPECIFIED;
1683 const struct IPv4XuAddress *xu_v4; 1683 const struct IPv4XuAddress *xu_v4;
1684 const struct IPv6XuAddress *xu_v6; 1684 const struct IPv6XuAddress *xu_v6;
1685 1685
@@ -1731,7 +1731,7 @@ xu_plugin_get_session (void *cls,
1731 (const struct sockaddr *) &v6, 1731 (const struct sockaddr *) &v6,
1732 sizeof (v6)); 1732 sizeof (v6));
1733 } 1733 }
1734 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network_type); 1734 GNUNET_break (GNUNET_NT_UNSPECIFIED != network_type);
1735 return xu_plugin_create_session (cls, 1735 return xu_plugin_create_session (cls,
1736 address, 1736 address,
1737 network_type); 1737 network_type);
@@ -1752,12 +1752,12 @@ process_xu_message (struct Plugin *plugin,
1752 const struct XUMessage *msg, 1752 const struct XUMessage *msg,
1753 const union XuAddress *xu_addr, 1753 const union XuAddress *xu_addr,
1754 size_t xu_addr_len, 1754 size_t xu_addr_len,
1755 enum GNUNET_ATS_Network_Type network_type) 1755 enum GNUNET_NetworkType network_type)
1756{ 1756{
1757 struct GNUNET_ATS_Session *s; 1757 struct GNUNET_ATS_Session *s;
1758 struct GNUNET_HELLO_Address *address; 1758 struct GNUNET_HELLO_Address *address;
1759 1759
1760 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network_type); 1760 GNUNET_break (GNUNET_NT_UNSPECIFIED != network_type);
1761 if (0 != ntohl (msg->reserved)) 1761 if (0 != ntohl (msg->reserved))
1762 { 1762 {
1763 GNUNET_break_op(0); 1763 GNUNET_break_op(0);
@@ -1827,7 +1827,7 @@ xu_select_read (struct Plugin *plugin,
1827 const struct sockaddr_in6 *sa6; 1827 const struct sockaddr_in6 *sa6;
1828 const union XuAddress *int_addr; 1828 const union XuAddress *int_addr;
1829 size_t int_addr_len; 1829 size_t int_addr_len;
1830 enum GNUNET_ATS_Network_Type network_type; 1830 enum GNUNET_NetworkType network_type;
1831 1831
1832 fromlen = sizeof (addr); 1832 fromlen = sizeof (addr);
1833 memset (&addr, 1833 memset (&addr,
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 85ab9659d..47ba7aed4 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -499,12 +499,12 @@ env_notify_address (void *cls,
499} 499}
500 500
501 501
502static enum GNUNET_ATS_Network_Type 502static enum GNUNET_NetworkType
503env_get_address_type (void *cls, 503env_get_address_type (void *cls,
504 const struct sockaddr *addr, 504 const struct sockaddr *addr,
505 size_t addrlen) 505 size_t addrlen)
506{ 506{
507 return GNUNET_ATS_NET_LOOPBACK; 507 return GNUNET_NT_LOOPBACK;
508} 508}
509 509
510 510
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index cd93ff855..6309c3278 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -209,14 +209,14 @@ generate_config (const char *cfg_file,
209 "PATHS", 209 "PATHS",
210 "DEFAULTCONFIG", 210 "DEFAULTCONFIG",
211 fname); 211 fname);
212 for (int c = 0; c < GNUNET_ATS_NetworkTypeCount; c++) 212 for (int c = 0; c < GNUNET_NT_COUNT; c++)
213 { 213 {
214 GNUNET_asprintf (&in_name, 214 GNUNET_asprintf (&in_name,
215 "%s_QUOTA_IN", 215 "%s_QUOTA_IN",
216 GNUNET_ATS_print_network_type (c)); 216 GNUNET_NT_to_string (c));
217 GNUNET_asprintf (&out_name, 217 GNUNET_asprintf (&out_name,
218 "%s_QUOTA_OUT", 218 "%s_QUOTA_OUT",
219 GNUNET_ATS_print_network_type (c)); 219 GNUNET_NT_to_string (c));
220 GNUNET_CONFIGURATION_set_value_number (cfg, 220 GNUNET_CONFIGURATION_set_value_number (cfg,
221 "ats", 221 "ats",
222 in_name, 222 in_name,
diff --git a/src/transport/transport.h b/src/transport/transport.h
index 515c178f4..df1321d1a 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -692,7 +692,7 @@ struct GNUNET_TRANSPORT_AddAddressMessage
692 struct GNUNET_TIME_RelativeNBO expiration; 692 struct GNUNET_TIME_RelativeNBO expiration;
693 693
694 /** 694 /**
695 * An `enum GNUNET_ATS_Network_Type` in NBO. 695 * An `enum GNUNET_NetworkType` in NBO.
696 */ 696 */
697 uint32_t nt; 697 uint32_t nt;
698 698
@@ -801,7 +801,7 @@ struct GNUNET_TRANSPORT_AddQueueMessage
801 struct GNUNET_PeerIdentity receiver; 801 struct GNUNET_PeerIdentity receiver;
802 802
803 /** 803 /**
804 * An `enum GNUNET_ATS_Network_Type` in NBO. 804 * An `enum GNUNET_NetworkType` in NBO.
805 */ 805 */
806 uint32_t nt; 806 uint32_t nt;
807 807
@@ -988,7 +988,7 @@ struct GNUNET_TRANSPORT_MonitorData
988 struct GNUNET_MessageHeader header; 988 struct GNUNET_MessageHeader header;
989 989
990 /** 990 /**
991 * Network type (an `enum GNUNET_ATS_Network_Type` in NBO). 991 * Network type (an `enum GNUNET_NetworkType` in NBO).
992 */ 992 */
993 uint32_t nt GNUNET_PACKED; 993 uint32_t nt GNUNET_PACKED;
994 994
diff --git a/src/transport/transport_api2_communication.c b/src/transport/transport_api2_communication.c
index a89802ddd..ffd7f208e 100644
--- a/src/transport/transport_api2_communication.c
+++ b/src/transport/transport_api2_communication.c
@@ -251,7 +251,7 @@ struct GNUNET_TRANSPORT_QueueHandle
251 /** 251 /**
252 * Network type of the communciation queue. 252 * Network type of the communciation queue.
253 */ 253 */
254 enum GNUNET_ATS_Network_Type nt; 254 enum GNUNET_NetworkType nt;
255 255
256 /** 256 /**
257 * Communication status of the queue. 257 * Communication status of the queue.
@@ -318,7 +318,7 @@ struct GNUNET_TRANSPORT_AddressIdentifier
318 /** 318 /**
319 * Network type for the address. 319 * Network type for the address.
320 */ 320 */
321 enum GNUNET_ATS_Network_Type nt; 321 enum GNUNET_NetworkType nt;
322 322
323}; 323};
324 324
@@ -944,7 +944,7 @@ GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle
944 const struct GNUNET_PeerIdentity *peer, 944 const struct GNUNET_PeerIdentity *peer,
945 const char *address, 945 const char *address,
946 uint32_t mtu, 946 uint32_t mtu,
947 enum GNUNET_ATS_Network_Type nt, 947 enum GNUNET_NetworkType nt,
948 uint32_t distance, 948 uint32_t distance,
949 enum GNUNET_TRANSPORT_ConnectionStatus cs, 949 enum GNUNET_TRANSPORT_ConnectionStatus cs,
950 struct GNUNET_MQ_Handle *mq) 950 struct GNUNET_MQ_Handle *mq)
@@ -1002,7 +1002,7 @@ GNUNET_TRANSPORT_communicator_mq_del (struct GNUNET_TRANSPORT_QueueHandle *qh)
1002struct GNUNET_TRANSPORT_AddressIdentifier * 1002struct GNUNET_TRANSPORT_AddressIdentifier *
1003GNUNET_TRANSPORT_communicator_address_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, 1003GNUNET_TRANSPORT_communicator_address_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
1004 const char *address, 1004 const char *address,
1005 enum GNUNET_ATS_Network_Type nt, 1005 enum GNUNET_NetworkType nt,
1006 struct GNUNET_TIME_Relative expiration) 1006 struct GNUNET_TIME_Relative expiration)
1007{ 1007{
1008 struct GNUNET_TRANSPORT_AddressIdentifier *ai; 1008 struct GNUNET_TRANSPORT_AddressIdentifier *ai;
diff --git a/src/transport/transport_api2_monitor.c b/src/transport/transport_api2_monitor.c
index 3798296c1..ca9832e45 100644
--- a/src/transport/transport_api2_monitor.c
+++ b/src/transport/transport_api2_monitor.c
@@ -174,7 +174,7 @@ handle_monitor_data (void *cls,
174 struct GNUNET_TRANSPORT_MonitorInformation mi; 174 struct GNUNET_TRANSPORT_MonitorInformation mi;
175 175
176 mi.address = (const char *) &md[1]; 176 mi.address = (const char *) &md[1];
177 mi.nt = (enum GNUNET_ATS_Network_Type) ntohl (md->nt); 177 mi.nt = (enum GNUNET_NetworkType) ntohl (md->nt);
178 mi.cs = (enum GNUNET_TRANSPORT_ConnectionStatus) ntohl (md->cs); 178 mi.cs = (enum GNUNET_TRANSPORT_ConnectionStatus) ntohl (md->cs);
179 mi.num_msg_pending = ntohl (md->num_msg_pending); 179 mi.num_msg_pending = ntohl (md->num_msg_pending);
180 mi.num_bytes_pending = ntohl (md->num_bytes_pending); 180 mi.num_bytes_pending = ntohl (md->num_bytes_pending);