coap-numbers 0.1.2

Constants for the CoAP protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! 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. The expression of the later bits will depend on
//! the extension mechanism that is chosen to make them expressible.
//!
//! 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).

pub const KID_CONTEXT_FLAG: u8 = 1 << (7 - 3);
pub const KID_FLAG: u8 = 1 << (7 - 4);
pub const PARTIAL_IV: u8 = 0x07;