aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dhcpv6.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-10-05 16:33:54 -0400
committerMichael Mann <mmann78@netscape.net>2016-10-13 02:51:18 +0000
commit2eb7b05b8c9c6408268f0d1e81f0a18a02610f1c (patch)
treebd0a909e3d506ea2e61c446aa8a809b6f728af3b /epan/dissectors/packet-dhcpv6.c
parent4d8581d7e15fe4a80a53496b83a853271fc674b6 (diff)
Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-dhcpv6.c')
-rw-r--r--epan/dissectors/packet-dhcpv6.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c
index 703689f5b4..95c58c0b87 100644
--- a/epan/dissectors/packet-dhcpv6.c
+++ b/epan/dissectors/packet-dhcpv6.c
@@ -228,8 +228,8 @@ static expert_field ei_dhcpv6_bulk_leasequery_bad_msg_type = EI_INIT;
static dissector_handle_t dhcpv6_handle;
-#define UDP_PORT_DHCPV6_DOWNSTREAM 546
-#define UDP_PORT_DHCPV6_UPSTREAM 547
+#define TCP_PORT_DHCPV6_UPSTREAM 547
+#define UDP_PORT_DHCPV6_RANGE "546-547" /* Downstream + Upstream */
#define DHCPV6_LEASEDURATION_INFINITY 0xffffffff
#define HOP_COUNT_LIMIT 32
@@ -2459,12 +2459,11 @@ proto_reg_handoff_dhcpv6(void)
{
dissector_handle_t dhcpv6_bulkquery_handle;
- dissector_add_uint("udp.port", UDP_PORT_DHCPV6_DOWNSTREAM, dhcpv6_handle);
- dissector_add_uint("udp.port", UDP_PORT_DHCPV6_UPSTREAM, dhcpv6_handle);
+ dissector_add_uint_range_with_preference("udp.port", UDP_PORT_DHCPV6_RANGE, dhcpv6_handle);
dhcpv6_bulkquery_handle = create_dissector_handle(dissect_dhcpv6_bulk_leasequery,
proto_dhcpv6_bulk_leasequery);
- dissector_add_uint_with_preference("tcp.port", UDP_PORT_DHCPV6_UPSTREAM, dhcpv6_bulkquery_handle);
+ dissector_add_uint_with_preference("tcp.port", TCP_PORT_DHCPV6_UPSTREAM, dhcpv6_bulkquery_handle);
}
/*