/external/wpa_supplicant_8/src/ap/ |
vlan_ifconfig.c | 22 struct ifreq ifr; local 30 os_memset(&ifr, 0, sizeof(ifr)); 31 os_strlcpy(ifr.ifr_name, if_name, IFNAMSIZ); 33 if (ioctl(fd, SIOCGIFFLAGS, &ifr) != 0) { 42 ifr.ifr_flags |= IFF_UP; 44 ifr.ifr_flags &= ~IFF_UP; 46 if (ioctl(fd, SIOCSIFFLAGS, &ifr) != 0) {
|
/external/autotest/client/deps/fakemodem/src/ |
fakenet.c | 26 struct ifreq ifr; local 34 memset (&ifr, 0, sizeof (ifr)); 41 ifr.ifr_flags = IFF_TAP; 43 strncpy (ifr.ifr_name, dev, IFNAMSIZ); 45 if ((err = ioctl (fd, TUNSETIFF, (void *) &ifr)) < 0) { 50 strncpy (dev, ifr.ifr_name, IFNAMSIZ);
|
/external/android-clat/ |
tun.c | 48 struct ifreq ifr; local 51 memset(&ifr, 0, sizeof(ifr)); 53 ifr.ifr_flags = IFF_TUN; 55 strncpy(ifr.ifr_name, dev, IFNAMSIZ); 56 ifr.ifr_name[IFNAMSIZ-1] = '\0'; 59 if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){ 63 strcpy(dev, ifr.ifr_name);
|
clatd_microbenchmark.c | 72 struct ifreq ifr = { local 77 init_sockaddr_in((struct sockaddr_in *) &ifr.ifr_addr, "192.0.0.4"); 78 if (ioctl(s, SIOCSIFADDR, &ifr) < 0) die("SIOCSIFADDR"); 79 init_sockaddr_in((struct sockaddr_in *) &ifr.ifr_addr, "255.255.255.248"); 80 if (ioctl(s, SIOCSIFNETMASK, &ifr) < 0) die("SIOCSIFNETMASK"); 81 if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) die("SIOCGIFFLAGS"); 82 ifr.ifr_flags |= (IFF_UP | IFF_RUNNING); 83 if (ioctl(s, SIOCSIFFLAGS, &ifr) < 0) die("SIOCSIFFLAGS");
|
/external/autotest/client/profilers/powertop/src/ |
ethernet.c | 55 struct ifreq ifr; local 59 memset(&ifr, 0, sizeof(struct ifreq)); 65 strcpy(ifr.ifr_name, "eth0"); 68 ret = ioctl(sock, SIOCGIFFLAGS, &ifr); 74 if (ifr.ifr_flags & (IFF_UP | IFF_RUNNING)) { 82 ifr.ifr_data = (caddr_t)&wol; 83 ioctl(sock, SIOCETHTOOL, &ifr); 86 ioctl(sock, SIOCETHTOOL, &ifr); 96 struct ifreq ifr; local 100 memset(&ifr, 0, sizeof(struct ifreq)) [all...] |
wireless.c | 203 struct ifreq ifr; local 242 memset(&ifr, 0, sizeof(struct ifreq)); 249 strcpy(ifr.ifr_name, wireless_nic); 252 ret = ioctl(sock, SIOCGIFFLAGS, &ifr); 259 if (ifr.ifr_flags & (IFF_UP | IFF_RUNNING)) 264 ifr.ifr_data = (void*) &driver; 265 ret = ioctl(sock, SIOCETHTOOL, &ifr);
|
/external/ppp/pppd/plugins/rp-pppoe/ |
if.c | 100 struct ifreq ifr; local 136 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 137 if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { 142 memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, ETH_ALEN); 144 if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER) { 155 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 156 if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) { 158 } else if (ifr.ifr_mtu < ETH_DATA_LEN) [all...] |
/external/strace/ |
sock.c | 44 print_ifreq_addr(struct tcb *tcp, const struct ifreq *ifr, const long addr) 47 printxval(addrfams, ifr->ifr_addr.sa_family, "AF_???"); 49 if (ifr->ifr_addr.sa_family == AF_INET) { 51 (struct sockaddr_in *) &ifr->ifr_addr; 55 sizeof(ifr->ifr_addr.sa_data)); 67 const struct ifreq *ifr) 73 print_ifreq_addr(tcp, ifr, arg); 78 print_ifreq_addr(tcp, ifr, arg); 83 print_ifreq_addr(tcp, ifr, arg); 88 print_ifreq_addr(tcp, ifr, arg) 222 struct ifreq ifr; local [all...] |
/external/wpa_supplicant_8/src/drivers/ |
driver_openbsd.c | 33 struct ifreq ifr; local 35 os_memset(&ifr, 0, sizeof(ifr)); 36 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); 37 ifr.ifr_data = (void *)&nwid; 38 if (ioctl(drv->sock, SIOCG80211NWID, &ifr) < 0 ||
|
driver_nl80211_android.c | 45 struct ifreq ifr; local 50 os_memset(&ifr, 0, sizeof(ifr)); 52 os_strlcpy(ifr.ifr_name, bss->ifname, IFNAMSIZ); 60 ifr.ifr_data = &priv_cmd; 62 ret = ioctl(drv->global->ioctl_sock, SIOCDEVPRIVATE + 1, &ifr); 79 struct ifreq ifr; local 123 memset(&ifr, 0, sizeof(ifr)); 125 os_strlcpy(ifr.ifr_name, bss->ifname, IFNAMSIZ) [all...] |
linux_ioctl.c | 20 struct ifreq ifr; local 26 os_memset(&ifr, 0, sizeof(ifr)); 27 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); 29 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { 37 if (ifr.ifr_flags & IFF_UP) 39 ifr.ifr_flags |= IFF_UP; 41 if (!(ifr.ifr_flags & IFF_UP)) 43 ifr.ifr_flags &= ~IFF_UP; 46 if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) 60 struct ifreq ifr; local 82 struct ifreq ifr; local 105 struct ifreq ifr; local 162 struct ifreq ifr; local 184 struct ifreq ifr; local [all...] |
/frameworks/native/cmds/ip-up-vpn/ |
ip-up-vpn.c | 90 struct ifreq ifr; local 91 memset(&ifr, 0, sizeof(ifr)); 94 ifr.ifr_flags = IFF_UP; 95 strncpy(ifr.ifr_name, interface, IFNAMSIZ); 96 if (ioctl(s, SIOCSIFFLAGS, &ifr)) { 102 if (!set_address(&ifr.ifr_addr, address) || 103 ioctl(s, SIOCSIFADDR, &ifr)) { 109 if (set_address(&ifr.ifr_netmask, env("INTERNAL_NETMASK4"))) { 110 if (ioctl(s, SIOCSIFNETMASK, &ifr)) { [all...] |
/system/connectivity/dhcp_client/ |
device_info.cc | 56 struct ifreq ifr; local 62 memcpy(ifr.ifr_name, interface_name.c_str(), if_name_len); 63 ifr.ifr_name[if_name_len] = 0; 72 if (sockets_->Ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { 82 *mac_address = ByteString(ifr.ifr_hwaddr.sa_data, IFHWADDRLEN);
|
device_info_unittest.cc | 66 ACTION_P(SetIfreq, ifr) { 68 *ifr_arg = ifr; 72 const struct ifreq* const ifr = static_cast<struct ifreq*>(arg); local 73 return (ifr != nullptr) && 74 (strcmp(ifname, ifr->ifr_name) == 0); 80 struct ifreq ifr; local 81 memcpy(ifr.ifr_hwaddr.sa_data, kFakeMacAddress, sizeof(kFakeMacAddress)); 87 .WillOnce(DoAll(SetIfreq(ifr), Return(0)));
|
/development/samples/ToyVpn/server/linux/ |
ToyVpnServer.cpp | 65 ifreq ifr; local 66 memset(&ifr, 0, sizeof(ifr)); 67 ifr.ifr_flags = IFF_TUN | IFF_NO_PI; 68 strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); 70 if (ioctl(interface, TUNSETIFF, &ifr)) {
|
/bionic/libc/bionic/ |
net_if.cpp | 51 struct ifreq ifr; local 52 memset(&ifr, 0, sizeof(ifr)); 53 ifr.ifr_ifindex = ifindex; 55 int rc = ioctl(s, SIOCGIFNAME, &ifr); 58 return (rc == -1) ? nullptr : strncpy(ifname, ifr.ifr_name, IFNAMSIZ); 65 struct ifreq ifr; local 66 memset(&ifr, 0, sizeof(ifr)); 67 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)) [all...] |
/external/dnsmasq/src/ |
bpf.c | 34 struct ifreq *ifr; local 75 ifr = (struct ifreq *)ptr; 76 if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_ifru)) 77 len = ifr->ifr_addr.sa_len + offsetof(struct ifreq, ifr_ifru); 83 ifr = (struct ifreq *)ifreq.iov_base; 84 memcpy(ifr, ptr, len); 86 if (ifr->ifr_addr.sa_family == AF_INET && ipv4_callback) 90 addr = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr; 91 if (ioctl(fd, SIOCGIFNETMASK, ifr) == -1 [all...] |
/external/ipsec-tools/ |
main.c | 107 struct ifreq ifr = {.ifr_flags = IFF_TUN}; local 118 if (ioctl(tun, TUNSETIFF, &ifr)) { 122 sprintf(*envp, "INTERFACE=%s", ifr.ifr_name);
|
/external/libpcap/ |
pcap-can-linux.c | 148 struct ifreq ifr; local 173 memset(&ifr, 0, sizeof(ifr)); 174 strlcpy(ifr.ifr_name, handle->opt.source, sizeof(ifr.ifr_name)); 175 if (ioctl(handle->fd, SIOCGIFINDEX, &ifr) < 0) 183 handlep->ifindex = ifr.ifr_ifindex;
|
pcap-snoop.c | 211 struct ifreq ifr; local 326 (void)strncpy(ifr.ifr_name, p->opt.source, sizeof(ifr.ifr_name)); 327 if (ioctl(fd, SIOCGIFMTU, (char *)&ifr) < 0) { 349 if (p->snapshot > ifr.ifr_mtu + ll_hdrlen) 350 p->snapshot = ifr.ifr_mtu + ll_hdrlen;
|
/hardware/qcom/wlan/qcwcn/wpa_supplicant_8_lib/ |
driver_cmd_nl80211.c | 73 struct ifreq ifr; local 90 memset(&ifr, 0, sizeof(ifr)); 93 os_strlcpy(ifr.ifr_name, bss->ifname, IFNAMSIZ); 98 ifr.ifr_data = &priv_cmd; 100 if ((ret = ioctl(drv->global->ioctl_sock, SIOCDEVPRIVATE + 1, &ifr)) < 0) {
|
/packages/apps/Test/connectivity/sl4n/facades/wifi/ |
wifi_facade.cpp | 161 struct ifreq ifr; local 169 memset(&ifr, 0, sizeof(ifr)); 170 strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); 172 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { 180 if (ifr.ifr_flags & IFF_UP) { 184 ifr.ifr_flags |= IFF_UP; 186 if (!(ifr.ifr_flags & IFF_UP)) { 190 ifr.ifr_flags &= ~IFF_UP; 193 if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) [all...] |
/system/extras/tests/tcp_nuke_addr/ |
tcp_nuke_addr_test.cpp | 71 ifreq ifr; local 72 memset(&ifr, 0, sizeof(ifr)); 74 strncpy(ifr.ifr_name, "lo", strlen("lo")); 75 memcpy(&ifr.ifr_addr, &listenaddr, sizeof(listenaddr)); 81 if (ioctl(ioctlsock, SIOCKILLADDR, &ifr) != 0) {
|
/bionic/tests/ |
ifaddrs_test.cpp | 112 ifreq ifr; local 113 memset(&ifr, 0, sizeof(ifr)); 114 ifr.ifr_addr.sa_family = AF_INET; 115 if_name.copy(ifr.ifr_name, IFNAMSIZ - 1); 123 ASSERT_EQ(0, ioctl(fd, SIOCGIFFLAGS, &ifr)) << if_name << ' ' << strerror(errno); 124 request = ((ifr.ifr_flags & IFF_BROADCAST) != 0) ? SIOCGIFBRDADDR : SIOCGIFDSTADDR; 127 ASSERT_EQ(0, ioctl(fd, request, &ifr)) << if_name << ' ' << strerror(errno); 130 sockaddr_in* sock = reinterpret_cast<sockaddr_in*>(&ifr.ifr_addr);
|
/external/curl/CMake/ |
CurlTests.c | 466 struct ifreq ifr; local 467 if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|