aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dns.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2012-09-27 04:36:40 +0000
committerMichael Mann <mmann78@netscape.net>2012-09-27 04:36:40 +0000
commit65ef9e9d6b691cd54540b94fb8393c02443fd9d4 (patch)
treecfeec151dcb3ccb5ee66094cd6ac3b1cadb82580 /epan/dissectors/packet-dns.c
parent0063cc00c803c80e80ff809da781987846478354 (diff)
replaced decode_numeric_bitfield calls with filterable item or removed it if it didn't mathematically do anything.
svn path=/trunk/; revision=45166
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r--epan/dissectors/packet-dns.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c
index a508dc3744..3c1d0dc134 100644
--- a/epan/dissectors/packet-dns.c
+++ b/epan/dissectors/packet-dns.c
@@ -95,6 +95,7 @@ static int hf_dns_rr_ttl = -1;
static int hf_dns_rr_len = -1;
static int hf_dns_rr_addr = -1;
static int hf_dns_rr_primaryname = -1;
+static int hf_dns_rr_udp_payload_size = -1;
static int hf_dns_soa_mname = -1;
static int hf_dns_soa_rname = -1;
static int hf_dns_soa_serial_number = -1;
@@ -1214,9 +1215,7 @@ add_opt_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
"Type: %s", dns_type_description(type));
offset += 2;
if (is_mdns) {
- proto_tree_add_text(rr_tree, tvb, offset, 2, "%s",
- decode_numeric_bitfield(dns_class, 0x7fff, 16,
- "UDP payload size: %u"));
+ proto_tree_add_uint(rr_tree, hf_dns_rr_udp_payload_size, tvb, offset, 2, dns_class);
proto_tree_add_boolean(rr_tree, hf_dns_rr_cache_flush, tvb, offset, 2,
flush);
} else {
@@ -4039,6 +4038,11 @@ proto_register_dns(void)
FT_STRING, BASE_NONE, NULL, 0x0,
"Response Primary Name", HFILL }},
+ { &hf_dns_rr_udp_payload_size,
+ { "UDP payload size", "dns.resp.udp_payload_size",
+ FT_UINT16, BASE_HEX, NULL, 0x7FFF,
+ NULL, HFILL }},
+
{ &hf_dns_soa_mname,
{ "Primary name server", "dns.soa.mname",
FT_STRING, BASE_NONE, NULL, 0x0,