Home
last modified time | relevance | path

Searched refs:ifmr (Results 1 – 5 of 5) sorted by relevance

/external/chromium_org/net/base/
Dnet_util_posix.cc95 struct ifmediareq ifmr = {}; in GetNetworkInterfaceType() local
96 strncpy(ifmr.ifm_name, interface_name.c_str(), sizeof(ifmr.ifm_name) - 1); in GetNetworkInterfaceType()
103 if (ioctl(s, SIOCGIFMEDIA, &ifmr) != -1) { in GetNetworkInterfaceType()
104 if (ifmr.ifm_current & IFM_IEEE80211) { in GetNetworkInterfaceType()
106 } else if (ifmr.ifm_current & IFM_ETHER) { in GetNetworkInterfaceType()
/external/wpa_supplicant_8/src/drivers/
Ddriver_bsd.c179 struct ifmediareq ifmr; in bsd_get_if_media() local
181 os_memset(&ifmr, 0, sizeof(ifmr)); in bsd_get_if_media()
182 os_strlcpy(ifmr.ifm_name, drv->ifname, sizeof(ifmr.ifm_name)); in bsd_get_if_media()
184 if (ioctl(drv->sock, SIOCGIFMEDIA, &ifmr) < 0) { in bsd_get_if_media()
190 return ifmr.ifm_current; in bsd_get_if_media()
1460 struct ifmediareq ifmr; in get80211opmode() local
1462 (void) memset(&ifmr, 0, sizeof(ifmr)); in get80211opmode()
1463 (void) os_strlcpy(ifmr.ifm_name, drv->ifname, sizeof(ifmr.ifm_name)); in get80211opmode()
1465 if (ioctl(drv->sock, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0) { in get80211opmode()
1466 if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) { in get80211opmode()
[all …]
Ddriver_wired.c461 struct ifmediareq ifmr; in wpa_driver_wired_get_ifstatus() local
470 os_memset(&ifmr, 0, sizeof(ifmr)); in wpa_driver_wired_get_ifstatus()
471 os_strlcpy(ifmr.ifm_name, ifname, IFNAMSIZ); in wpa_driver_wired_get_ifstatus()
472 if (ioctl(s, SIOCGIFMEDIA, (caddr_t) &ifmr) < 0) { in wpa_driver_wired_get_ifstatus()
478 *status = (ifmr.ifm_status & (IFM_ACTIVE | IFM_AVALID)) == in wpa_driver_wired_get_ifstatus()
Ddriver_macsec_qca.c178 struct ifmediareq ifmr; in macsec_qca_get_ifstatus() local
187 os_memset(&ifmr, 0, sizeof(ifmr)); in macsec_qca_get_ifstatus()
188 os_strlcpy(ifmr.ifm_name, ifname, IFNAMSIZ); in macsec_qca_get_ifstatus()
189 if (ioctl(s, SIOCGIFMEDIA, (caddr_t) &ifmr) < 0) { in macsec_qca_get_ifstatus()
195 *status = (ifmr.ifm_status & (IFM_ACTIVE | IFM_AVALID)) == in macsec_qca_get_ifstatus()
/external/dhcpcd/
Dnet.c271 struct ifmediareq ifmr; in carrier_status() local
291 memset(&ifmr, 0, sizeof(ifmr)); in carrier_status()
292 strlcpy(ifmr.ifm_name, iface->name, sizeof(ifmr.ifm_name)); in carrier_status()
293 if (ioctl(socket_afnet, SIOCGIFMEDIA, &ifmr) != -1 && in carrier_status()
294 ifmr.ifm_status & IFM_AVALID) in carrier_status()
295 ret = (ifmr.ifm_status & IFM_ACTIVE) ? 1 : 0; in carrier_status()