Lines Matching refs:addr

181 #define GET_AI(ai, afd, addr)                                \  argument
184 (ai) = get_ai(pai, (afd), (addr)); \
247 sockaddr_union addr = {.sin6 = sin6_test}; in have_ipv6() local
248 return _find_src_addr(&addr.sa, NULL, mark, uid) == 1; in have_ipv6()
256 sockaddr_union addr = {.sin = sin_test}; in have_ipv4() local
257 return _find_src_addr(&addr.sa, NULL, mark, uid) == 1; in have_ipv4()
617 const char *cp, *scope, *addr; in explore_numeric_scope() local
647 addr = hostname2; in explore_numeric_scope()
650 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope()
683 const char* addr) { in get_ai() argument
689 assert(addr != NULL); in get_ai()
701 memcpy(p + afd->a_off, addr, (size_t) afd->a_addrlen); in get_ai()
1034 static int _get_scope(const struct sockaddr* addr) { in _get_scope() argument
1035 if (addr->sa_family == AF_INET6) { in _get_scope()
1036 const struct sockaddr_in6* addr6 = (const struct sockaddr_in6*) addr; in _get_scope()
1051 } else if (addr->sa_family == AF_INET) { in _get_scope()
1052 const struct sockaddr_in* addr4 = (const struct sockaddr_in*) addr; in _get_scope()
1091 static int _get_label(const struct sockaddr* addr) { in _get_label() argument
1092 if (addr->sa_family == AF_INET) { in _get_label()
1094 } else if (addr->sa_family == AF_INET6) { in _get_label()
1095 const struct sockaddr_in6* addr6 = (const struct sockaddr_in6*) addr; in _get_label()
1130 static int _get_precedence(const struct sockaddr* addr) { in _get_precedence() argument
1131 if (addr->sa_family == AF_INET) { in _get_precedence()
1133 } else if (addr->sa_family == AF_INET6) { in _get_precedence()
1134 const struct sockaddr_in6* addr6 = (const struct sockaddr_in6*) addr; in _get_precedence()
1292 static int _find_src_addr(const struct sockaddr* addr, struct sockaddr* src_addr, unsigned mark, in _find_src_addr() argument
1298 switch (addr->sa_family) { in _find_src_addr()
1310 sock = socket(addr->sa_family, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP); in _find_src_addr()
1327 ret = connect(sock, addr, len); in _find_src_addr()
1492 const char* addr; in _gethtent() local
1506 addr = p; in _gethtent()
1522 error = getaddrinfo_numeric(addr, nullptr, *pai, &res0); in _gethtent()