Lines Matching defs:ifr
184 struct ifreq ifr;
192 memset(&ifr, 0, sizeof(ifr));
193 ifr.ifr_ifindex = ifindex;
194 if (ioctl(udp_sock, SIOCGIFNAME, &ifr))
196 if (ioctl(udp_sock, SIOCGIFHWADDR, &ifr))
198 if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER)
200 if (setsockopt(udp_sock, SOL_SOCKET, SO_BINDTODEVICE, ifr.ifr_name, strlen(ifr.ifr_name)+1) < 0)
212 ah->ar_hrd = htons(ifr.ifr_hwaddr.sa_family);
218 memcpy(p, ifr.ifr_hwaddr.sa_data, ah->ar_hln);
671 struct ifreq ifr;
672 memset(&ifr, 0, sizeof(ifr));
674 strncpy(ifr.ifr_name, ifnames[i], IFNAMSIZ);
675 if (ioctl(udp_sock, SIOCGIFINDEX, &ifr)) {
679 ifvec[i] = ifr.ifr_ifindex;