- int res, af;
- uint32_t* probe;
-
- memset(&sin, '\0', sizeof(sin));
- memset(&sin6, '\0', sizeof(sin6));
-
- /* If the upper three (network byte order) uint32-parts
- * are null, then there ought to be an IPv4 address here.
- * Any such IPv6 would have to be 'xxxx::'. Neglectable? */
- probe = (uint32_t *) addr;
- af = (probe[1] || probe[2] || probe[3]) ? AF_INET6 : AF_INET;