aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcdns.c
diff options
context:
space:
mode:
authorDavid Perry <boolean263@protonmail.com>2023-06-13 15:51:49 -0400
committerAndersBroman <a.broman58@gmail.com>2023-06-13 21:53:31 +0000
commitf02f47dadfca0f79f62df6274f032d9841260e35 (patch)
treec4d13b7489df600ceb66c21a5a3b245668fb15bc /epan/dissectors/packet-fcdns.c
parent274e67998e84ba12a55b3e9456e500e4c632ac21 (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-e*` to `packet-f*`. 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
Diffstat (limited to 'epan/dissectors/packet-fcdns.c')
-rw-r--r--epan/dissectors/packet-fcdns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-fcdns.c b/epan/dissectors/packet-fcdns.c
index 0de57a7905..24a91fed99 100644
--- a/epan/dissectors/packet-fcdns.c
+++ b/epan/dissectors/packet-fcdns.c
@@ -2083,7 +2083,7 @@ proto_register_fcdns (void)
fcdns_req_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), fcdns_hash, fcdns_equal);
- dns_handle = create_dissector_handle (dissect_fcdns, proto_fcdns);
+ dns_handle = register_dissector("fcdns", dissect_fcdns, proto_fcdns);
}
void