aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
Commit message (Collapse)AuthorAgeFilesLines
...
* Declare wpa_debug_* variables in src/utils/wpa_debug.hJouni Malinen2013-12-314-13/+0
| | | | | | | | | These were somewhat more hidden to avoid direct use, but there are now numerous places where these are needed and more justification to make the extern int declarations available from wpa_debug.h. In addition, this avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add a BSS probe_response counterJouni Malinen2013-12-263-0/+3
| | | | | | | This can be used to verify whether an AP replies to a Probe Request frame. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add per-TID RX/TX countersJouni Malinen2013-12-245-2/+239
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use monotonic clock for relative time for eloop if availableJohannes Berg2013-11-201-1/+3
| | | | | | | | | | | | | | | Relative time shouldn't be calculated based on gettimeofday because that clock can jump (e.g., when the time is adjusted by the system administrator.) On systems where that is available, use CLOCK_BOOTTIME (on fairly recent Linux systems, this clock takes into account the time spend suspended) or CLOCK_MONOTONIC (on Linux and some POSIX systems, this clock is just freely running with no adjustments.) Reported-by: Holger Schurig <holgerschurig@gmail.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wlantest: Add more pcapng notes on EAPOL processingJouni Malinen2013-11-171-28/+32
| | | | | | | | Some of the MIC validation steps were not logged in the pcapng notes. Add these to make the entries more consistent and to provide more information to ease debugging. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Allow additional PTKs to be specified from a fileJouni Malinen2013-11-174-5/+154
| | | | | | | | | | A text file with a hexdump of PTK (KCK|KEK=TK with 48 octets for CCMP or 64 octets for TKIP or alternative 16 or 32 octet TK for CCMP/TKIP) can now be read from a file specified with the -T command line argument. If the current known PTK fails to decrypt a frame (or if no current PTK is known) all listed PTKs are iterated to see if any of them matches. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add support for debug log timestampsJouni Malinen2013-11-171-2/+6
| | | | | | | The new command line argument -t can now be used to request wlantest to include a timestamp in the log entries. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add support for log output into a fileJouni Malinen2013-11-172-2/+14
| | | | | | | This allows wlantest debug log output to be directed to a file so that RELOG command can be used to rotate files more easily than stdout. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add RELOG command to reopen log/capture filesJouni Malinen2013-11-175-10/+54
| | | | | | | This can be used similarly to the wpa_supplicant RELOG command to rotate log and capture files. Signed-hostap: Jouni Malinen <j@w1.fi>
* Validate P802.11ac test vector resultJouni Malinen2013-11-171-19/+92
| | | | | | | Verify the expected value against P802.11ac/D7.0 CCMP-256, GCMP-256, BIP-GMAC-128, and BIP-GMAC-256 test vectors. Signed-hostap: Jouni Malinen <j@w1.fi>
* Extend GCMP test vectors to include both MPDUsJouni Malinen2013-11-172-38/+190
| | | | | | | | | IEEE Std 802.11ad-2012 includes two test vectors for GCMP. Verify both of those and also verify that the results match the values in the standard instead of just verifying that decrypted frame matches original. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use ARRAY_SIZE() macroJouni Malinen2013-10-261-10/+8
| | | | | | | Replace the common sizeof(a)/sizeof(a[0]) constructions with a more readable version. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Always write radiotap pcap-ngJohannes Berg2013-06-221-4/+36
| | | | | | | | When writing pcap-ng files, always include a radiotap header even if there wasn't one in the input. For now just drop prism headers, I don't have any to test. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wlantest: Recognize hwsim_test packetsJouni Malinen2013-05-261-0/+20
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Select correct TDLS context if multiple existsJouni Malinen2013-05-261-10/+20
| | | | | | | | | | Some corner cases may result in both directions of TDLS tracking context existing. If that is the case, the incorrect one may end up getting picked when figuring out which TK to use for decryption or fix statistics counter to increment. Fix this by preferring the context that has TDLS link up. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Track TDLS setup noncesJouni Malinen2013-05-262-2/+51
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Use add_note() to annotate framesJouni Malinen2013-05-267-371/+394
| | | | | | | This adds debug information from wlantest into pcapng frame comments to make the information more convenient to use, e.g., in Wireshark. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add support for writing pcapng filesJouni Malinen2013-05-265-11/+336
| | | | | | | | | The new -n<file> command line argument can be used to request wlantest to write all read or captured frames into a pcapng file. This is similar to the -w argument, but with pcapng allowing per-frame comments to be embedded in the file. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Fix the injection of protected broadcast framesChaitanya T K2013-05-041-3/+2
| | | | | | | | | Injecting protected broadcast frames fails because of the unnecessary null check for sta. In case of broadcast frames sta can be null, so remove the check. Reported-by: Janardhan R <janardhanr@posedge.com> Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>
* wlantest: Fix CCMP-256 cipherJouni Malinen2013-04-051-2/+2
| | | | | | | TK was incorrectly truncated in a way that resulted in CCMP (128-bit key) encryption being used in practice. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Get rid of compiler warningJouni Malinen2013-03-291-2/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add wlantest_cli command add_wepJouni Malinen2013-03-291-1/+29
| | | | | | This can be used to configure a known WEP key for decrypting WEP frames. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add radiotap header when re-writing DLT_IEEE802_11 fileJouni Malinen2013-01-171-1/+37
| | | | | | | | When using DLT_IEEE802_11 datalink type in a pcap file, wlantest will now add a radiotap header to the re-written pcap file to make sure all frames in the output file will include the radiotap header. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Add -F option for assuming FCS is includedJouni Malinen2013-01-173-2/+21
| | | | | | | | | When using DLT_IEEE802_11 datalink type in a pcap file, wlantest can now be instructed to assume there is an FCS included in the frame by adding the new -F command line argument. This will make wlantest validate the FCS and strip it from the frame before processing. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Process TX status frames as RX frames tooJouni Malinen2012-12-161-1/+4
| | | | | | | | This is needed to allow capture files from the mac80211 cooked monitor mode interface to be processed properly. Without this, the locally generated frames may not get processed. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add BIP-GMAC-128/256 test vectorsJouni Malinen2012-09-093-0/+142
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add CCMP-256 test vectorJouni Malinen2012-09-093-0/+153
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Move AES-CCM implementation into src/cryptoJouni Malinen2012-09-091-198/+1
| | | | | | | | This is a generic AES CCM implementation that can be used for other purposes than just implementing CCMP, so it fits better in a separate file in src/crypto. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Move generic AES-CCM into separate functionsJouni Malinen2012-09-091-191/+216
| | | | | | | This part of the implementation is not specific to CCMP and could be used for other purposes, too. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add GCMP-256 test vectorJouni Malinen2012-09-093-10/+76
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Add support for using 192-bit and 256-bit keys with AES-GCMJouni Malinen2012-09-091-4/+4
| | | | | | | | This adds 192-bit and 256-bit key support to the internal AES implementation and extends the AES-GCM functions to accept key length to enable longer AES key use. Signed-hostap: Jouni Malinen <j@w1.fi>
* Support arbitrary IV length with AES-GCMJouni Malinen2012-09-081-4/+4
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Move AES-GCM implementation into src/cryptoJouni Malinen2012-09-081-282/+3
| | | | | | | | This is a generic AES GCM and GMAC implementation that can be used for other purposes than just implementing GCMP, so it fits better in a separate file in src/crypto. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Allow GHASH update calls to avoid extra allocationJouni Malinen2012-09-081-70/+39
| | | | | | | | There is no need to allocate a temporary buffer and build GHASH input data into it. Instead, ghash() is trivial to split into update part that can be called separately for each segment. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Remove CCMP specific AAD handling from GCMPJouni Malinen2012-09-081-10/+8
| | | | | | | GCMP encodes length of AAD differently, so remove the unnecessary code that got copied from the CCMP implementation. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Move GCM-AE and GCM-AD into separate functionsJouni Malinen2012-09-081-160/+185
| | | | | | | This splits the more generic GCM operations from GCMP specific implementation. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add GCMP implementation and test vectors from P802.11ad/D9.0Jouni Malinen2012-09-084-0/+517
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Check TKIP/CCMP decryption routines for test vectorsJouni Malinen2012-09-081-6/+60
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add IEEE Std 802.11-2012, M.9.1 BIP test vectorJouni Malinen2012-09-082-0/+36
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Move BIP function into a separate function and fileJouni Malinen2012-09-084-41/+77
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add IEEE Std 802.11-2012, M.9.2 CCMP (mgmt) test vectorJouni Malinen2012-09-081-0/+34
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add program for generating IEEE 802.11 test vectorsJouni Malinen2012-09-082-1/+131
| | | | | | | This version can generate CCMP and TKIP test vectors that match with the IEEE Std 802.11-2012, Annex M.6.3 and M.6.4. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Implement tkip_encrypt()Jouni Malinen2012-09-081-2/+49
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Fix couple of compiler warningsJouni Malinen2012-08-222-3/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Convert os_zalloc() for an array to use os_calloc()Jouni Malinen2012-08-131-12/+12
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* edit: Add support for setting prompt stringJanusz Dziedzic2012-08-051-1/+1
| | | | Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wlantest: Update STA info based on WPA/RSN IE in EAPOL-Key 2/4Jouni Malinen2012-03-211-0/+25
| | | | | | | | | | The WPA/RSN IE in EAPOL-Key 2/4 is more reliable than the one in (Re)Association Request frame. Update the STA info base don the EAPOL-Key frame so that the correct cipher information is used even if the (Re)Association Request frame is missing or corrupted in the capture. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-1122-176/+44
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Store last received GTK for each STAJouni Malinen2011-12-225-4/+26
| | | | | | | This allows info_sta command to be used to fetch the last received GTK separately for each STA. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Fix EAPOL-Key Key Data decryption for rekey caseJouni Malinen2011-12-221-2/+4
| | | | | | | KEK from TPTK needs to be used instead of from PTK when processing rekeying case similarly to what was already done with KCK. Signed-hostap: Jouni Malinen <j@w1.fi>