/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/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))
|
/external/iproute2/ip/ |
ipaddress.c | 453 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 462 len -= NLMSG_LENGTH(sizeof(*ifa)); 471 parse_rtattr(rta_tb, IFA_MAX, IFA_RTA(ifa), n->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))); 478 if (filter.ifindex && filter.ifindex != ifa->ifa_index) 480 if ((filter.scope^ifa->ifa_scope)&filter.scopemask) 482 if ((filter.flags^ifa->ifa_flags)&filter.flagmask) 490 label = ll_idx_n2a(ifa->ifa_index, b1); 498 dst.family = ifa->ifa_family; 505 if (filter.family && filter.family != ifa->ifa_family 639 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 650 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 668 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 901 struct ifaddrmsg *ifa = NLMSG_DATA(n); local 986 struct ifaddrmsg ifa; member in struct:__anon9112 [all...] |