Use `register_dissector()` for more protocols
Changes several calls of create_dissector_handle()
to instead call
register_dissector()
with a name for the dissector.
This should handle all dissectors in epan/
from packet-j*
to
packet-o*
.
This change allows affected dissectors to be findable by calls to
find_dissector()
. In turn, this opens up more command-line use for
these protocols, including fuzzshark and rawshark, as well as lua use
via Dissector.get()
.
Where needed, move the call from the protocol handoff function to the protocol register function, save the result in a static variable, and use that variable in the handoff function.
There were some calls to create_dissector_handle()
or
register_dissector()
which passed -1
as the protocol argument. When
I saw those I corrected them to pass the actual proto_foo
identifier
instead.
Partially addresses #5612 (closed)