/external/dhcpcd/ |
ifaddrs.c | 36 struct ifaddrs *ifa; local 48 ifa = malloc(sizeof(struct ifaddrs)); 49 if (!ifa) 51 memset(ifa, 0, sizeof(struct ifaddrs)); 53 ifa->ifa_name = malloc(strlen(name)+1); 54 if (!ifa->ifa_name) { 55 free(ifa); 58 strcpy(ifa->ifa_name, name); 59 ifa->ifa_flags = flags; 67 ifa->ifa_addr = (struct sockaddr *)saddr 99 struct ifaddrs *ifa; local [all...] |
ifaddrs.h | 32 extern void freeifaddrs(struct ifaddrs *ifa);
|
net.c | 316 struct ifaddrs *ifaddrs, *ifa; local 342 for (ifa = ifaddrs; ifa; ifa = ifa->ifa_next) { 343 if (ifa->ifa_addr != NULL) { 345 if (ifa->ifa_addr->sa_family != AF_LINK) 348 if (ifa->ifa_addr->sa_family != AF_PACKET) 356 if (strcmp(ifp->name, ifa->ifa_name) == 0) 368 if (strcmp(ifn, ifa->ifa_name) == 0 505 struct ifaddrs *ifaddrs, *ifa; local [all...] |
if-bsd.c | 146 struct ifaliasreq ifa; local 152 memset(&ifa, 0, sizeof(ifa)); 153 strlcpy(ifa.ifra_name, iface->name, sizeof(ifa.ifra_name)); 162 ADDADDR(ifa.ifra_addr, address); 163 ADDADDR(ifa.ifra_mask, netmask); 165 ADDADDR(ifa.ifra_broadaddr, broadcast); 170 retval = ioctl(socket_afnet, SIOCDIFADDR, &ifa); 172 retval = ioctl(socket_afnet, SIOCAIFADDR, &ifa); [all...] |
if-linux.c | 287 struct ifaddrmsg *ifa; local 296 if ((size_t)len < sizeof(*ifa)) { 302 ifa = NLMSG_DATA(nlm); 303 if (if_indextoname(ifa->ifa_index, ifn) == NULL) 308 rta = (struct rtattr *) IFA_RTA(ifa); 309 len = NLMSG_PAYLOAD(nlm, sizeof(*ifa)); 312 inet_cidrtoaddr(ifa->ifa_prefixlen, &net); 462 struct ifaddrmsg ifa; member in struct:nlma 489 if (!(nlm->ifa.ifa_index = if_nametoindex(iface->name))) { 494 nlm->ifa.ifa_family = AF_INET [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/chromium/net/base/ |
net_util_posix.cc | 69 for (ifaddrs *ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { 70 int family = ifa->ifa_addr->sa_family; 73 std::string name = ifa->ifa_name; 74 if (address.FromSockAddr(ifa->ifa_addr, 75 sizeof(ifa->ifa_addr)) &&
|
/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:__anon6682 [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/ipsec-tools/src/racoon/ |
grabmyaddr.c | 403 struct ifaddrmsg *ifa; local 407 ifa = NLMSG_DATA(h); 408 parse_rtattr(rta, IFA_MAX, IFA_RTA(ifa), IFA_PAYLOAD(h)); 410 if (ifa->ifa_family != AF_INET6) 412 if (ifa->ifa_flags & IFA_F_TENTATIVE) 420 addr.ss_family = ifa->ifa_family; 426 sin6->sin6_scope_id = ifa->ifa_index; 739 struct ifa_msghdr *ifa = (struct ifa_msghdr *) msg; local 744 parse_addresses(ifa + 1, msg + ifa->ifam_msglen [all...] |
/external/ipsec-tools/src/racoon/samples/roadwarrior/client/ |
phase1-down.sh | 43 route add default ${DEFAULT_GW} -ifa ${LOCAL_ADDR}
|
phase1-up.sh | 41 route add default ${DEFAULT_GW} -ifa ${INTERNAL_ADDR4}
|