Lines Matching refs:ifr

509 	struct ifreq *ifr;  in if_readconf()  local
532 ifr = ifc.ifc_req; in if_readconf()
534 add_interface(ilist, ifr->ifr_name); in if_readconf()
535 ifr++; in if_readconf()
587 struct ifreq ifr; in if_fetch() local
593 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
594 if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) { in if_fetch()
598 ife->flags = ifr.ifr_flags; in if_fetch()
608 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
609 if (ioctl(skfd, SIOCGIFHWADDR, &ifr) >= 0) in if_fetch()
610 memcpy(ife->hwaddr, ifr.ifr_hwaddr.sa_data, 8); in if_fetch()
613 ife->type = ifr.ifr_hwaddr.sa_family; in if_fetch()
615 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
616 if (ioctl(skfd, SIOCGIFMETRIC, &ifr) >= 0) in if_fetch()
617 ife->metric = ifr.ifr_metric; in if_fetch()
619 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
620 if (ioctl(skfd, SIOCGIFMTU, &ifr) >= 0) in if_fetch()
621 ife->mtu = ifr.ifr_mtu; in if_fetch()
624 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
625 if (ioctl(skfd, SIOCGIFMAP, &ifr) == 0) in if_fetch()
626 ife->map = ifr.ifr_map; in if_fetch()
630 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
631 if (ioctl(skfd, SIOCGIFTXQLEN, &ifr) >= 0) in if_fetch()
632 ife->tx_queue_len = ifr.ifr_qlen; in if_fetch()
635 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
636 ifr.ifr_addr.sa_family = AF_INET; in if_fetch()
637 if (ioctl(skfd, SIOCGIFADDR, &ifr) == 0) { in if_fetch()
639 ife->addr = ifr.ifr_addr; in if_fetch()
640 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
641 if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) >= 0) in if_fetch()
642 ife->dstaddr = ifr.ifr_dstaddr; in if_fetch()
644 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
645 if (ioctl(skfd, SIOCGIFBRDADDR, &ifr) >= 0) in if_fetch()
646 ife->broadaddr = ifr.ifr_broadaddr; in if_fetch()
648 strncpy_IFNAMSIZ(ifr.ifr_name, ifname); in if_fetch()
649 if (ioctl(skfd, SIOCGIFNETMASK, &ifr) >= 0) in if_fetch()
650 ife->netmask = ifr.ifr_netmask; in if_fetch()