diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2006-03-19 17:32:21 +0000 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2006-03-19 17:32:21 +0000 |
commit | be52b0238d2087a70baaaac7748af226cdddfc70 (patch) | |
tree | 62777e959aabc0766b8ec994b86e14dbdf2b96c1 /epan/dissectors/packet-cdp.c | |
parent | 5d20a3ba367bfd50e6ee40c74b983ea9768c7f67 (diff) |
No negative power consumption, so unsigned value.
svn path=/trunk/; revision=17669
Diffstat (limited to 'epan/dissectors/packet-cdp.c')
-rw-r--r-- | epan/dissectors/packet-cdp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c index fea1bb8057..d22b44863c 100644 --- a/epan/dissectors/packet-cdp.c +++ b/epan/dissectors/packet-cdp.c @@ -87,7 +87,6 @@ add_multi_line_string_to_tree(proto_tree *tree, tvbuff_t *tvb, gint start, #define TYPE_VTP_MGMT_DOMAIN 0x0009 /* VTP Domain, CTPv2 - see second URL */ #define TYPE_NATIVE_VLAN 0x000a /* Native VLAN, CTPv2 - see second URL */ #define TYPE_DUPLEX 0x000b /* Full/Half Duplex - see second URL */ -/* Somewhere in here there's a Power Draw TLV */ /* 0x000c */ /* 0x000d */ #define TYPE_VOIP_VLAN_REPLY 0x000e /* VoIP VLAN reply */ @@ -505,7 +504,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case TYPE_POWER: tlvi = proto_tree_add_text(cdp_tree, tvb, - offset, length, "Power consumption: %d mW", + offset, length, "Power consumption: %u mW", tvb_get_ntohs(tvb, offset + 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, tvb, @@ -513,7 +512,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 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, "Power consumption: %d mW", + length - 4, "Power consumption: %u mW", tvb_get_ntohs(tvb, offset + 4)); offset += length; break; |