From 7f64348cc55cbad28b8a8aab347c1fd4b097f36e Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Tue, 3 Sep 2013 06:34:52 +0000 Subject: [PATCH] Enhance NULL type Convert proto_tree_add_text calls to proto_tree_add_item svn path=/trunk/; revision=51707 --- epan/dissectors/packet-dns.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 665db8ff1f..e46abd0c1e 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -114,6 +114,7 @@ static int hf_dns_mf = -1; static int hf_dns_mb = -1; static int hf_dns_mg = -1; static int hf_dns_mr = -1; +static int hf_dns_null = -1; static int hf_dns_aaaa = -1; static int hf_dns_rr_primaryname = -1; static int hf_dns_rr_udp_payload_size = -1; @@ -3549,12 +3550,12 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, } break; - case T_NULL: + case T_NULL: /* Null (10) */ { if (cinfo != NULL) { col_append_fstr(cinfo, COL_INFO, " %s", name); } - proto_tree_add_text(rr_tree, tvb, cur_offset, data_len, "Data"); + proto_tree_add_item(rr_tree, hf_dns_null, tvb, cur_offset, data_len, ENC_NA); } break; @@ -4274,6 +4275,11 @@ proto_register_dns(void) FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dns_null, + { "Null (data)", "dns.null", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dns_aaaa, { "AAAA Address", "dns.aaaa", FT_IPv6, BASE_NONE, NULL, 0x0,