Lines Matching refs:ifr
1156 struct ifreq *ifr;
1177 ifr = (struct ifreq *)data;
1185 if_clone_create(ifr->ifr_name, sizeof(ifr->ifr_name)) :
1186 if_clone_destroy(ifr->ifr_name));
1201 ifp = ifunit(ifr->ifr_name);
1208 ifr->ifr_flags = ifp->if_flags;
1214 error = mac_ifnet_label_get(kauth_cred_get(), ifr, ifp);
1221 ifr->ifr_metric = ifp->if_metric;
1227 ifr->ifr_mtu = ifp->if_mtu;
1233 ifr->ifr_phys = ifp->if_physical;
1242 ifnet_set_flags(ifp, ifr->ifr_flags, (u_int16_t)~IFF_CANTCHANGE);
1266 error = mac_ifnet_label_set(kauth_cred_get(), ifr, ifp);
1275 ifp->if_metric = ifr->ifr_metric;
1330 if (ifr->ifr_mtu < IF_MINMTU || ifr->ifr_mtu > IF_MAXMTU)
1379 if (ifr->ifr_addr.sa_family != AF_LINK)
1384 error = if_addmulti(ifp, &ifr->ifr_addr, NULL);
1387 error = if_delmulti(ifp, &ifr->ifr_addr);
1461 if (ifr->ifr_addr.sa_family == 0 &&
1462 ifr->ifr_addr.sa_len < 16) {
1463 ifr->ifr_addr.sa_family = ifr->ifr_addr.sa_len;
1464 ifr->ifr_addr.sa_len = 16;
1467 if (ifr->ifr_addr.sa_len == 0)
1468 ifr->ifr_addr.sa_len = 16;
1497 *(u_short *)&ifr->ifr_addr = ifr->ifr_addr.sa_family;
1538 struct ifreq ifr;
1565 ifr.ifr_flags = ifp->if_flags;
1568 error = ifnet_ioctl(ifp, 0, SIOCSIFFLAGS, &ifr);
1595 struct ifreq ifr;
1600 * Zero the ifr buffer to make sure we don't
1603 bzero(&ifr, sizeof(struct ifreq));
1607 for (ifp = ifnet_head.tqh_first; space > sizeof(ifr) && ifp; ifp = ifp->if_link.tqe_next) {
1613 if(ifnlen + 1 > sizeof ifr.ifr_name) {
1617 strlcpy(ifr.ifr_name, workbuf, IFNAMSIZ);
1624 for ( ; space > sizeof (ifr) && ifa;
1634 (struct osockaddr *)&ifr.ifr_addr;
1635 ifr.ifr_addr = *sa;
1637 error = copyout((caddr_t)&ifr, ifrp, sizeof(ifr));
1640 ifr.ifr_addr = *sa;
1641 error = copyout((caddr_t)&ifr, ifrp, sizeof(ifr));
1644 if (space < sizeof (ifr) + sa->sa_len - sizeof(*sa))
1647 error = copyout((caddr_t)&ifr, ifrp, sizeof (ifr.ifr_name));
1657 space -= sizeof (ifr);
1664 bzero((caddr_t)&ifr.ifr_addr, sizeof(ifr.ifr_addr));
1665 error = copyout((caddr_t)&ifr, ifrp, sizeof (ifr));
1668 space -= sizeof (ifr);