]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Assign ndo->ndo_packetp in pretty_print_packet()
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 1 Nov 2021 08:40:53 +0000 (09:40 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 1 Nov 2021 09:56:02 +0000 (10:56 +0100)
Thus it can be used for debugging.

print.c

diff --git a/print.c b/print.c
index 447955f0a1ca98ec1b8606f65035c88a27c366b9..265eee7b8a4cd15b0f5c27a7242a6bfc90d50a58 100644 (file)
--- a/print.c
+++ b/print.c
@@ -389,6 +389,7 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h,
         * of the netdissect_options structure.
         */
        ndo->ndo_snapend = sp + h->caplen;
+       ndo->ndo_packetp = sp;
 
        ndo->ndo_protocol = "";
        ndo->ndo_ll_hdr_len = 0;