Home
last modified time | relevance | path

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

/packages/modules/Connectivity/service/jni/
Dcom_android_server_TestNetworkService.cpp70 ifreq ifr{}; in createTunTapImpl() local
73 ifr.ifr_flags = (isTun ? IFF_TUN : IFF_TAP) | IFF_NO_PI; in createTunTapImpl()
78 throwException(env, EOPNOTSUPP, "IFF_NO_CARRIER not supported", ifr.ifr_name); in createTunTapImpl()
81 ifr.ifr_flags |= IFF_NO_CARRIER; in createTunTapImpl()
83 strlcpy(ifr.ifr_name, iface, IFNAMSIZ); in createTunTapImpl()
84 if (ioctl(tun.get(), TUNSETIFF, &ifr)) { in createTunTapImpl()
85 throwException(env, errno, "allocating", ifr.ifr_name); in createTunTapImpl()
92 ifr.ifr_flags = IFF_MULTICAST; in createTunTapImpl()
94 if (ioctl(inet6CtrlSock.get(), SIOCSIFFLAGS, &ifr)) { in createTunTapImpl()
95 throwException(env, errno, "set IFF_MULTICAST", ifr.ifr_name); in createTunTapImpl()
[all …]
Dcom_android_server_connectivity_ClatCoordinator.cpp230 struct ifreq ifr = { in com_android_server_connectivity_ClatCoordinator_createTunInterface() local
233 strlcpy(ifr.ifr_name, v4interface.c_str(), sizeof(ifr.ifr_name)); in com_android_server_connectivity_ClatCoordinator_createTunInterface()
235 if (ioctl(fd, TUNSETIFF, &ifr, sizeof(ifr))) { in com_android_server_connectivity_ClatCoordinator_createTunInterface()
/packages/modules/Connectivity/thread/service/jni/
Dcom_android_server_thread_TunInterfaceController.cpp50 struct ifreq ifr = { in com_android_server_thread_TunInterfaceController_createTunInterface() local
53 strlcpy(ifr.ifr_name, ifName.c_str(), sizeof(ifr.ifr_name)); in com_android_server_thread_TunInterfaceController_createTunInterface()
55 if (ioctl(fd, TUNSETIFF, &ifr, sizeof(ifr)) != 0) { in com_android_server_thread_TunInterfaceController_createTunInterface()
69 ifr.ifr_mtu = mtu; in com_android_server_thread_TunInterfaceController_createTunInterface()
70 if (ioctl(inet6, SIOCSIFMTU, &ifr) != 0) { in com_android_server_thread_TunInterfaceController_createTunInterface()
84 struct ifreq ifr; in com_android_server_thread_TunInterfaceController_setInterfaceUp() local
87 ifr.ifr_flags = isUp ? IFF_UP : 0; in com_android_server_thread_TunInterfaceController_setInterfaceUp()
88 strlcpy(ifr.ifr_name, ifName.c_str(), sizeof(ifr.ifr_name)); in com_android_server_thread_TunInterfaceController_setInterfaceUp()
96 if (ioctl(inet6, SIOCSIFFLAGS, &ifr) != 0) { in com_android_server_thread_TunInterfaceController_setInterfaceUp()
/packages/modules/Virtualization/virtualizationservice/vmnic/src/
Daidl.rs49 let mut ifr: ifreq = unsafe { std::mem::zeroed() }; in create_tap_interface() localVariable
50 ifr.ifr_ifru.ifru_flags = (IFF_TAP | IFF_NO_PI | IFF_VNET_HDR) as c_short; in create_tap_interface()
51 ifr.ifr_name[..ifname.len()].copy_from_slice(ifname); in create_tap_interface()
53 unsafe { ioctl_tunsetiff(fd, &ifr) }.context("Failed to ioctl TUNSETIFF")?; in create_tap_interface()
57 unsafe { ifr.ifr_ifru.ifru_flags |= IFF_UP as c_short }; in create_tap_interface()
59 unsafe { ioctl_siocsifflags(sockfd, &ifr) }.context("Failed to ioctl SIOCSIFFLAGS")?; in create_tap_interface()
65 let ifr: ifreq = unsafe { std::mem::zeroed() }; in get_tap_ifreq() localVariable
68 unsafe { ioctl_tungetiff(fd, &ifr) }.context("Failed to ioctl TUNGETIFF")?; in get_tap_ifreq()
69 Ok(ifr) in get_tap_ifreq()
72 fn delete_tap_interface(fd: RawFd, sockfd: c_int, ifr: &mut ifreq) -> Result<()> { in delete_tap_interface()
[all …]
/packages/modules/Bluetooth/system/btif/src/
Dbtif_pan.cc267 struct ifreq ifr; in tap_if_up() local
274 memset(&ifr, 0, sizeof(ifr)); in tap_if_up()
275 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up()
276 err = ioctl(sk, SIOCGIFHWADDR, &ifr); in tap_if_up()
284 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up()
285 memcpy(ifr.ifr_hwaddr.sa_data, addr.address, 6); in tap_if_up()
295 if (ifr.ifr_hwaddr.sa_data[0] & 0x01) { in tap_if_up()
297 ifr.ifr_hwaddr.sa_data[0] &= ~0x01; in tap_if_up()
300 err = ioctl(sk, SIOCSIFHWADDR, (caddr_t)&ifr); in tap_if_up()
310 memset(&ifr, 0, sizeof(ifr)); in tap_if_up()
[all …]
/packages/modules/DnsResolver/tests/
Dtun_forwarder.cpp150 ifreq ifr = { in createTun() local
153 strlcpy(ifr.ifr_name, ifname.data(), sizeof(ifr.ifr_name)); in createTun()
155 if (ioctl(fd.get(), TUNSETIFF, &ifr) == -1) { in createTun()
156 PLOG(WARNING) << "failed to bring up tun " << ifr.ifr_name; in createTun()
161 ifr.ifr_flags = IFF_UP; in createTun()
162 if (ioctl(inet6CtrlSock.get(), SIOCSIFFLAGS, &ifr) == -1) { in createTun()
163 PLOG(WARNING) << "failed on SIOCSIFFLAGS " << ifr.ifr_name; in createTun()
/packages/modules/Connectivity/staticlibs/native/tcutils/
Dtcutils.cpp459 struct ifreq ifr = {}; in hardwareAddressType() local
466 strncpy(ifr.ifr_name, interface, sizeof(ifr.ifr_name)); in hardwareAddressType()
468 if (ioctl(fd, SIOCGIFHWADDR, &ifr, sizeof(ifr))) { in hardwareAddressType()
471 return ifr.ifr_hwaddr.sa_family; in hardwareAddressType()
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/
DSyscalls.cpp102 StatusOr<ifreq> ioctl(Fd sock, unsigned long request, ifreq* ifr) const override { in ioctl()
103 auto rv = ::ioctl(sock.get(), request, ifr); in ioctl()
107 return *ifr; in ioctl()
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/include/netdutils/
DMockSyscalls.h47 MOCK_CONST_METHOD3(ioctl, StatusOr<ifreq>(Fd sock, unsigned long request, ifreq* ifr));
DSyscalls.h62 virtual StatusOr<ifreq> ioctl(Fd sock, unsigned long request, ifreq* ifr) const = 0;
/packages/inputmethods/LatinIME/dictionaries/
Dlv_wordlist.combined.gz1dictionary=main:lv,locale=lv,description=Latviešu,date=1393228136, ...
Dsv_wordlist.combined.gz
Dlt_wordlist.combined.gz1dictionary=main:lt,locale=lt,description=Lietuvių,date=1393228136, ...
Dfi_wordlist.combined.gz1dictionary=main:fi,locale=fi,description=Suomi,date=1393228135, ...