Wireshark-dev: [Wireshark-dev] Duplicate dissectors error
From: Juan Jose Martin Carrascosa <[email protected]>
Date: Mon, 29 Aug 2016 15:59:10 -0700
Hi everybody,

I am adding plugins to my Wireshark installation, so they register themselves in the table rtps.type_name (created in packet-rtps.c).

Duplicate dissectors (null) and (null) for protocol Custom in dissector table rtps.type_name
Duplicate dissectors (null) and (null) for protocol Custom_A in dissector table rtps.type_name
Duplicate dissectors (null) and (null) for protocol Custom_A in dissector table rtps.type_name
Duplicate dissectors (null) and (null) for protocol Custom_A in dissector table rtps.type_name
Duplicate dissectors (null) and (null) for protocol (none) in dissector table rtps.type_name

That error message comes from dissector_add_for_decode_as(). Actually, I don't expect my dissectors to be called from decode_as...

Few things:

1) This message is printed to stderr instead of using any Logging API. Should we change that?

2) Which is the right way to design this so I don't get those errors? I could change the value DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE to DISSECTOR_TABLE_ALLOW_DUPLICATE when I create the rtps.type_name table but I'd prefer to solve the issue instead of patching it.

Thanks,
Juanjo Martin