aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-21 10:35:50 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-21 10:35:50 +0000
commit595fdf819d8c2176be841164508f9bd9985aa304 (patch)
treecf280c69eff003cc465f03cbbe640129c6a19bd5 /src/transport/plugin_transport_tcp.c
parent632f930a8ecba7d0437644f4f19d187151a9e4e0 (diff)
downloadgnunet-595fdf819d8c2176be841164508f9bd9985aa304.tar.gz
gnunet-595fdf819d8c2176be841164508f9bd9985aa304.zip
more FBSD fixes
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 546bc2066..099e10a1a 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -856,9 +856,9 @@ tcp_plugin_send (void *cls,
856#endif 856#endif
857 a6.sin6_family = AF_INET6; 857 a6.sin6_family = AF_INET6;
858 a6.sin6_port = t6->t6_port; 858 a6.sin6_port = t6->t6_port;
859 memcpy (a6.sin6_addr.s6_addr, 859 memcpy (&a6.sin6_addr,
860 &t6->ipv6_addr, 860 &t6->ipv6_addr,
861 16); 861 sizeof (struct in6_addr));
862 sb = &a6; 862 sb = &a6;
863 sbs = sizeof (a6); 863 sbs = sizeof (a6);
864 } 864 }
@@ -1085,9 +1085,9 @@ tcp_plugin_address_pretty_printer (void *cls,
1085 memset (&a6, 0, sizeof (a6)); 1085 memset (&a6, 0, sizeof (a6));
1086 a6.sin6_family = AF_INET6; 1086 a6.sin6_family = AF_INET6;
1087 a6.sin6_port = t6->t6_port; 1087 a6.sin6_port = t6->t6_port;
1088 memcpy (a6.sin6_addr.s6_addr, 1088 memcpy (&a6.sin6_addr,
1089 &t6->ipv6_addr, 1089 &t6->ipv6_addr,
1090 16); 1090 sizeof (struct in6_addr));
1091 port = ntohs (t6->t6_port); 1091 port = ntohs (t6->t6_port);
1092 sb = &a6; 1092 sb = &a6;
1093 sbs = sizeof (a6); 1093 sbs = sizeof (a6);
@@ -1254,8 +1254,8 @@ handle_tcp_welcome (void *cls,
1254 t6 = GNUNET_malloc (sizeof (struct IPv6TcpAddress)); 1254 t6 = GNUNET_malloc (sizeof (struct IPv6TcpAddress));
1255 t6->t6_port = s6->sin6_port; 1255 t6->t6_port = s6->sin6_port;
1256 memcpy (&t6->ipv6_addr, 1256 memcpy (&t6->ipv6_addr,
1257 s6->sin6_addr.s6_addr, 1257 &s6->sin6_addr,
1258 16); 1258 sizeof (struct in6_addr));
1259 session->connect_addr = t6; 1259 session->connect_addr = t6;
1260 session->connect_alen = sizeof (struct IPv6TcpAddress); 1260 session->connect_alen = sizeof (struct IPv6TcpAddress);
1261 } 1261 }
@@ -1451,14 +1451,14 @@ process_interfaces (void *cls,
1451 } 1451 }
1452 else if (af == AF_INET6) 1452 else if (af == AF_INET6)
1453 { 1453 {
1454 if (IN6_IS_ADDR_LINKLOCAL (((struct sockaddr_in6 *) addr)->sin6_addr.s6_addr)) 1454 if (IN6_IS_ADDR_LINKLOCAL (&((struct sockaddr_in6 *) addr)->sin6_addr))
1455 { 1455 {
1456 /* skip link local addresses */ 1456 /* skip link local addresses */
1457 return GNUNET_OK; 1457 return GNUNET_OK;
1458 } 1458 }
1459 memcpy (&t6.ipv6_addr, 1459 memcpy (&t6.ipv6_addr,
1460 ((struct sockaddr_in6 *) addr)->sin6_addr.s6_addr, 1460 &((struct sockaddr_in6 *) addr)->sin6_addr,
1461 16); 1461 sizeof (struct in6_addr));
1462 t6.t6_port = htons (plugin->adv_port); 1462 t6.t6_port = htons (plugin->adv_port);
1463 arg = &t6; 1463 arg = &t6;
1464 args = sizeof (t6); 1464 args = sizeof (t6);