Lines Matching defs:ifr
388 struct ifreq ifr;
436 memset(&ifr, 0, sizeof(ifr));
437 strncpy(ifr.ifr_name, pifreq->ifr_name, sizeof(ifr.ifr_name));
438 if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
444 fl = ifr.ifr_flags;
457 strncpy(first_ether_name, ifr.ifr_name, sizeof(first_ether_name));
576 struct ifreq ifr;
701 memset(&ifr, 0, sizeof(ifr));
702 sprintf(ifr.ifr_name, "%s", ifname);
703 ifr.ifr_ip_muxid = ipmuxid;
712 if (ioctl(ipfd, SIOCSIFMUXID, &ifr) < 0) {
758 slprintf(ifr.ifr_name, sizeof(ifr.ifr_name), PPP_DRV_NAME "%d", ifunit);
759 ifr.ifr_metric = ipmuxid;
760 if (strioctl(ipfd, SIOCSIFNAME, (char *)&ifr, sizeof ifr, 0) < 0)
761 fatal("Can't set interface name %s: %m", ifr.ifr_name);
776 struct ifreq ifr;
797 memset(&ifr, 0, sizeof(ifr));
798 sprintf(ifr.ifr_name, "%s", ifname);
799 if (ioctl(ipfd, SIOCGIFFLAGS, &ifr) < 0) {
804 if (ioctl(ipfd, SIOCGIFMUXID, &ifr) < 0) {
809 ipmuxid = ifr.ifr_ip_muxid;
1508 struct ifreq ifr;
1514 memset(&ifr, 0, sizeof(ifr));
1515 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
1516 ifr.ifr_metric = link_mtu;
1517 if (ioctl(ipfd, SIOCSIFMTU, &ifr) < 0) {
1518 error("Couldn't set IP MTU (%s): %m", ifr.ifr_name);
1531 error("Couldn't set IPv6 MTU (%s): %m", ifr.ifr_name);
1769 struct ifreq ifr;
1771 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
1772 if (ioctl(ipfd, SIOCGIFFLAGS, &ifr) < 0) {
1776 ifr.ifr_flags |= IFF_UP;
1777 if (ioctl(ipfd, SIOCSIFFLAGS, &ifr) < 0) {
1792 struct ifreq ifr;
1796 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
1797 if (ioctl(ipfd, SIOCGIFFLAGS, &ifr) < 0) {
1801 ifr.ifr_flags &= ~IFF_UP;
1802 if (ioctl(ipfd, SIOCSIFFLAGS, &ifr) < 0) {
1973 struct ifreq ifr;
1976 memset(&ifr, 0, sizeof(ifr));
1977 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
1978 ifr.ifr_addr.sa_family = AF_INET;
1979 INET_ADDR(ifr.ifr_addr) = m;
1980 if (ioctl(ipfd, SIOCSIFNETMASK, &ifr) < 0) {
1984 ifr.ifr_addr.sa_family = AF_INET;
1985 INET_ADDR(ifr.ifr_addr) = o;
1986 if (ioctl(ipfd, SIOCSIFADDR, &ifr) < 0) {
1995 if (ioctl(ipfd, SIOCGIFFLAGS, &ifr) >= 0
1996 && (ifr.ifr_flags & IFF_POINTOPOINT) == 0) {
1997 ifr.ifr_flags |= IFF_POINTOPOINT;
1998 if (ioctl(ipfd, SIOCSIFFLAGS, &ifr) < 0) {
2003 ifr.ifr_dstaddr.sa_family = AF_INET;
2004 INET_ADDR(ifr.ifr_dstaddr) = h;
2005 if (ioctl(ipfd, SIOCSIFDSTADDR, &ifr) < 0) {
2155 struct ifreq *ifr, *ifend, ifreq;
2177 for (ifr = ifc.ifc_req; ifr < ifend; ++ifr) {
2178 if (ifr->ifr_addr.sa_family != AF_INET)
2183 strlcpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
2195 ina = INET_ADDR(ifr->ifr_addr);
2201 if (ifr >= ifend) {
2207 info("found interface %s for proxy ARP", ifr->ifr_name);
2208 if (!get_hw_addr(ifr->ifr_name, ina, hwaddr)) {
2209 error("Couldn't get hardware address for %s", ifr->ifr_name);
2398 struct ifreq *ifr, *ifend, ifreq;
2429 for (ifr = ifc.ifc_req; ifr < ifend; ++ifr) {
2433 if (ifr->ifr_addr.sa_family != AF_INET)
2435 ina = INET_ADDR(ifr->ifr_addr);
2441 strlcpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));