Wireshark-dev: [Wireshark-dev] Common CBOR decoding API
From: Brian Sipos <BSipos@xxxxxxxxxxx>
Date: Wed, 3 Mar 2021 13:32:43 +0000
All,
While developing a dissector for a CBOR-based protocol, I notice that there is no API-level handling of CBOR in wireshark in the same way that there is for some other encodings (e.g., ASN.1 OID encoding of [1]) there is just the dissector-level decoding of [2].

Since CBOR is being used in a variety of new protocols, especially related to CoAP, does it make sense to have library-level handling of CBOR?
I offer my existing, narrowly-scoped API [3] as a starting point. Some of its names must change, and explicit `wmem_allocator_t` input added to allocators, but I believe there is value in having a common and well-tested API for these CBOR-based protocols.
Some existing wireshark handlers of CBOR are not robust to things like unexpected tags or unexpected major types in the encoded stream, which having a common API would help with.