diff options
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r-- | usr.sbin/tcpdump/ethertype.h | 7 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-ether.c | 10 |
2 files changed, 12 insertions, 5 deletions
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 " : " "); |