2000-02-05 09:19:06 +00:00
|
|
|
/* packet-vtp.c
|
2011-05-11 01:11:50 +00:00
|
|
|
* Routines for the disassembly of Cisco's VLAN Trunking Protocol
|
2000-02-05 09:19:06 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2000-02-05 09:19:06 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2000-02-05 09:19:06 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-02-05 09:19:06 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-02-05 09:19:06 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-02-05 09:19:06 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-02-05 09:19:06 +00:00
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2000-02-05 09:19:06 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <glib.h>
|
2012-05-15 19:23:35 +00:00
|
|
|
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* See
|
|
|
|
*
|
|
|
|
* http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
|
|
|
|
*
|
|
|
|
* for some information on VTP.
|
|
|
|
*
|
|
|
|
* It's incomplete, and it appears to be inaccurate in a number of places,
|
|
|
|
* but it's all I could find....
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int proto_vtp = -1;
|
|
|
|
static int hf_vtp_version = -1;
|
|
|
|
static int hf_vtp_code = -1;
|
|
|
|
static int hf_vtp_followers = -1;
|
|
|
|
static int hf_vtp_md_len = -1;
|
|
|
|
static int hf_vtp_md = -1;
|
|
|
|
static int hf_vtp_conf_rev_num = -1;
|
|
|
|
static int hf_vtp_upd_id = -1;
|
|
|
|
static int hf_vtp_upd_ts = -1;
|
|
|
|
static int hf_vtp_md5_digest = -1;
|
|
|
|
static int hf_vtp_seq_num = -1;
|
|
|
|
static int hf_vtp_start_value = -1;
|
|
|
|
static int hf_vtp_vlan_info_len = -1;
|
|
|
|
static int hf_vtp_vlan_status_vlan_susp = -1;
|
|
|
|
static int hf_vtp_vlan_type = -1;
|
|
|
|
static int hf_vtp_vlan_name_len = -1;
|
|
|
|
static int hf_vtp_isl_vlan_id = -1;
|
|
|
|
static int hf_vtp_mtu_size = -1;
|
|
|
|
static int hf_vtp_802_10_index = -1;
|
|
|
|
static int hf_vtp_vlan_name = -1;
|
|
|
|
static int hf_vtp_vlan_tlvtype = -1;
|
|
|
|
static int hf_vtp_vlan_tlvlength = -1;
|
2011-05-11 01:11:50 +00:00
|
|
|
static gint hf_vtp_pruning_first_vid = -1;
|
|
|
|
static gint hf_vtp_pruning_last_vid = -1;
|
|
|
|
static gint hf_vtp_pruning_active_vid = -1;
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
static gint ett_vtp = -1;
|
|
|
|
static gint ett_vtp_vlan_info = -1;
|
|
|
|
static gint ett_vtp_vlan_status = -1;
|
|
|
|
static gint ett_vtp_tlv = -1;
|
2011-05-06 01:27:54 +00:00
|
|
|
static gint ett_vtp_pruning = -1;
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
static int
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vlan_info(tvbuff_t *tvb, int offset, proto_tree *tree);
|
2000-02-05 09:19:06 +00:00
|
|
|
static void
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vlan_info_tlv(tvbuff_t *tvb, int offset, int length,
|
2000-02-05 09:19:06 +00:00
|
|
|
proto_tree *tree, proto_item *ti, guint8 type);
|
|
|
|
|
|
|
|
#define SUMMARY_ADVERT 0x01
|
|
|
|
#define SUBSET_ADVERT 0x02
|
|
|
|
#define ADVERT_REQUEST 0x03
|
2011-05-06 01:27:54 +00:00
|
|
|
#define JOIN_MSG 0x04
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
static const value_string type_vals[] = {
|
2011-05-06 01:27:54 +00:00
|
|
|
{ SUMMARY_ADVERT, "Summary Advertisement" },
|
|
|
|
{ SUBSET_ADVERT, "Subset Advertisement" },
|
|
|
|
{ ADVERT_REQUEST, "Advertisement Request" },
|
|
|
|
{ JOIN_MSG, "Join/Prune Message" },
|
2000-02-05 09:19:06 +00:00
|
|
|
{ 0, NULL },
|
|
|
|
};
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2011-05-11 01:11:50 +00:00
|
|
|
static void
|
|
|
|
set_vtp_info_col(tvbuff_t *tvb, packet_info *pinfo)
|
|
|
|
{
|
|
|
|
switch (tvb_get_guint8(tvb, 1)) {
|
|
|
|
|
|
|
|
case SUMMARY_ADVERT:
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO,
|
|
|
|
"Summary Advertisement, Revision: %u", tvb_get_ntohl(tvb, 36));
|
|
|
|
|
|
|
|
if (tvb_get_guint8(tvb, 2) > 0) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO,
|
|
|
|
", Followers: %u", tvb_get_guint8(tvb, 2));
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SUBSET_ADVERT:
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO,
|
|
|
|
"Subset Advertisement, Revision: %u, Seq: %u",
|
|
|
|
tvb_get_ntohl(tvb, 36), tvb_get_guint8(tvb, 2));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ADVERT_REQUEST:
|
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Advertisement Request");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case JOIN_MSG:
|
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Join");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Unrecognized VTP message");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2000-02-05 09:19:06 +00:00
|
|
|
{
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_item *ti;
|
2011-05-06 01:27:54 +00:00
|
|
|
proto_tree *vtp_tree = NULL, *vtp_pruning_tree = NULL;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
int offset = 0;
|
2000-02-05 09:19:06 +00:00
|
|
|
guint8 code;
|
|
|
|
guint8 md_len;
|
2001-03-13 21:34:28 +00:00
|
|
|
const guint8 *upd_timestamp;
|
2000-02-05 09:19:06 +00:00
|
|
|
int vlan_info_len;
|
2011-05-06 01:27:54 +00:00
|
|
|
int pruning_vlan_id;
|
2000-02-05 09:19:06 +00:00
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "VTP");
|
2011-05-11 01:11:50 +00:00
|
|
|
set_vtp_info_col(tvb, pinfo);
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
if (tree) {
|
2002-01-24 09:20:54 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_vtp, tvb, offset, -1,
|
2011-10-21 02:10:19 +00:00
|
|
|
ENC_NA);
|
2000-02-05 09:19:06 +00:00
|
|
|
vtp_tree = proto_item_add_subtree(ti, ett_vtp);
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_version, tvb, offset, 1,
|
2011-10-06 03:35:44 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
code = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint(vtp_tree, hf_vtp_code, tvb, offset, 1,
|
2000-02-05 09:19:06 +00:00
|
|
|
code);
|
|
|
|
offset += 1;
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2000-02-05 09:19:06 +00:00
|
|
|
switch (code) {
|
|
|
|
|
|
|
|
case SUMMARY_ADVERT:
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_followers, tvb, offset,
|
2011-10-06 03:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
md_len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, tvb, offset,
|
2000-02-05 09:19:06 +00:00
|
|
|
1, md_len);
|
|
|
|
offset += 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_md, tvb, offset,
|
2011-10-15 18:46:26 +00:00
|
|
|
32, ENC_ASCII|ENC_NA);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 32;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_conf_rev_num, tvb,
|
2011-10-06 03:35:44 +00:00
|
|
|
offset, 4, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 4;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_upd_id, tvb,
|
2011-10-10 00:39:31 +00:00
|
|
|
offset, 4, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 4;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
upd_timestamp = tvb_get_ptr(tvb, offset, 12);
|
|
|
|
proto_tree_add_string_format(vtp_tree, hf_vtp_upd_ts, tvb,
|
2007-03-26 11:06:26 +00:00
|
|
|
offset, 12, (gchar*)upd_timestamp,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Update Timestamp: %.2s-%.2s-%.2s %.2s:%.2s:%.2s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
&upd_timestamp[0], &upd_timestamp[2], &upd_timestamp[4],
|
|
|
|
&upd_timestamp[6], &upd_timestamp[8], &upd_timestamp[10]);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 12;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_md5_digest, tvb,
|
2011-10-04 22:44:31 +00:00
|
|
|
offset, 16, ENC_NA);
|
2000-02-05 09:19:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SUBSET_ADVERT:
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_seq_num, tvb, offset,
|
2011-10-06 03:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
md_len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, tvb, offset,
|
2000-02-05 09:19:06 +00:00
|
|
|
1, md_len);
|
|
|
|
offset += 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_md, tvb, offset,
|
2011-10-15 18:46:26 +00:00
|
|
|
32, ENC_ASCII|ENC_NA);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 32;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_conf_rev_num, tvb,
|
2011-10-06 03:35:44 +00:00
|
|
|
offset, 4, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 4;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
while (tvb_reported_length_remaining(tvb, offset) > 0) {
|
2002-08-28 21:04:11 +00:00
|
|
|
vlan_info_len =
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vlan_info(tvb, offset, vtp_tree);
|
2000-02-05 09:19:06 +00:00
|
|
|
if (vlan_info_len < 0)
|
|
|
|
break;
|
|
|
|
offset += vlan_info_len;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ADVERT_REQUEST:
|
|
|
|
offset += 1; /* skip reserved field */
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
md_len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, tvb, offset,
|
2000-02-05 09:19:06 +00:00
|
|
|
1, md_len);
|
|
|
|
offset += 1;
|
|
|
|
|
2011-05-11 01:11:50 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_md, tvb, offset,
|
2011-10-15 18:46:26 +00:00
|
|
|
32, ENC_ASCII|ENC_NA);
|
2011-05-11 01:11:50 +00:00
|
|
|
offset += 32;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_start_value, tvb,
|
2011-10-06 03:35:44 +00:00
|
|
|
offset, 2, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
break;
|
|
|
|
|
2011-05-06 01:27:54 +00:00
|
|
|
case JOIN_MSG:
|
|
|
|
offset += 1; /* skip reserved/unused field */
|
2000-02-05 09:19:06 +00:00
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
md_len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, tvb, offset,
|
2000-02-05 09:19:06 +00:00
|
|
|
1, md_len);
|
|
|
|
offset += 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_md, tvb, offset,
|
2011-10-15 18:46:26 +00:00
|
|
|
32, ENC_ASCII|ENC_NA);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 32;
|
|
|
|
|
2011-05-11 01:11:50 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_pruning_first_vid, tvb, offset,
|
2011-10-06 03:35:44 +00:00
|
|
|
2, ENC_BIG_ENDIAN);
|
2011-05-06 01:27:54 +00:00
|
|
|
pruning_vlan_id = tvb_get_ntohs(tvb, offset);
|
|
|
|
offset += 2;
|
2000-02-05 09:19:06 +00:00
|
|
|
|
2011-05-11 01:11:50 +00:00
|
|
|
proto_tree_add_item(vtp_tree, hf_vtp_pruning_last_vid, tvb, offset,
|
2011-10-06 03:35:44 +00:00
|
|
|
2, ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 2;
|
2011-05-06 01:27:54 +00:00
|
|
|
|
|
|
|
ti = proto_tree_add_text (vtp_tree, tvb, offset, -1,
|
|
|
|
"Advertised active (i.e. not pruned) VLANs");
|
|
|
|
vtp_pruning_tree = proto_item_add_subtree(ti, ett_vtp_pruning);
|
|
|
|
|
|
|
|
while (tvb_reported_length_remaining(tvb, offset) > 0) {
|
|
|
|
guint8 vlan_usage_bitmap;
|
|
|
|
int shift;
|
|
|
|
|
|
|
|
vlan_usage_bitmap = tvb_get_guint8(tvb, offset);
|
|
|
|
|
|
|
|
for (shift = 0; shift < 8; shift++) {
|
|
|
|
if (vlan_usage_bitmap & (1<<7)) {
|
2011-05-11 01:11:50 +00:00
|
|
|
proto_tree_add_uint(vtp_pruning_tree, hf_vtp_pruning_active_vid,
|
2011-05-06 01:27:54 +00:00
|
|
|
tvb, offset, 1, pruning_vlan_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
pruning_vlan_id += 1;
|
|
|
|
vlan_usage_bitmap <<= 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
offset += 1;
|
|
|
|
}
|
|
|
|
|
2000-02-05 09:19:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#define VLAN_SUSPENDED 0x01
|
|
|
|
|
|
|
|
static const value_string vlan_type_vals[] = {
|
|
|
|
{ 0x01, "Ethernet" },
|
|
|
|
{ 0x02, "FDDI" },
|
|
|
|
{ 0x03, "TrCRF" },
|
|
|
|
{ 0x04, "FDDI-net" },
|
|
|
|
{ 0x05, "TrBRF" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
#define SR_RING_NUM 0x01
|
|
|
|
#define SR_BRIDGE_NUM 0x02
|
|
|
|
#define STP_TYPE 0x03
|
|
|
|
#define PARENT_VLAN 0x04
|
|
|
|
#define TR_BRIDGED_VLANS 0x05
|
|
|
|
#define PRUNING 0x06
|
|
|
|
#define BRIDGE_TYPE 0x07
|
|
|
|
#define MAX_ARE_HOP_CNT 0x08
|
|
|
|
#define MAX_STE_HOP_CNT 0x09
|
|
|
|
#define BACKUP_CRF_MODE 0x0A
|
|
|
|
|
|
|
|
static const value_string vlan_tlv_type_vals[] = {
|
|
|
|
{ SR_RING_NUM, "Source-Routing Ring Number" },
|
|
|
|
{ SR_BRIDGE_NUM, "Source-Routing Bridge Number" },
|
|
|
|
{ STP_TYPE, "Spanning-Tree Protocol Type" },
|
|
|
|
{ PARENT_VLAN, "Parent VLAN" },
|
|
|
|
{ TR_BRIDGED_VLANS, "Translationally Bridged VLANs" },
|
|
|
|
{ PRUNING, "Pruning" },
|
|
|
|
{ BRIDGE_TYPE, "Bridge Type" },
|
|
|
|
{ MAX_ARE_HOP_CNT, "Max ARE Hop Count" },
|
|
|
|
{ MAX_STE_HOP_CNT, "Max STE Hop Count" },
|
|
|
|
{ BACKUP_CRF_MODE, "Backup CRF Mode" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static int
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vlan_info(tvbuff_t *tvb, int offset, proto_tree *tree)
|
2000-02-05 09:19:06 +00:00
|
|
|
{
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_item *ti;
|
2000-02-05 09:19:06 +00:00
|
|
|
proto_tree *vlan_info_tree;
|
|
|
|
proto_tree *status_tree;
|
|
|
|
guint8 vlan_info_len;
|
|
|
|
int vlan_info_left;
|
|
|
|
guint8 status;
|
|
|
|
guint8 vlan_name_len;
|
2001-02-05 02:47:31 +00:00
|
|
|
guint8 type;
|
2000-02-05 09:19:06 +00:00
|
|
|
int length;
|
|
|
|
proto_tree *tlv_tree;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
vlan_info_len = tvb_get_guint8(tvb, offset);
|
|
|
|
ti = proto_tree_add_text(tree, tvb, offset, vlan_info_len,
|
2000-02-05 09:19:06 +00:00
|
|
|
"VLAN Information");
|
|
|
|
vlan_info_tree = proto_item_add_subtree(ti, ett_vtp_vlan_info);
|
|
|
|
vlan_info_left = vlan_info_len;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_uint(vlan_info_tree, hf_vtp_vlan_info_len, tvb, offset, 1,
|
2000-02-05 09:19:06 +00:00
|
|
|
vlan_info_len);
|
|
|
|
offset += 1;
|
|
|
|
vlan_info_left -= 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < 1)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
status = tvb_get_guint8(tvb, offset);
|
|
|
|
ti = proto_tree_add_text(vlan_info_tree, tvb, offset, 1,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Status: 0x%02x%s", status,
|
|
|
|
(status & VLAN_SUSPENDED) ? "(VLAN suspended)" : "");
|
|
|
|
status_tree = proto_item_add_subtree(ti, ett_vtp_vlan_status);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_boolean(status_tree, hf_vtp_vlan_status_vlan_susp, tvb, offset, 1,
|
2000-02-05 09:19:06 +00:00
|
|
|
status);
|
|
|
|
offset += 1;
|
|
|
|
vlan_info_left -= 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < 1)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vlan_info_tree, hf_vtp_vlan_type, tvb, offset, 1,
|
2011-10-06 03:35:44 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 1;
|
|
|
|
vlan_info_left -= 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < 1)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
vlan_name_len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint(vlan_info_tree, hf_vtp_vlan_name_len, tvb, offset, 1,
|
2000-02-05 09:19:06 +00:00
|
|
|
vlan_name_len);
|
|
|
|
offset += 1;
|
|
|
|
vlan_info_left -= 1;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < 2)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vlan_info_tree, hf_vtp_isl_vlan_id, tvb, offset, 2,
|
2011-10-06 03:35:44 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 2;
|
|
|
|
vlan_info_left -= 2;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < 2)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vlan_info_tree, hf_vtp_mtu_size, tvb, offset, 2,
|
2011-10-06 03:35:44 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 2;
|
|
|
|
vlan_info_left -= 2;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < 4)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vlan_info_tree, hf_vtp_802_10_index, tvb, offset, 4,
|
2011-10-06 03:35:44 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += 4;
|
|
|
|
vlan_info_left -= 4;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
/* VLAN name length appears to be rounded up to a multiple of 4. */
|
2000-02-05 09:19:06 +00:00
|
|
|
vlan_name_len = 4*((vlan_name_len + 3)/4);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (vlan_info_left < vlan_name_len)
|
2000-02-05 09:19:06 +00:00
|
|
|
return -1;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_item(vlan_info_tree, hf_vtp_vlan_name, tvb, offset,
|
2011-10-15 18:46:26 +00:00
|
|
|
vlan_name_len, ENC_ASCII|ENC_NA);
|
2000-02-05 09:19:06 +00:00
|
|
|
offset += vlan_name_len;
|
|
|
|
vlan_info_left -= vlan_name_len;
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
while (vlan_info_left > 0) {
|
|
|
|
type = tvb_get_guint8(tvb, offset + 0);
|
|
|
|
length = tvb_get_guint8(tvb, offset + 1);
|
2000-02-05 09:19:06 +00:00
|
|
|
|
Get rid of "proto_tree_add_notext()" - if you create a subtree using it,
but, before you set the text, you throw an exception while putting stuff
under the subtree, you end up with an absolutely blank protocol tree
item, which is really gross. Instead of calling
"proto_tree_add_notext()", call "proto_tree_add_text()" with at least a
minimal label - yes, it does mean you do some work that will probably be
unnecessary, but, absent a scheme to arrange to do that work if it *is*
necessary (e.g., catching exceptions), the alternative is an ugly
protocol tree display.
svn path=/trunk/; revision=3879
2001-08-28 08:28:19 +00:00
|
|
|
ti = proto_tree_add_text(vlan_info_tree, tvb, offset,
|
|
|
|
2 + length*2, "%s",
|
|
|
|
val_to_str(type, vlan_tlv_type_vals,
|
|
|
|
"Unknown TLV type: 0x%02x"));
|
2000-02-05 09:19:06 +00:00
|
|
|
tlv_tree = proto_item_add_subtree(ti, ett_vtp_tlv);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvtype, tvb, offset,
|
2000-02-05 09:19:06 +00:00
|
|
|
1, type);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvlength, tvb, offset+1,
|
2000-02-05 09:19:06 +00:00
|
|
|
1, length);
|
|
|
|
offset += 2;
|
|
|
|
vlan_info_left -= 2;
|
|
|
|
if (length > 0) {
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vlan_info_tlv(tvb, offset, length*2, tlv_tree,
|
2000-02-05 09:19:06 +00:00
|
|
|
ti, type);
|
|
|
|
}
|
|
|
|
offset += length*2;
|
|
|
|
vlan_info_left -= length*2;
|
|
|
|
}
|
|
|
|
|
|
|
|
return vlan_info_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const value_string stp_type_vals[] = {
|
|
|
|
{ 1, "SRT" },
|
|
|
|
{ 2, "SRB" },
|
|
|
|
{ 3, "Auto" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pruning_vals[] = {
|
|
|
|
{ 1, "Enabled" },
|
|
|
|
{ 2, "Disabled" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string bridge_type_vals[] = {
|
|
|
|
{ 1, "SRT" },
|
|
|
|
{ 2, "SRB" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string backup_crf_mode_vals[] = {
|
|
|
|
{ 1, "TrCRF is configured as a backup" },
|
|
|
|
{ 2, "TrCRF is not configured as a backup" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
dissect_vlan_info_tlv(tvbuff_t *tvb, int offset, int length,
|
2000-02-05 09:19:06 +00:00
|
|
|
proto_tree *tree, proto_item *ti, guint8 type)
|
|
|
|
{
|
|
|
|
switch (type) {
|
|
|
|
|
|
|
|
case SR_RING_NUM:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Source-Routing Ring Number: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Source-Routing Ring Number: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
2000-02-05 09:19:06 +00:00
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Source-Routing Ring Number: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Source-Routing Ring Number: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SR_BRIDGE_NUM:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Source-Routing Bridge Number: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Source-Routing Bridge Number: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
2000-02-05 09:19:06 +00:00
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Source-Routing Bridge Number: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Source-Routing Bridge Number: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case STP_TYPE:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Spanning-Tree Protocol Type: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), stp_type_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Spanning-Tree Protocol Type: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), stp_type_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Spanning-Tree Protocol Type: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Spanning-Tree Protocol Type: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PARENT_VLAN:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Parent VLAN: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Parent VLAN: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
2000-02-05 09:19:06 +00:00
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Parent VLAN: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Parent VLAN: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TR_BRIDGED_VLANS:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Translationally Bridged VLANs: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Translationally Bridged VLANs: 0x%04x",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
2000-02-05 09:19:06 +00:00
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Translationally Bridged VLANs: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Translationally Bridged VLANs: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PRUNING:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Pruning: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), pruning_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Pruning: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), pruning_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Pruning: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Pruning: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BRIDGE_TYPE:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Bridge Type: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), bridge_type_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Bridge Type: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), bridge_type_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Bridge Type: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Bridge Type: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MAX_ARE_HOP_CNT:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Max ARE Hop Count: %u",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Max ARE Hop Count: %u",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
2000-02-05 09:19:06 +00:00
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Max ARE Hop Count: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Max ARE Hop Count: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MAX_STE_HOP_CNT:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Max STE Hop Count: %u",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Max STE Hop Count: %u",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
tvb_get_ntohs(tvb, offset));
|
2000-02-05 09:19:06 +00:00
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Max STE Hop Count: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Max STE Hop Count: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BACKUP_CRF_MODE:
|
|
|
|
if (length == 2) {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Backup CRF Mode: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), backup_crf_mode_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, 2,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Backup CRF Mode: %s",
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
val_to_str(tvb_get_ntohs(tvb, offset), backup_crf_mode_vals,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Unknown (0x%04x)"));
|
|
|
|
} else {
|
|
|
|
proto_item_set_text(ti,
|
|
|
|
"Backup CRF Mode: Bad length %u",
|
|
|
|
length);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length,
|
2000-02-05 09:19:06 +00:00
|
|
|
"Backup CRF Mode: Bad length %u",
|
|
|
|
length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, length, "Data");
|
2000-02-05 09:19:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_vtp(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_vtp_version,
|
|
|
|
{ "Version", "vtp.version", FT_UINT8, BASE_HEX, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_code,
|
|
|
|
{ "Code", "vtp.code", FT_UINT8, BASE_HEX, VALS(type_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_followers,
|
|
|
|
{ "Followers", "vtp.followers", FT_UINT8, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Number of following Subset-Advert messages", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_md_len,
|
|
|
|
{ "Management Domain Length", "vtp.md_len", FT_UINT8, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Length of management domain string", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_md,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Management Domain", "vtp.md", FT_STRING, BASE_NONE, NULL, 0,
|
2010-09-23 21:46:31 +00:00
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_conf_rev_num,
|
|
|
|
{ "Configuration Revision Number", "vtp.conf_rev_num", FT_UINT32, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Revision number of the configuration information", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_upd_id,
|
|
|
|
{ "Updater Identity", "vtp.upd_id", FT_IPv4, BASE_NONE, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"IP address of the updater", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_upd_ts,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Update Timestamp", "vtp.upd_ts", FT_STRING, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Time stamp of the current configuration revision", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_md5_digest,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "MD5 Digest", "vtp.md5_digest", FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_seq_num,
|
|
|
|
{ "Sequence Number", "vtp.seq_num", FT_UINT8, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Order of this frame in the sequence of Subset-Advert frames", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_start_value,
|
|
|
|
{ "Start Value", "vtp.start_value", FT_UINT16, BASE_HEX, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Virtual LAN ID of first VLAN for which information is requested", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_info_len,
|
|
|
|
{ "VLAN Information Length", "vtp.vlan_info.len", FT_UINT8, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Length of the VLAN information field", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_status_vlan_susp,
|
|
|
|
{ "VLAN suspended", "vtp.vlan_info.status.vlan_susp", FT_BOOLEAN, 8, NULL, VLAN_SUSPENDED,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_type,
|
|
|
|
{ "VLAN Type", "vtp.vlan_info.vlan_type", FT_UINT8, BASE_HEX, VALS(vlan_type_vals), 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Type of VLAN", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_name_len,
|
|
|
|
{ "VLAN Name Length", "vtp.vlan_info.vlan_name_len", FT_UINT8, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Length of VLAN name string", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_isl_vlan_id,
|
|
|
|
{ "ISL VLAN ID", "vtp.vlan_info.isl_vlan_id", FT_UINT16, BASE_HEX, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"ID of this VLAN on ISL trunks", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_mtu_size,
|
|
|
|
{ "MTU Size", "vtp.vlan_info.mtu_size", FT_UINT16, BASE_DEC, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"MTU for this VLAN", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_802_10_index,
|
|
|
|
{ "802.10 Index", "vtp.vlan_info.802_10_index", FT_UINT32, BASE_HEX, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"IEEE 802.10 security association identifier for this VLAN", HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_name,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VLAN Name", "vtp.vlan_info.vlan_name", FT_STRING, BASE_NONE, NULL, 0,
|
2010-09-23 21:46:31 +00:00
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_tlvtype,
|
|
|
|
{ "Type", "vtp.vlan_info.tlv_type", FT_UINT8, BASE_HEX, VALS(vlan_tlv_type_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2000-02-05 09:19:06 +00:00
|
|
|
|
|
|
|
{ &hf_vtp_vlan_tlvlength,
|
|
|
|
{ "Length", "vtp.vlan_info.tlv_len", FT_UINT8, BASE_DEC, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2011-05-06 01:27:54 +00:00
|
|
|
|
2011-05-11 01:11:50 +00:00
|
|
|
{ &hf_vtp_pruning_first_vid,
|
|
|
|
{ "First VLAN ID", "vtp.pruning.first", FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
"First VLAN ID for which pruning information is present", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_vtp_pruning_last_vid,
|
|
|
|
{ "Last VLAN ID", "vtp.pruning.last", FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
"Last VLAN ID for which pruning information is present", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_vtp_pruning_active_vid,
|
|
|
|
{ "VLAN", "vtp.pruning.active", FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
"Active advertised VLAN ID", HFILL }},
|
|
|
|
|
2000-02-05 09:19:06 +00:00
|
|
|
};
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_vtp,
|
|
|
|
&ett_vtp_vlan_info,
|
|
|
|
&ett_vtp_vlan_status,
|
|
|
|
&ett_vtp_tlv,
|
2011-05-06 01:27:54 +00:00
|
|
|
&ett_vtp_pruning,
|
2000-02-05 09:19:06 +00:00
|
|
|
};
|
|
|
|
|
2011-05-11 01:11:50 +00:00
|
|
|
proto_vtp = proto_register_protocol("VLAN Trunking Protocol",
|
2001-01-03 06:56:03 +00:00
|
|
|
"VTP", "vtp");
|
2000-02-05 09:19:06 +00:00
|
|
|
proto_register_field_array(proto_vtp, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_vtp(void)
|
|
|
|
{
|
2001-12-03 04:00:26 +00:00
|
|
|
dissector_handle_t vtp_handle;
|
|
|
|
|
|
|
|
vtp_handle = create_dissector_handle(dissect_vtp, proto_vtp);
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("llc.cisco_pid", 0x2003, vtp_handle);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
}
|