diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-08-30 15:51:54 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-08-31 00:08:01 +0000 |
commit | a4c8ebc18b71200d7a6245e386e97a9d14c5dbdb (patch) | |
tree | 4918b2d727a5d308dfbecfa41f9c559c73ca725b /epan/dissectors/packet-ipx.c | |
parent | 1dbd2216edfe34e3dbb1f8967d325e7fa00ecb51 (diff) |
Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.
When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.
For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.
This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.
Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ipx.c')
-rw-r--r-- | epan/dissectors/packet-ipx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 309617fcba..a0b85871d5 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -1573,11 +1573,11 @@ proto_register_ipx(void) proto_register_subtree_array(ett, array_length(ett)); ipx_type_dissector_table = register_dissector_table("ipx.packet_type", - "IPX packet type", proto_ipx, FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); + "IPX packet type", proto_ipx, FT_UINT8, BASE_HEX); ipx_socket_dissector_table = register_dissector_table("ipx.socket", - "IPX socket", proto_ipx, FT_UINT16, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); + "IPX socket", proto_ipx, FT_UINT16, BASE_HEX); spx_socket_dissector_table = register_dissector_table("spx.socket", - "SPX socket", proto_spx, FT_UINT16, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); + "SPX socket", proto_spx, FT_UINT16, BASE_HEX); register_init_routine(&spx_init_protocol); register_postseq_cleanup_routine(&spx_postseq_cleanup); |