aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_xu.c
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/plugin_transport_xu.c
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/plugin_transport_xu.c')
-rw-r--r--src/transport/plugin_transport_xu.c26
1 files changed, 13 insertions, 13 deletions
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,