From 2eb7b05b8c9c6408268f0d1e81f0a18a02610f1c Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Wed, 5 Oct 2016 16:33:54 -0400 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-bfd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-bfd.c') diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c index df8289fb49..8658e4c28d 100644 --- a/epan/dissectors/packet-bfd.c +++ b/epan/dissectors/packet-bfd.c @@ -43,8 +43,7 @@ void proto_register_bfd(void); void proto_reg_handoff_bfd(void); -#define UDP_PORT_BFD_1HOP_CONTROL 3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */ -#define UDP_PORT_BFD_MULTIHOP_CONTROL 4784 /* draft-ietf-bfd-multihop-05.txt */ +#define UDP_PORT_RANGE_BFD "3784,4784" /* draft-katz-ward-bfd-v4v6-1hop-00.txt */ /* draft-ietf-bfd-multihop-05.txt */ /* As per RFC 6428 : http://tools.ietf.org/html/rfc6428 Section: 3.5 */ @@ -869,8 +868,7 @@ proto_reg_handoff_bfd(void) dissector_handle_t bfd_control_handle; bfd_control_handle = find_dissector("bfd"); - dissector_add_uint("udp.port", UDP_PORT_BFD_1HOP_CONTROL, bfd_control_handle); - dissector_add_uint("udp.port", UDP_PORT_BFD_MULTIHOP_CONTROL, bfd_control_handle); + dissector_add_uint_range_with_preference("udp.port", UDP_PORT_RANGE_BFD, bfd_control_handle); dissector_add_uint("pwach.channel_type", ACH_TYPE_BFD_CC, bfd_control_handle); dissector_add_uint("pwach.channel_type", ACH_TYPE_BFD_CV, bfd_control_handle); -- cgit v1.2.1