From b3cddad2784ba063aa0490e2b3f0a27df39704ca Mon Sep 17 00:00:00 2001 From: Brian Sipos Date: Fri, 22 Nov 2024 21:20:39 -0500 Subject: [PATCH] Register context name --- README.md | 3 ++- src/packet-bpsec-cose.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 68516fa..57e25e1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Building the wireshark modules can be done with a command sequence similar to: ``` PLUGIN_PATH=$(pkg-config --define-variable=libdir=${HOME}/.local/lib --variable=plugindir wireshark) cmake -S . -B build/default -DCMAKE_BUILD_TYPE=Debug -DINSTALL_MODULE_PATH=${PLUGIN_PATH}/epan/ -G Ninja - cmake --build build/default --target install + cmake --build build/default + cmake --install build/default ``` At this point the two modules "libudpcl" and "libbpv7" will be installed in the wireshark plugin path and will be loaded at next wireshark application startup. diff --git a/src/packet-bpsec-cose.c b/src/packet-bpsec-cose.c index 8ec220b..4039227 100644 --- a/src/packet-bpsec-cose.c +++ b/src/packet-bpsec-cose.c @@ -195,6 +195,12 @@ void proto_reg_handoff_bpsec_cose(void) { handle_cose_msg_hdr = find_dissector_add_dependency("cose.msg.headers", proto_bpsec_cose); /* Packaged extensions */ + { + int64_t *key = g_new0(int64_t, 1); + *key = 3; + dissector_handle_t hdl = create_dissector_handle_with_name_and_description(NULL, proto_bpsec_cose, NULL, "COSE"); + dissector_add_custom_table_handle("bpsec.ctx", key, hdl); + } { bpsec_id_t *key = bpsec_id_new(NULL, bpsec_cose_ctxid, 3); dissector_handle_t hdl = create_dissector_handle_with_name_and_description(dissect_addl_protected, proto_bpsec_cose, NULL, "Additional Protected Headers");