Lines Matching refs:ifrp
90 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()
156 memcpy(ifl->lladdr, ifrp->ifr_hwaddr.sa_data, 14); in load_if()
157 strncpy(ifl->name, ifrp->ifr_name, IFNAMSIZ); in load_if()
164 if (ioctl(fd, SIOCGIFNETMASK, ifrp)) { in load_if()
168 mask = ((struct sockaddr_in*)&ifrp->ifr_netmask)->sin_addr.s_addr; in load_if()
169 if (ioctl(fd, SIOCGIFDSTADDR, ifrp)) { in load_if()
173 prefix = ((struct sockaddr_in*)&ifrp->ifr_dstaddr)->sin_addr.s_addr; in load_if()