Home
last modified time | relevance | path

Searched refs:ifreq (Results 1 – 25 of 149) sorted by relevance

123456

/external/crosvm/net_util/src/sys/unix/
Dtap.rs63 let mut ifreq: net_sys::ifreq = Default::default(); in from_raw_descriptor() localVariable
64 let ret = ioctl_with_mut_ref(&tap_file, net_sys::TUNGETIFF(), &mut ifreq); in from_raw_descriptor()
72 if_name: ifreq.ifr_ifrn.ifrn_name, in from_raw_descriptor()
73 if_flags: ifreq.ifr_ifru.ifru_flags, in from_raw_descriptor()
77 pub fn create_tap_with_ifreq(ifreq: &mut net_sys::ifreq) -> Result<Tap> { in create_tap_with_ifreq()
94 let ret = unsafe { ioctl_with_mut_ref(&tuntap, net_sys::TUNSETIFF(), ifreq) }; in create_tap_with_ifreq()
103 if_name: unsafe { ifreq.ifr_ifrn.ifrn_name }, in create_tap_with_ifreq()
104 if_flags: unsafe { ifreq.ifr_ifru.ifru_flags }, in create_tap_with_ifreq()
136 let mut ifreq: net_sys::ifreq = Default::default(); in new_with_name() localVariable
138 let ifrn_name = ifreq.ifr_ifrn.ifrn_name.as_mut(); in new_with_name()
[all …]
/external/libwebsockets/lib/misc/
Dgetifaddrs.c76 struct ifreq *ifr; in getifaddrs2()
115 struct ifreq ifreq; in getifaddrs2() local
119 ifr = (struct ifreq *)p; in getifaddrs2()
132 memset(&ifreq, 0, sizeof(ifreq)); in getifaddrs2()
133 memcpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifr->ifr_name)); in getifaddrs2()
135 if (ioctl(fd, siocgifflags, &ifreq) < 0) { in getifaddrs2()
144 (*end)->ifa_flags = (unsigned int)ifreq.ifr_flags; in getifaddrs2()
151 if (ifreq.ifr_flags & IFF_BROADCAST) { in getifaddrs2()
156 } else if (ifreq.ifr_flags & IFF_POINTOPOINT) { in getifaddrs2()
197 sizeof(struct ifreq)); in getifaddrs()
[all …]
/external/strace/tests/
Dioctl_sock_gifconf.c46 if (val % (int) sizeof(struct ifreq)) in print_ifc_len()
50 val / (int) sizeof(struct ifreq)); in print_ifc_len()
81 i < (int) (MAX_STRLEN * sizeof(struct ifreq)); in print_ifconf()
82 i += sizeof(struct ifreq)) { in print_ifconf()
83 struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i); in print_ifconf()
95 if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq)) in print_ifconf()
136 struct ifreq *ifr = tail_alloc(2 * sizeof(*ifr)); in main()
/external/strace/tests-m32/
Dioctl_sock_gifconf.c46 if (val % (int) sizeof(struct ifreq)) in print_ifc_len()
50 val / (int) sizeof(struct ifreq)); in print_ifc_len()
81 i < (int) (MAX_STRLEN * sizeof(struct ifreq)); in print_ifconf()
82 i += sizeof(struct ifreq)) { in print_ifconf()
83 struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i); in print_ifconf()
95 if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq)) in print_ifconf()
136 struct ifreq *ifr = tail_alloc(2 * sizeof(*ifr)); in main()
/external/strace/tests-mx32/
Dioctl_sock_gifconf.c46 if (val % (int) sizeof(struct ifreq)) in print_ifc_len()
50 val / (int) sizeof(struct ifreq)); in print_ifc_len()
81 i < (int) (MAX_STRLEN * sizeof(struct ifreq)); in print_ifconf()
82 i += sizeof(struct ifreq)) { in print_ifconf()
83 struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i); in print_ifconf()
95 if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq)) in print_ifconf()
136 struct ifreq *ifr = tail_alloc(2 * sizeof(*ifr)); in main()
/external/ltp/testcases/kernel/pty/
Dpty04.c246 struct ifreq ifreq = { 0 }; in open_netdev() local
249 SAFE_IOCTL(pts, SIOCGIFNAME, ifreq.ifr_name); in open_netdev()
250 tst_res(TINFO, "Netdev is %s", ifreq.ifr_name); in open_netdev()
254 ifreq.ifr_mtu = ldisc->mtu; in open_netdev()
255 if (ioctl(sk, SIOCSIFMTU, &ifreq)) in open_netdev()
257 SAFE_IOCTL(sk, SIOCGIFMTU, &ifreq); in open_netdev()
258 mtu = ifreq.ifr_mtu; in open_netdev()
261 SAFE_IOCTL(sk, SIOCGIFFLAGS, &ifreq); in open_netdev()
262 ifreq.ifr_flags |= IFF_UP | IFF_RUNNING; in open_netdev()
263 SAFE_IOCTL(sk, SIOCSIFFLAGS, &ifreq); in open_netdev()
[all …]
/external/ppp/pppd/
Dsys-linux.c1194 struct ifreq ifr; in netif_set_mtu()
1210 struct ifreq ifr; in netif_get_mtu()
1780 struct ifreq *ifr, *ifend; in get_ether_addr()
1783 struct ifreq ifreq, bestifreq; in get_ether_addr() local
1785 struct ifreq ifs[MAX_IFS]; in get_ether_addr()
1802 ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq)); in get_ether_addr()
1806 strlcpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name)); in get_ether_addr()
1811 if (ioctl(sock_fd, SIOCGIFFLAGS, &ifreq) < 0) in get_ether_addr()
1814 if (((ifreq.ifr_flags ^ FLAGS_GOOD) & FLAGS_MASK) != 0) in get_ether_addr()
1819 if (ioctl(sock_fd, SIOCGIFNETMASK, &ifreq) < 0) in get_ether_addr()
[all …]
Dsys-solaris.c387 struct ifreq *pifreq; in get_first_ethernet()
388 struct ifreq ifr; in get_first_ethernet()
405 req_size = num_ifs * sizeof(struct ifreq); in get_first_ethernet()
431 for (i = ifc.ifc_len / sizeof(struct ifreq); i > 0; i--, pifreq++) { in get_first_ethernet()
576 struct ifreq ifr; in sys_init()
776 struct ifreq ifr; in sys_cleanup()
1508 struct ifreq ifr;
1769 struct ifreq ifr;
1792 struct ifreq ifr;
1973 struct ifreq ifr;
[all …]
/external/autotest/client/profilers/powertop/src/
Dethernet.c55 struct ifreq ifr; in activate_WOL_suggestion()
59 memset(&ifr, 0, sizeof(struct ifreq)); in activate_WOL_suggestion()
96 struct ifreq ifr; in suggest_WOL_off()
100 memset(&ifr, 0, sizeof(struct ifreq)); in suggest_WOL_off()
/external/libcups/cups/
Dgetifaddrs.c32 struct ifreq *ifp; /* Interface data */ in _cups_getifaddrs()
35 struct ifreq request; /* Interface request */ in _cups_getifaddrs()
91 ifp = (struct ifreq *)bufptr; in _cups_getifaddrs()
94 if (ifpsize < sizeof(struct ifreq)) in _cups_getifaddrs()
95 ifpsize = sizeof(struct ifreq); in _cups_getifaddrs()
/external/wpa_supplicant_8/src/drivers/
Dlinux_ioctl.c21 struct ifreq ifr; in linux_set_iface_flags()
61 struct ifreq ifr; in linux_iface_up()
83 struct ifreq ifr; in linux_get_ifhwaddr()
106 struct ifreq ifr; in linux_set_ifhwaddr()
152 struct ifreq ifr; in linux_br_add_if()
177 struct ifreq ifr; in linux_br_del_if()
/external/iputils/
Drdisc.c1105 struct ifreq ifreq, *ifr; in initifs() local
1124 bufsize = numifs * sizeof(struct ifreq); in initifs()
1152 for (i = 0, n = ifc.ifc_len/sizeof (struct ifreq); n > 0; n--, ifr++) { in initifs()
1153 ifreq = *ifr; in initifs()
1154 if (strlen(ifreq.ifr_name) >= IFNAMSIZ) in initifs()
1156 if (ioctl(sock, SIOCGIFFLAGS, (char *)&ifreq) < 0) { in initifs()
1162 if ((ifreq.ifr_flags & IFF_UP) == 0) in initifs()
1164 if (ifreq.ifr_flags & IFF_LOOPBACK) in initifs()
1166 if ((ifreq.ifr_flags & (IFF_MULTICAST|IFF_BROADCAST|IFF_POINTOPOINT)) == 0) in initifs()
1172 interfaces[i].flags = ifreq.ifr_flags; in initifs()
[all …]
/external/scapy/scapy/arch/
Dlinux.py190 ifreq = ioctl(sck.fileno(), SIOCGIFCONF,
194 out = struct.unpack("iL", ifreq)[0]
205 ifreq = ioctl(sck, SIOCGIFADDR, struct.pack("16s16x", ifname))
206 ifaddr = struct.unpack(">I", ifreq[20:24])[0]
207 ifreq = ioctl(sck, SIOCGIFNETMASK, struct.pack("16s16x", ifname))
208 msk = struct.unpack(">I", ifreq[20:24])[0]
235 ifreq = ioctl(s, SIOCGIFADDR,struct.pack("16s16x", LOOPBACK_NAME.encode("utf8")))
236 addrfamily = struct.unpack("h",ifreq[16:18])[0]
240 dst = socket.ntohl(struct.unpack("I",ifreq[20:24])[0]) & msk
241 ifaddr = scapy.utils.inet_ntoa(ifreq[20:24])
[all …]
/external/libpcap/
Dfad-gifc.c139 register struct ifreq *ifrp, *ifend, *ifnext; in pcap_findalldevs_interfaces()
147 struct ifreq ifrflags, ifrnetmask, ifrbroadaddr, ifrdstaddr; in pcap_findalldevs_interfaces()
207 ifrp = (struct ifreq *)buf; in pcap_findalldevs_interfaces()
208 ifend = (struct ifreq *)(buf + ifc.ifc_len); in pcap_findalldevs_interfaces()
225 ifnext = (struct ifreq *)((char *)ifrp + n); in pcap_findalldevs_interfaces()
Dpcap-haiku.cpp39 prepare_request(struct ifreq& request, const char* name) in prepare_request()
125 ifreq request; in pcap_stats_haiku()
131 if (ioctl(socket, SIOCGIFSTATS, &request, sizeof(struct ifreq)) < 0) { in pcap_stats_haiku()
215 struct ifreq request; in pcap_create_interface()
244 if (ioctl(socket, SIOCSPACKETCAP, &request, sizeof(struct ifreq)) < 0) { in pcap_create_interface()
/external/cronet/net/third_party/quiche/src/quiche/quic/qbone/bonnet/
Dtun_device.cc67 struct ifreq if_request; in Up()
83 struct ifreq if_request; in Down()
100 struct ifreq if_request; in OpenDevice()
162 struct ifreq if_request; in ConfigureInterface()
Dtun_device_test.cc62 auto* ifr = reinterpret_cast<struct ifreq*>(argp); in SetInitExpectations()
70 auto* ifr = reinterpret_cast<struct ifreq*>(argp); in SetInitExpectations()
81 auto* ifr = reinterpret_cast<struct ifreq*>(argp); in SetInitExpectations()
92 auto* ifr = reinterpret_cast<struct ifreq*>(argp); in ExpectUp()
108 auto* ifr = reinterpret_cast<struct ifreq*>(argp); in ExpectDown()
/external/ms-tpm-20-ref/Samples/TPMCmd-DeviceID/Platform/src/
DEPS.c74 struct ifreq interfaceRequest = {0}; in GetMacAddress()
92 struct ifreq* intefaceRequestStart = interfaceConfiguration.ifc_req; in GetMacAddress()
93 …const struct ifreq* const interfaceRequestEnd = intefaceRequestStart + (interfaceConfiguration.ifc… in GetMacAddress()
/external/toybox/toys/pending/
Dbrctl.c45 struct ifreq ifr;
60 struct ifreq ifr; in get_br_info()
142 struct ifreq ifr; in br_addif()
160 struct ifreq ifr; in br_delif()
194 struct ifreq ifr; in set_time()
260 struct ifreq ifr; in set_cost_prio()
/external/iproute2/ip/
Dtunnel.c73 struct ifreq ifr; in tnl_get_ioctl()
97 struct ifreq ifr; in tnl_add_ioctl()
123 struct ifreq ifr; in tnl_del_ioctl()
151 struct ifreq ifr; in tnl_gen_ioctl()
Diptuntap.c49 static int tap_add_ioctl(struct ifreq *ifr, uid_t uid, gid_t gid) in tap_add_ioctl()
85 static int tap_del_ioctl(struct ifreq *ifr) in tap_del_ioctl()
109 struct ifreq *ifr, uid_t *uid, gid_t *gid) in parse_args()
206 struct ifreq ifr; in do_add()
218 struct ifreq ifr; in do_del()
/external/toybox/toys/net/
Difconfig.c104 struct ifreq ifre; in display_ifconfig()
343 struct ifreq *ifre; in show_iface()
349 ifcon.ifc_len = sizeof(struct ifreq)*num; in show_iface()
352 if (ifcon.ifc_len != sizeof(struct ifreq)*num) break; in show_iface()
356 for(num = 0; num < ifcon.ifc_len && ifre; num += sizeof(struct ifreq), ifre++) in show_iface()
372 #define IFREQ_OFFSZ(x) -(int)((offsetof(struct ifreq, x)<<16) + sizeof(ifre.x))
377 struct ifreq ifre; in ifconfig_main()
387 memset(&ifre, 0, sizeof(struct ifreq)); in ifconfig_main()
/external/ltp/testcases/kernel/security/tomoyo/
Dtomoyo_new_file_test.c100 struct ifreq ifreq; in stage_file_test() local
604 memset(&ifreq, 0, sizeof(ifreq)); in stage_file_test()
605 snprintf(ifreq.ifr_name, sizeof(ifreq.ifr_name) - 1, "lo"); in stage_file_test()
606 show_result(ioctl(fd, 35123, &ifreq), 1); in stage_file_test()
610 show_result(ioctl(fd, 35123, &ifreq), 0); in stage_file_test()
/external/curl/lib/
Dif2ip.h58 struct ifreq { struct
88 #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ argument
/external/ipsec-tools/src/racoon/
Dgrabmyaddr.c257 struct ifreq ifr; in getifaddrs()
439 struct ifreq *iflist; in grab_myaddrs()
441 struct ifreq *ifr, *ifr_end; in grab_myaddrs()
454 iflist = (struct ifreq *)racoon_malloc(len); in grab_myaddrs()
489 ifr_end = (struct ifreq *) (ifconf.ifc_buf + ifconf.ifc_len); in grab_myaddrs()
492 (sizeof((p)->ifr_name) + sysdep_sa_len(&(p)->ifr_addr) > sizeof(struct ifreq) \ in grab_myaddrs()
493 ? sizeof((p)->ifr_name) + sysdep_sa_len(&(p)->ifr_addr) : sizeof(struct ifreq)) in grab_myaddrs()
497 ifr = (struct ifreq *)((caddr_t)ifr + _IFREQ_LEN(ifr))) { in grab_myaddrs()

123456