summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-ether.c
diff options
context:
space:
mode:
authorcanacar <canacar@openbsd.org>2005-10-08 19:45:15 +0000
committercanacar <canacar@openbsd.org>2005-10-08 19:45:15 +0000
commitbf8217aef51ef7695ce450c2f339129bee42c23d (patch)
tree8fbf87b31758c492e25c11ad8ec21bfb4f063ca6 /usr.sbin/tcpdump/print-ether.c
parentCheck IP version when decoding v4 and v6 packets. (diff)
downloadwireguard-openbsd-bf8217aef51ef7695ce450c2f339129bee42c23d.tar.xz
wireguard-openbsd-bf8217aef51ef7695ce450c2f339129bee42c23d.zip
Add a best effort mpls decoder. From Jason L. Wright.
Since the encapsulated protocol information is not always available in the MPLS tag stack. The decoder attempts to guess the protocol. ok brad@
Diffstat (limited to 'usr.sbin/tcpdump/print-ether.c')
-rw-r--r--usr.sbin/tcpdump/print-ether.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-ether.c b/usr.sbin/tcpdump/print-ether.c
index 9003aa6171a..d0db67dea31 100644
--- a/usr.sbin/tcpdump/print-ether.c
+++ b/usr.sbin/tcpdump/print-ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ether.c,v 1.19 2004/01/22 16:18:52 jason Exp $ */
+/* $OpenBSD: print-ether.c,v 1.20 2005/10/08 19:45:15 canacar Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-ether.c,v 1.19 2004/01/22 16:18:52 jason Exp $ (LBL)";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-ether.c,v 1.20 2005/10/08 19:45:15 canacar Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -235,6 +235,11 @@ recurse:
ether_macctl(p, length);
return (1);
+ case ETHERTYPE_MPLS:
+ case ETHERTYPE_MPLS_MCAST:
+ mpls_print(p, length);
+ return (1);
+
case ETHERTYPE_LAT:
case ETHERTYPE_SCA:
case ETHERTYPE_MOPRC: