diff options
author | Guy Harris <gharris@sonic.net> | 2022-09-13 12:44:57 -0700 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-09-13 19:47:58 +0000 |
commit | 8724c249e1cd2a91e726a682d85924a58ae10b18 (patch) | |
tree | dd125f180221ac5296d006fab62cb882119f1d5a /epan/dissectors/packet-thread.c | |
parent | fd84d481fcfe1413599fb800b1159df211cb4ef3 (diff) |
coap, thread: special-case application/octet-stream for CoAP for TMF.
Have a "CoAP for TMF" dissector that the user can use Decode As to
assign to a UDP port.
Have a "coap_tmf_media_type" dissector table in which the TMF code can
register itself for the media type "application/octet-stream".
Have the "CoAP for TMF" dissector pass a "this is for TMF" flag to the
common dissection code. In the common dissection code, if that flag is
set, first try the media type with the "coap_tmf_media_type" dissector
table before trying it in the regular "media_type" table.
This allows a user to specify UDP ports that 1) should be decoded as
CoAP and 2) should have an application/octet-stream payload dissected as
a TMF message, which should address concerns raised for Thread in issue
Diffstat (limited to 'epan/dissectors/packet-thread.c')
-rw-r--r-- | epan/dissectors/packet-thread.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-thread.c b/epan/dissectors/packet-thread.c index 808ab838ac..efa08351b1 100644 --- a/epan/dissectors/packet-thread.c +++ b/epan/dissectors/packet-thread.c @@ -3391,6 +3391,7 @@ proto_register_thread_coap(void) proto_thread_coap = proto_register_protocol("Thread CoAP", "Thread CoAP", "thread_coap"); thread_coap_handle = register_dissector("thread_coap", dissect_thread_coap, proto_thread_coap); + dissector_add_string("coap_tmf_media_type", "application/octet-stream", thread_coap_handle); thread_coap_namespace = register_dissector_table("thread.coap_namespace", "Thread CoAP namespace", proto_thread_coap, FT_STRING, BASE_NONE); } |