Skip to main content

Module network

Module network 

Source
Expand description

The network layer (Mesh Protocol 3.4): Network PDUs encrypted and obfuscated with a network key’s material, decoded by trying the keys whose NID matches, and a bounded message cache so a relayed copy is handled once.

Structs§

Cache
Recently seen Network PDUs (by source and sequence), bounded.
NetworkKey
A network key and what is derived from it.
NetworkPdu
A Network PDU, decrypted.

Enums§

Error
Errors building a PDU.

Constants§

MAX_PDU
The most a Network PDU carries on the advertising bearer.

Functions§

decode
Decodes a Network PDU with whichever key opens it. iv_index is the current one; a PDU whose IVI bit differs is tried with the one before (during an IV update). Returns the key’s position, the IV index used and the PDU.
decode_proxy
Decodes a Proxy Configuration message, as decode does a Network PDU.
encode
Encrypts and obfuscates a Network PDU.
encode_proxy
Encrypts and obfuscates a Proxy Configuration message (with the proxy nonce; pdu is a control message, TTL 0, to the unassigned address).