Home
last modified time | relevance | path

Searched refs:ifr (Results 1 – 3 of 3) sorted by relevance

/frameworks/opt/net/wifi/libwifi_system_iface/
Dinterface_tool.cpp36 bool GetIfState(const char* if_name, int sock, struct ifreq* ifr) { in GetIfState() argument
37 memset(ifr, 0, sizeof(*ifr)); in GetIfState()
38 if (strlcpy(ifr->ifr_name, if_name, sizeof(ifr->ifr_name)) >= in GetIfState()
39 sizeof(ifr->ifr_name)) { in GetIfState()
44 if (TEMP_FAILURE_RETRY(ioctl(sock, SIOCGIFFLAGS, ifr)) != 0) { in GetIfState()
63 struct ifreq ifr; in GetUpState() local
64 if (!GetIfState(if_name, sock.get(), &ifr)) { in GetUpState()
68 return ifr.ifr_flags & IFF_UP; in GetUpState()
79 struct ifreq ifr; in SetUpState() local
80 if (!GetIfState(if_name, sock.get(), &ifr)) { in SetUpState()
[all …]
/frameworks/native/cmds/ip-up-vpn/
Dip-up-vpn.c90 struct ifreq ifr; in main() local
91 memset(&ifr, 0, sizeof(ifr)); in main()
94 ifr.ifr_flags = IFF_UP; in main()
95 strncpy(ifr.ifr_name, interface, IFNAMSIZ); in main()
96 if (ioctl(s, SIOCSIFFLAGS, &ifr)) { in main()
102 if (!set_address(&ifr.ifr_addr, address) || in main()
103 ioctl(s, SIOCSIFADDR, &ifr)) { in main()
109 if (set_address(&ifr.ifr_netmask, env("INTERNAL_NETMASK4"))) { in main()
110 if (ioctl(s, SIOCSIFNETMASK, &ifr)) { in main()
/frameworks/base/libs/common_time/
Dcommon_time_server.cpp444 struct ifreq ifr; in setupSocket_l() local
445 memset(&ifr, 0, sizeof(ifr)); in setupSocket_l()
446 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", mBindIface.string()); in setupSocket_l()
447 ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = 0; in setupSocket_l()
449 (void *)&ifr, sizeof(ifr)); in setupSocket_l()
453 "(errno = %d)", ifr.ifr_name, errno); in setupSocket_l()
545 struct ifreq ifr; in assignDeviceID() local
546 memset(&ifr, 0, sizeof(ifr)); in assignDeviceID()
547 ifr.ifr_addr.sa_family = AF_INET; in assignDeviceID()
548 strlcpy(ifr.ifr_name, mBindIface.string(), IFNAMSIZ); in assignDeviceID()
[all …]