Lines Matching defs:sa
50 static int addzoneid(const struct sockaddr_in6 *sa, char *host,
52 static size_t getzonestr(const struct sockaddr_in6 *sa, char *zonestr,
66 * sa - points to either a sockaddr_in structure (for
95 getnameinfo(const struct sockaddr *sa, socklen_t salen,
111 if (sa == NULL)
113 switch (sa->sa_family) {
115 addr = (char *)&sa2sin(sa)->sin_addr;
118 port = (sa2sin(sa)->sin_port); /* network byte order */
121 addr = (char *)&sa2sin6(sa)->sin6_addr;
124 port = (sa2sin6(sa)->sin6_port); /* network byte order */
139 if (inet_ntop(sa->sa_family, addr,
146 hp = getipnodebyaddr(addr, alen, sa->sa_family,
186 if (_inet_ntop_native(sa->sa_family, addr,
197 if ((sa->sa_family == AF_INET6) &&
198 (sa2sin6(sa)->sin6_scope_id != 0)) {
209 if (IN6_IS_ADDR_LINKSCOPE(&(sa2sin6(sa)->sin6_addr))) {
210 if ((err = addzoneid(sa2sin6(sa), host,
266 * addzoneid(sa, host, hostlen)
278 addzoneid(const struct sockaddr_in6 *sa, char *host, size_t hostlen)
285 if (((zonelen = getzonestr(sa, zonestr, sizeof (zonestr))) == 0) ||
297 * getzonestr(sa, zonestr)
313 getzonestr(const struct sockaddr_in6 *sa, char *zonestr, size_t zonelen)
323 addr = &sa->sin6_addr;
329 ifindex = sa->sin6_scope_id;