2 * Routines for the disassembly of Cisco's VLAN Trunking Protocol
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #include <epan/packet.h>
30 #include <epan/expert.h>
35 * http://www.cisco.com/en/US/tech/tk389/tk689/technologies_tech_note09186a0080094c52.shtml
37 * for some information on VTP.
40 static int proto_vtp
= -1;
41 static int hf_vtp_version
= -1;
42 static int hf_vtp_code
= -1;
43 static int hf_vtp_followers
= -1;
44 static int hf_vtp_md_len
= -1;
45 static int hf_vtp_md
= -1;
46 static int hf_vtp_conf_rev_num
= -1;
47 static int hf_vtp_upd_id
= -1;
48 static int hf_vtp_upd_ts
= -1;
49 static int hf_vtp_md5_digest
= -1;
50 static int hf_vtp_seq_num
= -1;
51 static int hf_vtp_start_value
= -1;
52 static int hf_vtp_vlan_info_len
= -1;
53 static int hf_vtp_vlan_status_vlan_susp
= -1;
54 static int hf_vtp_vlan_type
= -1;
55 static int hf_vtp_vlan_name_len
= -1;
56 static int hf_vtp_isl_vlan_id
= -1;
57 static int hf_vtp_mtu_size
= -1;
58 static int hf_vtp_802_10_index
= -1;
59 static int hf_vtp_vlan_name
= -1;
60 static int hf_vtp_vlan_tlvtype
= -1;
61 static int hf_vtp_vlan_tlvlength
= -1;
62 static int hf_vtp_pruning_first_vid
= -1;
63 static int hf_vtp_pruning_last_vid
= -1;
64 static int hf_vtp_pruning_active_vid
= -1;
65 static int hf_vtp_vlan_src_route_ring_num
= -1;
66 static int hf_vtp_vlan_src_route_bridge_num
= -1;
67 static int hf_vtp_vlan_stp_type
= -1;
68 static int hf_vtp_vlan_parent_vlan
= -1;
69 static int hf_vtp_vlan_translationally_bridged_vlans
= -1;
70 static int hf_vtp_vlan_pruning
= -1;
71 static int hf_vtp_vlan_bridge_type
= -1;
72 static int hf_vtp_vlan_max_are_hop_count
= -1;
73 static int hf_vtp_vlan_max_ste_hop_count
= -1;
74 static int hf_vtp_vlan_backup_crf_mode
= -1;
76 static gint ett_vtp
= -1;
77 static gint ett_vtp_vlan_info
= -1;
78 static gint ett_vtp_vlan_status
= -1;
79 static gint ett_vtp_tlv
= -1;
80 static gint ett_vtp_pruning
= -1;
82 static expert_field ei_vtp_vlan_tlvlength_bad
= EI_INIT
;
85 dissect_vlan_info(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
);
87 dissect_vlan_info_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, int length
,
88 proto_tree
*tree
, proto_item
*ti
, guint8 type
);
90 #define SUMMARY_ADVERT 0x01
91 #define SUBSET_ADVERT 0x02
92 #define ADVERT_REQUEST 0x03
95 static const value_string type_vals
[] = {
96 { SUMMARY_ADVERT
, "Summary Advertisement" },
97 { SUBSET_ADVERT
, "Subset Advertisement" },
98 { ADVERT_REQUEST
, "Advertisement Request" },
99 { JOIN_MSG
, "Join/Prune Message" },
104 set_vtp_info_col(tvbuff_t
*tvb
, packet_info
*pinfo
)
106 switch (tvb_get_guint8(tvb
, 1)) {
109 col_add_fstr(pinfo
->cinfo
, COL_INFO
,
110 "Summary Advertisement, Revision: %u", tvb_get_ntohl(tvb
, 36));
112 if (tvb_get_guint8(tvb
, 2) > 0) {
113 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
114 ", Followers: %u", tvb_get_guint8(tvb
, 2));
120 col_add_fstr(pinfo
->cinfo
, COL_INFO
,
121 "Subset Advertisement, Revision: %u, Seq: %u",
122 tvb_get_ntohl(tvb
, 36), tvb_get_guint8(tvb
, 2));
126 col_set_str(pinfo
->cinfo
, COL_INFO
, "Advertisement Request");
130 col_set_str(pinfo
->cinfo
, COL_INFO
, "Join");
134 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unrecognized VTP message");
140 dissect_vtp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
143 proto_tree
*vtp_tree
= NULL
, *vtp_pruning_tree
= NULL
;
146 guint8
*upd_timestamp
;
150 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "VTP");
151 set_vtp_info_col(tvb
, pinfo
);
153 ti
= proto_tree_add_item(tree
, proto_vtp
, tvb
, offset
, -1, ENC_NA
);
154 vtp_tree
= proto_item_add_subtree(ti
, ett_vtp
);
156 proto_tree_add_item(vtp_tree
, hf_vtp_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
159 code
= tvb_get_guint8(tvb
, offset
);
160 proto_tree_add_item(vtp_tree
, hf_vtp_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
166 proto_tree_add_item(vtp_tree
, hf_vtp_followers
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
169 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
172 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
|ENC_NA
);
175 proto_tree_add_item(vtp_tree
, hf_vtp_conf_rev_num
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
178 proto_tree_add_item(vtp_tree
, hf_vtp_upd_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
181 upd_timestamp
= tvb_get_string(wmem_packet_scope(), tvb
, offset
, 12);
182 proto_tree_add_string_format_value(vtp_tree
, hf_vtp_upd_ts
, tvb
,
183 offset
, 12, (gchar
*)upd_timestamp
,
184 "%.2s-%.2s-%.2s %.2s:%.2s:%.2s",
185 &upd_timestamp
[0], &upd_timestamp
[2], &upd_timestamp
[4],
186 &upd_timestamp
[6], &upd_timestamp
[8], &upd_timestamp
[10]);
189 proto_tree_add_item(vtp_tree
, hf_vtp_md5_digest
, tvb
, offset
, 16, ENC_NA
);
193 proto_tree_add_item(vtp_tree
, hf_vtp_seq_num
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
196 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
199 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
|ENC_NA
);
202 proto_tree_add_item(vtp_tree
, hf_vtp_conf_rev_num
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
205 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
207 dissect_vlan_info(tvb
, pinfo
, offset
, vtp_tree
);
208 if (vlan_info_len
<= 0)
210 offset
+= vlan_info_len
;
215 offset
+= 1; /* skip reserved field */
217 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
220 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
|ENC_NA
);
223 proto_tree_add_item(vtp_tree
, hf_vtp_start_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
227 offset
+= 1; /* skip reserved/unused field */
229 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
232 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
|ENC_NA
);
235 proto_tree_add_item(vtp_tree
, hf_vtp_pruning_first_vid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
236 pruning_vlan_id
= tvb_get_ntohs(tvb
, offset
);
239 proto_tree_add_item(vtp_tree
, hf_vtp_pruning_last_vid
, tvb
, offset
,
243 ti
= proto_tree_add_text (vtp_tree
, tvb
, offset
, -1,
244 "Advertised active (i.e. not pruned) VLANs");
245 vtp_pruning_tree
= proto_item_add_subtree(ti
, ett_vtp_pruning
);
247 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
248 guint8 vlan_usage_bitmap
;
251 vlan_usage_bitmap
= tvb_get_guint8(tvb
, offset
);
253 for (shift
= 0; shift
< 8; shift
++) {
254 if (vlan_usage_bitmap
& (1<<7)) {
255 proto_tree_add_uint(vtp_pruning_tree
, hf_vtp_pruning_active_vid
,
256 tvb
, offset
, 1, pruning_vlan_id
);
259 pruning_vlan_id
+= 1;
260 vlan_usage_bitmap
<<= 1;
270 #define VLAN_SUSPENDED 0x01
272 static const value_string vlan_type_vals
[] = {
273 { 0x01, "Ethernet" },
276 { 0x04, "FDDI-net" },
281 #define SR_RING_NUM 0x01
282 #define SR_BRIDGE_NUM 0x02
283 #define STP_TYPE 0x03
284 #define PARENT_VLAN 0x04
285 #define TR_BRIDGED_VLANS 0x05
287 #define BRIDGE_TYPE 0x07
288 #define MAX_ARE_HOP_CNT 0x08
289 #define MAX_STE_HOP_CNT 0x09
290 #define BACKUP_CRF_MODE 0x0A
292 static const value_string vlan_tlv_type_vals
[] = {
293 { SR_RING_NUM
, "Source-Routing Ring Number" },
294 { SR_BRIDGE_NUM
, "Source-Routing Bridge Number" },
295 { STP_TYPE
, "Spanning-Tree Protocol Type" },
296 { PARENT_VLAN
, "Parent VLAN" },
297 { TR_BRIDGED_VLANS
, "Translationally Bridged VLANs" },
298 { PRUNING
, "Pruning" },
299 { BRIDGE_TYPE
, "Bridge Type" },
300 { MAX_ARE_HOP_CNT
, "Max ARE Hop Count" },
301 { MAX_STE_HOP_CNT
, "Max STE Hop Count" },
302 { BACKUP_CRF_MODE
, "Backup CRF Mode" },
307 dissect_vlan_info(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
)
310 proto_tree
*vlan_info_tree
;
311 proto_tree
*status_tree
;
312 guint8 vlan_info_len
;
315 guint8 vlan_name_len
;
318 proto_tree
*tlv_tree
;
320 vlan_info_len
= tvb_get_guint8(tvb
, offset
);
321 ti
= proto_tree_add_text(tree
, tvb
, offset
, vlan_info_len
,
323 vlan_info_tree
= proto_item_add_subtree(ti
, ett_vtp_vlan_info
);
324 vlan_info_left
= vlan_info_len
;
326 proto_tree_add_uint(vlan_info_tree
, hf_vtp_vlan_info_len
, tvb
, offset
, 1,
331 status
= tvb_get_guint8(tvb
, offset
);
332 ti
= proto_tree_add_text(vlan_info_tree
, tvb
, offset
, 1,
333 "Status: 0x%02x%s", status
,
334 (status
& VLAN_SUSPENDED
) ? "(VLAN suspended)" : "");
335 status_tree
= proto_item_add_subtree(ti
, ett_vtp_vlan_status
);
336 proto_tree_add_boolean(status_tree
, hf_vtp_vlan_status_vlan_susp
, tvb
, offset
, 1,
341 proto_tree_add_item(vlan_info_tree
, hf_vtp_vlan_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
345 vlan_name_len
= tvb_get_guint8(tvb
, offset
);
346 proto_tree_add_item(vlan_info_tree
, hf_vtp_vlan_name_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
350 proto_tree_add_item(vlan_info_tree
, hf_vtp_isl_vlan_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
354 proto_tree_add_item(vlan_info_tree
, hf_vtp_mtu_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
358 proto_tree_add_item(vlan_info_tree
, hf_vtp_802_10_index
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
362 /* VLAN name length appears to be rounded up to a multiple of 4. */
363 vlan_name_len
= 4*((vlan_name_len
+ 3)/4);
364 proto_tree_add_item(vlan_info_tree
, hf_vtp_vlan_name
, tvb
, offset
, vlan_name_len
, ENC_ASCII
|ENC_NA
);
365 offset
+= vlan_name_len
;
366 vlan_info_left
-= vlan_name_len
;
368 while (vlan_info_left
> 0) {
369 type
= tvb_get_guint8(tvb
, offset
+ 0);
370 length
= tvb_get_guint8(tvb
, offset
+ 1);
372 ti
= proto_tree_add_text(vlan_info_tree
, tvb
, offset
,
374 val_to_str(type
, vlan_tlv_type_vals
,
375 "Unknown TLV type: 0x%02x"));
376 tlv_tree
= proto_item_add_subtree(ti
, ett_vtp_tlv
);
377 proto_tree_add_item(tlv_tree
, hf_vtp_vlan_tlvtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
378 proto_tree_add_item(tlv_tree
, hf_vtp_vlan_tlvlength
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
382 dissect_vlan_info_tlv(tvb
, pinfo
, offset
, length
*2, tlv_tree
,
386 vlan_info_left
-= length
*2;
389 return vlan_info_len
;
392 static const value_string stp_type_vals
[] = {
399 static const value_string pruning_vals
[] = {
405 static const value_string bridge_type_vals
[] = {
411 static const value_string backup_crf_mode_vals
[] = {
412 { 1, "TrCRF is configured as a backup" },
413 { 2, "TrCRF is not configured as a backup" },
418 dissect_vlan_info_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, int length
,
419 proto_tree
*tree
, proto_item
*ti
, guint8 type
)
425 proto_tree_add_item(tree
, hf_vtp_vlan_src_route_ring_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
427 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Source-Routing Ring Number: Bad length %u", length
);
433 proto_tree_add_item(tree
, hf_vtp_vlan_src_route_bridge_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
435 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Source-Routing Bridge Number: Bad length %u", length
);
441 proto_tree_add_item(tree
, hf_vtp_vlan_stp_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
443 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Spanning-Tree Protocol Type: Bad length %u", length
);
449 proto_tree_add_item(tree
, hf_vtp_vlan_parent_vlan
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
451 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Parent VLAN: Bad length %u", length
);
455 case TR_BRIDGED_VLANS
:
457 proto_tree_add_item(tree
, hf_vtp_vlan_translationally_bridged_vlans
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
459 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Translationally Bridged VLANs: Bad length %u", length
);
465 proto_tree_add_item(tree
, hf_vtp_vlan_pruning
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
467 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Pruning: Bad length %u", length
);
473 proto_tree_add_item(tree
, hf_vtp_vlan_bridge_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
475 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Bridge Type: Bad length %u", length
);
479 case MAX_ARE_HOP_CNT
:
481 proto_tree_add_item(tree
, hf_vtp_vlan_max_are_hop_count
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
483 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Max ARE Hop Count: Bad length %u", length
);
487 case MAX_STE_HOP_CNT
:
489 proto_tree_add_item(tree
, hf_vtp_vlan_max_ste_hop_count
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
491 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Max STE Hop Count: Bad length %u", length
);
495 case BACKUP_CRF_MODE
:
497 proto_tree_add_item(tree
, hf_vtp_vlan_backup_crf_mode
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
499 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Backup CRF Mode: Bad length %u", length
);
504 proto_tree_add_text(tree
, tvb
, offset
, length
, "Data");
510 proto_register_vtp(void)
512 static hf_register_info hf
[] = {
514 { "Version", "vtp.version", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
518 { "Code", "vtp.code", FT_UINT8
, BASE_HEX
, VALS(type_vals
), 0x0,
522 { "Followers", "vtp.followers", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
523 "Number of following Subset-Advert messages", HFILL
}},
526 { "Management Domain Length", "vtp.md_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
527 "Length of management domain string", HFILL
}},
530 { "Management Domain", "vtp.md", FT_STRING
, BASE_NONE
, NULL
, 0,
533 { &hf_vtp_conf_rev_num
,
534 { "Configuration Revision Number", "vtp.conf_rev_num", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
535 "Revision number of the configuration information", HFILL
}},
538 { "Updater Identity", "vtp.upd_id", FT_IPv4
, BASE_NONE
, NULL
, 0x0,
539 "IP address of the updater", HFILL
}},
542 { "Update Timestamp", "vtp.upd_ts", FT_STRING
, BASE_NONE
, NULL
, 0,
543 "Time stamp of the current configuration revision", HFILL
}},
545 { &hf_vtp_md5_digest
,
546 { "MD5 Digest", "vtp.md5_digest", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
550 { "Sequence Number", "vtp.seq_num", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
551 "Order of this frame in the sequence of Subset-Advert frames", HFILL
}},
553 { &hf_vtp_start_value
,
554 { "Start Value", "vtp.start_value", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
555 "Virtual LAN ID of first VLAN for which information is requested", HFILL
}},
557 { &hf_vtp_vlan_info_len
,
558 { "VLAN Information Length", "vtp.vlan_info.len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
559 "Length of the VLAN information field", HFILL
}},
561 { &hf_vtp_vlan_status_vlan_susp
,
562 { "VLAN suspended", "vtp.vlan_info.status.vlan_susp", FT_BOOLEAN
, 8, NULL
, VLAN_SUSPENDED
,
566 { "VLAN Type", "vtp.vlan_info.vlan_type", FT_UINT8
, BASE_HEX
, VALS(vlan_type_vals
), 0x0,
567 "Type of VLAN", HFILL
}},
569 { &hf_vtp_vlan_name_len
,
570 { "VLAN Name Length", "vtp.vlan_info.vlan_name_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
571 "Length of VLAN name string", HFILL
}},
573 { &hf_vtp_isl_vlan_id
,
574 { "ISL VLAN ID", "vtp.vlan_info.isl_vlan_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
575 "ID of this VLAN on ISL trunks", HFILL
}},
578 { "MTU Size", "vtp.vlan_info.mtu_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
579 "MTU for this VLAN", HFILL
}},
581 { &hf_vtp_802_10_index
,
582 { "802.10 Index", "vtp.vlan_info.802_10_index", FT_UINT32
, BASE_HEX
, NULL
, 0x0,
583 "IEEE 802.10 security association identifier for this VLAN", HFILL
}},
586 { "VLAN Name", "vtp.vlan_info.vlan_name", FT_STRING
, BASE_NONE
, NULL
, 0,
589 { &hf_vtp_vlan_tlvtype
,
590 { "Type", "vtp.vlan_info.tlv_type", FT_UINT8
, BASE_HEX
, VALS(vlan_tlv_type_vals
), 0x0,
593 { &hf_vtp_vlan_tlvlength
,
594 { "Length", "vtp.vlan_info.tlv_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
597 { &hf_vtp_pruning_first_vid
,
598 { "First VLAN ID", "vtp.pruning.first", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
599 "First VLAN ID for which pruning information is present", HFILL
}},
601 { &hf_vtp_pruning_last_vid
,
602 { "Last VLAN ID", "vtp.pruning.last", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
603 "Last VLAN ID for which pruning information is present", HFILL
}},
605 { &hf_vtp_pruning_active_vid
,
606 { "VLAN", "vtp.pruning.active", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
607 "Active advertised VLAN ID", HFILL
}},
609 { &hf_vtp_vlan_src_route_ring_num
,
610 { "Source-Routing Ring Number", "vtp.vlan_info.src_route_ring_num", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
613 { &hf_vtp_vlan_src_route_bridge_num
,
614 { "Source-Routing Bridge Number", "vtp.vlan_info.src_route_bridge_num", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
617 { &hf_vtp_vlan_stp_type
,
618 { "Spanning-Tree Protocol Type", "vtp.vlan_info.stp_type", FT_UINT16
, BASE_HEX
, VALS(stp_type_vals
), 0x0,
621 { &hf_vtp_vlan_parent_vlan
,
622 { "Parent VLAN", "vtp.vlan_info.parent_vlan", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
625 { &hf_vtp_vlan_translationally_bridged_vlans
,
626 { "Translationally Bridged VLANs", "vtp.vlan_info.translationally_bridged_vlans", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
629 { &hf_vtp_vlan_pruning
,
630 { "Pruning", "vtp.vlan_info.pruning", FT_UINT16
, BASE_HEX
, VALS(pruning_vals
), 0x0,
633 { &hf_vtp_vlan_bridge_type
,
634 { "Bridge Type", "vtp.vlan_info.bridge_type", FT_UINT16
, BASE_HEX
, VALS(bridge_type_vals
), 0x0,
637 { &hf_vtp_vlan_max_are_hop_count
,
638 { "Max ARE Hop Count", "vtp.vlan_info.max_are_hop_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
641 { &hf_vtp_vlan_max_ste_hop_count
,
642 { "Max STE Hop Count", "vtp.vlan_info.max_ste_hop_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
645 { &hf_vtp_vlan_backup_crf_mode
,
646 { "Backup CRF Mode", "vtp.vlan_info.backup_crf_mode", FT_UINT16
, BASE_HEX
, VALS(backup_crf_mode_vals
), 0x0,
649 static gint
*ett
[] = {
652 &ett_vtp_vlan_status
,
657 static ei_register_info ei
[] = {
658 { &ei_vtp_vlan_tlvlength_bad
, { "vtp.vlan_info.tlv_len.bad", PI_PROTOCOL
, PI_WARN
, "Bad length for TLV length", EXPFILL
}},
661 expert_module_t
* expert_vtp
;
663 proto_vtp
= proto_register_protocol("VLAN Trunking Protocol", "VTP", "vtp");
664 proto_register_field_array(proto_vtp
, hf
, array_length(hf
));
665 proto_register_subtree_array(ett
, array_length(ett
));
666 expert_vtp
= expert_register_protocol(proto_vtp
);
667 expert_register_field_array(expert_vtp
, ei
, array_length(ei
));
671 proto_reg_handoff_vtp(void)
673 dissector_handle_t vtp_handle
;
675 vtp_handle
= create_dissector_handle(dissect_vtp
, proto_vtp
);
676 dissector_add_uint("llc.cisco_pid", 0x2003, vtp_handle
);