Home
last modified time | relevance | path

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

/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 …]
/frameworks/opt/net/wifi/service/jni/
Dcom_android_server_wifi_WifiNative.cpp240 struct ifreq ifr; in set_iface_flags() local
250 memset(&ifr, 0, sizeof(ifr)); in set_iface_flags()
251 strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in set_iface_flags()
255 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in set_iface_flags()
265 if (ifr.ifr_flags & IFF_UP) { in set_iface_flags()
270 ifr.ifr_flags |= IFF_UP; in set_iface_flags()
272 if (!(ifr.ifr_flags & IFF_UP)) { in set_iface_flags()
277 ifr.ifr_flags &= ~IFF_UP; in set_iface_flags()
280 if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) { in set_iface_flags()