]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Log frame number for Management frames and EAPOL frames
authorJouni Malinen <jouni.malinen@oss.qualcomm.com>
Wed, 7 May 2025 15:45:07 +0000 (18:45 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 7 May 2025 15:45:07 +0000 (18:45 +0300)
This makes it easier to find the frame from a capture file if needing to
manual inspectation of the details.

Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
wlantest/rx_eapol.c
wlantest/rx_mgmt.c

index dd58ae521c0d25b2d48d07cfc61da2927ce49d3f..75e29863dae95e174e1de6b245420717ebf3919a 100644 (file)
@@ -1683,9 +1683,9 @@ void rx_data_eapol(struct wlantest *wt, const u8 *bssid, const u8 *sta_addr,
        hdr = (const struct ieee802_1x_hdr *) data;
        length = be_to_host16(hdr->length);
        wpa_printf(MSG_DEBUG, "RX EAPOL: " MACSTR " -> " MACSTR "%s ver=%u "
-                  "type=%u len=%u",
+                  "type=%u len=%u #%u",
                   MAC2STR(src), MAC2STR(dst), prot ? " Prot" : "",
-                  hdr->version, hdr->type, length);
+                  hdr->version, hdr->type, length, wt->frame_num);
        if (hdr->version < 1 || hdr->version > 3) {
                wpa_printf(MSG_INFO, "Unexpected EAPOL version %u from "
                           MACSTR, hdr->version, MAC2STR(src));
index 1c9309488dff149516c18ba634cd21097eb14234..47dbc600992e395766212446f137d820e6a9ac10 100644 (file)
@@ -3950,12 +3950,13 @@ void rx_mgmt(struct wlantest *wt, const u8 *data, size_t len)
                    stype == WLAN_FC_STYPE_PROBE_RESP ||
                    stype == WLAN_FC_STYPE_PROBE_REQ) ?
                   MSG_EXCESSIVE : MSG_MSGDUMP,
-                  "MGMT %s%s%s DA=" MACSTR " SA=" MACSTR " BSSID=" MACSTR,
+                  "MGMT %s%s%s DA=" MACSTR " SA=" MACSTR " BSSID=" MACSTR
+                  " #%u",
                   mgmt_stype(stype),
                   fc & WLAN_FC_PWRMGT ? " PwrMgt" : "",
                   fc & WLAN_FC_ISWEP ? " Prot" : "",
                   MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
-                  MAC2STR(hdr->addr3));
+                  MAC2STR(hdr->addr3), wt->frame_num);
 
        if ((fc & WLAN_FC_ISWEP) &&
            !(hdr->addr1[0] & 0x01) &&