diff options
Diffstat (limited to 'wlantest')
-rw-r--r-- | wlantest/process.c | 7 | ||||
-rw-r--r-- | wlantest/readpcap.c | 5 | ||||
-rw-r--r-- | wlantest/wlantest.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/wlantest/process.c b/wlantest/process.c index 7890892..6cdb10b 100644 --- a/wlantest/process.c +++ b/wlantest/process.c @@ -262,3 +262,10 @@ void wlantest_process_prism(struct wlantest *wt, const u8 *data, size_t len) rx_frame(wt, frame, frame_len); } + + +void wlantest_process_80211(struct wlantest *wt, const u8 *data, size_t len) +{ + wpa_hexdump(MSG_EXCESSIVE, "Process data", data, len); + rx_frame(wt, data, len); +} diff --git a/wlantest/readpcap.c b/wlantest/readpcap.c index ecb5ae2..f2f6e92 100644 --- a/wlantest/readpcap.c +++ b/wlantest/readpcap.c @@ -36,7 +36,8 @@ int read_cap_file(struct wlantest *wt, const char *fname) return -1; } dlt = pcap_datalink(pcap); - if (dlt != DLT_IEEE802_11_RADIO && dlt != DLT_PRISM_HEADER) { + if (dlt != DLT_IEEE802_11_RADIO && dlt != DLT_PRISM_HEADER && + dlt != DLT_IEEE802_11) { wpa_printf(MSG_ERROR, "Unsupported pcap datalink type: %d", dlt); pcap_close(pcap); @@ -82,6 +83,8 @@ int read_cap_file(struct wlantest *wt, const char *fname) case DLT_PRISM_HEADER: wlantest_process_prism(wt, data, hdr->caplen); break; + case DLT_IEEE802_11: + wlantest_process_80211(wt, data, hdr->caplen); } } diff --git a/wlantest/wlantest.h b/wlantest/wlantest.h index 81f4731..35e5135 100644 --- a/wlantest/wlantest.h +++ b/wlantest/wlantest.h @@ -155,6 +155,7 @@ void write_pcap_decrypted(struct wlantest *wt, const u8 *buf1, size_t len1, const u8 *buf2, size_t len2); void wlantest_process(struct wlantest *wt, const u8 *data, size_t len); void wlantest_process_prism(struct wlantest *wt, const u8 *data, size_t len); +void wlantest_process_80211(struct wlantest *wt, const u8 *data, size_t len); void wlantest_process_wired(struct wlantest *wt, const u8 *data, size_t len); u32 crc32(const u8 *frame, size_t frame_len); int monitor_init(struct wlantest *wt, const char *ifname); |