diff options
author | David Perry <boolean263@protonmail.com> | 2023-05-09 15:19:23 -0400 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2023-05-16 08:18:10 +0000 |
commit | 5468611d57cb0302d4f0f359f79c0bedc66ee888 (patch) | |
tree | 7ade10f42525ed5a80b68a1f2849b08ae0094b3a /epan/dissectors/packet-2dparityfec.c | |
parent | 40fdd6766467007fcae26d4edb6c32c1bbc3dea6 (diff) |
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-a*` to
`packet-d*`.
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, and use `find_dissector()` 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
Diffstat (limited to 'epan/dissectors/packet-2dparityfec.c')
-rw-r--r-- | epan/dissectors/packet-2dparityfec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-2dparityfec.c b/epan/dissectors/packet-2dparityfec.c index 63d073ae15..8f6ceb6467 100644 --- a/epan/dissectors/packet-2dparityfec.c +++ b/epan/dissectors/packet-2dparityfec.c @@ -248,7 +248,7 @@ void proto_register_2dparityfec(void) "as FEC data corresponding to Pro-MPEG Code of Practice #3 release 2", &dissect_fec); - handle_2dparityfec = create_dissector_handle(dissect_2dparityfec, + handle_2dparityfec = register_dissector("2dparityfec", dissect_2dparityfec, proto_2dparityfec); } |