diff options
author | Michael Mann <mmann78@netscape.net> | 2016-10-05 16:33:54 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-10-13 02:51:18 +0000 |
commit | 2eb7b05b8c9c6408268f0d1e81f0a18a02610f1c (patch) | |
tree | bd0a909e3d506ea2e61c446aa8a809b6f728af3b /epan/dissectors/packet-nat-pmp.c | |
parent | 4d8581d7e15fe4a80a53496b83a853271fc674b6 (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-nat-pmp.c')
-rw-r--r-- | epan/dissectors/packet-nat-pmp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-nat-pmp.c b/epan/dissectors/packet-nat-pmp.c index cf5530129e..5c4f597e62 100644 --- a/epan/dissectors/packet-nat-pmp.c +++ b/epan/dissectors/packet-nat-pmp.c @@ -44,8 +44,7 @@ void proto_register_nat_pmp(void); void proto_reg_handoff_nat_pmp(void); -#define PCP_STATUS_PORT 5350 -#define PCP_PORT 5351 +#define PCP_PORT_RANGE "5350-5351" /* NAT Port opcodes */ #define EXTERNAL_ADDRESS_REQUEST 0 @@ -825,17 +824,15 @@ void proto_reg_handoff_nat_pmp(void) dissector_handle_t nat_pmp_handle; dissector_handle_t pcp_handle; - pcp_handle = create_dissector_handle(dissect_portcontrol, proto_pcp); - dissector_add_uint("udp.port", PCP_STATUS_PORT, pcp_handle); - dissector_add_uint("udp.port", PCP_PORT, pcp_handle); + dissector_add_uint_range_with_preference("udp.port", PCP_PORT_RANGE, pcp_handle); nat_pmp_handle = create_dissector_handle(dissect_nat_pmp, proto_nat_pmp); /* Port Control Protocol (packet-portcontrol.c) shares the same UDP ports as NAT-PMP, but it backwards compatible. However, still let NAT-PMP use Decode As */ - dissector_add_for_decode_as("udp.port", nat_pmp_handle); + dissector_add_for_decode_as_with_preference("udp.port", nat_pmp_handle); } /* |