/external/android-clat/ |
setif.c | 39 struct ifaddrmsg ifa; local 48 memset(&ifa, 0, sizeof(ifa)); 49 if (!(ifa.ifa_index = if_nametoindex(ifname))) { 53 ifa.ifa_family = family; 54 ifa.ifa_prefixlen = prefixlen; 55 ifa.ifa_scope = RT_SCOPE_UNIVERSE; 57 msg = nlmsg_alloc_ifaddr(RTM_NEWADDR, NLM_F_ACK | NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE, &ifa);
|
getaddr.c | 98 struct ifaddrmsg ifa; local 110 memset(&ifa, 0, sizeof(ifa)); 111 ifa.ifa_family = targ.family; 121 send_ifaddrmsg(RTM_GETADDR, NLM_F_REQUEST | NLM_F_ROOT, &ifa, callbacks);
|
/external/dhcpcd/ |
ifaddrs.c | 37 struct ifaddrs *ifa; local 49 ifa = malloc(sizeof(struct ifaddrs)); 50 if (!ifa) 52 memset(ifa, 0, sizeof(struct ifaddrs)); 54 ifa->ifa_name = malloc(strlen(name)+1); 55 if (!ifa->ifa_name) { 56 free(ifa); 59 strcpy(ifa->ifa_name, name); 60 ifa->ifa_flags = flags; 68 ifa->ifa_addr = (struct sockaddr *)saddr 100 struct ifaddrs *ifa; local [all...] |
if-bsd.c | 158 struct ifaliasreq ifa; local 164 memset(&ifa, 0, sizeof(ifa)); 165 strlcpy(ifa.ifra_name, iface->name, sizeof(ifa.ifra_name)); 174 ADDADDR(ifa.ifra_addr, address); 175 ADDADDR(ifa.ifra_mask, netmask); 177 ADDADDR(ifa.ifra_broadaddr, broadcast); 182 retval = ioctl(socket_afnet, SIOCDIFADDR, &ifa); 184 retval = ioctl(socket_afnet, SIOCAIFADDR, &ifa); [all...] |
if-linux.c | 294 struct ifaddrmsg *ifa; local 303 if ((size_t)len < sizeof(*ifa)) { 309 ifa = NLMSG_DATA(nlm); 310 if (if_indextoname(ifa->ifa_index, ifn) == NULL) 315 rta = (struct rtattr *) IFA_RTA(ifa); 316 len = NLMSG_PAYLOAD(nlm, sizeof(*ifa)); 319 inet_cidrtoaddr(ifa->ifa_prefixlen, &net); 481 struct ifaddrmsg ifa; member in struct:nlma 508 if (!(nlm->ifa.ifa_index = if_nametoindex(iface->name))) { 513 nlm->ifa.ifa_family = AF_INET [all...] |
net.c | 334 struct ifaddrs *ifaddrs, *ifa; local 360 for (ifa = ifaddrs; ifa; ifa = ifa->ifa_next) { 361 if (ifa->ifa_addr != NULL) { 363 if (ifa->ifa_addr->sa_family != AF_LINK) 366 if (ifa->ifa_addr->sa_family != AF_PACKET) 374 if (strcmp(ifp->name, ifa->ifa_name) == 0) 386 if (strcmp(ifn, ifa->ifa_name) == 0 537 struct ifaddrs *ifaddrs, *ifa; local [all...] |
/external/iputils/ninfod/ |
ninfod_addrs.c | 170 struct ni_ifaddrs *ifa; local 172 for (ifa = ifa0; ifa; ifa = ifa->ifa_next) { 173 if (!ifa->ifa_addr) 175 if (ifa->ifa_flags & (IFA_F_TENTATIVE|IFA_F_SECONDARY)) 188 IN6_ARE_ADDR_EQUAL((struct in6_addr *)ifa->ifa_addr, 198 ifindex = ifa->ifa_ifindex; 218 struct ni_ifaddrs *ifa; local 339 struct ni_ifaddrs *ifa; local 378 struct ni_ifaddrs *ifa; local [all...] |
ni_ifaddrs.c | 352 struct ni_ifaddrs *ifl = NULL, *ifa = NULL; local 361 ifa = data = calloc(1, NLMSG_ALIGN(sizeof(struct ni_ifaddrs[icnt])) 364 *ifap = ifa; 416 ifa->ifa_ifindex = nlm_index; 417 ifa->ifa_flags = nlm_flags; 429 ifl->ifa_next = ifa; 468 ifa->ifa_addr = data; 478 ifa->ifa_cacheinfo = xdata; 508 ifa->ifa_addr = (struct sockaddr *) data; 509 memcpy(ifa->ifa_addr, ifamap.address, ifamap.address_len) [all...] |
/external/libpcap/ |
fad-getad.c | 142 struct ifaddrs *ifap, *ifa; local 167 for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { 171 if (!(ifa->ifa_flags & IFF_UP)) { 198 if (ifa->ifa_addr != NULL) { 199 addr = ifa->ifa_addr; 201 netmask = ifa->ifa_netmask; 207 if (ifa->ifa_flags & IFF_BROADCAST & [all...] |
/external/libppp/src/ |
iface.h | 33 struct ncprange ifa; /* local address/mask */ member in struct:iface_addr
|
arp.c | 288 struct sockaddr_in *ifa, *netmask; local 290 ifa = (struct sockaddr_in *)sa[RTAX_IFA]; 299 inet_ntoa(ifa->sin_addr), a); 302 if ((ifa->sin_addr.s_addr & netmask->sin_addr.s_addr) ==
|
ipv6cp.c | 119 struct ifaddrs *ifa, *ifap = NULL; local 138 for (ifa = ifap; ifa; ifa = ifa->ifa_next) { 141 if (ifa->ifa_addr->sa_family != AF_LINK) 144 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
|
command.c | 3180 struct ncprange ifa; local 3229 struct ncpaddr ifa; local [all...] |
/external/dnsmasq/src/ |
netlink.c | 188 struct ifaddrmsg *ifa = NLMSG_DATA(h); local 189 struct rtattr *rta = IFA_RTA(ifa); 190 unsigned int len1 = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa)); 192 if (ifa->ifa_family == AF_INET) 196 netmask.s_addr = htonl(0xffffffff << (32 - ifa->ifa_prefixlen)); 211 if (!((*ipv4_callback)(addr, ifa->ifa_index, netmask, broadcast, parm))) 215 else if (ifa->ifa_family == AF_INET6) 227 if (!((*ipv6_callback)(addrp, ifa->ifa_index, ifa->ifa_index, parm)))
|
/external/dnsmasq/contrib/wrt/ |
dhcp_release.c | 224 struct ifaddrmsg *ifa = NLMSG_DATA(h); local 226 unsigned int len1 = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa)); 228 if (ifa->ifa_index == index && ifa->ifa_family == AF_INET) 232 netmask.s_addr = htonl(0xffffffff << (32 - ifa->ifa_prefixlen)); 235 for (rta = IFA_RTA(ifa); RTA_OK(rta, len1); rta = RTA_NEXT(rta, len1))
|
/system/core/libsysutils/src/ |
NetlinkEvent.cpp | 236 struct ifaddrmsg *ifa; local 238 if (sizeof(*ifa) > (size_t) len) { 243 ifa = (ifaddrmsg *)NLMSG_DATA(nh); 245 if (!parseIfAddrMessage(nh->nlmsg_type, ifa, rtasize)) {
|
/external/iputils/ |
rarpd.c | 92 struct ifaddr *ifa; local 111 while ((ifa = ifl->ifa_list) != NULL) { 112 ifl->ifa_list = ifa->next; 113 free(ifa); 174 for (ifa = ifl->ifa_list; ifa; ifa = ifa->next) { 175 if (ifa->local == addr && 176 ifa->prefix == prefix & 242 struct ifaddr *ifa; local 298 struct ifaddr *ifa; local 367 struct ifaddr *ifa; local [all...] |
ping.c | 393 struct ifaddrs *ifa0, *ifa; local 401 for (ifa = ifa0; ifa; ifa = ifa->ifa_next) { 402 if (!ifa->ifa_addr || ifa->ifa_addr->sa_family != AF_INET) 404 if (!strncmp(ifa->ifa_name, device, sizeof(device) - 1) && 405 !memcmp(&((struct sockaddr_in *)ifa->ifa_addr)->sin_addr, 410 if (!ifa) [all...] |
arping.c | 68 struct ifaddrs *ifa; member in struct:device 572 /* Common check for ifa->ifa_flags */ 598 struct ifaddrs *ifa0, *ifa; local 607 for (ifa = ifa0; ifa; ifa = ifa->ifa_next) { 608 if (!ifa->ifa_addr) 610 if (ifa->ifa_addr->sa_family != AF_PACKET) 612 if (device.name && ifa->ifa_name && strcmp(ifa->ifa_name, device.name) 935 struct ifaddrs *ifa; local [all...] |
ping6.c | 1005 struct ifaddrs *ifa0, *ifa; local 1012 for (ifa = ifa0; ifa; ifa = ifa->ifa_next) { 1013 if (!ifa->ifa_addr || ifa->ifa_addr->sa_family != AF_INET6) 1015 if (!strncmp(ifa->ifa_name, device, sizeof(device) - 1) && 1016 IN6_ARE_ADDR_EQUAL(&((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr, 1020 if (!ifa) [all...] |
/external/iproute2/ip/ |
ipaddress.c | 508 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 519 len -= NLMSG_LENGTH(sizeof(*ifa)); 528 parse_rtattr(rta_tb, IFA_MAX, IFA_RTA(ifa), n->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))); 535 if (filter.ifindex && filter.ifindex != ifa->ifa_index) 537 if ((filter.scope^ifa->ifa_scope)&filter.scopemask) 539 if ((filter.flags^ifa->ifa_flags)&filter.flagmask) 547 label = ll_idx_n2a(ifa->ifa_index, b1); 555 dst.family = ifa->ifa_family; 562 if (filter.family && filter.family != ifa->ifa_family 695 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 706 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 724 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 968 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 1053 struct ifaddrmsg ifa; member in struct:__anon21142 [all...] |