2 #include <sys/socket.h> 3 #include <netinet/in.h> 9 #define EAFNOSUPPORT EINVAL 17 if (
ipv4)
goto compat;
18 s = socket(PF_INET6,SOCK_DGRAM,0);
22 s=socket(AF_INET,SOCK_DGRAM,0);
31 setsockopt(s,IPPROTO_IPV6,IPV6_V6ONLY,(
void*)&zero,
sizeof(zero));