Home
last modified time | relevance | path

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

1234567

/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/drivers/
Dlinux_ioctl.c18 int linux_set_iface_flags(int sock, const char *ifname, int dev_up) in linux_set_iface_flags() argument
27 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_set_iface_flags()
32 ifname, strerror(errno)); in linux_set_iface_flags()
50 ifname, dev_up ? "UP" : "DOWN", strerror(errno)); in linux_set_iface_flags()
58 int linux_iface_up(int sock, const char *ifname) in linux_iface_up() argument
67 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_iface_up()
72 ifname, strerror(errno)); in linux_iface_up()
80 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) in linux_get_ifhwaddr() argument
85 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in linux_get_ifhwaddr()
88 ifname, strerror(errno)); in linux_get_ifhwaddr()
[all …]
Ddriver_wired.c49 char ifname[IFNAMSIZ + 1]; member
223 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in wired_init_sockets()
250 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in wired_init_sockets()
296 os_strlcpy(ifr.ifr_ifrn.ifrn_name, drv->ifname, IFNAMSIZ); in wired_init_sockets()
371 os_strlcpy(drv->ifname, params->ifname, sizeof(drv->ifname)); in wired_driver_hapd_init()
424 static int wpa_driver_wired_get_ifflags(const char *ifname, int *flags) in wpa_driver_wired_get_ifflags() argument
436 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in wpa_driver_wired_get_ifflags()
449 static int wpa_driver_wired_set_ifflags(const char *ifname, int flags) in wpa_driver_wired_set_ifflags() argument
461 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in wpa_driver_wired_set_ifflags()
475 static int wpa_driver_wired_get_ifstatus(const char *ifname, int *status) in wpa_driver_wired_get_ifstatus() argument
[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);
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()
71 wpa_driver_openbsd_set_key(const char *ifname, void *priv, enum wpa_alg alg, in wpa_driver_openbsd_set_key() argument
82 os_strlcpy(keyavail.i_name, drv->ifname, sizeof(keyavail.i_name)); in wpa_driver_openbsd_set_key()
94 wpa_driver_openbsd_init(void *ctx, const char *ifname) in wpa_driver_openbsd_init() argument
107 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()
349 static void * wpa_driver_roboswitch_init(void *ctx, const char *ifname) in wpa_driver_roboswitch_init() argument
361 sep = drv->ifname + in wpa_driver_roboswitch_init()
362 os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname)) - 2; in wpa_driver_roboswitch_init()
364 while (sep > drv->ifname && *sep != '.') sep--; in wpa_driver_roboswitch_init()
365 if (sep <= drv->ifname) { in wpa_driver_roboswitch_init()
[all …]
Ddriver_macsec_qca.c58 char ifname[IFNAMSIZ + 1]; member
127 static int macsec_qca_get_ifflags(const char *ifname, int *flags) in macsec_qca_get_ifflags() argument
139 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in macsec_qca_get_ifflags()
152 static int macsec_qca_set_ifflags(const char *ifname, int flags) in macsec_qca_set_ifflags() argument
164 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in macsec_qca_set_ifflags()
178 static int macsec_qca_get_ifstatus(const char *ifname, int *status) in macsec_qca_get_ifstatus() argument
190 os_strlcpy(ifmr.ifm_name, ifname, IFNAMSIZ); in macsec_qca_get_ifstatus()
206 static int macsec_qca_multi(const char *ifname, const u8 *addr, int add) in macsec_qca_multi() argument
222 os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); in macsec_qca_multi()
308 static void * macsec_qca_init(void *ctx, const char *ifname) in macsec_qca_init() argument
[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()
550 if (len > sizeof(event.interface_status.ifname)) in wpa_driver_wext_event_link()
551 len = sizeof(event.interface_status.ifname) - 1; in wpa_driver_wext_event_link()
552 os_memcpy(event.interface_status.ifname, buf, len); in wpa_driver_wext_event_link()
558 event.interface_status.ifname, in wpa_driver_wext_event_link()
[all …]
Ddriver_nl80211.c783 struct wpa_driver_nl80211_data *drv, const char *ifname) in wpa_driver_nl80211_event_newlink() argument
787 if (os_strcmp(drv->first_bss->ifname, ifname) == 0) { in wpa_driver_nl80211_event_newlink()
788 if (if_nametoindex(drv->first_bss->ifname) == 0) { in wpa_driver_nl80211_event_newlink()
790 drv->first_bss->ifname); in wpa_driver_nl80211_event_newlink()
796 drv->first_bss->ifname); in wpa_driver_nl80211_event_newlink()
801 os_strlcpy(event.interface_status.ifname, ifname, in wpa_driver_nl80211_event_newlink()
802 sizeof(event.interface_status.ifname)); in wpa_driver_nl80211_event_newlink()
809 struct wpa_driver_nl80211_data *drv, const char *ifname) in wpa_driver_nl80211_event_dellink() argument
813 if (os_strcmp(drv->first_bss->ifname, ifname) == 0) { in wpa_driver_nl80211_event_dellink()
816 ifname); in wpa_driver_nl80211_event_dellink()
[all …]
Ddriver_bsd.c56 char ifname[IFNAMSIZ+1]; /* interface name */ member
78 os_strlcpy(ireq.i_name, drv->ifname, sizeof(ireq.i_name)); in bsd_set80211()
100 os_strlcpy(ireq->i_name, drv->ifname, sizeof(ireq->i_name)); in bsd_get80211()
144 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in bsd_get_ssid()
167 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in bsd_set_ssid()
182 os_strlcpy(ifmr.ifm_name, drv->ifname, sizeof(ifmr.ifm_name)); in bsd_get_if_media()
200 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in bsd_set_if_media()
264 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name)); in bsd_ctrl_iface()
292 bsd_set_key(const char *ifname, void *priv, enum wpa_alg alg, in bsd_set_key() argument
577 os_strlcpy(creq.i_name, drv->ifname, sizeof(creq.i_name)); in bsd_set_freq()
[all …]
/external/wpa_supplicant_8/src/ap/
Dvlan_init.c43 char ifname[IFNAMSIZ + 1]; member
53 static void dyn_iface_get(struct hostapd_data *hapd, const char *ifname, in dyn_iface_get() argument
63 if (os_strcmp(ifname, next->ifname) == 0) in dyn_iface_get()
79 os_strlcpy(next->ifname, ifname, sizeof(next->ifname)); in dyn_iface_get()
90 static int dyn_iface_put(struct hostapd_data *hapd, const char *ifname) in dyn_iface_put() argument
100 if (os_strcmp(ifname, next->ifname) == 0) in dyn_iface_put()
562 static void vlan_newlink(char *ifname, struct hostapd_data *hapd) in vlan_newlink() argument
571 wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname); in vlan_newlink()
574 if (os_strcmp(ifname, vlan->ifname) == 0 && !vlan->configured) { in vlan_newlink()
621 if (!br_addif(br_name, 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/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/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 …]
Dl2_packet_none.c19 char ifname[17]; member
68 const char *ifname, const u8 *own_addr, unsigned short protocol, in l2_packet_init() argument
78 os_strlcpy(l2->ifname, ifname, sizeof(l2->ifname)); in l2_packet_init()
95 const char *br_ifname, const char *ifname, const u8 *own_addr, in l2_packet_init_bridge() argument
/external/dhcpcd/
Dplatform-linux.c127 check_ipv6(const char *ifname) in check_ipv6() argument
132 if (ifname == NULL) in check_ipv6()
133 ifname = "all"; in check_ipv6()
135 snprintf(path, sizeof(path), "%s/%s/accept_ra", prefix, ifname); in check_ipv6()
139 "%s: not configured to accept IPv6 RAs", ifname); in check_ipv6()
145 prefix, ifname); in check_ipv6()
148 "%s: configured as a router, not a host", ifname); in check_ipv6()
Dif-linux-wireless.c62 int getifssid(const char *ifname, char *ssid);
65 getifssid(const char *ifname, char *ssid) in getifssid() argument
74 strlcpy(iwr.ifr_name, ifname, sizeof(iwr.ifr_name)); in getifssid()
87 ifname = ssid; in getifssid()
Dif-bsd.c115 getifssid(const char *ifname, char *ssid) in getifssid() argument
128 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in getifssid()
138 strlcpy(ireq.i_name, ifname, sizeof(ireq.i_name)); in getifssid()
315 char ifname[IF_NAMESIZE]; in manage_link() local
366 memset(ifname, 0, sizeof(ifname)); in manage_link()
367 if (!(if_indextoname(ifm->ifm_index, ifname))) in manage_link()
387 handle_carrier(len, ifm->ifm_flags, ifname); in manage_link()
413 if (!if_indextoname(ifam->ifam_index, ifname)) in manage_link()
429 handle_hwaddr(ifname, hwaddr, in manage_link()
438 handle_ifa(rtm->rtm_type, ifname, in manage_link()
/external/android-clat/
Dsetif.c39 int add_address(const char *ifname, int family, const void *address, int prefixlen, const void *bro… in add_address() argument
52 if (!(ifa.ifa_index = if_nametoindex(ifname))) { in add_address()
101 int if_up(const char *ifname, int mtu) { in if_up() argument
107 if (!(ifi.ifi_index = if_nametoindex(ifname))) { in if_up()
161 int add_anycast_address(int sock, struct in6_addr *addr, const char *ifname) { in add_anycast_address() argument
164 ifindex = if_nametoindex(ifname); in add_anycast_address()
166 logmsg(ANDROID_LOG_ERROR, "%s: unknown ifindex for interface %s", __func__, ifname); in add_anycast_address()
/external/wpa_supplicant_8/wpa_supplicant/
Dmesh.c174 os_strlcpy(bss->conf->iface, wpa_s->ifname, sizeof(bss->conf->iface)); in wpa_supplicant_mesh_init()
486 static int wpas_mesh_get_ifname(struct wpa_supplicant *wpa_s, char *ifname, in wpas_mesh_get_ifname() argument
489 char *ifname_ptr = wpa_s->ifname; in wpas_mesh_get_ifname()
492 res = os_snprintf(ifname, len, "mesh-%s-%d", ifname_ptr, in wpas_mesh_get_ifname()
495 (os_strlen(ifname) >= IFNAMSIZ && in wpas_mesh_get_ifname()
496 os_strlen(wpa_s->ifname) < IFNAMSIZ)) { in wpas_mesh_get_ifname()
498 res = os_snprintf(ifname, len, "mesh-%d", wpa_s->mesh_if_idx); in wpas_mesh_get_ifname()
507 int wpas_mesh_add_interface(struct wpa_supplicant *wpa_s, char *ifname, in wpas_mesh_add_interface() argument
514 if (ifname[0] == '\0' && wpas_mesh_get_ifname(wpa_s, ifname, len) < 0) in wpas_mesh_add_interface()
517 if (wpa_drv_if_add(wpa_s, WPA_IF_MESH, ifname, NULL, NULL, NULL, addr, in wpas_mesh_add_interface()
[all …]
/external/wpa_supplicant_8/hs20/client/
Dosu_client.c758 if (wpa_command(ctx->ifname, cmd) < 0) in remove_sp_creds()
776 if (set_cred_quoted(ctx->ifname, id, "excluded_ssid", txt) < 0) in set_pps_cred_policy_spe()
842 if (set_cred_quoted(ctx->ifname, id, "roaming_partner", val) < 0) in set_pps_cred_policy_prp()
913 set_cred(ctx->ifname, id, "min_dl_bandwidth_home", dl) < 0) in set_pps_cred_policy_min_backhaul()
916 set_cred(ctx->ifname, id, "min_ul_bandwidth_home", ul) < 0) in set_pps_cred_policy_min_backhaul()
920 set_cred(ctx->ifname, id, "min_dl_bandwidth_roaming", dl) < in set_pps_cred_policy_min_backhaul()
924 set_cred(ctx->ifname, id, "min_ul_bandwidth_roaming", ul) < in set_pps_cred_policy_min_backhaul()
999 if (set_cred(ctx->ifname, id, "req_conn_capab", buf) < 0) in set_pps_cred_policy_required_proto_port()
1027 if (set_cred(ctx->ifname, id, "max_bss_load", str) < 0) in set_pps_cred_policy_max_bss_load()
1069 if (set_cred(ctx->ifname, id, "sp_priority", str) < 0) in set_pps_cred_priority()
[all …]

1234567