Lines Matching defs:ifr
100 struct ifreq ifr;
136 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
137 if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
142 memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, ETH_ALEN);
144 if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER) {
155 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
156 if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
158 } else if (ifr.ifr_mtu < ETH_DATA_LEN) {
160 ifname, ifr.ifr_mtu, ETH_DATA_LEN);
169 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
170 if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
175 sa.sll_ifindex = ifr.ifr_ifindex;