/bionic/libc/bionic/ |
if_nametoindex.c | 44 struct ifreq ifr; local 46 memset(&ifr, 0, sizeof(struct ifreq)); 47 strncpy(ifr.ifr_name, ifname, IFNAMSIZ); 48 ifr.ifr_name[IFNAMSIZ - 1] = 0; 52 if (ioctl(ctl_sock, SIOCGIFINDEX, &ifr) >= 0) { 53 index = ifr.ifr_ifindex;
|
if_indextoname.c | 46 struct ifreq ifr; local 49 memset(&ifr, 0, sizeof(struct ifreq)); 50 ifr.ifr_ifindex = ifindex; 53 if (ioctl(ctl_sock, SIOCGIFNAME, &ifr) >= 0) { 54 ret = strncpy (ifname, ifr.ifr_name, IFNAMSIZ);
|
/external/iproute2/ip/ |
tunnel.c | 67 struct ifreq ifr; local 71 strncpy(ifr.ifr_name, dev, IFNAMSIZ); 73 err = ioctl(fd, SIOCGIFINDEX, &ifr); 79 return ifr.ifr_ifindex; 84 struct ifreq ifr; local 88 strncpy(ifr.ifr_name, dev, IFNAMSIZ); 90 err = ioctl(fd, SIOCGIFHWADDR, &ifr); 96 return ifr.ifr_addr.sa_family; 102 static struct ifreq ifr; local 106 ifr.ifr_ifindex = idx 119 struct ifreq ifr; local 135 struct ifreq ifr; local 154 struct ifreq ifr; local 173 struct ifreq ifr; local [all...] |
ipmaddr.c | 277 struct ifreq ifr; local 280 memset(&ifr, 0, sizeof(ifr)); 290 if (ifr.ifr_name[0]) 292 strncpy(ifr.ifr_name, *argv, IFNAMSIZ); 299 if (ifr.ifr_hwaddr.sa_data[0]) 301 if (ll_addr_a2n(ifr.ifr_hwaddr.sa_data, 309 if (ifr.ifr_name[0] == 0) { 319 if (ioctl(fd, cmd, (char*)&ifr) != 0) {
|
/external/strace/ |
sock.c | 73 print_addr(tcp, addr, ifr) 76 struct ifreq *ifr; 78 if (ifr->ifr_addr.sa_family == AF_INET) { 80 sinp = (struct sockaddr_in *) &ifr->ifr_addr; 83 printstr(tcp, addr, sizeof(ifr->ifr_addr.sa_data)); 91 struct ifreq ifr; local 149 umove(tcp, tcp->u_arg[2], &ifr); 152 tprintf(", {ifr_index=%d, ifr_name=???}", ifr.ifr_ifindex); 154 tprintf(", {ifr_name=\"%s\", ???}", ifr.ifr_name); 157 ifr.ifr_ifindex, ifr.ifr_name) [all...] |
/external/dhcpcd/ |
bpf.c | 56 struct ifreq ifr; local 88 memset(&ifr, 0, sizeof(ifr)); 89 strlcpy(ifr.ifr_name, iface->name, sizeof(ifr.ifr_name)); 90 if (ioctl(fd, BIOCSETIF, &ifr) == -1)
|
net.c | 192 struct ifreq *ifr; member in union:__anon3260 195 struct ifreq *ifr; local 230 ifr = ifreqs.ifr; 233 if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_ifru)) 235 ifr->ifr_addr.sa_len; 238 p += sizeof(*ifr); 240 if (strcmp(ifname, ifr->ifr_name) != 0) 246 if (hwaddr && hwlen && ifr->ifr_addr.sa_family == AF_LINK) 291 struct ifreq ifr; local 323 struct ifreq ifr; local 368 struct ifreq ifr; local 452 struct ifreq ifr; local 491 struct ifreq ifr; local [all...] |
/external/bluetooth/bluez/network/ |
common.c | 192 struct ifreq ifr; local 197 memset(&ifr, 0, sizeof(ifr)); 198 strncpy(ifr.ifr_name, devname, IF_NAMESIZE - 1); 200 ifr.ifr_flags |= IFF_UP; 201 ifr.ifr_flags |= IFF_MULTICAST; 203 err = ioctl(sk, SIOCSIFFLAGS, (caddr_t) &ifr); 217 struct ifreq ifr; local 222 memset(&ifr, 0, sizeof(ifr)); 238 struct ifreq ifr; local [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...] |
helper.c | 353 struct ifreq ifr; local 354 ifr.ifr_ifindex = lease->last_interface; 355 if (ioctl(daemon->dhcpfd, SIOCGIFNAME, &ifr) != -1) 356 strncpy(buf->interface, ifr.ifr_name, IF_NAMESIZE);
|
network.c | 23 struct ifreq ifr; local 28 ifr.ifr_ifindex = index; 29 if (ioctl(fd, SIOCGIFNAME, &ifr) == -1) 32 strncpy(name, ifr.ifr_name, IF_NAMESIZE); 123 struct ifreq ifr; local 134 !indextoname(fd, if_index, ifr.ifr_name) || 135 ioctl(fd, SIOCGIFFLAGS, &ifr) == -1) 146 loopback = ifr.ifr_flags & IFF_LOOPBACK; 148 if (ioctl(fd, SIOCGIFMTU, &ifr) != -1) 149 mtu = ifr.ifr_mtu 961 struct ifreq ifr; local [all...] |
/external/libpcap/ |
pcap-snoop.c | 208 struct ifreq ifr; local 318 (void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); 319 if (ioctl(fd, SIOCGIFMTU, (char *)&ifr) < 0) { 341 if (snaplen > ifr.ifr_mtu + ll_hdrlen) 342 snaplen = ifr.ifr_mtu + ll_hdrlen;
|
pcap-snit.c | 269 struct ifreq ifr; /* interface request struct */ local 334 strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); 335 ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\0'; 337 si.ic_len = sizeof(ifr); 338 si.ic_dp = (char *)𝔦 341 ifr.ifr_name, pcap_strerror(errno));
|
/external/ppp/pppd/plugins/pppoatm/ |
pppoatm.c | 178 struct ifreq ifr; local 184 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 185 ifr.ifr_mtu = mtu; 186 if (ioctl(sock, SIOCSIFMTU, (caddr_t) &ifr) < 0)
|
/external/wpa_supplicant/ |
driver_wired.c | 59 struct ifreq ifr; local 68 os_memset(&ifr, 0, sizeof(ifr)); 69 os_strncpy(ifr.ifr_name, ifname, IFNAMSIZ); 70 if (ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { 76 *flags = ifr.ifr_flags & 0xffff; 83 struct ifreq ifr; local 92 os_memset(&ifr, 0, sizeof(ifr)); 93 os_strncpy(ifr.ifr_name, ifname, IFNAMSIZ) 107 struct ifreq ifr; local [all...] |
l2_packet_linux.c | 100 struct ifreq ifr; local 118 os_strncpy(ifr.ifr_name, l2->ifname, sizeof(ifr.ifr_name)); 119 if (ioctl(l2->fd, SIOCGIFINDEX, &ifr) < 0) { 125 l2->ifindex = ifr.ifr_ifindex; 129 ll.sll_ifindex = ifr.ifr_ifindex; 138 if (ioctl(l2->fd, SIOCGIFHWADDR, &ifr) < 0) { 144 os_memcpy(l2->own_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN); 169 struct ifreq ifr; local 177 os_memset(&ifr, 0, sizeof(ifr)) [all...] |
/external/wpa_supplicant_6/wpa_supplicant/src/drivers/ |
driver_wired.c | 58 struct ifreq ifr; local 67 os_memset(&ifr, 0, sizeof(ifr)); 68 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); 69 if (ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { 75 *flags = ifr.ifr_flags & 0xffff; 82 struct ifreq ifr; local 91 os_memset(&ifr, 0, sizeof(ifr)); 92 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ) 106 struct ifreq ifr; local [all...] |
/external/wpa_supplicant_6/wpa_supplicant/src/l2_packet/ |
l2_packet_linux.c | 100 struct ifreq ifr; local 118 os_memset(&ifr, 0, sizeof(ifr)); 119 os_strlcpy(ifr.ifr_name, l2->ifname, sizeof(ifr.ifr_name)); 120 if (ioctl(l2->fd, SIOCGIFINDEX, &ifr) < 0) { 126 l2->ifindex = ifr.ifr_ifindex; 130 ll.sll_ifindex = ifr.ifr_ifindex; 139 if (ioctl(l2->fd, SIOCGIFHWADDR, &ifr) < 0) { 145 os_memcpy(l2->own_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN) 170 struct ifreq ifr; local [all...] |
/hardware/broadcom/wlan/bcm4329/src/dhd/exe/ |
dhdu_linux.c | 66 struct ifreq *ifr = (struct ifreq *)dhd; local 81 ifr->ifr_data = (caddr_t) &ioc; 82 if ((ret = ioctl(s, SIOCDEVPRIVATE, ifr)) < 0) { 98 struct ifreq ifr; local 109 ifr.ifr_data = (caddr_t)&info; 110 strncpy(ifr.ifr_name, name, IFNAMSIZ); 111 if ((ret = ioctl(s, SIOCETHTOOL, &ifr)) < 0) { 139 dhd_find(struct ifreq *ifr) 146 ifr->ifr_name[0] = '\0'; 160 strncpy(ifr->ifr_name, name, IFNAMSIZ) 174 struct ifreq ifr; local [all...] |
/system/core/toolbox/ |
ifconfig.c | 22 static void setflags(int s, struct ifreq *ifr, int set, int clr) 24 if(ioctl(s, SIOCGIFFLAGS, ifr) < 0) die("SIOCGIFFLAGS"); 25 ifr->ifr_flags = (ifr->ifr_flags & (~clr)) | set; 26 if(ioctl(s, SIOCSIFFLAGS, ifr) < 0) die("SIOCSIFFLAGS"); 36 static void setmtu(int s, struct ifreq *ifr, const char *mtu) 39 ifr->ifr_mtu = m; 40 if(ioctl(s, SIOCSIFMTU, ifr) < 0) die("SIOCSIFMTU"); 42 static void setdstaddr(int s, struct ifreq *ifr, const char *addr) 44 init_sockaddr_in((struct sockaddr_in *) &ifr->ifr_dstaddr, addr) 62 struct ifreq ifr; local [all...] |
iftop.c | 72 struct ifreq ifr; local 81 memset(&ifr, 0, sizeof(struct ifreq)); 82 ifr.ifr_addr.sa_family = AF_INET; 83 strcpy(ifr.ifr_name, if_name); 85 ret = ioctl(s, SIOCGIFMTU, &ifr); 97 return ifr.ifr_mtu;
|
/external/ppp/pppd/plugins/rp-pppoe/ |
plugin.c | 191 struct ifreq ifr; local 202 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 203 ifr.ifr_mtu = mtu; 204 if (ioctl(sock, SIOCSIFMTU, &ifr) < 0) { 280 struct ifreq ifr; local 301 strncpy(ifr.ifr_name, cmd, sizeof(ifr.ifr_name)); 302 if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) { 305 if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) [all...] |
/libcore/luni/src/main/native/ |
ifaddrs-android.h | 87 ifreq ifr; local 88 memset(&ifr, 0, sizeof(ifr)); 89 strcpy(ifr.ifr_name, name); 90 int rc = ioctl(fd.get(), SIOCGIFFLAGS, &ifr); 94 ifa_flags = ifr.ifr_flags;
|
java_net_NetworkInterface.cpp | 145 static bool doIoctl(JNIEnv* env, jstring name, int request, ifreq& ifr) { 153 memset(&ifr, 0, sizeof(ifr)); 154 env->GetStringUTFRegion(name, 0, nameLength, ifr.ifr_name); 162 int rc = ioctl(fd.get(), request, &ifr); 171 ifreq ifr; local 172 doIoctl(env, name, SIOCGIFFLAGS, ifr); // May throw. 173 return (ifr.ifr_flags & flag) != 0; 177 ifreq ifr; local 178 if (!doIoctl(env, name, SIOCGIFHWADDR, ifr)) { 198 ifreq ifr; local [all...] |
/external/dnsmasq/contrib/wrt/ |
dhcp_release.c | 255 struct ifreq ifr; local 277 strcpy(ifr.ifr_name, argv[1]); 278 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) == -1)
|