Packet Structure

This document describes how the OSDP packets are built/decoded.

Security Control Block (Optional)

Byte

Name

Meaning

Value

5

SEC_BLK_LEN

Length of Security Control Block

Any

6

SEC_BLK_TYPE

Security Block Type

See Below

7 - m-1

SEC_BLK_DATA

Security Block Data

Based on type

Command/Reply Structure

The Command/Reply block is a mandatory field. If no SCB exist it follows directly after fixed header. If SCB is present, then this is offset by as many bytes.

Byte

Name

Meaning

Value

5

CMND/REPLY

Command or Reply Code

See CMD/REPLY

6 - n

DATA

(optional) Data Block

Based on CMD/REPLY

Message Authentication Code (Optional)

This is an optional block present in secure channel messages. These 4 bytes are just above the CRC/CKSUM bytes.

Byte

Name

Meaning

Value

n-6

MAC[0]

Message Authentication Code Byte-0

Any

n-5

MAC[0]

Message Authentication Code Byte-0

Any

n-4

MAC[0]

Message Authentication Code Byte-0

Any

n-3

MAC[0]

Message Authentication Code Byte-0

Any

Packet Validation

These are the last 2 bytes (1 if CKSUM is was used in Message Control Information bit mask) of the packet.

Byte

Name

Meaning

Value

n-2

CKSUM/CRC_LSB

Checksum, or, CRC-16 Least Significant Byte

CKSUM/CRC

n-1

CRC_MSB

(optional) CRC-16 Most Significant Byte

CKSUM/CRC