Lines Matching refs:ifrp
90 struct ifreq *ifrp, *ifend;
120 for (ifrp = ibuf; ifrp < ifend; ifrp++) {
125 if (ifrp->ifr_addr.sa_family != AF_INET)
127 addr = ((struct sockaddr_in*)&ifrp->ifr_addr)->sin_addr.s_addr;
130 if (ioctl(fd, SIOCGIFINDEX, ifrp)) {
134 if (ifidx && ifrp->ifr_ifindex != ifidx)
137 if (ifl->index == ifrp->ifr_ifindex)
141 int index = ifrp->ifr_ifindex;
143 if (ioctl(fd, SIOCGIFHWADDR, ifrp)) {
155 ifl->hatype = ifrp->ifr_hwaddr.sa_family;
156 memcpy(ifl->lladdr, ifrp->ifr_hwaddr.sa_data, 14);
157 strncpy(ifl->name, ifrp->ifr_name, IFNAMSIZ);
164 if (ioctl(fd, SIOCGIFNETMASK, ifrp)) {
168 mask = ((struct sockaddr_in*)&ifrp->ifr_netmask)->sin_addr.s_addr;
169 if (ioctl(fd, SIOCGIFDSTADDR, ifrp)) {
173 prefix = ((struct sockaddr_in*)&ifrp->ifr_dstaddr)->sin_addr.s_addr;