summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-llc.c
diff options
context:
space:
mode:
authorjakob <jakob@openbsd.org>2001-04-08 22:45:52 +0000
committerjakob <jakob@openbsd.org>2001-04-08 22:45:52 +0000
commitf3cbb22db5ce372bcc0a493217a8447862ddf89a (patch)
tree8d6fcfdb1d2ec80eb9bad6e76a8a0e616e463476 /usr.sbin/tcpdump/print-llc.c
parent- bring over some bus_dma allocation code (from failed attempt to bus_dma-ify ubsec) (diff)
downloadwireguard-openbsd-f3cbb22db5ce372bcc0a493217a8447862ddf89a.tar.xz
wireguard-openbsd-f3cbb22db5ce372bcc0a493217a8447862ddf89a.zip
add support for printing cdp (Cisco Discovery Protocol), from tcpdump.org
Diffstat (limited to 'usr.sbin/tcpdump/print-llc.c')
-rw-r--r--usr.sbin/tcpdump/print-llc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-llc.c b/usr.sbin/tcpdump/print-llc.c
index f3492734460..008dfc59666 100644
--- a/usr.sbin/tcpdump/print-llc.c
+++ b/usr.sbin/tcpdump/print-llc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-llc.c,v 1.11 2000/12/07 22:36:45 mickey Exp $ */
+/* $OpenBSD: print-llc.c,v 1.12 2001/04/08 22:45:53 jakob Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-llc.c,v 1.11 2000/12/07 22:36:45 mickey Exp $";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-llc.c,v 1.12 2001/04/08 22:45:53 jakob Exp $";
#endif
#include <sys/param.h>
@@ -88,6 +88,15 @@ llc_print(const u_char *p, u_int length, u_int caplen,
else if (p[0] == 0xf0 && p[1] == 0xf0)
netbios_print(p, length);
#endif
+
+ /* Cisco Discovery Protocol - SNAP & ether type 0x2000 */
+ if(llc.ssap == LLCSAP_SNAP && llc.dsap == LLCSAP_SNAP &&
+ llc.llcui == LLC_UI &&
+ llc.ethertype[0] == 0x20 && llc.ethertype[1] == 0x00 ) {
+ cdp_print( p, length, caplen, esrc, edst);
+ return (1);
+ }
+
if (llc.ssap == LLCSAP_ISONS && llc.dsap == LLCSAP_ISONS
&& llc.llcui == LLC_UI) {
isoclns_print(p + 3, length - 3, caplen - 3, esrc, edst);