diff options
author | Anish Bhatt <anish@chelsio.com> | 2014-05-27 22:45:48 -0700 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-05-28 05:54:53 +0000 |
commit | 482e6a65102a0007ce7665501215e2851be413ed (patch) | |
tree | 365d67fa4e0a4d9711f62932c58b77cc692ea1a3 /epan/dissectors/packet-lldp.c | |
parent | 0701d6170de5e02b15b1ab6fa031c239791ab595 (diff) |
LLDP Cleanup : 802.1 Qbg TLV
Change-Id: Ibdea530928d1bd98cb353ad8d7d938f739aa693f
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/1830
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r-- | epan/dissectors/packet-lldp.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index e990ffea7a..0753ded38a 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -241,6 +241,9 @@ static int hf_ieee_802_1qbg_evb_configure_caps_rr = -1; static int hf_ieee_802_1qbg_evb_configure_caps_rte = -1; static int hf_ieee_802_1qbg_evb_configure_caps_ecp = -1; static int hf_ieee_802_1qbg_evb_configure_caps_vdp = -1; +static int hf_ieee_802_1qbg_evb_supported_vsi = -1; +static int hf_ieee_802_1qbg_evb_configured_vsi = -1; +static int hf_ieee_802_1qbg_evb_retrans_timer = -1; static int hf_media_tlv_subtype = -1; static int hf_media_tlv_subtype_caps = -1; static int hf_media_tlv_subtype_caps_llpd = -1; @@ -2037,8 +2040,6 @@ static void dissect_ieee_802_1qbg_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset) { guint8 subType; - guint8 tempByte; - guint16 tempShort; guint32 tempOffset = offset; proto_tree *evb_capabilities_subtree = NULL; @@ -2080,23 +2081,20 @@ dissect_ieee_802_1qbg_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre tempOffset += 2; - tempShort = tvb_get_ntohs(tvb, tempOffset); if (tree) { - proto_tree_add_text(tree, tvb, tempOffset, 2, "supported no. of VSIs: %04u", tempShort); + proto_tree_add_item(tree, hf_ieee_802_1qbg_evb_supported_vsi, tvb, tempOffset, 2, ENC_BIG_ENDIAN); } tempOffset += 2; - tempShort = tvb_get_ntohs(tvb, tempOffset); if (tree) { - proto_tree_add_text(tree, tvb, tempOffset, 2, "configured no. of VSIs: %04u", tempShort); + proto_tree_add_item(tree, hf_ieee_802_1qbg_evb_configured_vsi, tvb, tempOffset, 2, ENC_BIG_ENDIAN); } tempOffset += 2; - tempByte= tvb_get_guint8(tvb, tempOffset); if (tree) { - proto_tree_add_text(tree, tvb, tempOffset, 1, "retransmission timer exponent: %02u", tempByte); + proto_tree_add_item(tree, hf_ieee_802_1qbg_evb_retrans_timer, tvb, tempOffset, 1, ENC_BIG_ENDIAN); } break; @@ -4128,6 +4126,18 @@ proto_register_lldp(void) { "VSI discovery protocol (VDP)", "lldp.ieee.802_1qbg.evb_configure_caps.vdp", FT_BOOLEAN, 16, TFS(&tfs_capable_not_capable), EVB_CAPA_VDP, NULL, HFILL } }, + { &hf_ieee_802_1qbg_evb_supported_vsi, + { "Supported No of VSIs", "lldp.ieee.802_1qbg.evb_supported_vsi", FT_UINT16, BASE_DEC, + NULL, 0x0, NULL, HFILL } + }, + { &hf_ieee_802_1qbg_evb_configured_vsi, + { "Configured No of VSIs", "lldp.ieee.802_1qbg.evb_configured_vsi", FT_UINT16, BASE_DEC, + NULL, 0x0, NULL, HFILL } + }, + { &hf_ieee_802_1qbg_evb_retrans_timer, + { "Retransmission timer exponent", "lldp.ieee.802_1qbg.evb_retrans_timer", FT_UINT8, BASE_DEC, + NULL, 0x0, NULL, HFILL } + }, { &hf_media_tlv_subtype, { "Media Subtype", "lldp.media.subtype", FT_UINT8, BASE_HEX, VALS(media_subtypes), 0x0, NULL, HFILL } |