26c26
< * $FreeBSD: head/tools/regression/netinet6/ip6_sockets/ip6_sockets.c 160499 2006-07-19 12:10:33Z rwatson $
---
> * $FreeBSD: head/tools/regression/netinet6/ip6_sockets/ip6_sockets.c 160500 2006-07-19 12:54:14Z rwatson $
30a31,32
> #include <netinet/in.h>
>
31a34
> #include <string.h>
40a44
> struct sockaddr_in6 sin6;
42a47,49
> /*
> * UDPv6 simple test.
> */
47a55,73
> /*
> * UDPv6 connected case -- connect UDPv6 to an arbitrary port so that
> * when we close the socket, it goes through the disconnect logic.
> */
> s = socket(PF_INET6, SOCK_DGRAM, 0);
> if (s < 0)
> err(-1, "socket(PF_INET6, SOCK_DGRAM, 0)");
> bzero(&sin6, sizeof(sin6));
> sin6.sin6_len = sizeof(sin6);
> sin6.sin6_family = AF_INET6;
> sin6.sin6_addr = in6addr_loopback;
> sin6.sin6_port = htons(1024);
> if (connect(s, (struct sockaddr *)&sin6, sizeof(sin6)) < 0)
> err(-1, "connect(SOCK_DGRAM, ::1)");
> close(s);
>
> /*
> * TCPv6.
> */
52a79,81
> /*
> * Raw IPv6.
> */
< * $FreeBSD: head/tools/regression/netinet6/ip6_sockets/ip6_sockets.c 160499 2006-07-19 12:10:33Z rwatson $
---
> * $FreeBSD: head/tools/regression/netinet6/ip6_sockets/ip6_sockets.c 160500 2006-07-19 12:54:14Z rwatson $
30a31,32
> #include <netinet/in.h>
>
31a34
> #include <string.h>
40a44
> struct sockaddr_in6 sin6;
42a47,49
> /*
> * UDPv6 simple test.
> */
47a55,73
> /*
> * UDPv6 connected case -- connect UDPv6 to an arbitrary port so that
> * when we close the socket, it goes through the disconnect logic.
> */
> s = socket(PF_INET6, SOCK_DGRAM, 0);
> if (s < 0)
> err(-1, "socket(PF_INET6, SOCK_DGRAM, 0)");
> bzero(&sin6, sizeof(sin6));
> sin6.sin6_len = sizeof(sin6);
> sin6.sin6_family = AF_INET6;
> sin6.sin6_addr = in6addr_loopback;
> sin6.sin6_port = htons(1024);
> if (connect(s, (struct sockaddr *)&sin6, sizeof(sin6)) < 0)
> err(-1, "connect(SOCK_DGRAM, ::1)");
> close(s);
>
> /*
> * TCPv6.
> */
52a79,81
> /*
> * Raw IPv6.
> */