pub struct Afl {
pub fcl: u16,
pub mcl: Option<u8>,
pub key_info: Option<u16>,
pub counter: Option<u32>,
pub length: Option<u16>,
/* private fields */
}Expand description
The authentication and fragmentation layer (CI 90, OMS Vol. 2 §6, EN 13757-7).
Its MAC is verified only for security mode 7 (by Encrypted::decrypt); an AFL MAC in
front of a plaintext or mode-5 transport layer is parsed, not checked. A fragment
(fragment ID not 0) has Body::Fragment; join the fragments with
Reassembly.
Fields§
§fcl: u16Fragmentation control: bit 14 more fragments, 13–9 which fields are present, 7–0 fragment ID.
mcl: Option<u8>Message control: authentication type in bits 3–0.
key_info: Option<u16>Key information.
counter: Option<u32>Message counter: strictly increasing per meter; compare it to detect replays.
length: Option<u16>Message length: the bytes of the whole message from the TPL CI on (first fragment of a fragmented message only).
Implementations§
Source§impl Afl
impl Afl
Sourcepub const fn more_fragments(&self) -> bool
pub const fn more_fragments(&self) -> bool
More fragments follow this one.
Sourcepub const fn fragment_id(&self) -> u8
pub const fn fragment_id(&self) -> u8
The fragment ID: 0 for an unfragmented message, 1, 2, … for the fragments of one.