Lines Matching refs:ifrequest

353 	struct ifreq ifrequest;  in up_iface()  local
358 set_ifreq_to_ifname(&ifrequest); in up_iface()
359 if (network_ioctl(SIOCGIFFLAGS, &ifrequest, "getting interface flags") < 0) { in up_iface()
364 if (!(ifrequest.ifr_flags & IFF_UP)) { in up_iface()
365 ifrequest.ifr_flags |= IFF_UP; in up_iface()
368 if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0) { in up_iface()
377 if (network_ioctl(SIOCGIFADDR, &ifrequest, "can't get interface address") < 0) { in up_iface()
378 } else if (ifrequest.ifr_addr.sa_family != AF_INET) { in up_iface()
381 ((struct sockaddr_in*)(&ifrequest.ifr_addr))->sin_addr.s_addr = INADDR_ANY; in up_iface()
382 network_ioctl(SIOCSIFADDR, &ifrequest, "can't set interface address"); in up_iface()
384 network_ioctl(SIOCGIFFLAGS, &ifrequest, "can't get interface flags"); in up_iface()
394 struct ifreq ifrequest; in maybe_up_new_iface()
397 set_ifreq_to_ifname(&ifrequest); in maybe_up_new_iface()
399 ifrequest.ifr_data = &driver_info; in maybe_up_new_iface()
400 if (network_ioctl(SIOCETHTOOL, &ifrequest, NULL) == 0) { in maybe_up_new_iface()
405 set_ifreq_to_ifname(&ifrequest); in maybe_up_new_iface()
406 if (network_ioctl(SIOCGIFHWADDR, &ifrequest, NULL) == 0) { in maybe_up_new_iface()
408 (uint8_t)(ifrequest.ifr_hwaddr.sa_data[0]), in maybe_up_new_iface()
409 (uint8_t)(ifrequest.ifr_hwaddr.sa_data[1]), in maybe_up_new_iface()
410 (uint8_t)(ifrequest.ifr_hwaddr.sa_data[2]), in maybe_up_new_iface()
411 (uint8_t)(ifrequest.ifr_hwaddr.sa_data[3]), in maybe_up_new_iface()
412 (uint8_t)(ifrequest.ifr_hwaddr.sa_data[4]), in maybe_up_new_iface()
413 (uint8_t)(ifrequest.ifr_hwaddr.sa_data[5])); in maybe_up_new_iface()
629 struct ifreq ifrequest; in ifplugd_main() local
630 set_ifreq_to_ifname(&ifrequest); in ifplugd_main()
631 G.iface_exists = (network_ioctl(SIOCGIFINDEX, &ifrequest, NULL) == 0); in ifplugd_main()