assert(addr->family != AF_UNSPEC);
void sk_addrcopy(SockAddr addr, char *buf){    assert(addr->family != AF_UNSPEC);#ifdef IPV6    if (addr->family == AF_INET6) {	memcpy(buf, (char*) addr->ai, 16);    } else#endif    if (addr->family == AF_INET) {	struct in_addr a;	a.s_addr = htonl(addr->address);	memcpy(buf, (char*) &a.s_addr, 4);    }}