/freebsd/contrib/ntp/libntp/lib/isc/unix/ |
H A D | ifiter_getifaddrs.c | 42 struct ifaddrs *ifaddrs; /*%< List of ifaddrs */ member 43 struct ifaddrs *pos; /*%< Ptr to current ifaddr */ 71 iter->ifaddrs = NULL; in isc_interfaceiter_create() 92 if ((ret = getifaddrs(&iter->ifaddrs)) >= 0) in isc_interfaceiter_create() 126 if (iter->ifaddrs != NULL) /* just in case */ in isc_interfaceiter_create() 127 freeifaddrs(iter->ifaddrs); in isc_interfaceiter_create() 141 struct ifaddrs *ifa; in internal_current() 271 if (iter->ifaddrs) in internal_destroy() 272 freeifaddrs(iter->ifaddrs); in internal_destroy() 273 iter->ifaddrs = NULL; in internal_destroy() [all …]
|
/freebsd/lib/libc/net/ |
H A D | if_nameindex.c | 81 struct ifaddrs *ifaddrs, *ifa; in if_nameindex() local 87 if (getifaddrs(&ifaddrs) < 0) in if_nameindex() 96 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in if_nameindex() 121 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in if_nameindex() 138 freeifaddrs(ifaddrs); in if_nameindex()
|
H A D | if_indextoname.c | 63 struct ifaddrs *ifaddrs, *ifa; in if_indextoname() local 71 if (getifaddrs(&ifaddrs) < 0) in if_indextoname() 74 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in if_indextoname() 88 freeifaddrs(ifaddrs); in if_indextoname()
|
H A D | if_nametoindex.c | 67 struct ifaddrs *ifaddrs, *ifa; in if_nametoindex() local 81 if (getifaddrs(&ifaddrs) < 0) in if_nametoindex() 86 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in if_nametoindex() 95 freeifaddrs(ifaddrs); in if_nametoindex()
|
H A D | getifaddrs.c | 77 getifaddrs(struct ifaddrs **pif) in getifaddrs() 87 struct ifaddrs *cif; in getifaddrs() 94 struct ifaddrs *ifa, *ift; in getifaddrs() 202 data = malloc(sizeof(struct ifaddrs) * icnt + dcnt + ncnt); in getifaddrs() 208 ifa = (struct ifaddrs *)(void *)data; in getifaddrs() 209 data += sizeof(struct ifaddrs) * icnt; in getifaddrs() 212 memset(ifa, 0, sizeof(struct ifaddrs) * icnt); in getifaddrs() 339 freeifaddrs(struct ifaddrs *ifp) in freeifaddrs()
|
H A D | sourcefilter.c | 83 struct ifaddrs *ifa; in __inaddr_to_index() 84 struct ifaddrs *ifaddrs; in __inaddr_to_index() local 89 if (getifaddrs(&ifaddrs) < 0) in __inaddr_to_index() 101 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in __inaddr_to_index() 117 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in __inaddr_to_index() 128 freeifaddrs(ifaddrs); in __inaddr_to_index()
|
/freebsd/include/ |
H A D | ifaddrs.h | 32 struct ifaddrs { struct 33 struct ifaddrs *ifa_next; argument 60 extern int getifaddrs(struct ifaddrs **); argument 61 extern void freeifaddrs(struct ifaddrs *);
|
/freebsd/share/examples/libifconfig/ |
H A D | status.c | 56 print_carp(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_carp() 73 print_inet4_addr(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_inet4_addr() 103 print_inet6_addr(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_inet6_addr() 187 print_link_addr(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_link_addr() 211 print_ifaddr(ifconfig_handle_t *lifh, struct ifaddrs *ifa, void *udata __unused) in print_ifaddr() 238 print_nd6(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_nd6() 250 print_fib(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_fib() 262 print_lagg(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_lagg() 330 print_laggport(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_laggport() 347 print_groups(ifconfig_handle_t *lifh, struct ifaddrs *ifa) in print_groups() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | pcap-snf.c | 345 struct snf_ifaddrs *ifaddrs, *ifa; in snf_findalldevs() local 357 if (snf_getifaddrs(&ifaddrs) || ifaddrs == NULL) in snf_findalldevs() 374 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->snf_ifa_next) { in snf_findalldevs() 473 snf_freeifaddrs(ifaddrs); in snf_findalldevs() 511 struct snf_ifaddrs *ifaddrs, *ifa; in snf_create() local 525 if (snf_getifaddrs(&ifaddrs) || ifaddrs == NULL) { in snf_create() 531 ifa = ifaddrs; in snf_create() 539 snf_freeifaddrs(ifaddrs); in snf_create()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_platform_limits_solaris.cpp | 317 CHECK_TYPE_SIZE(ifaddrs); 318 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next); 319 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_name); 320 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_addr); 321 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netmask); 328 sizeof(((ifaddrs *)nullptr)->ifa_ifu)); 330 offsetof(ifaddrs, ifa_ifu)); 331 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
|
H A D | sanitizer_platform_limits_freebsd.cpp | 524 CHECK_TYPE_SIZE(ifaddrs); 525 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next); 526 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_name); 527 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_addr); 528 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netmask); 530 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); 531 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
|
H A D | sanitizer_platform_limits_posix.cpp | 1237 CHECK_TYPE_SIZE(ifaddrs); 1238 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next); 1239 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_name); 1240 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_addr); 1241 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netmask); 1249 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); 1252 sizeof(((ifaddrs *)nullptr)->ifa_ifu)); 1254 offsetof(ifaddrs, ifa_ifu)); 1257 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); 1259 CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | getifaddrs.c | 502 rk_getifaddrs(struct ifaddrs **ifap) in rk_getifaddrs() 548 struct ifaddrs *ifl = NULL, *ifa = NULL; in rk_getifaddrs() 558 NLMSG_ALIGN(sizeof(struct ifaddrs[icnt])) in rk_getifaddrs() 560 ifa = (struct ifaddrs *)data; in rk_getifaddrs() 577 data += NLMSG_ALIGN(sizeof(struct ifaddrs)) * icnt; in rk_getifaddrs() 857 rk_freeifaddrs(struct ifaddrs *ifp) in rk_freeifaddrs() 870 getifaddrs2(struct ifaddrs **ifap, in getifaddrs2() 883 struct ifaddrs *start = NULL, **end = &start; in getifaddrs2() 1012 getlifaddrs2(struct ifaddrs **ifap, in getlifaddrs2() 1025 struct ifaddrs *start = NULL, **end = &start; in getlifaddrs2() [all …]
|
H A D | ifaddrs.hin | 56 struct ifaddrs { 57 struct ifaddrs *ifa_next; 71 rk_getifaddrs(struct ifaddrs**); 74 rk_freeifaddrs(struct ifaddrs*);
|
H A D | Makefile.am | 127 ifaddrs.hin \ 158 ifaddrs_h = ifaddrs.h 175 CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h search.h vis.h
|
/freebsd/lib/libifconfig/ |
H A D | libifconfig.h | 54 struct ifaddrs; 138 struct ifaddrs *ifa, void *udata); 156 void ifconfig_foreach_ifaddr(ifconfig_handle_t *h, struct ifaddrs *ifa, 311 const char *name, struct ifaddrs *ifa, struct ifconfig_inet_addr *addr); 322 const char *name, struct ifaddrs *ifa, struct ifconfig_inet6_addr *addr);
|
H A D | libifconfig_internal.h | 54 struct ifaddrs *ifap;
|
H A D | libifconfig_inet.c | 56 const char *name __unused, struct ifaddrs *ifa, in ifconfig_inet_get_addrinfo()
|
/freebsd/usr.sbin/rpcbind/tests/ |
H A D | addrmerge_test.c | 52 struct ifaddrs ifaddr; 57 struct ifaddrs *mock_ifaddrs = NULL; 66 freeifaddrs(struct ifaddrs *ifp __unused) in freeifaddrs() 72 getifaddrs(struct ifaddrs **ifap) in getifaddrs() 82 struct ifaddrs *ifaddr = &mock_ifaddr_storage[ifaddr_count].ifaddr; in mock_ifaddr4() 102 *ifaddr = (struct ifaddrs) { in mock_ifaddr4() 129 struct ifaddrs *ifaddr = &mock_ifaddr_storage[ifaddr_count].ifaddr; in mock_ifaddr6() 154 *ifaddr = (struct ifaddrs) { in mock_ifaddr6()
|
/freebsd/usr.sbin/mtest/ |
H A D | mtest.c | 157 struct ifaddrs *ifa; in __ifindex_to_primary_ip() 158 struct ifaddrs *ifaddrs; in __ifindex_to_primary_ip() local 167 if (getifaddrs(&ifaddrs) < 0) in __ifindex_to_primary_ip() 175 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in __ifindex_to_primary_ip() 190 freeifaddrs(ifaddrs); in __ifindex_to_primary_ip()
|
/freebsd/sbin/ifconfig/ |
H A D | ifconfig.c | 98 struct ifaddrs *ifa); 112 struct ifaddrs *ifa; 226 calcorders(struct ifaddrs *ifa, struct ifa_queue *q) in calcorders() 228 struct ifaddrs *prev; in calcorders() 266 cmpifaddrs(struct ifaddrs *a, struct ifaddrs *b, struct ifa_queue *q) in cmpifaddrs() 366 static struct ifaddrs * 367 sortifaddrs(struct ifaddrs *list, in sortifaddrs() argument 368 int (*compare)(struct ifaddrs *, struct ifaddrs *, struct ifa_queue *), in sortifaddrs() argument 371 struct ifaddrs *right, *temp, *last, *result, *next, *tail; in sortifaddrs() 782 struct ifaddrs *ifap, *sifap, *ifa; in list_interfaces_ioctl() [all …]
|
/freebsd/crypto/openssh/ |
H A D | sshconnect.c | 292 check_ifaddrs(const char *ifname, int af, const struct ifaddrs *ifaddrs, in check_ifaddrs() argument 298 const struct ifaddrs *ifa; in check_ifaddrs() 306 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in check_ifaddrs() 357 struct ifaddrs *ifaddrs = NULL; in ssh_create_socket() local 396 if ((r = getifaddrs(&ifaddrs)) != 0) { in ssh_create_socket() 403 ifaddrs, &bindaddr, &bindaddrlen) != 0) { in ssh_create_socket() 431 if (ifaddrs != NULL) in ssh_create_socket() 432 freeifaddrs(ifaddrs); in ssh_create_socket()
|
/freebsd/contrib/blocklist/bin/ |
H A D | internal.c | 47 struct ifaddrs *ifas;
|
H A D | internal.h | 48 extern struct ifaddrs *ifas;
|
/freebsd/contrib/hyperv/tools/ |
H A D | hv_kvp_daemon.c | 575 struct ifaddrs *ifaddrs_ptr; in kvp_if_name_to_mac() 576 struct ifaddrs *head_ifaddrs_ptr; in kvp_if_name_to_mac() 606 struct ifaddrs *ifaddrs_ptr; in kvp_mac_to_if_name() 607 struct ifaddrs *head_ifaddrs_ptr; in kvp_mac_to_if_name() 811 struct ifaddrs *ifap; in kvp_get_ip_info() 812 struct ifaddrs *curp; in kvp_get_ip_info()
|