3 @@ -307,9 +307,11 @@ void net_send_tcp(int index)
4 struct sockaddr_storage local;
5 struct sockaddr_storage remote;
6 struct sockaddr_in *local4 = (struct sockaddr_in *) &local;
7 - struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local;
8 struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote;
10 + struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local;
11 struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote;
16 @@ -566,8 +568,10 @@ void net_send_query(int index)
18 /* sendto() assumes packet length includes the IPv4 header but not the
20 - spacketsize = abs(packetsize) -
21 - ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) );
22 + spacketsize = abs(packetsize);
24 + spacketsize -= ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) );
26 rv = sendto(sendsock, packet, spacketsize, 0, remotesockaddr, salen);
27 if (first && (rv < 0) && ((errno == EINVAL) || (errno == EMSGSIZE))) {
28 /* Try the first packet again using host byte order. */
35 -//#include <string.h>
44 #include <arpa/inet.h>
45 #include <netinet/in.h>
46 +#include <sys/select.h>
47 #include <sys/socket.h>
49 #include <netinet/ip6.h>