From ed21afa9521a930c96c69ff11b13b54ca006767e Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Thu, 2 Jul 2015 22:57:34 +0200 Subject: LLDP: fix dissection of Power Class field Bug: 11330 Change-Id: I865fe694706606c091a32f58a35658800a9dacc6 Reviewed-on: https://code.wireshark.org/review/9473 Reviewed-by: Pascal Quantin Petri-Dish: Pascal Quantin Reviewed-by: Michael Mann --- epan/dissectors/packet-lldp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index ed9e5edc8b..e7a7663cbc 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -627,6 +627,16 @@ static const value_string cisco_subtypes[] = { { 0, NULL } }; +/* 802.3 Power Class */ +static const value_string power_class_802_3[] = { + { 1, "0" }, + { 2, "1" }, + { 3, "2" }, + { 4, "3" }, + { 5, "4" }, + { 0, NULL } +}; + /* 802.3 Power Type */ static const value_string power_type_802_3[] = { { 0, "Type 2 PSE Device" }, @@ -4420,7 +4430,7 @@ proto_register_lldp(void) }, { &hf_ieee_802_3_mdi_power_class, { "Power Class", "lldp.ieee.802_3.mdi_power_class", FT_UINT8, BASE_DEC, - NULL, 0x0, NULL, HFILL } + VALS(power_class_802_3), 0x0, NULL, HFILL } }, { &hf_ieee_802_3_mdi_power_type, { "Power Type", "lldp.ieee.802_3.mdi_power_type", FT_UINT8, BASE_DEC, -- cgit v1.2.1