cborGetLength

Helper to determine the length of a single encoded CBOR data item.

This is used for handling 18013-5:2021 L2CAP data where messages are not separated by any framing.

Return

-1 if no single encoded CBOR data item could be found, otherwise the length of the CBOR data that was decoded.

Parameters

data

data with a single encoded CBOR data item and possibly more