Home
last modified time | relevance | path

Searched refs:ifr (Results 1 - 25 of 466) sorted by relevance

12345678910>>...19

/third_party/wpa_supplicant/wpa_supplicant-2.9/src/drivers/
H A Dlinux_ioctl.c21 struct ifreq ifr; in linux_set_iface_flags() local
27 os_memset(&ifr, 0, sizeof(ifr)); in linux_set_iface_flags()
28 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_set_iface_flags()
30 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_set_iface_flags()
38 if (ifr.ifr_flags & IFF_UP) in linux_set_iface_flags()
40 ifr.ifr_flags |= IFF_UP; in linux_set_iface_flags()
42 if (!(ifr.ifr_flags & IFF_UP)) in linux_set_iface_flags()
44 ifr.ifr_flags &= ~IFF_UP; in linux_set_iface_flags()
47 if (ioctl(sock, SIOCSIFFLAGS, &ifr) ! in linux_set_iface_flags()
61 struct ifreq ifr; linux_iface_up() local
83 struct ifreq ifr; linux_get_ifhwaddr() local
106 struct ifreq ifr; linux_set_ifhwaddr() local
152 struct ifreq ifr; linux_br_add_if() local
177 struct ifreq ifr; linux_br_del_if() local
[all...]
H A Ddriver_wired.c171 struct ifreq ifr; in wired_init_sockets() local
189 os_memset(&ifr, 0, sizeof(ifr)); in wired_init_sockets()
190 os_strlcpy(ifr.ifr_name, drv->common.ifname, sizeof(ifr.ifr_name)); in wired_init_sockets()
191 if (ioctl(drv->common.sock, SIOCGIFINDEX, &ifr) != 0) { in wired_init_sockets()
199 addr.sll_ifindex = ifr.ifr_ifindex; in wired_init_sockets()
210 if (wired_multicast_membership(drv->common.sock, ifr.ifr_ifindex, in wired_init_sockets()
217 os_memset(&ifr, 0, sizeof(ifr)); in wired_init_sockets()
[all...]
H A Ddriver_wired_common.c35 struct ifreq ifr; in driver_wired_get_ifflags() local
44 os_memset(&ifr, 0, sizeof(ifr)); in driver_wired_get_ifflags()
45 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in driver_wired_get_ifflags()
46 if (ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { in driver_wired_get_ifflags()
53 *flags = ifr.ifr_flags & 0xffff; in driver_wired_get_ifflags()
60 struct ifreq ifr; in driver_wired_set_ifflags() local
69 os_memset(&ifr, 0, sizeof(ifr)); in driver_wired_set_ifflags()
70 os_strlcpy(ifr in driver_wired_set_ifflags()
85 struct ifreq ifr; driver_wired_multi() local
[all...]
H A Ddriver_nl80211_android.c45 struct ifreq ifr; in android_priv_cmd() local
50 os_memset(&ifr, 0, sizeof(ifr)); in android_priv_cmd()
52 os_strlcpy(ifr.ifr_name, bss->ifname, IFNAMSIZ); in android_priv_cmd()
60 ifr.ifr_data = &priv_cmd; in android_priv_cmd()
62 ret = ioctl(drv->global->ioctl_sock, SIOCDEVPRIVATE + 1, &ifr); in android_priv_cmd()
79 struct ifreq ifr; in android_pno_start() local
123 memset(&ifr, 0, sizeof(ifr)); in android_pno_start()
125 os_strlcpy(ifr in android_pno_start()
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/drivers/
H A Dlinux_ioctl.c21 struct ifreq ifr; in linux_set_iface_flags() local
27 os_memset(&ifr, 0, sizeof(ifr)); in linux_set_iface_flags()
28 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_set_iface_flags()
30 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_set_iface_flags()
38 if (ifr.ifr_flags & IFF_UP) in linux_set_iface_flags()
40 ifr.ifr_flags |= IFF_UP; in linux_set_iface_flags()
42 if (!(ifr.ifr_flags & IFF_UP)) in linux_set_iface_flags()
44 ifr.ifr_flags &= ~IFF_UP; in linux_set_iface_flags()
47 if (ioctl(sock, SIOCSIFFLAGS, &ifr) ! in linux_set_iface_flags()
61 struct ifreq ifr; linux_iface_up() local
83 struct ifreq ifr; linux_get_ifhwaddr() local
106 struct ifreq ifr; linux_set_ifhwaddr() local
152 struct ifreq ifr; linux_br_add_if() local
177 struct ifreq ifr; linux_br_del_if() local
[all...]
H A Ddriver_wired.c171 struct ifreq ifr; in wired_init_sockets() local
189 os_memset(&ifr, 0, sizeof(ifr)); in wired_init_sockets()
190 os_strlcpy(ifr.ifr_name, drv->common.ifname, sizeof(ifr.ifr_name)); in wired_init_sockets()
191 if (ioctl(drv->common.sock, SIOCGIFINDEX, &ifr) != 0) { in wired_init_sockets()
199 addr.sll_ifindex = ifr.ifr_ifindex; in wired_init_sockets()
210 if (wired_multicast_membership(drv->common.sock, ifr.ifr_ifindex, in wired_init_sockets()
217 os_memset(&ifr, 0, sizeof(ifr)); in wired_init_sockets()
[all...]
H A Ddriver_wired_common.c35 struct ifreq ifr; in driver_wired_get_ifflags() local
44 os_memset(&ifr, 0, sizeof(ifr)); in driver_wired_get_ifflags()
45 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in driver_wired_get_ifflags()
46 if (ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { in driver_wired_get_ifflags()
53 *flags = ifr.ifr_flags & 0xffff; in driver_wired_get_ifflags()
60 struct ifreq ifr; in driver_wired_set_ifflags() local
69 os_memset(&ifr, 0, sizeof(ifr)); in driver_wired_set_ifflags()
70 os_strlcpy(ifr in driver_wired_set_ifflags()
85 struct ifreq ifr; driver_wired_multi() local
[all...]
H A Ddriver_nl80211_android.c45 struct ifreq ifr; in android_priv_cmd() local
50 os_memset(&ifr, 0, sizeof(ifr)); in android_priv_cmd()
52 os_strlcpy(ifr.ifr_name, bss->ifname, IFNAMSIZ); in android_priv_cmd()
60 ifr.ifr_data = &priv_cmd; in android_priv_cmd()
62 ret = ioctl(drv->global->ioctl_sock, SIOCDEVPRIVATE + 1, &ifr); in android_priv_cmd()
79 struct ifreq ifr; in android_pno_start() local
123 memset(&ifr, 0, sizeof(ifr)); in android_pno_start()
125 os_strlcpy(ifr in android_pno_start()
[all...]
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/
H A Dnet_socket_test_010.cpp43 static void InitIfreq(struct ifreq *ifr) in InitIfreq() argument
45 *ifr = (struct ifreq){{0}}; in InitIfreq()
46 (void)strncpy_s(ifr->ifr_name, sizeof(ifr->ifr_name) - 1, gDefaultNetif, sizeof(ifr->ifr_name) - 1); in InitIfreq()
47 ifr->ifr_name[sizeof(ifr->ifr_name) - 1] = '\0'; in InitIfreq()
55 struct ifreq ifr; in IfIndex2Name()
58 ifr.ifr_ifindex = index; in IfIndex2Name()
59 ret = ioctl(fd, SIOCGIFNAME, &ifr); in IfIndex2Name()
90 struct ifreq ifr = {{0}}; IoctlTestInternal() local
[all...]
H A Dnet_socket_test_013.cpp134 struct ifreq ifr; in GetIp() local
136 int ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name) - 1, ifname, sizeof(ifr.ifr_name) - 1); in GetIp()
140 ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\0'; in GetIp()
141 ret = ioctl(sfd, SIOCGIFADDR, &ifr); in GetIp()
143 ip = (reinterpret_cast<struct sockaddr_in *>(&(ifr.ifr_addr)))->sin_addr.s_addr; in GetIp()
150 struct ifreq ifr; in GetNetmask() local
152 int ret = strncpy_s(ifr in GetNetmask()
[all...]
/kernel/linux/linux-5.10/net/core/
H A Ddev_ioctl.c23 static int dev_ifname(struct net *net, struct ifreq *ifr) in dev_ifname() argument
25 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname()
26 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname()
80 static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd) in dev_ifsioc_locked() argument
83 struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name); in dev_ifsioc_locked()
90 ifr->ifr_flags = (short) dev_get_flags(dev); in dev_ifsioc_locked()
95 ifr->ifr_metric = 0; in dev_ifsioc_locked()
99 ifr->ifr_mtu = dev->mtu; in dev_ifsioc_locked()
107 ifr in dev_ifsioc_locked()
135 net_hwtstamp_validate(struct ifreq *ifr) net_hwtstamp_validate() argument
194 dev_do_ioctl(struct net_device *dev, struct ifreq *ifr, unsigned int cmd) dev_do_ioctl() argument
217 dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) dev_ifsioc() argument
365 dev_ioctl(struct net *net, unsigned int cmd, struct ifreq *ifr, bool *need_copyout) dev_ioctl() argument
[all...]
/kernel/liteos_m/components/net/lwip-2.1/porting/src/
H A Dsockets_porting.c294 static u8_t lwip_ioctl_internal_SIOCGIFCONF(struct ifreq *ifr) in lwip_ioctl_internal_SIOCGIFCONF() argument
305 ifc = (struct ifconf *)ifr; in lwip_ioctl_internal_SIOCGIFCONF()
349 static u8_t lwip_ioctl_internal_SIOCGIFADDR(struct ifreq *ifr) in lwip_ioctl_internal_SIOCGIFADDR() argument
355 netif = netif_find(ifr->ifr_name); in lwip_ioctl_internal_SIOCGIFADDR()
359 sock_in = (struct sockaddr_in *)&ifr->ifr_addr; in lwip_ioctl_internal_SIOCGIFADDR()
366 static u8_t lwip_ioctl_internal_SIOCGIFNETMASK(struct ifreq *ifr) in lwip_ioctl_internal_SIOCGIFNETMASK() argument
372 netif = netif_find(ifr->ifr_name); in lwip_ioctl_internal_SIOCGIFNETMASK()
376 sock_in = (struct sockaddr_in *)&ifr->ifr_netmask; in lwip_ioctl_internal_SIOCGIFNETMASK()
383 static u8_t lwip_ioctl_internal_SIOCGIFHWADDR(struct ifreq *ifr) in lwip_ioctl_internal_SIOCGIFHWADDR() argument
388 netif = netif_find(ifr in lwip_ioctl_internal_SIOCGIFHWADDR()
406 lwip_ioctl_internal_SIOCSIFFLAGS(struct ifreq *ifr) lwip_ioctl_internal_SIOCSIFFLAGS() argument
484 lwip_ioctl_internal_SIOCGIFFLAGS(struct ifreq *ifr) lwip_ioctl_internal_SIOCGIFFLAGS() argument
558 lwip_ioctl_internal_SIOCGIFNAME(struct ifreq *ifr) lwip_ioctl_internal_SIOCGIFNAME() argument
631 lwip_ioctl_internal_SIOCSIFNAME(struct ifreq *ifr) lwip_ioctl_internal_SIOCSIFNAME() argument
662 lwip_ioctl_internal_SIOCGIFINDEX(struct ifreq *ifr) lwip_ioctl_internal_SIOCGIFINDEX() argument
675 lwip_ioctl_internal_SIOCGIFMTU(struct ifreq *ifr) lwip_ioctl_internal_SIOCGIFMTU() argument
689 lwip_ioctl_internal_SIOCGIFBRDADDR(struct ifreq *ifr) lwip_ioctl_internal_SIOCGIFBRDADDR() argument
711 struct ifreq *ifr = (struct ifreq *)argp; lwip_ioctl_impl() local
[all...]
/kernel/uniproton/src/net/lwip-2.1/src/
H A Dsockets.c286 static u8_t OsLwipIoctlInternalSiocgifConf(struct ifreq *ifr) in OsLwipIoctlInternalSiocgifConf() argument
294 struct ifconf *ifc = (struct ifconf *)ifr; in OsLwipIoctlInternalSiocgifConf()
339 static u8_t OsLwipIoctlInternalSiocgifAddr(struct ifreq *ifr) in OsLwipIoctlInternalSiocgifAddr() argument
344 struct netif *netif = netif_find(ifr->ifr_name); in OsLwipIoctlInternalSiocgifAddr()
348 sockIn = (struct sockaddr_in *)&ifr->ifr_addr; in OsLwipIoctlInternalSiocgifAddr()
354 static u8_t OsLwipIoctlInternalSiocgifNetmask(struct ifreq *ifr) in OsLwipIoctlInternalSiocgifNetmask() argument
359 struct netif *netif = netif_find(ifr->ifr_name); in OsLwipIoctlInternalSiocgifNetmask()
363 sockIn = (struct sockaddr_in *)&ifr->ifr_netmask; in OsLwipIoctlInternalSiocgifNetmask()
369 static u8_t OsLwipIoctlInternalSiocgifHwAddr(struct ifreq *ifr) in OsLwipIoctlInternalSiocgifHwAddr() argument
372 struct netif *netif = netif_find(ifr in OsLwipIoctlInternalSiocgifHwAddr()
390 OsLwipIoctlInternalSiocsifFlags(struct ifreq *ifr) OsLwipIoctlInternalSiocsifFlags() argument
466 OsLwipIoctlInternalSiocgifFlags(struct ifreq *ifr) OsLwipIoctlInternalSiocgifFlags() argument
538 OsLwipIoctlInternalSiocgifName(struct ifreq *ifr) OsLwipIoctlInternalSiocgifName() argument
610 OsLwipIoctlInternalSiocsifName(struct ifreq *ifr) OsLwipIoctlInternalSiocsifName() argument
639 OsLwipIoctlInternalSiocgifIndex(struct ifreq *ifr) OsLwipIoctlInternalSiocgifIndex() argument
650 OsLwipIoctlInternalSiocgifMtu(struct ifreq *ifr) OsLwipIoctlInternalSiocgifMtu() argument
662 OsLwipIoctlInternalSiocgifBrdAddr(struct ifreq *ifr) OsLwipIoctlInternalSiocgifBrdAddr() argument
683 struct ifreq *ifr = (struct ifreq *)argp; OsLwipIoctlImpl() local
[all...]
/kernel/liteos_a/net/lwip-2.1/porting/src/
H A Dsockets.c480 static u8_t lwip_ioctl_internal_SIOCGIFCONF(struct ifreq *ifr, struct net_group *group) argument
482 static u8_t lwip_ioctl_internal_SIOCGIFCONF(struct ifreq *ifr)
494 ifc = (struct ifconf *)ifr;
542 static u8_t lwip_ioctl_internal_SIOCGIFADDR(struct ifreq *ifr) argument
548 netif = netif_find(ifr->ifr_name);
552 sock_in = (struct sockaddr_in *)&ifr->ifr_addr;
572 static u8_t lwip_ioctl_internal_SIOCSIFADDR_6(struct ifreq *ifr) argument
574 (void)ifr;
579 static u8_t lwip_ioctl_internal_SIOCSIFADDR(struct ifreq *ifr, struct net_group *group) argument
581 static u8_t lwip_ioctl_internal_SIOCSIFADDR(struct ifreq *ifr)
668 lwip_ioctl_internal_SIOCDIFADDR_6(struct ifreq *ifr) global() argument
675 lwip_ioctl_internal_SIOCDIFADDR(struct ifreq *ifr, struct net_group *group) global() argument
737 lwip_ioctl_internal_SIOCGIFNETMASK(struct ifreq *ifr) global() argument
755 lwip_ioctl_internal_SIOCSIFNETMASK(struct ifreq *ifr, struct net_group *group) global() argument
844 lwip_ioctl_internal_SIOCSIFHWADDR(struct ifreq *ifr) global() argument
884 lwip_ioctl_internal_SIOCGIFHWADDR(struct ifreq *ifr) global() argument
907 lwip_ioctl_internal_SIOCSIFFLAGS(struct ifreq *ifr) global() argument
991 lwip_ioctl_internal_SIOCGIFFLAGS(struct ifreq *ifr) global() argument
1066 lwip_ioctl_internal_SIOCGIFNAME(struct ifreq *ifr, struct net_group *group) global() argument
1145 lwip_ioctl_internal_SIOCSIFNAME(struct ifreq *ifr) global() argument
1182 lwip_ioctl_internal_SIOCGIFINDEX(struct ifreq *ifr) global() argument
1195 lwip_ioctl_internal_SIOCSIFMTU(struct ifreq *ifr) global() argument
1225 lwip_ioctl_internal_SIOCGIFMTU(struct ifreq *ifr) global() argument
1239 lwip_ioctl_internal_SIOCGIFBRDADDR(struct ifreq *ifr) global() argument
1262 lwip_ioctl_internal_SIOCETHTOOL(struct ifreq *ifr) global() argument
1285 lwip_ioctl_internal_SIOCSIPV6DAD(struct ifreq *ifr) global() argument
1318 lwip_ioctl_internal_SIOCGIPV6DAD(struct ifreq *ifr) global() argument
1333 lwip_ioctl_internal_SIOCSIPV6DPCTD(struct ifreq *ifr) global() argument
1362 lwip_ioctl_internal_SIOCGIPV6DPCTD(struct ifreq *ifr) global() argument
1384 struct ifreq *ifr = (struct ifreq *)argp; global() local
[all...]
/kernel/linux/linux-6.6/net/core/
H A Ddev_ioctl.c27 static int dev_ifname(struct net *net, struct ifreq *ifr) in dev_ifname() argument
29 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname()
30 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname()
85 static int dev_getifmap(struct net_device *dev, struct ifreq *ifr) in dev_getifmap() argument
87 struct ifmap *ifmap = &ifr->ifr_map; in dev_getifmap()
112 static int dev_setifmap(struct net_device *dev, struct ifreq *ifr) in dev_setifmap() argument
114 struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map; in dev_setifmap()
132 return dev->netdev_ops->ndo_set_config(dev, &ifr->ifr_map); in dev_setifmap()
138 static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigne argument
242 dev_eth_ioctl(struct net_device *dev, struct ifreq *ifr, unsigned int cmd) dev_eth_ioctl() argument
280 dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr) dev_get_hwtstamp() argument
367 dev_set_hwtstamp(struct net_device *dev, struct ifreq *ifr) dev_set_hwtstamp() argument
467 dev_siocbond(struct net_device *dev, struct ifreq *ifr, unsigned int cmd) dev_siocbond() argument
482 dev_siocdevprivate(struct net_device *dev, struct ifreq *ifr, void __user *data, unsigned int cmd) dev_siocdevprivate() argument
514 dev_ifsioc(struct net *net, struct ifreq *ifr, void __user *data, unsigned int cmd) dev_ifsioc() argument
671 dev_ioctl(struct net *net, unsigned int cmd, struct ifreq *ifr, void __user *data, bool *need_copyout) dev_ioctl() argument
[all...]
/drivers/peripheral/wlan/chip/hdi_service/
H A Diface_tool.cpp43 bool GetIfState(const char* ifName, int sock, struct ifreq* ifr) in GetIfState() argument
45 if (memset_s(ifr, sizeof(*ifr), 0, sizeof(*ifr)) != EOK) { in GetIfState()
49 if (strlcpy(ifr->ifr_name, ifName, sizeof(ifr->ifr_name)) >= in GetIfState()
50 sizeof(ifr->ifr_name)) { in GetIfState()
54 if (TEMP_FAILURE_RETRY(ioctl(sock, SIOCGIFFLAGS, ifr)) != 0) { in GetIfState()
68 struct ifreq ifr; in GetUpState() local
69 if (!GetIfState(ifName, sock.Get(), &ifr)) { in GetUpState()
82 struct ifreq ifr; SetUpState() local
109 struct ifreq ifr; SetMacAddress() local
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/net/
H A Dtun.c22 struct ifreq ifr; in tun_attach() local
24 memset(&ifr, 0, sizeof(ifr)); in tun_attach()
25 strcpy(ifr.ifr_name, dev); in tun_attach()
26 ifr.ifr_flags = IFF_ATTACH_QUEUE; in tun_attach()
28 return ioctl(fd, TUNSETQUEUE, (void *) &ifr); in tun_attach()
33 struct ifreq ifr; in tun_detach() local
35 memset(&ifr, 0, sizeof(ifr)); in tun_detach()
36 strcpy(ifr in tun_detach()
44 struct ifreq ifr; tun_alloc() local
[all...]
/third_party/toybox/toys/pending/
H A Dbrctl.c45 struct ifreq ifr; in get_ports() local
52 xstrncpy(ifr.ifr_name, bridge, IFNAMSIZ); in get_ports()
53 ifr.ifr_data = (char *)args; in get_ports()
54 xioctl(TT.sockfd, SIOCDEVPRIVATE, &ifr); in get_ports()
60 struct ifreq ifr; in get_br_info() local
65 xstrncpy(ifr.ifr_name, bridge, IFNAMSIZ); in get_br_info()
66 ifr.ifr_data = (char *)args; in get_br_info()
68 if (ioctl(TT.sockfd, SIOCDEVPRIVATE, &ifr) < 0) { in get_br_info()
142 struct ifreq ifr; in br_addif() local
147 ifr in br_addif()
160 struct ifreq ifr; br_delif() local
194 struct ifreq ifr; set_time() local
260 struct ifreq ifr; set_cost_prio() local
[all...]
/third_party/ltp/testcases/kernel/syscalls/bind/
H A Dbind06.c31 struct ifreq ifr; in setup() local
36 strcpy(ifr.ifr_name, "lo"); in setup()
37 SAFE_IOCTL(fd, SIOCGIFINDEX, &ifr); in setup()
41 addr1.sll_ifindex = ifr.ifr_ifindex; in setup()
72 struct ifreq ifr; in run() local
75 strcpy(ifr.ifr_name, "lo"); in run()
79 ifr.ifr_flags = 0; in run()
80 ioctl(fd, SIOCSIFFLAGS, &ifr); in run()
81 ifr.ifr_flags = IFF_UP; in run()
83 ioctl(fd, SIOCSIFFLAGS, &ifr); in run()
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/
H A Dvlan_ifconfig.c22 struct ifreq ifr; in ifconfig_helper() local
30 os_memset(&ifr, 0, sizeof(ifr)); in ifconfig_helper()
31 os_strlcpy(ifr.ifr_name, if_name, IFNAMSIZ); in ifconfig_helper()
33 if (ioctl(fd, SIOCGIFFLAGS, &ifr) != 0) { in ifconfig_helper()
42 ifr.ifr_flags |= IFF_UP; in ifconfig_helper()
44 ifr.ifr_flags &= ~IFF_UP; in ifconfig_helper()
46 if (ioctl(fd, SIOCSIFFLAGS, &ifr) != 0) { in ifconfig_helper()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/
H A Dvlan_ifconfig.c22 struct ifreq ifr; in ifconfig_helper() local
30 os_memset(&ifr, 0, sizeof(ifr)); in ifconfig_helper()
31 os_strlcpy(ifr.ifr_name, if_name, IFNAMSIZ); in ifconfig_helper()
33 if (ioctl(fd, SIOCGIFFLAGS, &ifr) != 0) { in ifconfig_helper()
42 ifr.ifr_flags |= IFF_UP; in ifconfig_helper()
44 ifr.ifr_flags &= ~IFF_UP; in ifconfig_helper()
46 if (ioctl(fd, SIOCSIFFLAGS, &ifr) != 0) { in ifconfig_helper()
/third_party/ltp/testcases/lib/
H A Dtst_ns_ifmove.c39 struct ifreq ifr; in get_intf_index_from_name() local
42 memset(&ifr, 0, sizeof(ifr)); in get_intf_index_from_name()
43 strncpy(ifr.ifr_name, intf_name, sizeof(ifr.ifr_name) - 1); in get_intf_index_from_name()
44 ifr.ifr_name[sizeof(ifr.ifr_name)-1] = '\0'; in get_intf_index_from_name()
49 SAFE_IOCTL(sock_fd, SIOCGIFINDEX, &ifr); in get_intf_index_from_name()
52 return ifr.ifr_ifindex; in get_intf_index_from_name()
/third_party/libwebsockets/lib/misc/
H A Dgetifaddrs.c76 struct ifreq *ifr; in getifaddrs2() local
123 ifr = (struct ifreq *)p; in getifaddrs2()
124 sa = &ifr->ifr_addr; in getifaddrs2()
130 sz = max(sz, sizeof(ifr->ifr_name) + sa->sa_len); in getifaddrs2()
134 sz = max(sz, sizeof(ifr->ifr_name) + SA_LEN(sa)); in getifaddrs2()
137 memcpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifr->ifr_name)); in getifaddrs2()
147 (*end)->ifa_name = strdup(ifr->ifr_name); in getifaddrs2()
157 lws_malloc(sizeof(ifr->ifr_broadaddr), "getifaddrs"); in getifaddrs2()
158 memcpy((*end)->ifa_broadaddr, &ifr in getifaddrs2()
[all...]
/third_party/ltp/testcases/network/packet/
H A Dfanout01.c54 struct ifreq ifr; in run() local
56 memset(&ifr, 0, sizeof(struct ifreq)); in run()
62 strcpy((char *)&ifr.ifr_name, "lo"); in run()
63 SAFE_IOCTL(fd, SIOCGIFINDEX, &ifr); in run()
64 index = ifr.ifr_ifindex; in run()
66 SAFE_IOCTL(fd, SIOCGIFFLAGS, &ifr); in run()
67 ifr.ifr_flags &= ~(short)IFF_UP; in run()
68 SAFE_IOCTL(fd, SIOCSIFFLAGS, &ifr); in run()
/third_party/ltp/testcases/kernel/containers/share/
H A Dns_ifmove.c51 struct ifreq ifr; in get_intf_index_from_name() local
54 memset(&ifr, 0, sizeof(ifr)); in get_intf_index_from_name()
55 strncpy(ifr.ifr_name, intf_name, sizeof(ifr.ifr_name) - 1); in get_intf_index_from_name()
56 ifr.ifr_name[sizeof(ifr.ifr_name)-1] = '\0'; in get_intf_index_from_name()
65 if (ioctl(sock_fd, SIOCGIFINDEX, &ifr) == -1) { in get_intf_index_from_name()
72 return ifr.ifr_ifindex; in get_intf_index_from_name()

Completed in 11 milliseconds

12345678910>>...19