NetworkPdu

data class NetworkPdu(val ivi: Int, val nid: Int, val ctl: Int, val ttl: Int, val seq: UInt, val src: MeshAddress.UnicastAddress, val dst: MeshAddress, val transportPdu: ByteArray, val netMic: ByteArray)

A complete Network PDU ready for transmission over a bearer.

Network PDUs are max 29 bytes for non-segmented access messages on the ADV bearer. Larger PDUs may be carried over the GATT proxy bearer (up to the negotiated MTU).

Constructors

Link copied to clipboard
constructor(ivi: Int, nid: Int, ctl: Int, ttl: Int, seq: UInt, src: MeshAddress.UnicastAddress, dst: MeshAddress, transportPdu: ByteArray, netMic: ByteArray)

Properties

Link copied to clipboard
val ctl: Int

Control (1) or Access (0) message indicator.

Link copied to clipboard

Destination address (unicast, group, or virtual).

Link copied to clipboard

Whether this is a control message (vs access message).

Link copied to clipboard
val ivi: Int

IV Index least significant bit (0 = normal, 1 = IV update in progress).

Link copied to clipboard

Network MIC (32-bit for access, 64-bit for control messages).

Link copied to clipboard
val nid: Int

Network ID -- 7-bit value identifying the NetKey (derived via K3).

Link copied to clipboard
val seq: UInt

24-bit sequence number for replay protection.

Link copied to clipboard

Source unicast address.

Link copied to clipboard

Encrypted transport PDU payload.

Link copied to clipboard
val ttl: Int

Time-To-Live -- remaining hop count before message is dropped.