if (addr->family == AF_INET6) { FIXME;   } else #endif if (addr->family == AF_INET) {
if (addr->family == AF_INET) return ipv4_is_loopback( ((struct sockaddr_in *)addr->ai->ai_addr)->sin_addr); else if (addr->family == AF_INET6) return IN6_IS_ADDR_LOOPBACK( &((struct sockaddr_in6 *)addr->ai->ai_addr)->sin6_addr); else return 0; #else
int sk_address_is_local(SockAddr addr){#ifdef IPV6    if (addr->family == AF_INET6) {	FIXME;  /* someone who can compile for IPV6 had better do this bit */    } else#endif    if (addr->family == AF_INET) {	struct in_addr a;	a.s_addr = htonl(addr->address);	return ipv4_is_loopback(a);    } else {	assert(addr->family == AF_UNSPEC);	return 0;                      /* we don't know; assume not */    }}