Lines Matching refs:family
110 if (!get_addr_1(&addr, arg, AF_INET) && addr.family == AF_INET) { in get_netmask()
470 int get_addr_1(inet_prefix *addr, const char *name, int family) in get_addr_1() argument
477 if ((family == AF_DECnet) || (family == AF_MPLS)) in get_addr_1()
479 addr->family = family; in get_addr_1()
480 addr->bytelen = (family == AF_INET6 ? 16 : 4); in get_addr_1()
485 if (family == AF_PACKET) { in get_addr_1()
493 addr->family = AF_PACKET; in get_addr_1()
500 addr->family = AF_INET6; in get_addr_1()
501 if (family != AF_UNSPEC && family != AF_INET6) in get_addr_1()
511 if (family == AF_DECnet) { in get_addr_1()
514 addr->family = AF_DECnet; in get_addr_1()
524 if (family == AF_MPLS) { in get_addr_1()
528 addr->family = AF_MPLS; in get_addr_1()
545 addr->family = AF_INET; in get_addr_1()
546 if (family != AF_UNSPEC && family != AF_INET) in get_addr_1()
580 int get_prefix_1(inet_prefix *dst, char *arg, int family) in get_prefix_1() argument
591 if ((family == AF_DECnet) || (family == AF_MPLS)) in get_prefix_1()
593 dst->family = family; in get_prefix_1()
603 err = get_addr_1(dst, arg, family); in get_prefix_1()
605 dst->bitlen = af_bit_len(dst->family); in get_prefix_1()
623 static const char *family_name_verbose(int family) in family_name_verbose() argument
625 if (family == AF_UNSPEC) in family_name_verbose()
627 return family_name(family); in family_name_verbose()
630 int get_addr(inet_prefix *dst, const char *arg, int family) in get_addr() argument
632 if (get_addr_1(dst, arg, family)) { in get_addr()
635 family_name_verbose(family), arg); in get_addr()
641 int get_prefix(inet_prefix *dst, char *arg, int family) in get_prefix() argument
643 if (family == AF_PACKET) { in get_prefix()
650 if (get_prefix_1(dst, arg, family)) { in get_prefix()
653 family_name_verbose(family), arg); in get_prefix()
849 int family = AF_UNSPEC; in read_family() local
852 family = AF_INET; in read_family()
854 family = AF_INET6; in read_family()
856 family = AF_DECnet; in read_family()
858 family = AF_PACKET; in read_family()
860 family = AF_IPX; in read_family()
862 family = AF_MPLS; in read_family()
864 family = AF_BRIDGE; in read_family()
865 return family; in read_family()
868 const char *family_name(int family) in family_name() argument
870 if (family == AF_INET) in family_name()
872 if (family == AF_INET6) in family_name()
874 if (family == AF_DECnet) in family_name()
876 if (family == AF_PACKET) in family_name()
878 if (family == AF_IPX) in family_name()
880 if (family == AF_MPLS) in family_name()
882 if (family == AF_BRIDGE) in family_name()
915 if (n->addr.family == af && in resolve_address()
923 n->addr.family = af; in resolve_address()