diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-10 00:39:31 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-10 00:39:31 +0000 |
commit | a22559941fee1c629c118c45c98358c121937ffd (patch) | |
tree | 279279f3db0b5f366362166344c1cc92c0d44b38 /epan/dissectors/packet-dns.c | |
parent | 909a1add4166b5347444d494a2f258aec6a258a2 (diff) |
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_BOOLEAN
FT_IPv4
FT_EUI64
FT_GUID
FT_UINT_STRING
Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39328 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r-- | epan/dissectors/packet-dns.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index a3fcc38288..3897dc1260 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -1280,7 +1280,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, col_append_fstr(cinfo, COL_INFO, " %s", addr); proto_item_append_text(trr, ", addr %s", addr); - proto_tree_add_item(rr_tree, hf_dns_rr_addr, tvb, cur_offset, 4, FALSE); + proto_tree_add_item(rr_tree, hf_dns_rr_addr, tvb, cur_offset, 4, ENC_BIG_ENDIAN); if ((class & 0x7f) == C_IN) { tvb_memcpy(tvb, &addr_int, cur_offset, sizeof(addr_int)); @@ -1992,7 +1992,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, proto_tree_add_item(rr_tree, hf_dns_nsec3_algo, tvb, cur_offset++, 1, ENC_BIG_ENDIAN); flags_item = proto_tree_add_item(rr_tree, hf_dns_nsec3_flags, tvb, cur_offset, 1, ENC_BIG_ENDIAN); flags_tree = proto_item_add_subtree(flags_item, ett_nsec3_flags); - proto_tree_add_item(flags_tree, hf_dns_nsec3_flag_optout, tvb, cur_offset, 1, FALSE); + proto_tree_add_item(flags_tree, hf_dns_nsec3_flag_optout, tvb, cur_offset, 1, ENC_BIG_ENDIAN); cur_offset++; proto_tree_add_item(rr_tree, hf_dns_nsec3_iterations, tvb, cur_offset, 2, ENC_BIG_ENDIAN); cur_offset += 2; @@ -2785,7 +2785,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, if (rr_len < 1) goto bad_rr; afdpart_len = tvb_get_guint8(tvb, cur_offset) & DNS_APL_AFDLENGTH; - proto_tree_add_item(rr_tree, hf_dns_apl_negation, tvb, cur_offset, 1, FALSE); + proto_tree_add_item(rr_tree, hf_dns_apl_negation, tvb, cur_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(rr_tree, hf_dns_apl_afdlength, tvb, cur_offset, 1, FALSE); cur_offset += 1; rr_len -= 1; @@ -3228,19 +3228,19 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, flags, buf); field_tree = proto_item_add_subtree(tf, ett_dns_flags); proto_tree_add_item(field_tree, hf_dns_flags_response, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); proto_tree_add_item(field_tree, hf_dns_flags_opcode, tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); if (is_llmnr) { if (flags & F_RESPONSE) { proto_tree_add_item(field_tree, hf_dns_flags_conflict_response, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); } else { proto_tree_add_item(field_tree, hf_dns_flags_conflict_query, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); } proto_tree_add_item(field_tree, hf_dns_flags_truncated, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); proto_tree_add_item(field_tree, hf_dns_flags_tentative, tvb, offset + DNS_FLAGS, 2, FALSE); if (flags & F_RESPONSE) { @@ -3250,24 +3250,24 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } else { if (flags & F_RESPONSE) { proto_tree_add_item(field_tree, hf_dns_flags_authoritative, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); } proto_tree_add_item(field_tree, hf_dns_flags_truncated, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); proto_tree_add_item(field_tree, hf_dns_flags_recdesired, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); if (flags & F_RESPONSE) { proto_tree_add_item(field_tree, hf_dns_flags_recavail, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); } proto_tree_add_item(field_tree, hf_dns_flags_z, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); if (flags & F_RESPONSE) { proto_tree_add_item(field_tree, hf_dns_flags_authenticated, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); } proto_tree_add_item(field_tree, hf_dns_flags_checkdisable, - tvb, offset + DNS_FLAGS, 2, FALSE); + tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); if (flags & F_RESPONSE) { proto_tree_add_item(field_tree, hf_dns_flags_rcode, tvb, offset + DNS_FLAGS, 2, ENC_BIG_ENDIAN); |