summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/print-ip.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-10-05 07:51:21 +0000
committerglebius <glebius@FreeBSD.org>2012-10-05 07:51:21 +0000
commit9aada32871f50c506bf460d8e5c36f8ce516a4f4 (patch)
treeed1959c16458a8caf1fac5f2a1e73aa02c3dde91 /contrib/tcpdump/print-ip.c
parent031c00ccd680f5db61a5fc8f268581709717049b (diff)
downloadFreeBSD-src-9aada32871f50c506bf460d8e5c36f8ce516a4f4.zip
FreeBSD-src-9aada32871f50c506bf460d8e5c36f8ce516a4f4.tar.gz
Provide ability for printing and decoding pfsync(4) traffic. This
doesn't mean supporting IFT_PFSYNC (which I hope will eventually die). This means decoding packets with IP protocol of 240 caught on any normal interface like Ethernet. The code is based on couple of files from OpenBSD, significantly modified by myself. Parser differentiates for four levels of verbosity: no -v, -v, -vv and -vvv. We don't yet forward this code upstream, because currently it strongly relies on if_pfsync.h and even on pfvar.h. I hope that this can be fixed in future. Reviewed by: gnn, delphij
Diffstat (limited to 'contrib/tcpdump/print-ip.c')
-rw-r--r--contrib/tcpdump/print-ip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/tcpdump/print-ip.c b/contrib/tcpdump/print-ip.c
index 9896233..1ef4ee3 100644
--- a/contrib/tcpdump/print-ip.c
+++ b/contrib/tcpdump/print-ip.c
@@ -483,6 +483,10 @@ again:
pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
break;
+ case IPPROTO_PFSYNC:
+ pfsync_ip_print(ipds->cp, ipds->len);
+ break;
+
default:
if ((proto = getprotobynumber(ipds->nh)) != NULL)
ND_PRINT((ndo, " %s", proto->p_name));
OpenPOWER on IntegriCloud