/hostap-latest/wlantest/ |
D | wlantest.c | 48 static void wlantest_init(struct wlantest *wt) in wlantest_init() argument 51 os_memset(wt, 0, sizeof(*wt)); in wlantest_init() 52 wt->monitor_sock = -1; in wlantest_init() 53 wt->ctrl_sock = -1; in wlantest_init() 55 wt->ctrl_socks[i] = -1; in wlantest_init() 56 dl_list_init(&wt->passphrase); in wlantest_init() 57 dl_list_init(&wt->bss); in wlantest_init() 58 dl_list_init(&wt->secret); in wlantest_init() 59 dl_list_init(&wt->radius); in wlantest_init() 60 dl_list_init(&wt->pmk); in wlantest_init() [all …]
|
D | writepcap.c | 18 int write_pcap_init(struct wlantest *wt, const char *fname) in write_pcap_init() argument 20 int linktype = wt->ethernet ? DLT_EN10MB : DLT_IEEE802_11_RADIO; in write_pcap_init() 22 wt->write_pcap = pcap_open_dead(linktype, 4000); in write_pcap_init() 23 if (wt->write_pcap == NULL) in write_pcap_init() 25 wt->write_pcap_dumper = pcap_dump_open(wt->write_pcap, fname); in write_pcap_init() 26 if (wt->write_pcap_dumper == NULL) { in write_pcap_init() 27 pcap_close(wt->write_pcap); in write_pcap_init() 28 wt->write_pcap = NULL; in write_pcap_init() 38 void write_pcap_deinit(struct wlantest *wt) in write_pcap_deinit() argument 40 if (wt->write_pcap_dumper) { in write_pcap_deinit() [all …]
|
D | monitor.c | 22 int monitor_init(struct wlantest *wt, const char *ifname) in monitor_init() argument 28 int monitor_init_wired(struct wlantest *wt, const char *ifname) in monitor_init_wired() argument 34 void monitor_deinit(struct wlantest *wt) in monitor_deinit() argument 42 struct wlantest *wt = eloop_ctx; in monitor_read() local 52 clear_notes(wt); in monitor_read() 53 os_free(wt->decrypted); in monitor_read() 54 wt->decrypted = NULL; in monitor_read() 55 write_pcap_captured(wt, buf, len); in monitor_read() 56 wlantest_process(wt, buf, len); in monitor_read() 57 write_pcapng_captured(wt, buf, len); in monitor_read() [all …]
|
D | ctrl.c | 104 static void ctrl_disconnect(struct wlantest *wt, int sock) in ctrl_disconnect() argument 110 if (wt->ctrl_socks[i] == sock) { in ctrl_disconnect() 111 close(wt->ctrl_socks[i]); in ctrl_disconnect() 112 eloop_unregister_read_sock(wt->ctrl_socks[i]); in ctrl_disconnect() 113 wt->ctrl_socks[i] = -1; in ctrl_disconnect() 120 static void ctrl_send(struct wlantest *wt, int sock, const u8 *buf, in ctrl_send() argument 125 ctrl_disconnect(wt, sock); in ctrl_send() 130 static void ctrl_send_simple(struct wlantest *wt, int sock, in ctrl_send_simple() argument 135 ctrl_send(wt, sock, buf, sizeof(buf)); in ctrl_send_simple() 139 static struct wlantest_bss * ctrl_get_bss(struct wlantest *wt, int sock, in ctrl_get_bss() argument [all …]
|
D | process.c | 20 static struct wlantest_sta * rx_get_sta(struct wlantest *wt, in rx_get_sta() argument 83 bss = bss_find(wt, bssid); in rx_get_sta() 90 static void rx_update_ps(struct wlantest *wt, const struct ieee80211_hdr *hdr, in rx_update_ps() argument 105 add_note(wt, MSG_DEBUG, "AP " MACSTR " sent a frame " in rx_update_ps() 127 add_note(wt, MSG_DEBUG, "STA " MACSTR " woke up from " in rx_update_ps() 131 add_note(wt, MSG_DEBUG, "STA " MACSTR " went to sleep", in rx_update_ps() 142 static int rx_duplicate(struct wlantest *wt, const struct ieee80211_hdr *hdr, in rx_duplicate() argument 167 add_note(wt, MSG_MSGDUMP, "Ignore duplicated frame (seq=%u " in rx_duplicate() 181 static void rx_ack(struct wlantest *wt, const struct ieee80211_hdr *hdr) in rx_ack() argument 183 struct ieee80211_hdr *last = (struct ieee80211_hdr *) wt->last_hdr; in rx_ack() [all …]
|
D | rx_data.c | 55 static void rx_data_eth(struct wlantest *wt, const u8 *bssid, 60 static void rx_data_vlan(struct wlantest *wt, const u8 *bssid, in rx_data_vlan() argument 73 rx_data_eth(wt, bssid, sta_addr, dst, src, WPA_GET_BE16(data + 2), in rx_data_vlan() 78 static void rx_data_eth(struct wlantest *wt, const u8 *bssid, in rx_data_eth() argument 85 rx_data_eapol(wt, bssid, sta_addr, dst, src, data, len, prot); in rx_data_eth() 88 rx_data_ip(wt, bssid, sta_addr, dst, src, data, len, in rx_data_eth() 92 rx_data_80211_encap(wt, bssid, sta_addr, dst, src, data, len); in rx_data_eth() 95 rx_data_vlan(wt, bssid, sta_addr, dst, src, data, len, prot, in rx_data_eth() 102 static void rx_data_process(struct wlantest *wt, struct wlantest_bss *bss, in rx_data_process() argument 143 rx_data_eth(wt, bssid, sta_addr, dst, src, in rx_data_process() [all …]
|
D | rx_mgmt.c | 402 static void rx_mgmt_beacon(struct wlantest *wt, const u8 *data, size_t len) in rx_mgmt_beacon() argument 416 bss = bss_get(wt, mgmt->bssid); in rx_mgmt_beacon() 426 add_note(wt, MSG_INFO, "Invalid IEs in a Beacon frame from " in rx_mgmt_beacon() 448 bss_update(wt, bss, &elems, 1); in rx_mgmt_beacon() 527 m_bss = bss_get(wt, bssid); in rx_mgmt_beacon() 570 bss_update(wt, m_bss, &merged, 1); in rx_mgmt_beacon() 577 add_note(wt, MSG_INFO, in rx_mgmt_beacon() 589 add_note(wt, MSG_INFO, "Invalid MME in a Beacon frame from " in rx_mgmt_beacon() 597 add_note(wt, MSG_INFO, "Unexpected MME KeyID %u from " MACSTR, in rx_mgmt_beacon() 608 add_note(wt, MSG_DEBUG, in rx_mgmt_beacon() [all …]
|
D | rx_eapol.c | 87 static void rx_data_eapol_key_1_of_4(struct wlantest *wt, const u8 *dst, in rx_data_eapol_key_1_of_4() argument 104 bss = bss_get(wt, src); in rx_data_eapol_key_1_of_4() 106 bss = bss_find(wt, bssid); in rx_data_eapol_key_1_of_4() 107 bss_mld = bss_find(wt, src); in rx_data_eapol_key_1_of_4() 109 bss = bss_get(wt, src); in rx_data_eapol_key_1_of_4() 111 bss = bss_get(wt, bssid); in rx_data_eapol_key_1_of_4() 124 add_note(wt, MSG_INFO, "EAPOL-Key 1/4 from " MACSTR in rx_data_eapol_key_1_of_4() 131 add_note(wt, MSG_INFO, "EAPOL-Key 1/4 from " MACSTR in rx_data_eapol_key_1_of_4() 135 add_note(wt, MSG_INFO, "EAPOL-Key 1/4 from " MACSTR in rx_data_eapol_key_1_of_4() 140 add_note(wt, MSG_INFO, "EAPOL-Key 1/4 from " MACSTR in rx_data_eapol_key_1_of_4() [all …]
|
D | readpcap.c | 16 static void write_pcap_with_radiotap(struct wlantest *wt, in write_pcap_with_radiotap() argument 31 if (wt->assume_fcs) in write_pcap_with_radiotap() 35 h.ts = wt->write_pcap_time; in write_pcap_with_radiotap() 44 pcap_dump(wt->write_pcap_dumper, &h, buf); in write_pcap_with_radiotap() 49 int read_cap_file(struct wlantest *wt, const char *fname) in read_cap_file() argument 76 clear_notes(wt); in read_cap_file() 77 os_free(wt->decrypted); in read_cap_file() 78 wt->decrypted = NULL; in read_cap_file() 95 wt->frame_num++; in read_cap_file() 100 if (wt->write_pcap_dumper) { in read_cap_file() [all …]
|
D | rx_tdls.c | 20 static struct wlantest_tdls * get_tdls(struct wlantest *wt, const u8 *linkid, in get_tdls() argument 27 bss = bss_find(wt, linkid); in get_tdls() 29 bss = bss_find(wt, bssid); in get_tdls() 31 add_note(wt, MSG_INFO, "TDLS: Incorrect BSSID " MACSTR in get_tdls() 56 add_note(wt, MSG_DEBUG, "Add new TDLS link context: initiator " MACSTR in get_tdls() 134 static int tdls_verify_mic(struct wlantest *wt, struct wlantest_tdls *tdls, in tdls_verify_mic() argument 191 add_note(wt, MSG_DEBUG, "TDLS: Valid MIC"); in tdls_verify_mic() 194 add_note(wt, MSG_DEBUG, "TDLS: Invalid MIC"); in tdls_verify_mic() 199 static void rx_data_tdls_setup_request(struct wlantest *wt, const u8 *bssid, in rx_data_tdls_setup_request() argument 209 add_note(wt, MSG_INFO, "Too short TDLS Setup Request " MACSTR in rx_data_tdls_setup_request() [all …]
|
D | wlantest.h | 258 void add_note(struct wlantest *wt, int level, const char *fmt, ...) 260 void clear_notes(struct wlantest *wt); 261 size_t notes_len(struct wlantest *wt, size_t hdrlen); 262 void write_decrypted_note(struct wlantest *wt, const u8 *decrypted, 265 int add_wep(struct wlantest *wt, const char *key); 266 int read_cap_file(struct wlantest *wt, const char *fname); 267 int read_wired_cap_file(struct wlantest *wt, const char *fname); 269 int write_pcap_init(struct wlantest *wt, const char *fname); 270 void write_pcap_deinit(struct wlantest *wt); 271 void write_pcap_captured(struct wlantest *wt, const u8 *buf, size_t len); [all …]
|
D | rx_ip.c | 19 static void ping_update(struct wlantest *wt, struct wlantest_sta *sta, int req, in ping_update() argument 39 add_note(wt, MSG_DEBUG, "ICMP echo (ping) match for STA " in ping_update() 45 static void rx_data_icmp(struct wlantest *wt, const u8 *bssid, in rx_data_icmp() argument 73 add_note(wt, MSG_DEBUG, "ICMP echo %s %s -> %s id=%04x seq=%u len=%u%s", in rx_data_icmp() 78 bss = bss_find(wt, bssid); in rx_data_icmp() 80 add_note(wt, MSG_INFO, "No BSS " MACSTR in rx_data_icmp() 88 sta = sta_find_mlo(wt, bss, sta_addr); in rx_data_icmp() 90 add_note(wt, MSG_INFO, "No STA " MACSTR in rx_data_icmp() 95 ping_update(wt, sta, hdr->type == ICMP_ECHO, src, dst, id, seq); in rx_data_icmp() 96 if (peer_addr && (sta = sta_find_mlo(wt, bss, peer_addr))) in rx_data_icmp() [all …]
|
D | wired.c | 19 static struct wlantest_radius * radius_get(struct wlantest *wt, u32 srv, in radius_get() argument 24 dl_list_for_each(r, &wt->radius, struct wlantest_radius, list) { in radius_get() 35 dl_list_add(&wt->radius, &r->list); in radius_get() 68 static void process_radius_access_request(struct wlantest *wt, u32 dst, in process_radius_access_request() argument 80 r = radius_get(wt, dst, src); in process_radius_access_request() 90 static void wlantest_add_pmk(struct wlantest *wt, const u8 *pmk, size_t pmk_len) in wlantest_add_pmk() argument 99 dl_list_add(&wt->pmk, &p->list); in wlantest_add_pmk() 104 static void process_radius_access_accept(struct wlantest *wt, u32 dst, u32 src, in process_radius_access_accept() argument 112 r = radius_get(wt, src, dst); in process_radius_access_accept() 125 dl_list_for_each(s, &wt->secret, struct wlantest_radius_secret, list) { in process_radius_access_accept() [all …]
|
D | bss.c | 19 struct wlantest_bss * bss_find(struct wlantest *wt, const u8 *bssid) in bss_find() argument 23 dl_list_for_each(bss, &wt->bss, struct wlantest_bss, list) { in bss_find() 32 struct wlantest_bss * bss_find_mld(struct wlantest *wt, const u8 *mld_mac_addr, in bss_find_mld() argument 37 dl_list_for_each(bss, &wt->bss, struct wlantest_bss, list) { in bss_find_mld() 48 struct wlantest_bss * bss_get(struct wlantest *wt, const u8 *bssid) in bss_get() argument 55 bss = bss_find(wt, bssid); in bss_get() 66 dl_list_add(&wt->bss, &bss->list); in bss_get() 128 static void bss_add_pmk(struct wlantest *wt, struct wlantest_bss *bss) in bss_add_pmk() argument 132 dl_list_for_each(p, &wt->passphrase, struct wlantest_passphrase, list) in bss_add_pmk() 148 void bss_update(struct wlantest *wt, struct wlantest_bss *bss, in bss_update() argument [all …]
|
D | inject.c | 82 static int wlantest_inject_bip(struct wlantest *wt, struct wlantest_bss *bss, in wlantest_inject_bip() argument 104 ret = inject_frame(wt->monitor_sock, prot, plen); in wlantest_inject_bip() 111 static int wlantest_inject_prot_bc(struct wlantest *wt, in wlantest_inject_prot_bc() argument 152 ret = inject_frame(wt->monitor_sock, crypt, crypt_len); in wlantest_inject_prot_bc() 159 static int wlantest_inject_prot(struct wlantest *wt, struct wlantest_bss *bss, in wlantest_inject_prot() argument 183 bss = bss_get(wt, hdr->addr3); in wlantest_inject_prot() 212 return wlantest_inject_bip(wt, bss, frame, len, in wlantest_inject_prot() 214 return wlantest_inject_prot_bc(wt, bss, frame, len, in wlantest_inject_prot() 266 ret = inject_frame(wt->monitor_sock, crypt, crypt_len); in wlantest_inject_prot() 274 int wlantest_inject(struct wlantest *wt, struct wlantest_bss *bss, in wlantest_inject() argument [all …]
|
D | wep.c | 71 u8 * wep_decrypt(struct wlantest *wt, const struct ieee80211_hdr *hdr, in wep_decrypt() argument 79 if (dl_list_empty(&wt->wep)) in wep_decrypt() 88 dl_list_for_each(w, &wt->wep, struct wlantest_wep, list) { in wep_decrypt()
|
D | sta.c | 31 struct wlantest_sta * sta_find_mlo(struct wlantest *wt, in sta_find_mlo() argument 55 dl_list_for_each(obss, &wt->bss, struct wlantest_bss, list) { in sta_find_mlo() 318 void sta_new_ptk(struct wlantest *wt, struct wlantest_sta *sta, in sta_new_ptk() argument 324 add_note(wt, MSG_DEBUG, "Derived new PTK"); in sta_new_ptk() 330 dl_list_for_each(bss, &wt->bss, struct wlantest_bss, list) { in sta_new_ptk()
|
/hostap-latest/tests/hwsim/ |
D | test_ap_pmf.py | 30 wt = Wlantest() 31 wt.flush() 32 wt.add_passphrase("12345678") 52 wt.require_ap_pmf_mandatory(apdev[0]['bssid']) 53 wt.require_sta_pmf(apdev[0]['bssid'], dev[0].p2p_interface_addr()) 54 wt.require_sta_pmf_mandatory(apdev[0]['bssid'], dev[1].p2p_interface_addr()) 56 if wt.get_sta_counter("valid_saqueryresp_tx", apdev[0]['bssid'], 59 if wt.get_sta_counter("valid_saqueryresp_tx", apdev[0]['bssid'], 77 wt = Wlantest() 78 wt.flush() [all …]
|
D | test_ap_ciphers.py | 55 wt = Wlantest() 56 wt.flush() 57 wt.add_passphrase("12345678") 66 if wt.get_bss_counter('valid_bip_mmie', ap['bssid']) < 1: 68 if wt.get_bss_counter('bip_deauth', ap['bssid']) < 1: 75 res = wt.info_bss('group_mgmt', ap['bssid']).strip() 595 wt = Wlantest() 596 wt.flush() 597 wt.add_passphrase("12345678") 678 wt = Wlantest() [all …]
|
D | test_ap_tdls.py | 71 wt = Wlantest() 72 wt.flush() 73 wt.add_passphrase("12345678") 74 wt.add_wepkey("68656c6c6f") 77 wt = Wlantest() 78 dl = wt.get_tdls_counter("valid_direct_link", bssid, addr0, addr1) 79 inv_dl = wt.get_tdls_counter("invalid_direct_link", bssid, addr0, addr1) 80 ap = wt.get_tdls_counter("valid_ap_path", bssid, addr0, addr1) 81 inv_ap = wt.get_tdls_counter("invalid_ap_path", bssid, addr0, addr1) 85 wt = Wlantest() [all …]
|
D | test_ap_qosmap.py | 21 wt = Wlantest() 22 wt.clear_sta_counters(bssid, sta) 26 tx = wt.get_tx_tid(bssid, sta, tid) 28 [tx, rx] = wt.get_tid_counters(bssid, sta) 31 rx = wt.get_rx_tid(bssid, sta, ap_tid) 33 [tx, rx] = wt.get_tid_counters(bssid, sta)
|
D | test_p2p_autogo.py | 269 wt = Wlantest() 270 wt.flush() 271 wt.add_passphrase("12345678") 281 conf = wt.get_tdls_counter("setup_conf_ok", bssid, addr1, addr2) 284 dl = wt.get_tdls_counter("valid_direct_link", bssid, addr1, addr2) 287 wt.tdls_clear(bssid, addr1, addr2) 290 teardown = wt.get_tdls_counter("teardown", bssid, addr1, addr2) 293 wt.tdls_clear(bssid, addr1, addr2) 295 ap_path = wt.get_tdls_counter("valid_ap_path", bssid, addr1, addr2) 298 direct_link = wt.get_tdls_counter("valid_direct_link", bssid, addr1, addr2) [all …]
|
D | test_ap_hs20.py | 158 def check_probe_resp(wt, bssid_unexpected, bssid_expected): argument 160 count = wt.get_bss_counter("probe_response", bssid_unexpected) 165 count = wt.get_bss_counter("probe_response", bssid_expected) 436 wt = Wlantest() 437 wt.flush() 443 wt.clear_bss_counters(bssid) 444 wt.clear_bss_counters(bssid2) 451 check_probe_resp(wt, bssid, bssid2) 455 wt.clear_bss_counters(bssid) 456 wt.clear_bss_counters(bssid2) [all …]
|
/hostap-latest/src/ap/ |
D | airtime_policy.c | 143 int wt, num_bss = 0, max_wt = 0; in update_airtime_weights() local 203 wt = bss->conf->airtime_weight * num_sta_prod / in update_airtime_weights() 206 wt = 1; in update_airtime_weights() 208 bss->airtime_weight = wt; in update_airtime_weights() 209 if (wt > max_wt) in update_airtime_weights() 210 max_wt = wt; in update_airtime_weights() 232 struct airtime_sta_weight *wt; in get_weight_for_sta() local 234 wt = hapd->conf->airtime_weight_list; in get_weight_for_sta() 235 while (wt && !ether_addr_equal(wt->addr, sta)) in get_weight_for_sta() 236 wt = wt->next; in get_weight_for_sta() [all …]
|
D | ap_config.c | 1009 struct airtime_sta_weight *wt, *wt_prev; in hostapd_config_free_bss() local 1011 wt = conf->airtime_weight_list; in hostapd_config_free_bss() 1013 while (wt) { in hostapd_config_free_bss() 1014 wt_prev = wt; in hostapd_config_free_bss() 1015 wt = wt->next; in hostapd_config_free_bss()
|