From 5b0329a9e755e860c3ac8cd6cf383f58261e445d Mon Sep 17 00:00:00 2001 From: Michael Richardson Date: Tue, 3 May 2011 18:58:32 -0400 Subject: From: Darren Reed To: tcpdump-workers@lists.tcpdump.org Date: Sat, 09 Apr 2011 12:51:14 +1000 Subject: [tcpdump-workers] Printing PPI packets Printing PPI packets with tcpdump does not turn out to be that hard. My simple tests have produced the output as below. It would be worthwhile having some changes made into the tcpdump code base that were similar to the attached that print them out. --- interface.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'interface.h') diff --git a/interface.h b/interface.h index aa3954f5..075b78fe 100644 --- a/interface.h +++ b/interface.h @@ -97,6 +97,14 @@ extern char *program_name; /* used to generate self-identifying messages */ extern int32_t thiszone; /* seconds offset from gmt to local time */ +typedef u_int (*if_ndo_printer)(struct netdissect_options *ndo, + const struct pcap_pkthdr *, const u_char *); +typedef u_int (*if_printer)(const struct pcap_pkthdr *, const u_char *); + +extern if_ndo_printer lookup_ndo_printer(int); +extern if_printer lookup_printer(int); + + /* * True if "l" bytes of "var" were captured. * @@ -314,6 +322,7 @@ extern u_int bt_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int usb_linux_48_byte_print(const struct pcap_pkthdr *, const u_char *); extern u_int usb_linux_64_byte_print(const struct pcap_pkthdr *, const u_char *); + #ifdef INET6 extern void ip6_opt_print(const u_char *, int); extern int hbhopt_print(const u_char *); -- cgit v1.2.1