summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/ethertypes.h3
-rw-r--r--usr.sbin/tcpdump/ethertype.h7
-rw-r--r--usr.sbin/tcpdump/print-ether.c10
3 files changed, 14 insertions, 6 deletions
diff --git a/sys/net/ethertypes.h b/sys/net/ethertypes.h
index d63cc11f3e0..96013ea47e3 100644
--- a/sys/net/ethertypes.h
+++ b/sys/net/ethertypes.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ethertypes.h,v 1.9 2008/05/05 13:40:17 dlg Exp $ */
+/* $OpenBSD: ethertypes.h,v 1.10 2008/12/05 01:25:24 sthen Exp $ */
/* $NetBSD: ethertypes.h,v 1.13 2002/02/10 01:28:32 thorpej Exp $ */
/*
@@ -300,6 +300,7 @@
#define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */
#define ETHERTYPE_PAE 0x888E /* 802.1X Port Access Entity */
#define ETHERTYPE_AOE 0x88A2 /* ATA over Ethernet */
+#define ETHERTYPE_QINQ 0x88A8 /* 802.1ad VLAN stacking */
#define ETHERTYPE_LLDP 0x88CC /* Link Layer Discovery Protocol */
#define ETHERTYPE_LOOPBACK 0x9000 /* Loopback */
#define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */
diff --git a/usr.sbin/tcpdump/ethertype.h b/usr.sbin/tcpdump/ethertype.h
index 3a49392018a..6b9c899d4ce 100644
--- a/usr.sbin/tcpdump/ethertype.h
+++ b/usr.sbin/tcpdump/ethertype.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ethertype.h,v 1.13 2007/10/07 16:41:05 deraadt Exp $ */
+/* $OpenBSD: ethertype.h,v 1.14 2008/12/05 01:25:24 sthen Exp $ */
/*
* Copyright (c) 1993, 1994, 1996
@@ -20,7 +20,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Id: ethertype.h,v 1.13 2007/10/07 16:41:05 deraadt Exp $ (LBL)
+ * @(#) $Id: ethertype.h,v 1.14 2008/12/05 01:25:24 sthen Exp $ (LBL)
*/
/*
@@ -102,6 +102,9 @@
#ifndef ETHERTYPE_8021Q
#define ETHERTYPE_8021Q 0x8100
#endif
+#ifndef ETHERTYPE_QINQ
+#define ETHERTYPE_QINQ 0x88a8
+#endif
#ifndef ETHERTYPE_IPX
#define ETHERTYPE_IPX 0x8137
#endif
diff --git a/usr.sbin/tcpdump/print-ether.c b/usr.sbin/tcpdump/print-ether.c
index aad24160c78..208d3ecdf38 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.24 2008/10/16 12:57:01 mpf Exp $ */
+/* $OpenBSD: print-ether.c,v 1.25 2008/12/05 01:25:24 sthen Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Id: print-ether.c,v 1.24 2008/10/16 12:57:01 mpf Exp $ (LBL)";
+ "@(#) $Id: print-ether.c,v 1.25 2008/12/05 01:25:24 sthen Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -204,7 +204,11 @@ recurse:
return (1);
case ETHERTYPE_8021Q:
- printf("802.1Q vid %d pri %d%s",
+ printf("802.1Q ");
+ case ETHERTYPE_QINQ:
+ if (ethertype == ETHERTYPE_QINQ)
+ printf("QinQ s");
+ printf("vid %d pri %d%s",
ntohs(*(unsigned short*)p)&0xFFF,
ntohs(*(unsigned short*)p)>>13,
(ntohs(*(unsigned short*)p)&0x1000) ? " cfi " : " ");