On Oct 25, 2017, at 1:44 PM, John Dill <[email protected]> wrote:
> I just happened to turn on console printing to troubleshoot a different
> problem and I'm getting a couple of interesting messages when I change my
> protocol preferences.
>
> Duplicate dissectors (anonymous) and (anonymous) for protocol xxx in
> dissector table tcp.port
...
> I have a proto_reg_handoff_xxx that creates a couple of TCP port dissector
> handles using 'dissector_add_uint("tcp.port", MY_TCP_PORT, tcp_handle)',
Why *two* handles? You can register the handle tcp_handle twice with two
different TCP ports.
If the format of the packets is the same for both ports, you *should* use the
same dissector handle; if *that* causes an error, that's a bug.
If the format of the packets is *not* the same for both ports, then you should
use different dissector handles - with different dissector functions - *and*
ensure that the dissectors have different names (which means they have to
*have* names, so use "register_dissector()" rather than
"create_dissector_handle()" to create the handles), so that, as Michael Mann
noted, the user can choose one or the other of them for "Decode As...".
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <[email protected]>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:[email protected]?subject=unsubscribe