diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2001-04-08 22:45:54 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2001-04-08 22:45:54 +0000 |
commit | 69caa646dae906287659247a1c04e4e85faeb2d8 (patch) | |
tree | 2add9350e5d8b9cba29f4ecd6bf5dfbcf1b004aa /usr.sbin/tcpdump/print-llc.c | |
parent | 2911c28abfb17dba8e3c2d88ff61228190b59281 (diff) |
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.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-llc.c b/usr.sbin/tcpdump/print-llc.c index ebea850705b..b3ff0647c3d 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: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-llc.c,v 1.11 2000/12/07 22:36:45 mickey Exp $"; + "@(#) $Header: /cvs/OpenBSD/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); |