return EINVAL; \
}while(0)
- port= htons(port);
-
if (!strchr(addr, ':')) { /* INET */
#define AFCORE(INETx,SINx,sinx) \
*salen = needlen;
memset(sa, 0, needlen);
+
+ sa->sa_family= af;
*portp = htons(port);
int r= inet_pton(af,parse,dst);
}
} /* else; !!*ep */
- SIN6(sa)->sin6_scope_id= htonl(scope);
+ SIN6(sa)->sin6_scope_id= scope;
} /* if (scopestr) */
return 0;
if (sa->sa_family == AF_INET6) {
uint32_t scope = CSIN6(sa)->sin6_scope_id;
if (scope) {
- scope = ntohl(scope);
int scopeoffset = strlen(addr_buffer);
int remain = *addr_buflen - scopeoffset;
int r = snprintf(addr_buffer + scopeoffset, remain,