From 4e57694d4aa2a652077e01fd6867a8def7ffdb15 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Thu, 6 Oct 2011 03:35:44 +0000 Subject: Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288 --- epan/dissectors/packet-cdp.c | 114 +++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'epan/dissectors/packet-cdp.c') diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c index a3200d48c4..10044eb0e3 100644 --- a/epan/dissectors/packet-cdp.c +++ b/epan/dissectors/packet-cdp.c @@ -200,7 +200,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cdp_tree = proto_item_add_subtree(ti, ett_cdp); /* CDP header */ - proto_tree_add_item(cdp_tree, hf_cdp_version, tvb, offset, 1, FALSE); + proto_tree_add_item(cdp_tree, hf_cdp_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_uint_format_value(cdp_tree, hf_cdp_ttl, tvb, offset, 1, @@ -285,8 +285,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "TLV with invalid length %u (< 4)", length); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); } offset += 4; break; @@ -306,8 +306,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) length, "Device ID: %s", tvb_format_stringzpad(tvb, offset + 4, length - 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_item(tlv_tree, hf_cdp_deviceid, tvb, offset + 4, length - 4, FALSE); } offset += length; @@ -335,8 +335,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) real_length, "Port ID: %s", tvb_format_text(tvb, offset + 4, real_length - 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_item(tlv_tree, hf_cdp_portid, tvb, offset + 4, real_length - 4, FALSE); } offset += real_length; @@ -348,8 +348,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Addresses"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); } offset += 4; length -= 4; @@ -378,8 +378,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Capabilities"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); } offset += 4; length -= 4; @@ -392,8 +392,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Software Version"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); add_multi_line_string_to_tree(tlv_tree, tvb, offset + 4, length - 4, "Software Version: "); } @@ -407,8 +407,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "Platform: %s", tvb_format_text(tvb, offset + 4, length - 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, FALSE); } offset += length; @@ -422,8 +422,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) length, "ODR Default gateway: %s", tvb_ip_to_str(tvb, offset+4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset+4, 4, "ODR Default gateway = %s", tvb_ip_to_str(tvb, offset+4)); @@ -439,8 +439,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) then length/5=(length-4)/5 :) */ tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); } offset += 4; length -= 4; @@ -463,8 +463,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset,length, "Protocol Hello: %s", val_to_str(tvb_get_ntohs(tvb, offset+7), type_hello_vals, "Unknown (0x%04x)")); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset+4, 3, "OUI: 0x%06X (%s)", tvb_get_ntoh24(tvb,offset+4), @@ -527,8 +527,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "VTP Management Domain: %s", tvb_format_text(tvb, offset + 4, length - 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "VTP Management Domain: %s", tvb_format_text(tvb, offset + 4, length - 4)); @@ -542,8 +542,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "Native VLAN: %u", tvb_get_ntohs(tvb, offset + 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "Native VLAN: %u", tvb_get_ntohs(tvb, offset + 4)); @@ -558,8 +558,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_get_guint8(tvb, offset + 4) ? "Full" : "Half" ); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "Duplex: %s", tvb_get_guint8(tvb, offset + 4) ? @@ -585,8 +585,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "VoIP VLAN Reply"); } tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, 1, "Data"); if (length >= 7) { @@ -615,8 +615,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "VoIP VLAN Query"); } tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, 1, "Data"); if (length >= 7) { @@ -634,8 +634,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 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_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "Power Consumption: %u mW", tvb_get_ntohs(tvb, offset + 4)); @@ -649,8 +649,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "MTU: %u", tvb_get_ntohl(tvb,offset + 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "MTU: %u", tvb_get_ntohl(tvb,offset + 4)); @@ -664,8 +664,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "Trust Bitmap: 0x%02X", tvb_get_guint8(tvb, offset + 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "Trust Bitmap: %02x", tvb_get_guint8(tvb, offset + 4)); @@ -679,8 +679,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "Untrusted port CoS: 0x%02X", tvb_get_guint8(tvb, offset + 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "Untrusted port CoS: %02x", tvb_get_guint8(tvb, offset + 4)); @@ -694,8 +694,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "System Name: %s", tvb_format_text(tvb, offset + 4, length - 4)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "System Name: %s", tvb_format_text(tvb, offset + 4, length - 4)); @@ -708,8 +708,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "System Object Identifier"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "System Object Identifier: %s", tvb_bytes_to_str(tvb, offset + 4, length - 4)); @@ -722,8 +722,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Management Addresses"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); } offset += 4; length -= 4; @@ -753,8 +753,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length, "Location: %s", tvb_format_text(tvb, offset + 5, length - 5)); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, 1 , "UNKNOWN: 0x%02X", tvb_get_guint8(tvb, offset + 4)); @@ -770,8 +770,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Power Request: "); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, 2, "Request-ID: %u", tvb_get_ntohs(tvb, offset + 4)); @@ -812,8 +812,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "Power Available: "); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, 2, "Request-ID: %u", tvb_get_ntohs(tvb, offset + 4)); @@ -846,8 +846,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, "EnergyWise"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_tree, tvb, offset + 4, 20, "Encrypted Data"); proto_tree_add_text(tlv_tree, tvb, offset + 24, @@ -897,8 +897,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Spare Pair PoE"); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); } offset += 4; length -= 4; @@ -913,8 +913,8 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) val_to_str(type, type_vals, "Unknown (0x%04x)"), length); tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv); - proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE); - proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE); + proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN); if (length > 4) { proto_tree_add_text(tlv_tree, tvb, offset + 4, length - 4, "Data"); -- cgit v1.2.3