Fix tshark field names for RA/TA display
Replace invalid wlan.addr1/wlan.addr2 with wlan.ra/wlan.ta fields. These fields are the correct tshark field names for Receiver Address and Transmitter Address in monitor mode captures. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1e9191f6c7
commit
744bc35597
|
|
@ -84,11 +84,12 @@ echo "(This may take up to 2 seconds if no packets are present)"
|
||||||
|
|
||||||
# Use timeout with -c to limit packets and avoid hanging
|
# Use timeout with -c to limit packets and avoid hanging
|
||||||
# Capture both stdout and stderr
|
# Capture both stdout and stderr
|
||||||
# Fields: frame.number, wlan.addr1 (RA/Receiver Address), wlan.addr2 (TA/Transmitter Address), radiotap.present
|
# Fields: frame.number, wlan.ra (Receiver Address), wlan.ta (Transmitter Address), radiotap.present
|
||||||
|
# Note: wlan.ra and wlan.ta may not be available for all frame types, but are correct for monitor mode
|
||||||
TEST_OUTPUT=$(timeout 2 tshark -i "$INTERFACE" -c 100 -T fields \
|
TEST_OUTPUT=$(timeout 2 tshark -i "$INTERFACE" -c 100 -T fields \
|
||||||
-e frame.number \
|
-e frame.number \
|
||||||
-e wlan.addr1 \
|
-e wlan.ra \
|
||||||
-e wlan.addr2 \
|
-e wlan.ta \
|
||||||
-e radiotap.present \
|
-e radiotap.present \
|
||||||
2>&1 || true)
|
2>&1 || true)
|
||||||
TEST_EXIT_CODE=${PIPESTATUS[0]}
|
TEST_EXIT_CODE=${PIPESTATUS[0]}
|
||||||
|
|
@ -136,8 +137,8 @@ set +e # Temporarily disable exit on error
|
||||||
CAPTURE_OUTPUT=$(timeout "$DURATION" tshark -i "$INTERFACE" -n -T fields \
|
CAPTURE_OUTPUT=$(timeout "$DURATION" tshark -i "$INTERFACE" -n -T fields \
|
||||||
-e frame.number \
|
-e frame.number \
|
||||||
-e frame.time \
|
-e frame.time \
|
||||||
-e wlan.addr1 \
|
-e wlan.ra \
|
||||||
-e wlan.addr2 \
|
-e wlan.ta \
|
||||||
-e wlan.fc.type \
|
-e wlan.fc.type \
|
||||||
-e wlan.fc.subtype \
|
-e wlan.fc.subtype \
|
||||||
-e wlan.fc.type_subtype \
|
-e wlan.fc.type_subtype \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue