aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rx.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-rx.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-rx.c')
-rw-r--r--epan/dissectors/packet-rx.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/epan/dissectors/packet-rx.c b/epan/dissectors/packet-rx.c
index 0d514b9022..34533307bf 100644
--- a/epan/dissectors/packet-rx.c
+++ b/epan/dissectors/packet-rx.c
@@ -42,9 +42,7 @@
void proto_register_rx(void);
void proto_reg_handoff_rx(void);
-#define UDP_PORT_RX_LOW 7000
-#define UDP_PORT_RX_HIGH 7009
-#define UDP_PORT_RX_AFS_BACKUPS 7021
+#define UDP_PORT_RX_RANGE "7000-7009,7021"
static const value_string rx_types[] = {
{ RX_PACKET_TYPE_DATA, "data" },
@@ -755,19 +753,13 @@ proto_reg_handoff_rx(void)
{
dissector_handle_t rx_handle;
- int port;
-
/*
* Get handle for the AFS dissector.
*/
afs_handle = find_dissector_add_dependency("afs", proto_rx);
- /* Ports in the range UDP_PORT_RX_LOW to UDP_PORT_RX_HIGH
- are all used for various AFS services. */
rx_handle = create_dissector_handle(dissect_rx, proto_rx);
- for (port = UDP_PORT_RX_LOW; port <= UDP_PORT_RX_HIGH; port++)
- dissector_add_uint("udp.port", port, rx_handle);
- dissector_add_uint("udp.port", UDP_PORT_RX_AFS_BACKUPS, rx_handle);
+ dissector_add_uint_range_with_preference("udp.port", UDP_PORT_RX_RANGE, rx_handle);
}
/*