2 * Routines for the disassembly of Cisco's VLAN Trunking Protocol
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include <epan/packet.h>
14 #include <epan/expert.h>
15 #include <epan/cisco_pid.h>
20 * http://www.cisco.com/en/US/tech/tk389/tk689/technologies_tech_note09186a0080094c52.shtml
22 * for some information on VTP.
24 void proto_register_vtp(void);
25 void proto_reg_handoff_vtp(void);
27 static dissector_handle_t vtp_handle
;
30 static int hf_vtp_version
;
31 static int hf_vtp_code
;
32 static int hf_vtp_followers
;
33 static int hf_vtp_md_len
;
35 static int hf_vtp_conf_rev_num
;
36 static int hf_vtp_upd_id
;
37 static int hf_vtp_upd_ts
;
38 static int hf_vtp_md5_digest
;
39 static int hf_vtp_seq_num
;
40 static int hf_vtp_start_value
;
41 static int hf_vtp_vlan_info_len
;
42 static int hf_vtp_vlan_status
;
43 static int hf_vtp_vlan_status_vlan_susp
;
44 static int hf_vtp_vlan_type
;
45 static int hf_vtp_vlan_name_len
;
46 static int hf_vtp_isl_vlan_id
;
47 static int hf_vtp_mtu_size
;
48 static int hf_vtp_802_10_index
;
49 static int hf_vtp_vlan_name
;
50 static int hf_vtp_vlan_tlvtype
;
51 static int hf_vtp_vlan_tlvlength
;
52 static int hf_vtp_pruning_first_vid
;
53 static int hf_vtp_pruning_last_vid
;
54 static int hf_vtp_pruning_active_vid
;
55 static int hf_vtp_vlan_src_route_ring_num
;
56 static int hf_vtp_vlan_src_route_bridge_num
;
57 static int hf_vtp_vlan_stp_type
;
58 static int hf_vtp_vlan_parent_vlan
;
59 static int hf_vtp_vlan_translationally_bridged_vlans
;
60 static int hf_vtp_vlan_pruning
;
61 static int hf_vtp_vlan_bridge_type
;
62 static int hf_vtp_vlan_max_are_hop_count
;
63 static int hf_vtp_vlan_max_ste_hop_count
;
64 static int hf_vtp_vlan_backup_crf_mode
;
65 static int hf_vtp_vlan_data
;
66 static int hf_vtp_reserved
;
69 static int ett_vtp_vlan_info
;
70 static int ett_vtp_vlan_status
;
71 static int ett_vtp_tlv
;
72 static int ett_vtp_pruning
;
74 static expert_field ei_vtp_vlan_tlvlength_bad
;
77 dissect_vlan_info(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
);
79 dissect_vlan_info_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, int length
,
80 proto_tree
*tree
, proto_item
*ti
, uint8_t type
);
82 #define SUMMARY_ADVERT 0x01
83 #define SUBSET_ADVERT 0x02
84 #define ADVERT_REQUEST 0x03
87 static const value_string type_vals
[] = {
88 { SUMMARY_ADVERT
, "Summary Advertisement" },
89 { SUBSET_ADVERT
, "Subset Advertisement" },
90 { ADVERT_REQUEST
, "Advertisement Request" },
91 { JOIN_MSG
, "Join/Prune Message" },
96 set_vtp_info_col(tvbuff_t
*tvb
, packet_info
*pinfo
)
98 switch (tvb_get_uint8(tvb
, 1)) {
101 col_add_fstr(pinfo
->cinfo
, COL_INFO
,
102 "Summary Advertisement, Revision: %u", tvb_get_ntohl(tvb
, 36));
104 if (tvb_get_uint8(tvb
, 2) > 0) {
105 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
106 ", Followers: %u", tvb_get_uint8(tvb
, 2));
112 col_add_fstr(pinfo
->cinfo
, COL_INFO
,
113 "Subset Advertisement, Revision: %u, Seq: %u",
114 tvb_get_ntohl(tvb
, 36), tvb_get_uint8(tvb
, 2));
118 col_set_str(pinfo
->cinfo
, COL_INFO
, "Advertisement Request");
122 col_set_str(pinfo
->cinfo
, COL_INFO
, "Join");
126 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unrecognized VTP message");
132 dissect_vtp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
135 proto_tree
*vtp_tree
= NULL
, *vtp_pruning_tree
= NULL
;
138 uint8_t *upd_timestamp
;
141 int yy
, mm
, dd
, hh
, _mm
, ss
;
144 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "VTP");
145 set_vtp_info_col(tvb
, pinfo
);
147 ti
= proto_tree_add_item(tree
, proto_vtp
, tvb
, offset
, -1, ENC_NA
);
148 vtp_tree
= proto_item_add_subtree(ti
, ett_vtp
);
150 proto_tree_add_item(vtp_tree
, hf_vtp_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
153 code
= tvb_get_uint8(tvb
, offset
);
154 proto_tree_add_item(vtp_tree
, hf_vtp_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
160 proto_tree_add_item(vtp_tree
, hf_vtp_followers
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
163 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
166 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
);
169 proto_tree_add_item(vtp_tree
, hf_vtp_conf_rev_num
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
172 proto_tree_add_item(vtp_tree
, hf_vtp_upd_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
175 upd_timestamp
= display
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, 12, ENC_ASCII
);
176 if (sscanf(upd_timestamp
, "%2d%2d%2d%2d%2d%2d", &yy
, &mm
, &dd
, &hh
, &_mm
, &ss
) == 6) {
177 display
= wmem_strdup_printf(pinfo
->pool
, "%02d-%02d-%02d %02d:%02d:%02d",
178 yy
, mm
, dd
, hh
, _mm
, ss
);
180 proto_tree_add_string_format_value(vtp_tree
, hf_vtp_upd_ts
, tvb
,
181 offset
, 12, upd_timestamp
, "%s", display
);
184 proto_tree_add_item(vtp_tree
, hf_vtp_md5_digest
, tvb
, offset
, 16, ENC_NA
);
188 proto_tree_add_item(vtp_tree
, hf_vtp_seq_num
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
191 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
194 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
);
197 proto_tree_add_item(vtp_tree
, hf_vtp_conf_rev_num
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
200 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
202 dissect_vlan_info(tvb
, pinfo
, offset
, vtp_tree
);
203 if (vlan_info_len
<= 0)
205 offset
+= vlan_info_len
;
210 proto_tree_add_item(vtp_tree
, hf_vtp_reserved
, tvb
, offset
, 1, ENC_NA
);
213 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
216 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
);
219 proto_tree_add_item(vtp_tree
, hf_vtp_start_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
223 proto_tree_add_item(vtp_tree
, hf_vtp_reserved
, tvb
, offset
, 1, ENC_NA
);
226 proto_tree_add_item(vtp_tree
, hf_vtp_md_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
229 proto_tree_add_item(vtp_tree
, hf_vtp_md
, tvb
, offset
, 32, ENC_ASCII
);
232 proto_tree_add_item(vtp_tree
, hf_vtp_pruning_first_vid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
233 pruning_vlan_id
= tvb_get_ntohs(tvb
, offset
);
236 proto_tree_add_item(vtp_tree
, hf_vtp_pruning_last_vid
, tvb
, offset
,
240 vtp_pruning_tree
= proto_tree_add_subtree(vtp_tree
, tvb
, offset
, -1,
241 ett_vtp_pruning
, NULL
, "Advertised active (i.e. not pruned) VLANs");
243 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
244 uint8_t vlan_usage_bitmap
;
247 vlan_usage_bitmap
= tvb_get_uint8(tvb
, offset
);
249 for (shift
= 0; shift
< 8; shift
++) {
250 if (vlan_usage_bitmap
& (1<<7)) {
251 proto_tree_add_uint(vtp_pruning_tree
, hf_vtp_pruning_active_vid
,
252 tvb
, offset
, 1, pruning_vlan_id
);
255 pruning_vlan_id
+= 1;
256 vlan_usage_bitmap
<<= 1;
264 return tvb_captured_length(tvb
);
267 #define VLAN_SUSPENDED 0x01
269 static const value_string vlan_type_vals
[] = {
270 { 0x01, "Ethernet" },
273 { 0x04, "FDDI-net" },
278 #define SR_RING_NUM 0x01
279 #define SR_BRIDGE_NUM 0x02
280 #define STP_TYPE 0x03
281 #define PARENT_VLAN 0x04
282 #define TR_BRIDGED_VLANS 0x05
284 #define BRIDGE_TYPE 0x07
285 #define MAX_ARE_HOP_CNT 0x08
286 #define MAX_STE_HOP_CNT 0x09
287 #define BACKUP_CRF_MODE 0x0A
289 static const value_string vlan_tlv_type_vals
[] = {
290 { SR_RING_NUM
, "Source-Routing Ring Number" },
291 { SR_BRIDGE_NUM
, "Source-Routing Bridge Number" },
292 { STP_TYPE
, "Spanning-Tree Protocol Type" },
293 { PARENT_VLAN
, "Parent VLAN" },
294 { TR_BRIDGED_VLANS
, "Translationally Bridged VLANs" },
295 { PRUNING
, "Pruning" },
296 { BRIDGE_TYPE
, "Bridge Type" },
297 { MAX_ARE_HOP_CNT
, "Max ARE Hop Count" },
298 { MAX_STE_HOP_CNT
, "Max STE Hop Count" },
299 { BACKUP_CRF_MODE
, "Backup CRF Mode" },
304 dissect_vlan_info(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*tree
)
307 proto_tree
*vlan_info_tree
;
308 proto_tree
*status_tree
;
309 uint8_t vlan_info_len
;
312 uint8_t vlan_name_len
;
315 proto_tree
*tlv_tree
;
317 vlan_info_len
= tvb_get_uint8(tvb
, offset
);
318 vlan_info_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, vlan_info_len
,
319 ett_vtp_vlan_info
, NULL
, "VLAN Information");
320 vlan_info_left
= vlan_info_len
;
322 proto_tree_add_uint(vlan_info_tree
, hf_vtp_vlan_info_len
, tvb
, offset
, 1,
327 status
= tvb_get_uint8(tvb
, offset
);
328 ti
= proto_tree_add_uint(vlan_info_tree
, hf_vtp_vlan_status
, tvb
, offset
, 1, status
);
329 if (status
& VLAN_SUSPENDED
)
330 proto_item_append_text(ti
, " (VLAN suspended)");
331 status_tree
= proto_item_add_subtree(ti
, ett_vtp_vlan_status
);
332 proto_tree_add_boolean(status_tree
, hf_vtp_vlan_status_vlan_susp
, tvb
, offset
, 1,
337 proto_tree_add_item(vlan_info_tree
, hf_vtp_vlan_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
341 vlan_name_len
= tvb_get_uint8(tvb
, offset
);
342 proto_tree_add_item(vlan_info_tree
, hf_vtp_vlan_name_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
346 proto_tree_add_item(vlan_info_tree
, hf_vtp_isl_vlan_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
350 proto_tree_add_item(vlan_info_tree
, hf_vtp_mtu_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
354 proto_tree_add_item(vlan_info_tree
, hf_vtp_802_10_index
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
358 /* VLAN name length appears to be rounded up to a multiple of 4. */
359 vlan_name_len
= 4*((vlan_name_len
+ 3)/4);
360 proto_tree_add_item(vlan_info_tree
, hf_vtp_vlan_name
, tvb
, offset
, vlan_name_len
, ENC_ASCII
);
361 offset
+= vlan_name_len
;
362 vlan_info_left
-= vlan_name_len
;
364 while (vlan_info_left
> 0) {
365 type
= tvb_get_uint8(tvb
, offset
+ 0);
366 length
= tvb_get_uint8(tvb
, offset
+ 1);
368 tlv_tree
= proto_tree_add_subtree(vlan_info_tree
, tvb
, offset
,
369 2 + length
*2, ett_vtp_tlv
, &ti
,
370 val_to_str(type
, vlan_tlv_type_vals
,
371 "Unknown TLV type: 0x%02x"));
372 proto_tree_add_item(tlv_tree
, hf_vtp_vlan_tlvtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
373 proto_tree_add_item(tlv_tree
, hf_vtp_vlan_tlvlength
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
377 dissect_vlan_info_tlv(tvb
, pinfo
, offset
, length
*2, tlv_tree
,
381 vlan_info_left
-= length
*2;
384 return vlan_info_len
;
387 static const value_string stp_type_vals
[] = {
394 static const value_string pruning_vals
[] = {
400 static const value_string bridge_type_vals
[] = {
406 static const value_string backup_crf_mode_vals
[] = {
407 { 1, "TrCRF is configured as a backup" },
408 { 2, "TrCRF is not configured as a backup" },
413 dissect_vlan_info_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, int length
,
414 proto_tree
*tree
, proto_item
*ti
, uint8_t type
)
420 proto_tree_add_item(tree
, hf_vtp_vlan_src_route_ring_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
422 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Source-Routing Ring Number: Bad length %u", length
);
428 proto_tree_add_item(tree
, hf_vtp_vlan_src_route_bridge_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
430 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Source-Routing Bridge Number: Bad length %u", length
);
436 proto_tree_add_item(tree
, hf_vtp_vlan_stp_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
438 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Spanning-Tree Protocol Type: Bad length %u", length
);
444 proto_tree_add_item(tree
, hf_vtp_vlan_parent_vlan
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
446 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Parent VLAN: Bad length %u", length
);
450 case TR_BRIDGED_VLANS
:
452 proto_tree_add_item(tree
, hf_vtp_vlan_translationally_bridged_vlans
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
454 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Translationally Bridged VLANs: Bad length %u", length
);
460 proto_tree_add_item(tree
, hf_vtp_vlan_pruning
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
462 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Pruning: Bad length %u", length
);
468 proto_tree_add_item(tree
, hf_vtp_vlan_bridge_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
470 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Bridge Type: Bad length %u", length
);
474 case MAX_ARE_HOP_CNT
:
476 proto_tree_add_item(tree
, hf_vtp_vlan_max_are_hop_count
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
478 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Max ARE Hop Count: Bad length %u", length
);
482 case MAX_STE_HOP_CNT
:
484 proto_tree_add_item(tree
, hf_vtp_vlan_max_ste_hop_count
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
486 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Max STE Hop Count: Bad length %u", length
);
490 case BACKUP_CRF_MODE
:
492 proto_tree_add_item(tree
, hf_vtp_vlan_backup_crf_mode
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
494 expert_add_info_format(pinfo
, ti
, &ei_vtp_vlan_tlvlength_bad
, "Backup CRF Mode: Bad length %u", length
);
499 proto_tree_add_item(tree
, hf_vtp_vlan_data
, tvb
, offset
, length
, ENC_NA
);
505 proto_register_vtp(void)
507 static hf_register_info hf
[] = {
509 { "Version", "vtp.version", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
513 { "Code", "vtp.code", FT_UINT8
, BASE_HEX
, VALS(type_vals
), 0x0,
517 { "Followers", "vtp.followers", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
518 "Number of following Subset-Advert messages", HFILL
}},
521 { "Management Domain Length", "vtp.md_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
522 "Length of management domain string", HFILL
}},
525 { "Management Domain", "vtp.md", FT_STRING
, BASE_NONE
, NULL
, 0,
528 { &hf_vtp_conf_rev_num
,
529 { "Configuration Revision Number", "vtp.conf_rev_num", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
530 "Revision number of the configuration information", HFILL
}},
533 { "Updater Identity", "vtp.upd_id", FT_IPv4
, BASE_NONE
, NULL
, 0x0,
534 "IP address of the updater", HFILL
}},
537 { "Update Timestamp", "vtp.upd_ts", FT_STRING
, BASE_NONE
, NULL
, 0,
538 "Time stamp of the current configuration revision", HFILL
}},
540 { &hf_vtp_md5_digest
,
541 { "MD5 Digest", "vtp.md5_digest", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
545 { "Sequence Number", "vtp.seq_num", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
546 "Order of this frame in the sequence of Subset-Advert frames", HFILL
}},
548 { &hf_vtp_start_value
,
549 { "Start Value", "vtp.start_value", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
550 "Virtual LAN ID of first VLAN for which information is requested", HFILL
}},
552 { &hf_vtp_vlan_info_len
,
553 { "VLAN Information Length", "vtp.vlan_info.len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
554 "Length of the VLAN information field", HFILL
}},
556 { &hf_vtp_vlan_status
,
557 { "Status", "vtp.vlan_info.status", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
560 { &hf_vtp_vlan_status_vlan_susp
,
561 { "VLAN suspended", "vtp.vlan_info.status.vlan_susp", FT_BOOLEAN
, 8, NULL
, VLAN_SUSPENDED
,
565 { "VLAN Type", "vtp.vlan_info.vlan_type", FT_UINT8
, BASE_HEX
, VALS(vlan_type_vals
), 0x0,
566 "Type of VLAN", HFILL
}},
568 { &hf_vtp_vlan_name_len
,
569 { "VLAN Name Length", "vtp.vlan_info.vlan_name_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
570 "Length of VLAN name string", HFILL
}},
572 { &hf_vtp_isl_vlan_id
,
573 { "ISL VLAN ID", "vtp.vlan_info.isl_vlan_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
574 "ID of this VLAN on ISL trunks", HFILL
}},
577 { "MTU Size", "vtp.vlan_info.mtu_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
578 "MTU for this VLAN", HFILL
}},
580 { &hf_vtp_802_10_index
,
581 { "802.10 Index", "vtp.vlan_info.802_10_index", FT_UINT32
, BASE_HEX
, NULL
, 0x0,
582 "IEEE 802.10 security association identifier for this VLAN", HFILL
}},
585 { "VLAN Name", "vtp.vlan_info.vlan_name", FT_STRING
, BASE_NONE
, NULL
, 0,
588 { &hf_vtp_vlan_tlvtype
,
589 { "Type", "vtp.vlan_info.tlv_type", FT_UINT8
, BASE_HEX
, VALS(vlan_tlv_type_vals
), 0x0,
592 { &hf_vtp_vlan_tlvlength
,
593 { "Length", "vtp.vlan_info.tlv_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
596 { &hf_vtp_pruning_first_vid
,
597 { "First VLAN ID", "vtp.pruning.first", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
598 "First VLAN ID for which pruning information is present", HFILL
}},
600 { &hf_vtp_pruning_last_vid
,
601 { "Last VLAN ID", "vtp.pruning.last", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
602 "Last VLAN ID for which pruning information is present", HFILL
}},
604 { &hf_vtp_pruning_active_vid
,
605 { "VLAN", "vtp.pruning.active", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
606 "Active advertised VLAN ID", HFILL
}},
608 { &hf_vtp_vlan_src_route_ring_num
,
609 { "Source-Routing Ring Number", "vtp.vlan_info.src_route_ring_num", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
612 { &hf_vtp_vlan_src_route_bridge_num
,
613 { "Source-Routing Bridge Number", "vtp.vlan_info.src_route_bridge_num", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
616 { &hf_vtp_vlan_stp_type
,
617 { "Spanning-Tree Protocol Type", "vtp.vlan_info.stp_type", FT_UINT16
, BASE_HEX
, VALS(stp_type_vals
), 0x0,
620 { &hf_vtp_vlan_parent_vlan
,
621 { "Parent VLAN", "vtp.vlan_info.parent_vlan", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
624 { &hf_vtp_vlan_translationally_bridged_vlans
,
625 { "Translationally Bridged VLANs", "vtp.vlan_info.translationally_bridged_vlans", FT_UINT16
, BASE_HEX
, NULL
, 0x0,
628 { &hf_vtp_vlan_pruning
,
629 { "Pruning", "vtp.vlan_info.pruning", FT_UINT16
, BASE_HEX
, VALS(pruning_vals
), 0x0,
632 { &hf_vtp_vlan_bridge_type
,
633 { "Bridge Type", "vtp.vlan_info.bridge_type", FT_UINT16
, BASE_HEX
, VALS(bridge_type_vals
), 0x0,
636 { &hf_vtp_vlan_max_are_hop_count
,
637 { "Max ARE Hop Count", "vtp.vlan_info.max_are_hop_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
640 { &hf_vtp_vlan_max_ste_hop_count
,
641 { "Max STE Hop Count", "vtp.vlan_info.max_ste_hop_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
644 { &hf_vtp_vlan_backup_crf_mode
,
645 { "Backup CRF Mode", "vtp.vlan_info.backup_crf_mode", FT_UINT16
, BASE_HEX
, VALS(backup_crf_mode_vals
), 0x0,
649 { "Data", "vtp.vlan_info.data", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
653 { "Reserved", "vtp.reserved", FT_BYTES
, BASE_NONE
, NULL
, 0,
657 static int *ett
[] = {
660 &ett_vtp_vlan_status
,
665 static ei_register_info ei
[] = {
666 { &ei_vtp_vlan_tlvlength_bad
, { "vtp.vlan_info.tlv_len.bad", PI_PROTOCOL
, PI_WARN
, "Bad length for TLV length", EXPFILL
}},
669 expert_module_t
* expert_vtp
;
671 proto_vtp
= proto_register_protocol("VLAN Trunking Protocol", "VTP", "vtp");
672 proto_register_field_array(proto_vtp
, hf
, array_length(hf
));
673 proto_register_subtree_array(ett
, array_length(ett
));
674 expert_vtp
= expert_register_protocol(proto_vtp
);
675 expert_register_field_array(expert_vtp
, ei
, array_length(ei
));
676 vtp_handle
= register_dissector("vtp", dissect_vtp
, proto_vtp
);
680 proto_reg_handoff_vtp(void)
682 dissector_add_uint("llc.cisco_pid", CISCO_PID_VTP
, vtp_handle
);
686 * Editor modelines - https://www.wireshark.org/tools/modelines.html
691 * indent-tabs-mode: t
694 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
695 * :indentSize=8:tabSize=8:noTabs=false: