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.cpp37 bool GetIfState(const char* if_name, int sock, struct ifreq* ifr) { in GetIfState() argument
38 memset(ifr, 0, sizeof(*ifr)); in GetIfState()
39 if (strlcpy(ifr->ifr_name, if_name, sizeof(ifr->ifr_name)) >= in GetIfState()
40 sizeof(ifr->ifr_name)) { in GetIfState()
45 if (TEMP_FAILURE_RETRY(ioctl(sock, SIOCGIFFLAGS, ifr)) != 0) { in GetIfState()
64 struct ifreq ifr; in GetUpState() local
65 if (!GetIfState(if_name, sock.get(), &ifr)) { in GetUpState()
69 return ifr.ifr_flags & IFF_UP; in GetUpState()
80 struct ifreq ifr; in SetUpState() local
81 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()
103 if (!set_address(&ifr.ifr_addr, address) || in main()
104 ioctl(s, SIOCSIFADDR, &ifr)) { in main()
111 if (set_address(&ifr.ifr_netmask, env("INTERNAL_NETMASK4"))) { in main()
112 if (ioctl(s, SIOCSIFNETMASK, &ifr)) { in main()
/frameworks/base/services/core/jni/
Dcom_android_server_TestNetworkService.cpp59 ifreq ifr{}; in createTunTapInterface() local
62 ifr.ifr_flags = (isTun ? IFF_TUN : IFF_TAP) | IFF_NO_PI; in createTunTapInterface()
63 strlcpy(ifr.ifr_name, iface, IFNAMSIZ); in createTunTapInterface()
64 if (ioctl(tun.get(), TUNSETIFF, &ifr)) { in createTunTapInterface()
65 throwException(env, errno, "allocating", ifr.ifr_name); in createTunTapInterface()
71 ifr.ifr_flags = IFF_UP; in createTunTapInterface()
73 if (ioctl(inet6CtrlSock.get(), SIOCSIFFLAGS, &ifr)) { in createTunTapInterface()
74 throwException(env, errno, "activating", ifr.ifr_name); in createTunTapInterface()