Output temporary pcap filename for debugging

Display the name of the temporary pcap file being used for capture.
This helps with debugging and allows users to inspect the file if needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Robert McMahon 2026-02-13 14:07:28 -08:00
parent 5ee50bc184
commit 39058bdbf3
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ echo "Capturing packets for $DURATION seconds..."
# Use a temporary pcap file to avoid field extraction errors during capture # Use a temporary pcap file to avoid field extraction errors during capture
# Capture to file first, then parse it - this prevents tshark from exiting early # Capture to file first, then parse it - this prevents tshark from exiting early
TEMP_PCAP=$(mktemp /tmp/tshark_capture_XXXXXX.pcap) TEMP_PCAP=$(mktemp /tmp/tshark_capture_XXXXXX.pcap)
echo "Capturing to temporary file: $TEMP_PCAP"
set +e # Temporarily disable exit on error set +e # Temporarily disable exit on error
# Capture to pcap file - this won't error on missing fields # Capture to pcap file - this won't error on missing fields