Skip to content

NetPacketHeader ​

Struct

Source: NetProtocol.h

Description ​

Decoded, host-order view of the 16-byte wire header.

This struct is never copied to or from the wire as a whole: padding and host endianness are handled by explicit field-by-field encode/decode, so the on-wire bytes are identical on ESP32 (little-endian RISC-V) and native.

Properties ​

NameTypeDescription
versionuint8_tWire protocol version, must equal the build's.
typeNetPacketTypePacket discriminator.
flagsuint8_tBit 0 reliable; every other bit reserved (must be zero).
sourceNodeIduint8_tSender's application label.
sourceBootIduint16_tSender's boot generation.
sequenceuint32_tSender's monotonic sequence.
ackSequenceuint16_tReserved (0 in v1); ACKs carry the 32-bit sequence in their 4-byte payload.
payloadLengthuint16_tDeclared payload byte count.

Released under the MIT License.