Home
last modified time | relevance | path

Searched refs:ifname (Results 1 – 25 of 269) sorted by relevance

1234567891011

/external/wpa_supplicant_8/wpa_supplicant/hidl/1.2/
Dhidl_manager.cpp54 const std::string &ifname, int network_id) in getNetworkObjectMapKey() argument
56 return ifname + "_" + std::to_string(network_id); in getNetworkObjectMapKey()
125 const std::string &ifname, const android::sp<CallbackType> &callback, in addIfaceCallbackHidlObjectToMap() argument
131 if (ifname.empty()) in addIfaceCallbackHidlObjectToMap()
134 auto iface_callback_map_iter = callbacks_map.find(ifname); in addIfaceCallbackHidlObjectToMap()
146 const std::string &ifname, int network_id, in addNetworkCallbackHidlObjectToMap() argument
153 if (ifname.empty() || network_id < 0) in addNetworkCallbackHidlObjectToMap()
158 getNetworkObjectMapKey(ifname, network_id); in addNetworkCallbackHidlObjectToMap()
171 const std::string &ifname, in removeAllIfaceCallbackHidlObjectsFromMap() argument
175 auto iface_callback_map_iter = callbacks_map.find(ifname); in removeAllIfaceCallbackHidlObjectsFromMap()
[all …]
/external/ltp/testcases/network/stress/ns-tools/
Dinitialize_if70 ifname=`get_ifname $host_type $link_num` || exit 1
73 command="ifconfig $ifname down mtu 1500 ; ip route flush dev $ifname ; ip addr flush dev $ifname ; …
76 ( ifconfig $ifname down && \
77 ip link set mtu 1500 dev $ifname && \
78 ip route flush dev $ifname && \
79 ip addr flush dev $ifname && \
80 ifconfig $ifname up ) >/dev/null 2>&1
83 …config '$ifname' down && ip link set mtu 1500 dev '$ifname' && ip route flush dev '$ifname' && ip …
87 echo "Failed to initialize $ifname" >&2
Dadd_ipv6addr81 ifname=`get_ifname $host_type $link_num` || exit 1
84 ifconfig ${ifname} up ; ifconfig ${ifname} add ${addr}/${netmask}
87 …$LTP_RSH $RHOST '( PATH=/sbin:/usr/sbin:$PATH ; ifconfig '${ifname}' up && ifconfig '${ifname}' ad…
91 echo "Cannot assign $addr to $ifname" >&2
Dset_ipv4addr82 ifname=`get_ifname $host_type $link_num` || exit 1
85 ifconfig $ifname up
86 ifconfig $ifname $addr netmask $netmask broadcast $broadcast
89 …ret=`$LTP_RSH $RHOST '( PATH=/sbin:/usr/sbin:$PATH ; ifconfig '$ifname' up && ifconfig '$ifname $a…
93 echo "Cannot set $addr to $ifname" >&2
/external/wpa_supplicant_8/src/common/
Dwpa_helpers.c22 static struct wpa_ctrl * wpa_open_ctrl(const char *ifname) in wpa_open_ctrl() argument
27 os_snprintf(buf, sizeof(buf), "%s%s", wpas_ctrl_path, ifname); in wpa_open_ctrl()
35 int wpa_command(const char *ifname, const char *cmd) in wpa_command() argument
41 printf("wpa_command(ifname='%s', cmd='%s')\n", ifname, cmd); in wpa_command()
42 ctrl = wpa_open_ctrl(ifname); in wpa_command()
61 int wpa_command_resp(const char *ifname, const char *cmd, in wpa_command_resp() argument
67 printf("wpa_command(ifname='%s', cmd='%s')\n", ifname, cmd); in wpa_command_resp()
68 ctrl = wpa_open_ctrl(ifname); in wpa_command_resp()
83 struct wpa_ctrl * open_wpa_mon(const char *ifname) in open_wpa_mon() argument
87 ctrl = wpa_open_ctrl(ifname); in open_wpa_mon()
[all …]
Dwpa_helpers.h13 int wpa_command(const char *ifname, const char *cmd);
14 int wpa_command_resp(const char *ifname, const char *cmd,
16 int get_wpa_status(const char *ifname, const char *field, char *obuf,
19 struct wpa_ctrl * open_wpa_mon(const char *ifname);
20 int wait_ip_addr(const char *ifname, int timeout);
27 int add_network(const char *ifname);
28 int set_network(const char *ifname, int id, const char *field,
30 int set_network_quoted(const char *ifname, int id, const char *field,
32 int add_cred(const char *ifname);
33 int set_cred(const char *ifname, int id, const char *field, const char *value);
[all …]
/external/wpa_supplicant_8/src/ap/
Dvlan_init.c32 vlan->ifname); in vlan_if_add()
36 if (!iface_exists(vlan->ifname)) in vlan_if_add()
37 ret = hostapd_vlan_if_add(hapd, vlan->ifname); in vlan_if_add()
46 ifconfig_up(vlan->ifname); /* else wpa group will fail fatal */ in vlan_if_add()
57 wpa_printf(MSG_ERROR, "WPA deinit of %s failed", vlan->ifname); in vlan_if_add()
60 if (hostapd_vlan_if_remove(hapd, vlan->ifname)) in vlan_if_add()
61 wpa_printf(MSG_ERROR, "Removal of %s failed", vlan->ifname); in vlan_if_add()
77 return hostapd_vlan_if_remove(hapd, vlan->ifname); in vlan_if_remove()
89 vlan->ifname, strerror(errno)); in vlan_dynamic_add()
93 vlan_newlink(vlan->ifname, hapd); in vlan_dynamic_add()
[all …]
Dvlan_full.c40 char ifname[IFNAMSIZ + 1]; member
50 static void dyn_iface_get(struct hostapd_data *hapd, const char *ifname, in dyn_iface_get() argument
60 if (os_strcmp(ifname, next->ifname) == 0) in dyn_iface_get()
76 os_strlcpy(next->ifname, ifname, sizeof(next->ifname)); in dyn_iface_get()
87 static int dyn_iface_put(struct hostapd_data *hapd, const char *ifname) in dyn_iface_put() argument
97 if (os_strcmp(ifname, next->ifname) == 0) in dyn_iface_put()
461 void vlan_newlink(const char *ifname, struct hostapd_data *hapd) in vlan_newlink() argument
467 wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname); in vlan_newlink()
471 os_strcmp(ifname, vlan->ifname) != 0) in vlan_newlink()
487 !br_addif(hapd->conf->bridge, ifname)) in vlan_newlink()
[all …]
Dpreauth_auth.c36 char *ifname; member
51 "from interface '%s'", piface->ifname); in rsn_preauth_receive()
97 static int rsn_preauth_iface_add(struct hostapd_data *hapd, const char *ifname) in rsn_preauth_iface_add() argument
101 wpa_printf(MSG_DEBUG, "RSN pre-auth interface '%s'", ifname); in rsn_preauth_iface_add()
108 piface->ifname = os_strdup(ifname); in rsn_preauth_iface_add()
109 if (piface->ifname == NULL) { in rsn_preauth_iface_add()
113 piface->l2 = l2_packet_init(piface->ifname, NULL, ETH_P_PREAUTH, in rsn_preauth_iface_add()
126 os_free(piface->ifname); in rsn_preauth_iface_add()
143 os_free(prev->ifname); in rsn_preauth_iface_deinit()
/external/wpa_supplicant_8/src/drivers/
Dlinux_ioctl.c19 int linux_set_iface_flags(int sock, const char *ifname, int dev_up) in linux_set_iface_flags() argument
28 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_set_iface_flags()
33 ifname, strerror(errno)); in linux_set_iface_flags()
51 ifname, dev_up ? "UP" : "DOWN", strerror(errno)); in linux_set_iface_flags()
59 int linux_iface_up(int sock, const char *ifname) in linux_iface_up() argument
68 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_iface_up()
73 ifname, strerror(errno)); in linux_iface_up()
81 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) in linux_get_ifhwaddr() argument
86 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_get_ifhwaddr()
89 ifname, strerror(errno)); in linux_get_ifhwaddr()
[all …]
Ddriver_wired_common.c33 static int driver_wired_get_ifflags(const char *ifname, int *flags) in driver_wired_get_ifflags() argument
45 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in driver_wired_get_ifflags()
58 static int driver_wired_set_ifflags(const char *ifname, int flags) in driver_wired_set_ifflags() argument
70 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in driver_wired_set_ifflags()
83 static int driver_wired_multi(const char *ifname, const u8 *addr, int add) in driver_wired_multi() argument
99 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in driver_wired_multi()
191 static int driver_wired_get_ifstatus(const char *ifname, int *status) in driver_wired_get_ifstatus() argument
203 os_strlcpy(ifmr.ifm_name, ifname, IFNAMSIZ); in driver_wired_get_ifstatus()
220 const char *ifname, void *ctx) in driver_wired_init_common() argument
224 os_strlcpy(common->ifname, ifname, sizeof(common->ifname)); in driver_wired_init_common()
[all …]
Dlinux_ioctl.h12 int linux_set_iface_flags(int sock, const char *ifname, int dev_up);
13 int linux_iface_up(int sock, const char *ifname);
14 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr);
15 int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr);
18 int linux_br_add_if(int sock, const char *brname, const char *ifname);
19 int linux_br_del_if(int sock, const char *brname, const char *ifname);
20 int linux_br_get(char *brname, const char *ifname);
21 int linux_master_get(char *master_ifname, const char *ifname);
Ddriver_openbsd.c21 char ifname[IFNAMSIZ + 1]; member
36 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in wpa_driver_openbsd_get_ssid()
52 os_strlcpy(id.i_name, drv->ifname, sizeof(id.i_name)); in wpa_driver_openbsd_get_bssid()
72 wpa_driver_openbsd_set_key(const char *ifname, void *priv, enum wpa_alg alg, in wpa_driver_openbsd_set_key() argument
83 os_strlcpy(keyavail.i_name, drv->ifname, sizeof(keyavail.i_name)); in wpa_driver_openbsd_set_key()
95 wpa_driver_openbsd_init(void *ctx, const char *ifname) in wpa_driver_openbsd_init() argument
108 os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname)); in wpa_driver_openbsd_init()
Ddriver_roboswitch.c58 char ifname[IFNAMSIZ + 1]; member
213 sep = drv->ifname + os_strlen(drv->ifname); in wpa_driver_roboswitch_set_param()
215 drv->l2 = l2_packet_init(drv->ifname, NULL, ETH_P_ALL, in wpa_driver_roboswitch_set_param()
220 __func__, drv->ifname); in wpa_driver_roboswitch_set_param()
236 return drv->ifname; in wpa_driver_roboswitch_get_ifname()
357 static void * wpa_driver_roboswitch_init(void *ctx, const char *ifname) in wpa_driver_roboswitch_init() argument
369 sep = drv->ifname + in wpa_driver_roboswitch_init()
370 os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname)) - 2; in wpa_driver_roboswitch_init()
372 while (sep > drv->ifname && *sep != '.') sep--; in wpa_driver_roboswitch_init()
373 if (sep <= drv->ifname) { in wpa_driver_roboswitch_init()
[all …]
Ddriver_wext.c49 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_auth_param()
79 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_get_bssid()
104 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_bssid()
133 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_get_ssid()
176 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_ssid()
219 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_freq()
539 if (len > sizeof(event.interface_status.ifname)) in wpa_driver_wext_event_link()
540 len = sizeof(event.interface_status.ifname) - 1; in wpa_driver_wext_event_link()
541 os_memcpy(event.interface_status.ifname, buf, len); in wpa_driver_wext_event_link()
547 event.interface_status.ifname, in wpa_driver_wext_event_link()
[all …]
/external/scapy/scapy/arch/bpf/
Dcore.py36 def get_if_raw_addr(ifname): argument
41 fd = os.popen("%s %s" % (conf.prog.ifconfig, ifname))
49 warning("No IPv4 address found on %s !", ifname)
57 def get_if_raw_hwaddr(ifname): argument
63 if ifname == LOOPBACK_NAME:
68 fd = os.popen("%s %s" % (conf.prog.ifconfig, ifname))
77 raise Scapy_Exception("No MAC address found on %s !" % ifname)
152 for ifname in get_if_list():
155 if ifname == LOOPBACK_NAME:
160 result = get_if(ifname, SIOCGIFFLAGS)
[all …]
/external/ppp/pppd/plugins/rp-pppoe/
Dif.c96 openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr) in openInterface() argument
136 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in openInterface()
138 error("Can't get hardware address for %s: %m", ifname); in openInterface()
145 warn("Interface %.16s is not Ethernet", ifname); in openInterface()
150 ifname); in openInterface()
155 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in openInterface()
157 error("Can't get MTU for %s: %m", ifname); in openInterface()
160 ifname, ifr.ifr_mtu, ETH_DATA_LEN); in openInterface()
169 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in openInterface()
171 error("Could not get interface index for %s: %m", ifname); in openInterface()
[all …]
/external/wpa_supplicant_8/src/l2_packet/
Dl2_packet_pcap.c33 char ifname[100]; member
55 l2->eth = eth_open(l2->ifname); in l2_packet_init_libdnet()
59 l2->ifname, strerror(errno)); in l2_packet_init_libdnet()
66 l2->ifname, strerror(errno)); in l2_packet_init_libdnet()
205 char ifname[128]; in l2_packet_init_libpcap() local
206 os_snprintf(ifname, sizeof(ifname), "\\Device\\NPF_%s", l2->ifname); in l2_packet_init_libpcap()
207 pcap_lookupnet(ifname, &pcap_netp, &pcap_maskp, pcap_err); in l2_packet_init_libpcap()
208 l2->pcap = pcap_open_live(ifname, 2500, 0, 10, pcap_err); in l2_packet_init_libpcap()
211 fprintf(stderr, "ifname='%s'\n", ifname); in l2_packet_init_libpcap()
218 pcap_lookupnet(l2->ifname, &pcap_netp, &pcap_maskp, pcap_err); in l2_packet_init_libpcap()
[all …]
Dl2_packet_winpcap.c50 char ifname[100]; member
168 pcap_lookupnet(l2->ifname, &pcap_netp, &pcap_maskp, pcap_err); in l2_packet_init_libpcap()
169 l2->pcap = pcap_open_live(l2->ifname, 2500, 0, 1, pcap_err); in l2_packet_init_libpcap()
172 fprintf(stderr, "ifname='%s'\n", l2->ifname); in l2_packet_init_libpcap()
199 const char *ifname, const u8 *own_addr, unsigned short protocol, in l2_packet_init() argument
210 if (os_strncmp(ifname, "\\Device\\NPF_", 12) == 0) in l2_packet_init()
211 os_strlcpy(l2->ifname, ifname, sizeof(l2->ifname)); in l2_packet_init()
213 os_snprintf(l2->ifname, sizeof(l2->ifname), "\\Device\\NPF_%s", in l2_packet_init()
214 ifname); in l2_packet_init()
252 const char *br_ifname, const char *ifname, const u8 *own_addr, in l2_packet_init_bridge() argument
[all …]
Dl2_packet_freebsd.c38 char ifname[100]; member
109 pcap_lookupnet(l2->ifname, &pcap_netp, &pcap_maskp, pcap_err); in l2_packet_init_libpcap()
110 l2->pcap = pcap_open_live(l2->ifname, 2500, 0, 10, pcap_err); in l2_packet_init_libpcap()
113 fprintf(stderr, "ifname='%s'\n", l2->ifname); in l2_packet_init_libpcap()
151 __func__, l2->ifname, strerror(errno)); in l2_packet_init_libpcap()
228 const char *ifname, const u8 *own_addr, unsigned short protocol, in l2_packet_init() argument
238 os_strlcpy(l2->ifname, ifname, sizeof(l2->ifname)); in l2_packet_init()
243 if (eth_get(l2->ifname, l2->own_addr) < 0) { in l2_packet_init()
245 "interface '%s'.\n", l2->ifname); in l2_packet_init()
260 const char *br_ifname, const char *ifname, const u8 *own_addr, in l2_packet_init_bridge() argument
[all …]
/external/compiler-rt/test/msan/
Dif_indextoname.cc14 char ifname[IF_NAMESIZE + 1]; in main() local
15 assert(0 == __msan_test_shadow(ifname, sizeof(ifname))); in main()
16 if (!if_indextoname(1, ifname)) { in main()
21 assert(strlen(ifname) + 1 <= __msan_test_shadow(ifname, sizeof(ifname))); in main()
/external/u-boot/disk/
Dpart.c55 static struct blk_desc *get_dev_hwpart(const char *ifname, int dev, int hwpart) in get_dev_hwpart() argument
60 dev_desc = blk_get_devnum_by_typename(ifname, dev); in get_dev_hwpart()
63 ifname, dev); in get_dev_hwpart()
76 struct blk_desc *blk_get_dev(const char *ifname, int dev) in blk_get_dev() argument
78 return get_dev_hwpart(ifname, dev, 0); in blk_get_dev()
81 struct blk_desc *get_dev_hwpart(const char *ifname, int dev, int hwpart) in get_dev_hwpart() argument
86 struct blk_desc *blk_get_dev(const char *ifname, int dev) in blk_get_dev() argument
364 int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str, in blk_get_device_by_str() argument
386 ifname, dev_str); in blk_get_device_by_str()
395 ifname, hwpart_str); in blk_get_device_by_str()
[all …]
/external/mdnsresponder/mDNSWindows/
DPosixCompat.c27 if_nametoindex( const char * ifname ) in if_nametoindex() argument
32 check( ifname ); in if_nametoindex()
42 index = if_nametoindex_funcptr(ifname); in if_nametoindex()
53 if_indextoname( unsigned ifindex, char * ifname ) in if_indextoname() argument
58 check( ifname ); in if_indextoname()
59 *ifname = '\0'; in if_indextoname()
69 name = if_indextoname_funcptr(ifindex, ifname); in if_indextoname()
/external/wpa_supplicant_8/wpa_supplicant/
Deapol_test.py23 def __init__(self, ifname): argument
24 self.ifname = ifname
25 self.ctrl = wpaspy.Ctrl(os.path.join(wpas_ctrl, ifname))
27 raise Exception("Failed to connect to eapol_test (%s)" % ifname)
28 self.mon = wpaspy.Ctrl(os.path.join(wpas_ctrl, ifname))
63 logger.debug(self.ifname + ": " + ev)
75 def run(ifname, count, no_fast_reauth, res): argument
76 et = eapol_test(ifname)
/external/u-boot/arch/sandbox/cpu/
Deth-raw-os.c28 static int _raw_packet_start(const char *ifname, unsigned char *ethmac, in _raw_packet_start() argument
42 device->sll_ifindex = if_nametoindex(ifname); in _raw_packet_start()
55 ret = setsockopt(priv->sd, SOL_SOCKET, SO_BINDTODEVICE, ifname, in _raw_packet_start()
56 strlen(ifname) + 1); in _raw_packet_start()
58 printf("Failed to bind to '%s': %d %s\n", ifname, errno, in _raw_packet_start()
78 if (strlen(ifname) >= IFNAMSIZ) { in _raw_packet_start()
79 printf("Interface name %s is too long.\n", ifname); in _raw_packet_start()
82 strncpy(ifr.ifr_name, ifname, IFNAMSIZ); in _raw_packet_start()
144 int sandbox_eth_raw_os_start(const char *ifname, unsigned char *ethmac, in sandbox_eth_raw_os_start() argument
150 return _raw_packet_start(ifname, ethmac, priv); in sandbox_eth_raw_os_start()

1234567891011