diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-13 02:40:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-13 02:40:57 +0000 |
commit | 445b21759e969e86522e9d26018ada3b0ef19daf (patch) | |
tree | f8af0a393c56f87e3946868b5586598721e52106 | |
parent | daf302579a8b967a88bdeaead0a31cc83f59c6dd (diff) | |
download | wireshark-445b21759e969e86522e9d26018ada3b0ef19daf.tar.gz wireshark-445b21759e969e86522e9d26018ada3b0ef19daf.tar.bz2 wireshark-445b21759e969e86522e9d26018ada3b0ef19daf.zip |
Support for the VTP Management Domain item in CDP packets, from Kent
Engstr�m.
svn path=/trunk/; revision=2888
-rw-r--r-- | AUTHORS | 4 | ||||
-rw-r--r-- | doc/ethereal.pod.template | 1 | ||||
-rw-r--r-- | packet-cdp.c | 35 |
3 files changed, 31 insertions, 9 deletions
@@ -477,6 +477,10 @@ David Hampton <dhampton@mac.com> { Support for the HTTP-based SSDP protocol } +Kent Engström <kent@unit.liu.se> { + CDP VTP Management Domain item support +} + Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template index 82e6afed22..f07290025f 100644 --- a/doc/ethereal.pod.template +++ b/doc/ethereal.pod.template @@ -1017,6 +1017,7 @@ B<http://www.ethereal.com>. Burke Lau <burke_lau@agilent.com> Martti Kuparinen <martti.kuparinen@nomadiclab.com> David Hampton <dhampton@mac.com> + Kent Engström <kent@unit.liu.se> Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/packet-cdp.c b/packet-cdp.c index e41d188561..b161a81f52 100644 --- a/packet-cdp.c +++ b/packet-cdp.c @@ -2,7 +2,7 @@ * Routines for the disassembly of the "Cisco Discovery Protocol" * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-cdp.c,v 1.32 2001/01/10 09:07:35 guy Exp $ + * $Id: packet-cdp.c,v 1.33 2001/01/13 02:40:55 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -78,15 +78,18 @@ add_multi_line_string_to_tree(proto_tree *tree, tvbuff_t *tvb, gint start, #define TYPE_PLATFORM 0x0006 #define TYPE_IP_PREFIX 0x0007 +#define TYPE_VTP_MGMT_DOMAIN 0x0009 /* Guessed, from tcpdump */ + static const value_string type_vals[] = { - { TYPE_DEVICE_ID, "Device ID" }, - { TYPE_ADDRESS, "Addresses" }, - { TYPE_PORT_ID, "Port ID" }, - { TYPE_CAPABILITIES, "Capabilities" }, - { TYPE_IOS_VERSION, "Software version" }, - { TYPE_PLATFORM, "Platform" }, - { TYPE_IP_PREFIX, "IP Prefix (used for ODR)" }, - { 0, NULL }, + { TYPE_DEVICE_ID, "Device ID" }, + { TYPE_ADDRESS, "Addresses" }, + { TYPE_PORT_ID, "Port ID" }, + { TYPE_CAPABILITIES, "Capabilities" }, + { TYPE_IOS_VERSION, "Software version" }, + { TYPE_PLATFORM, "Platform" }, + { TYPE_IP_PREFIX, "IP Prefix (used for ODR)" }, + { TYPE_VTP_MGMT_DOMAIN, "VTP Management Domain" }, + { 0, NULL }, }; static void @@ -277,6 +280,20 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) length -= 5; } break; + case TYPE_VTP_MGMT_DOMAIN: + tlvi = proto_tree_add_text(cdp_tree, tvb, + offset, length, "VTP Management Domain: %.*s", + length - 4, + tvb_get_ptr(tvb, offset + 4, length - 4)); + tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); + proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, tvb, + offset + TLV_TYPE, 2, type); + proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, tvb, + offset + TLV_LENGTH, 2, length); + add_multi_line_string_to_tree(tlv_tree, tvb, offset + 4, + length - 4, "VTP Management Domain: "); + offset += length; + break; default: tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Type: %s, length: %u", |