diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-12 19:37:24 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-12 19:37:24 +0000 |
commit | 3db486ab748a6f5c8f5c1aeeb1e3710c85694f36 (patch) | |
tree | 879ba328027a26f6335f82f62be28627afa71deb /packet-llc.c | |
parent | bd7c6bda88272183dfbbf5fe146ccc638a864cd9 (diff) |
Cisco CDP packets appears to be sent as LLC packets with an OUI of
0x00000c and a protocol ID of 0x2000 - we used to recognize those as CDP
because we ignored the OUI and treated all LLC packets as
SNAP-encapsulated packets, and treated 0x2000 as an Ethertype, but we
now treat only encapsulated-Ethernet and Apple packets as
SNAP-encapsulated (and arguably we should handle Apple separately).
svn path=/trunk/; revision=1452
Diffstat (limited to 'packet-llc.c')
-rw-r--r-- | packet-llc.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/packet-llc.c b/packet-llc.c index fc6ec8430c..5768c11c66 100644 --- a/packet-llc.c +++ b/packet-llc.c @@ -2,7 +2,7 @@ * Routines for IEEE 802.2 LLC layer * Gilbert Ramirez <gramirez@tivoli.com> * - * $Id: packet-llc.c,v 1.37 2000/01/07 22:05:32 guy Exp $ + * $Id: packet-llc.c,v 1.38 2000/01/12 19:37:23 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -156,7 +156,7 @@ const value_string oui_vals[] = { /* http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/ibm_r/brprt1/brsrb.htm */ - { 0x00000c, "Cisco" }, + { OUI_CISCO, "Cisco" }, { 0x0000f8, "Cisco 90-Compatible" }, { 0x0080c2, "Bridged Frame-Relay" }, /* RFC 2427 */ { OUI_ATM_FORUM, "ATM Forum" }, @@ -369,6 +369,26 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { fd, tree, llc_tree, hf_llc_type); break; + + case OUI_CISCO: + /* So are all CDP packets LLC packets + with an OUI of OUI_CISCO and a + protocol ID of 0x2000, or + are some of them raw or encapsulated + Ethernet? */ + switch (etype) { + + case 0x2000: + if (tree) { + proto_tree_add_item(llc_tree, + hf_llc_pid, offset+6, + 2, etype); + } + dissect_cdp(pd, offset+8, fd, tree); + break; + } + break; + default: proto_tree_add_item(llc_tree, hf_llc_pid, offset+6, 2, etype); |