aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-03-09 10:24:34 +0000
committerGuy Harris <guy@alum.mit.edu>2005-03-09 10:24:34 +0000
commit8d34b8cacd036bcfadd2b5403afc9c0375b6f0c6 (patch)
tree09636c12ea29944d47bc6cde1755ada48ac7a7ef
parentae622c416da9fbaacdaad0a7cff1b11eec8fc2fc (diff)
From Ricardo Muggli: decode the voice VLAN field in CDP packets.
svn path=/trunk/; revision=13676
-rw-r--r--AUTHORS1
-rw-r--r--epan/dissectors/packet-cdp.c14
2 files changed, 11 insertions, 4 deletions
diff --git a/AUTHORS b/AUTHORS
index 6f69843551..f8179be7b0 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2403,6 +2403,7 @@ Yoshihiro Oyama <y.oyama [AT] netagent.co.jp>
Chris Eagle <cseagle [AT] nps.edu>
Dominique Bastien <dbastien [AT] accedian.com>
Nicolas Dichtel <nicolas.dichtel [AT] 6wind.com>
+Ricardo Muggli <ricardo.muggli [AT] mnsu.edu>
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index 1c3a100096..f9fea7a921 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -445,26 +445,32 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case TYPE_VOIP_VLAN_REPLY:
tlvi = proto_tree_add_text(cdp_tree, tvb,
- offset, length, "VoIP VLAN Reply");
+ offset, length, "VoIP VLAN Reply: %u", tvb_get_ntohs(tvb, offset + 5));
tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv);
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, tvb,
offset + TLV_TYPE, 2, type);
proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, tvb,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, tvb, offset + 4,
- length - 4, "Data");
+ 1, "Data");
+ proto_tree_add_text(tlv_tree, tvb, offset + 5,
+ 2, "Voice VLAN: %u",
+ tvb_get_ntohs(tvb, offset + 5));
offset += length;
break;
case TYPE_VOIP_VLAN_QUERY:
tlvi = proto_tree_add_text(cdp_tree, tvb,
- offset, length, "VoIP VLAN Query");
+ offset, length, "VoIP VLAN Query: %u", tvb_get_ntohs(tvb, offset + 5));
tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv);
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, tvb,
offset + TLV_TYPE, 2, type);
proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, tvb,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, tvb, offset + 4,
- length - 4, "Data");
+ 1, "Data");
+ proto_tree_add_text(tlv_tree, tvb, offset + 5,
+ 2, "Voice VLAN: %u",
+ tvb_get_ntohs(tvb, offset + 5));
offset += length;
break;
case TYPE_MTU: