Module coap_numbers::oscore_flag

source ·
Expand description

Constants for OSCORE flag bits

Flags and fields are expressed as bit masks over their serialized memory area. This means that flags in the 0..7 are expressed as u8 masks. Later bits are expressed in the smallest integer they can be expressed in; applications are expected to parse the extended bytes into an integer large enough to match their needs, and can cast up the flag bits easily. Note that due to the arrangement of bytes in the OSCORE option and the numbering of the bits, this requires treating the bytes as a little-endian representation of the full (numeric) bit set.

No helper functions are given because it’s unlikely that any application can make sense of the flags by looking at the registered flag bits but not know their meaning (as every flag is essentially mandatory to understand).

Constants§