Home
last modified time | relevance | path

Searched refs:ifrp (Results 1 – 4 of 4) sorted by relevance

/external/libpcap/
Dfad-gifc.c145 register struct ifreq *ifrp, *ifend, *ifnext; in pcap_findalldevs_interfaces() local
207 (buf_size - ifc.ifc_len) > sizeof(ifrp->ifr_name) + MAX_SA_LEN) in pcap_findalldevs_interfaces()
213 ifrp = (struct ifreq *)buf; in pcap_findalldevs_interfaces()
216 for (; ifrp < ifend; ifrp = ifnext) { in pcap_findalldevs_interfaces()
227 n = SA_LEN(&ifrp->ifr_addr) + sizeof(ifrp->ifr_name); in pcap_findalldevs_interfaces()
228 if (n < sizeof(*ifrp)) in pcap_findalldevs_interfaces()
229 ifnext = ifrp + 1; in pcap_findalldevs_interfaces()
231 ifnext = (struct ifreq *)((char *)ifrp + n); in pcap_findalldevs_interfaces()
244 if (!(*ifrp->ifr_name)) in pcap_findalldevs_interfaces()
252 if (strncmp(ifrp->ifr_name, "dummy", 5) == 0) in pcap_findalldevs_interfaces()
[all …]
Dfad-glifc.c82 register struct lifreq *ifrp, *ifend; in pcap_findalldevs_interfaces() local
163 ifrp = (struct lifreq *)buf; in pcap_findalldevs_interfaces()
166 for (; ifrp < ifend; ifrp++) { in pcap_findalldevs_interfaces()
172 if (strncmp(ifrp->lifr_name, "dummy", 5) == 0) in pcap_findalldevs_interfaces()
178 if (!(*check_usable)(ifrp->lifr_name)) { in pcap_findalldevs_interfaces()
188 if (((struct sockaddr *)&ifrp->lifr_addr)->sa_family == AF_INET6) in pcap_findalldevs_interfaces()
196 strncpy(ifrflags.lifr_name, ifrp->lifr_name, in pcap_findalldevs_interfaces()
212 strncpy(ifrnetmask.lifr_name, ifrp->lifr_name, in pcap_findalldevs_interfaces()
214 memcpy(&ifrnetmask.lifr_addr, &ifrp->lifr_addr, in pcap_findalldevs_interfaces()
239 strncpy(ifrbroadaddr.lifr_name, ifrp->lifr_name, in pcap_findalldevs_interfaces()
[all …]
/external/iputils/
Drarpd.c90 struct ifreq *ifrp, *ifend; in load_if() local
120 for (ifrp = ibuf; ifrp < ifend; ifrp++) { in load_if()
125 if (ifrp->ifr_addr.sa_family != AF_INET) in load_if()
127 addr = ((struct sockaddr_in*)&ifrp->ifr_addr)->sin_addr.s_addr; in load_if()
130 if (ioctl(fd, SIOCGIFINDEX, ifrp)) { in load_if()
134 if (ifidx && ifrp->ifr_ifindex != ifidx) in load_if()
137 if (ifl->index == ifrp->ifr_ifindex) in load_if()
141 int index = ifrp->ifr_ifindex; in load_if()
143 if (ioctl(fd, SIOCGIFHWADDR, ifrp)) { in load_if()
155 ifl->hatype = ifrp->ifr_hwaddr.sa_family; in load_if()
[all …]
/external/e2fsprogs/lib/uuid/
Dgen_uuid.c229 struct ifreq ifr, *ifrp; in get_node_id() local
266 for (i = 0; i < n; i+= ifreq_size(*ifrp) ) { in get_node_id()
267 ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i); in get_node_id()
268 strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ); in get_node_id()
280 sdlp = (struct sockaddr_dl *) &ifrp->ifr_addr; in get_node_id()