Lines Matching refs:af
502 int af_bit_len(int af) in af_bit_len() argument
504 switch (af) { in af_bit_len()
520 int af_byte_len(int af) in af_byte_len() argument
522 return af_bit_len(af) / 8; in af_byte_len()
707 const char *rt_addr_n2a(int af, int len, const void *addr, char *buf, int buflen) in rt_addr_n2a() argument
709 switch (af) { in rt_addr_n2a()
712 return inet_ntop(af, addr, buf, buflen); in rt_addr_n2a()
715 return mpls_ntop(af, addr, buf, buflen); in rt_addr_n2a()
717 return ipx_ntop(af, addr, buf, buflen); in rt_addr_n2a()
722 return dnet_ntop(af, &dna, buf, buflen); in rt_addr_n2a()
782 static const char *resolve_address(const void *addr, int len, int af) in resolve_address() argument
790 if (af == AF_INET6 && ((__u32*)addr)[0] == 0 && in resolve_address()
792 af = AF_INET; in resolve_address()
800 if (n->addr.family == af && in resolve_address()
807 n->addr.family = af; in resolve_address()
817 if ((h_ent = gethostbyaddr(addr, len, af)) != NULL) in resolve_address()
825 const char *format_host(int af, int len, const void *addr, in format_host() argument
832 len = len <= 0 ? af_byte_len(af) : len; in format_host()
835 (n = resolve_address(addr, len, af)) != NULL) in format_host()
839 return rt_addr_n2a(af, len, addr, buf, buflen); in format_host()