diff options
author | sthen <sthen@openbsd.org> | 2008-12-05 01:25:24 +0000 |
---|---|---|
committer | sthen <sthen@openbsd.org> | 2008-12-05 01:25:24 +0000 |
commit | 855d0349dd9d40b5255645b89e2b51e4e58b856d (patch) | |
tree | 163a26d7da1bd93c714d010657389dcf367c0cdf /usr.sbin/tcpdump/print-ether.c | |
parent | enable 9k frames on the "jumbo" ring (diff) | |
download | wireguard-openbsd-855d0349dd9d40b5255645b89e2b51e4e58b856d.tar.xz wireguard-openbsd-855d0349dd9d40b5255645b89e2b51e4e58b856d.zip |
add ethertype and tcpdump support for VLAN stacking (QinQ) with
type number 0x88a8 specified by 802.1ad.
from reyk on misc@. "ok, go for it" dlg
Diffstat (limited to 'usr.sbin/tcpdump/print-ether.c')
-rw-r--r-- | usr.sbin/tcpdump/print-ether.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 " : " "); |