diff options
author | Michael Mann <mmann78@netscape.net> | 2015-10-07 13:50:11 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-10-08 06:15:51 +0000 |
commit | ec82648b0989d409adcc404df69b691a260f16e9 (patch) | |
tree | e38922d9fe1f1b99f8eecb34c0a45238ba753324 /epan/dissectors/packet-dns.c | |
parent | 4a20f576da686237bcb66edeb1e195364ddd2a49 (diff) | |
download | wireshark-ec82648b0989d409adcc404df69b691a260f16e9.tar.gz |
Replace or rename "duplicate" UDP protocols shown in Decode As
Change-Id: I8cfd1c223c70c7e03728af8b2f7cbf9354d7ad86
Ping-Bug: 3949
Reviewed-on: https://code.wireshark.org/review/10865
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r-- | epan/dissectors/packet-dns.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 9766e58f93..748b39347e 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -105,6 +105,8 @@ static int st_node_response_nauthorities = -1; static int st_node_response_nadditionals = -1; static int proto_dns = -1; +static int proto_mdns = -1; +static int proto_llmnr = -1; static int hf_dns_length = -1; static int hf_dns_flags = -1; static int hf_dns_flags_response = -1; @@ -3660,8 +3662,11 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (tree) { if (is_llmnr) { - ti = proto_tree_add_protocol_format(tree, proto_dns, tvb, 0, -1, + ti = proto_tree_add_protocol_format(tree, proto_llmnr, tvb, 0, -1, "Link-local Multicast Name Resolution (%s)", (flags & F_RESPONSE) ? "response" : "query"); + } else if (is_mdns){ + ti = proto_tree_add_protocol_format(tree, proto_mdns, tvb, 0, -1, + "Domain Name System (%s)", (flags & F_RESPONSE) ? "response" : "query"); } else { ti = proto_tree_add_protocol_format(tree, proto_dns, tvb, 0, -1, "Domain Name System (%s)", (flags & F_RESPONSE) ? "response" : "query"); @@ -4071,8 +4076,8 @@ proto_reg_handoff_dns(void) dissector_add_uint_range("udp.port", dns_udp_port_range, dns_udp_handle); dns_sctp_handle = create_dissector_handle(dissect_dns_sctp, proto_dns); - mdns_udp_handle = create_dissector_handle(dissect_mdns_udp, proto_dns); - llmnr_udp_handle = create_dissector_handle(dissect_llmnr_udp, proto_dns); + mdns_udp_handle = create_dissector_handle(dissect_mdns_udp, proto_mdns); + llmnr_udp_handle = create_dissector_handle(dissect_llmnr_udp, proto_llmnr); dissector_add_uint("udp.port", UDP_PORT_MDNS, mdns_udp_handle); dissector_add_uint("tcp.port", TCP_PORT_MDNS, dns_tcp_handle); @@ -5524,6 +5529,8 @@ proto_register_dns(void) expert_module_t* expert_dns; proto_dns = proto_register_protocol("Domain Name Service", "DNS", "dns"); + proto_mdns = proto_register_protocol("Multicast Domain Name Service", "mDNS", "mdns"); + proto_llmnr = proto_register_protocol("Link-local Multicast Name Resolution", "LLMNR", "llmnr"); proto_register_field_array(proto_dns, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_dns = expert_register_protocol(proto_dns); |