1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 00:32:04 +02:00

net: Add option for tracing packets

Add an option to trace all packets send/received. This can be helpful when
debugging protocol issues, as the packets can then be imported into
wireshark [1] and analyzed further.

[1] https://www.wireshark.org/docs/wsug_html_chunked/ChIOImportSection.html

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Sean Anderson
2023-10-07 21:53:12 -04:00
committed by Tom Rini
parent a56e30e65f
commit 798962cedd
2 changed files with 7 additions and 0 deletions

View File

@@ -1201,6 +1201,9 @@ void net_process_received_packet(uchar *in_packet, int len)
ushort cti = 0, vlanid = VLAN_NONE, myvlanid, mynvlanid;
debug_cond(DEBUG_NET_PKT, "packet received\n");
if (DEBUG_NET_PKT_TRACE)
print_hex_dump_bytes("rx: ", DUMP_PREFIX_OFFSET, in_packet,
len);
#if defined(CONFIG_CMD_PCAP)
pcap_post(in_packet, len, false);