Lines Matching refs:ifreq

166 static void set_ifreq_to_ifname(struct ifreq *ifreq)  in set_ifreq_to_ifname()  argument
168 memset(ifreq, 0, sizeof(struct ifreq)); in set_ifreq_to_ifname()
169 strncpy_IFNAMSIZ(ifreq->ifr_name, G.iface); in set_ifreq_to_ifname()
185 char buf[sizeof(struct ifreq)]; in detect_link_mii()
186 struct ifreq *const ifreq = (void *)buf; in detect_link_mii() local
188 struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; in detect_link_mii()
190 set_ifreq_to_ifname(ifreq); in detect_link_mii()
192 if (network_ioctl(SIOCGMIIPHY, ifreq, "SIOCGMIIPHY") < 0) { in detect_link_mii()
198 if (network_ioctl(SIOCGMIIREG, ifreq, "SIOCGMIIREG") < 0) { in detect_link_mii()
208 char buf[sizeof(struct ifreq)]; in detect_link_priv()
209 struct ifreq *const ifreq = (void *)buf; in detect_link_priv() local
211 struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; in detect_link_priv()
213 set_ifreq_to_ifname(ifreq); in detect_link_priv()
215 if (network_ioctl(SIOCDEVPRIVATE, ifreq, "SIOCDEVPRIVATE") < 0) { in detect_link_priv()
221 if (network_ioctl(SIOCDEVPRIVATE+1, ifreq, "SIOCDEVPRIVATE+1") < 0) { in detect_link_priv()
230 struct ifreq ifreq; in detect_link_ethtool() local
233 set_ifreq_to_ifname(&ifreq); in detect_link_ethtool()
236 ifreq.ifr_data = (void*) &edata; in detect_link_ethtool()
238 if (network_ioctl(SIOCETHTOOL, &ifreq, "ETHTOOL_GLINK") < 0) { in detect_link_ethtool()
247 struct ifreq ifreq; in detect_link_iff() local
249 set_ifreq_to_ifname(&ifreq); in detect_link_iff()
251 if (network_ioctl(SIOCGIFFLAGS, &ifreq, "SIOCGIFFLAGS") < 0) { in detect_link_iff()
261 if (!(ifreq.ifr_flags & IFF_UP) && G.iface_last_status != IFSTATUS_ERR) in detect_link_iff()
264 return (ifreq.ifr_flags & IFF_RUNNING) ? IFSTATUS_UP : IFSTATUS_DOWN; in detect_link_iff()
353 struct ifreq ifrequest; in up_iface()
394 struct ifreq ifrequest; in maybe_up_new_iface()
629 struct ifreq ifrequest; in ifplugd_main()