Lines Matching refs:addr
534 sss_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr)
536 return family == AF_INET6 ? talloc_asprintf(mem_ctx, "[%s]", addr) :
537 talloc_strdup(mem_ctx, addr);
680 /* addr is in network order for both IPv4 and IPv6 versions */
681 bool check_ipv4_addr(struct in_addr *addr, uint8_t flags)
685 if (inet_ntop(AF_INET, addr, straddr, INET_ADDRSTRLEN) == NULL) {
691 if ((flags & SSS_NO_MULTICAST) && IN_MULTICAST(ntohl(addr->s_addr))) {
695 && inet_netof(*addr) == IN_LOOPBACKNET) {
699 && (addr->s_addr & htonl(0xffff0000)) == htonl(0xa9fe0000)) {
704 && addr->s_addr == htonl(INADDR_BROADCAST)) {
712 bool check_ipv6_addr(struct in6_addr *addr, uint8_t flags)
716 if (inet_ntop(AF_INET6, addr, straddr, INET6_ADDRSTRLEN) == NULL) {
722 if ((flags & SSS_NO_LINKLOCAL) && IN6_IS_ADDR_LINKLOCAL(addr)) {
725 } else if ((flags & SSS_NO_LOOPBACK) && IN6_IS_ADDR_LOOPBACK(addr)) {
728 } else if ((flags & SSS_NO_MULTICAST) && IN6_IS_ADDR_MULTICAST(addr)) {