Skip to main content

Module transport

Module transport 

Source
Expand description

The upper and lower transport layers (Mesh Protocol 3.5, 3.6).

Upper: an access payload encrypted with an application key (AKF 1, its AID in the header) or the device key (AKF 0), TransMIC 32 or 64 bits. Lower: one unsegmented PDU, or up to 32 segments of 12 octets each, acknowledged by Segment Acknowledgment messages; Reassembly collects segments on the receiving side and says what to acknowledge.

Structs§

Meta
Addressing and sequence of an access message, for its nonce.
Reassembly
Segments being reassembled, per source. One message per source at a time, as the specification requires; a newer SeqZero replaces an older.

Enums§

AccessKey
Which key secures an access message.
Lower
A parsed lower transport PDU.
Reassembled
What reassembly produced.

Constants§

MAX_SEGMENTS
The most segments a message may have.
MAX_UNSEGMENTED_ACCESS
The largest upper transport PDU unsegmented: 15 octets (access).
SEGMENT_SIZE
Octets of upper transport PDU per access segment.

Functions§

ack
A Segment Acknowledgment PDU.
decrypt_access
Decrypts an upper transport access PDU.
encrypt_access
Encrypts an access payload; big_mic chooses the 64-bit TransMIC (segmented messages only).
parse
Parses a lower transport PDU (ctl from the network header).
segment_access
Lower transport PDUs for an encrypted access message. akf_aid is None for the device key, Some(aid) for an application key. Each returned PDU goes in its own Network PDU with sequence numbers seq_zero’s message’s first and onward.