Skip to main content

Module packet

Module packet 

Source
Expand description

Packet codec — framing, header, security control block, MAC, trailer.

§Spec: §5.9 Tables 1–3, Annex C

Structs§

Address
PD bus address.
ControlByte
Decoded control byte.
CtrlFlags
Control byte flags.
PacketBuilderalloc
Builder for a single OSDP packet.
ParsedPacket
View of a parsed OSDP packet, borrowed from the input slice.
Scballoc
Owned Security Control Block.
ScbView
Borrowed view of a parsed Security Control Block.
Sqn
Sequence number (0..=3).

Enums§

ScsType
Security block type byte (SEC_BLK_TYPE).
Trailer
Decoded packet trailer.

Constants§

HEADER_LEN
Length of the fixed OSDP header (SOM, ADDR, LEN_LSB, LEN_MSB, CTRL).
MAC_LEN
MAC trailer length on the wire (the first 4 bytes of the computed MAC).

Functions§

checksum8
Compute the 8-bit OSDP checksum over bytes.
crc16
Compute the CRC-16/KERMIT over bytes.
crc16_le
Compute the CRC-16/KERMIT and return it as little-endian bytes.

Type Aliases§

Packetalloc
Re-export of the high-level PacketBuilder under a friendlier name.