pub struct NormCmd<'a> {
pub common: NormCommonHeader,
pub sender: SenderWord,
pub sub_type: NormCmdType,
pub head: [u8; 3],
pub extensions: Vec<HeaderExtension<'a>>,
pub content: &'a [u8],
}Expand description
A NORM_CMD message (RFC 5740 §4.2.3): common header + sender word + an 8-bit
sub-type selecting the body, then the sub-type-specific content (kept
opaque, plus the extension chain).
The fixed per-sub-type layouts (FLUSH/EOT/SQUELCH/CC/REPAIR_ADV/ACK_REQ/
APPLICATION) live in content; the sub_type discriminant tells the caller
how to interpret it. This keeps the variable, length-inferred regions
(node lists, fec_payload_id, app content) opaque as the spec requires.
Fields§
§common: NormCommonHeaderCommon header.
sender: SenderWordShared sender word.
sub_type: NormCmdTypeThe command sub-type.
head: [u8; 3]The 3 bytes that share the sub-type’s first word (sub-type-specific: e.g. fec_id+object_transport_id for FLUSH, reserved for EOT/APPLICATION, reserved+cc_sequence for CC).
extensions: Vec<HeaderExtension<'a>>Header-extension chain (e.g. EXT_RATE in CC, EXT_CC in REPAIR_ADV).
content: &'a [u8]Remaining sub-type-specific content (fec_payload_id, node lists, etc.), opaque to this layer.