aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-3com-njack.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-3com-njack.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-3com-njack.c')
-rw-r--r--epan/dissectors/packet-3com-njack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-3com-njack.c b/epan/dissectors/packet-3com-njack.c
index b51673c356..26207c07c5 100644
--- a/epan/dissectors/packet-3com-njack.c
+++ b/epan/dissectors/packet-3com-njack.c
@@ -97,6 +97,7 @@ static int hf_njack_getresp_unknown1 = -1;
#define PROTO_SHORT_NAME "NJACK"
#define PROTO_LONG_NAME "3com Network Jack"
+#define NJACK_PORT_RANGE "5264-5265"
#define PORT_NJACK_PC 5264
#define PORT_NJACK_SWITCH 5265
@@ -784,9 +785,8 @@ proto_reg_handoff_njack(void)
dissector_handle_t njack_handle;
njack_handle = create_dissector_handle(dissect_njack_static, proto_njack);
- dissector_add_uint("udp.port", PORT_NJACK_PC, njack_handle);
+ dissector_add_uint_range_with_preference("udp.port", NJACK_PORT_RANGE, njack_handle);
/* dissector_add_uint_with_preference("tcp.port", PORT_NJACK_PC, njack_handle); */
- dissector_add_uint("udp.port", PORT_NJACK_SWITCH, njack_handle);
/* dissector_add_uint_with_preference("tcp.port", PORT_NJACK_SWITCH, njack_handle); */
heur_dissector_add("udp", dissect_njack_heur, "NJACK over UDP", "njack_udp", proto_njack, HEURISTIC_ENABLE);