Subject: Re: [COSE] New wireshark API and dissector

From: Carsten Bormann <[email-masked]>
Date: Fri, 1 Oct 2021 11:58:32 +0200

Hi Brian,

> On 2021-10-01, at 01:29, Brian Sipos <[email-masked]> wrote:
> 
> All,
> For anyone interested, a new COSE message dissector and a new CBOR decoding API has been recently merged to the main branch of Wireshark [1].

This is most welcome news!

> For new dissectors of protocols which use CBOR as their encoding, this "wscbor" API gives a higher-level of abstraction (e.g. "text = wscbor_require_tstr(...)") and robustness to both tags and errors in structure and well-formedness.

(Of course, there now is the nagging question what the “WS” means here — probably not “Web Services” :-)

> Hopefully this will be helpful to other dissectors, since there are quite a a few CBOR-based protocols in the works.

Indeed!

Grüße, Carsten

---

From: Brian Sipos <[email-masked]>
Date: Fri, 1 Oct 2021 08:39:38 -0400

The name is an easy one: Wire Shark.
The API is quite tied in with the WS memory management and does bookkeeping
that a regular CBOR API wouldn't care about, like buffer offsets of various
parts of encoded items.

That does bring up that the current API does not handle indefinite
containers/strings in a way that the application is unaware. But the APIs
notion of a "chunk" as a contiguous piece of data, rather than a specific
CBOR item or header, allows for doing this in the future.

On Fri, Oct 1, 2021, 05:58 Carsten Bormann <[email-masked]> wrote:

> > For anyone interested, a new COSE message dissector and a new CBOR
> decoding API has been recently merged to the main branch of Wireshark [1].
>
> > For new dissectors of protocols which use CBOR as their encoding, this
> "wscbor" API gives a higher-level of abstraction (e.g. "text =
> wscbor_require_tstr(...)") and robustness to both tags and errors in
> structure and well-formedness.
>
> > Hopefully this will be helpful to other dissectors, since there are
> quite a a few CBOR-based protocols in the works.
>
> Indeed!
>
> Grüße, Carsten
>
> _______________________________________________
> CBOR mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cbor
>