Searched refs:ifr (Results 1 – 5 of 5) sorted by relevance
/system/core/libnetutils/ |
D | ifc_utils.c | 169 static void ifc_init_ifr(const char *name, struct ifreq *ifr) in ifc_init_ifr() argument 171 memset(ifr, 0, sizeof(struct ifreq)); in ifc_init_ifr() 172 strncpy(ifr->ifr_name, name, IFNAMSIZ); in ifc_init_ifr() 173 ifr->ifr_name[IFNAMSIZ - 1] = 0; in ifc_init_ifr() 179 struct ifreq ifr; in ifc_get_hwaddr() local 180 ifc_init_ifr(name, &ifr); in ifc_get_hwaddr() 182 r = ioctl(ifc_ctl_sock, SIOCGIFHWADDR, &ifr); in ifc_get_hwaddr() 185 memcpy(ptr, &ifr.ifr_hwaddr.sa_data, ETH_ALEN); in ifc_get_hwaddr() 192 struct ifreq ifr; in ifc_get_ifindex() local 193 ifc_init_ifr(name, &ifr); in ifc_get_ifindex() [all …]
|
/system/netd/tests/ |
D | tun_interface.cpp | 68 struct ifreq ifr = { in init() local 71 strlcpy(ifr.ifr_name, mIfName.c_str(), sizeof(ifr.ifr_name)); in init() 76 int ret = ioctl(mFd, TUNSETIFF, &ifr, sizeof(ifr)); in init() 83 if (ifc_add_address(ifr.ifr_name, srcStr, 64) || in init() 84 ifc_add_address(ifr.ifr_name, dstStr, 64)) { in init() 90 mIfIndex = if_nametoindex(ifr.ifr_name); in init()
|
/system/bt/btif/src/ |
D | btif_pan.cc | 283 struct ifreq ifr; in tap_if_up() local 290 memset(&ifr, 0, sizeof(ifr)); in tap_if_up() 291 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up() 292 err = ioctl(sk, SIOCGIFHWADDR, &ifr); in tap_if_up() 301 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up() 302 memcpy(ifr.ifr_hwaddr.sa_data, addr->address, 6); in tap_if_up() 312 if (ifr.ifr_hwaddr.sa_data[0] & 0x01) { in tap_if_up() 315 ifr.ifr_hwaddr.sa_data[0] &= ~0x01; in tap_if_up() 318 err = ioctl(sk, SIOCSIFHWADDR, (caddr_t)&ifr); in tap_if_up() 328 memset(&ifr, 0, sizeof(ifr)); in tap_if_up() [all …]
|
/system/extras/tests/tcp_nuke_addr/ |
D | tcp_nuke_addr_test.cpp | 71 ifreq ifr; in killSockets() local 72 memset(&ifr, 0, sizeof(ifr)); in killSockets() 74 strncpy(ifr.ifr_name, "lo", strlen("lo")); in killSockets() 75 memcpy(&ifr.ifr_addr, &listenaddr, sizeof(listenaddr)); in killSockets() 81 if (ioctl(ioctlsock, SIOCKILLADDR, &ifr) != 0) { in killSockets()
|
/system/core/init/ |
D | builtins.cpp | 202 struct ifreq ifr; in do_ifup() local 204 strlcpy(ifr.ifr_name, args[1].c_str(), IFNAMSIZ); in do_ifup() 209 if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) { in do_ifup() 213 ifr.ifr_flags |= IFF_UP; in do_ifup() 215 if (ioctl(s, SIOCSIFFLAGS, &ifr) < 0) { in do_ifup()
|