Understanding ISO 4335: HDLC Frame Structure and Control Field Formats

ISO 4335 – HDLC

Reference Standard

ISO 3309 and ISO 4335

HDLC Frame Structure: Fields

LengthField
1 or n octetsAddress
1 or 2 octetsControl
n octetsOptional Information
2 octetsFrame Control Sequence

HDLC Frame Structure: Address Field

Reference Standard

ISO 3309

The address field identifies a frame as either a command or a response. A command frame contains the address of a station to which the command is being sent. A response frame contains the address of the station sending the frame.

Address Field Basic Mode (Octet 1)

Bits 1 – 8Address Field Basic Mode in Octet 1
a a a a a a a a1 octet – value 0 to 255

Address Field Extended (Octets 1 to n)

Bits 1 – 8Address Field Extended in Octets 1 to n
0 a a a a a a aOctet 1 (bit 1 = 0)
0 a a a a a a aOctet i (bit 1 = 0)
1 a a a a a a aLast Octet n (bit 1 = 1)

Frame Structure: Control Field

Reference Standard

ISO 4335

The control field contains a command or a response, and sequence numbers where applicable.

Three types of control field formats are used to perform:

  • Numbered information transfer with I format
  • Numbered supervisory functions with S format
  • Unnumbered control functions with U format

I Format

The control field Information format is either for basic (modulo 8) operation or for extended (modulo 128) operation:

Basic Operation: I Format

1st Octet:
Bit 10
Bits 2-4N(S)Transmitter send sequence number
Bit 5PPoll bit when issued as a command (1 = Poll)
Bits 6-8N(R)Transmit receive sequence number
Bit 1CommandResponseFrame Designation
0IInformation

Extended Operation: I Format

1st Octet:
Bit 10
Bits 2-8N(S)Transmitter send sequence number
Bit 1CommandResponseFrame Designation
0IInformation
2nd Octet:
Bit 1PPoll bit when issued as a command (1 = Poll)
Bits 2-8N(R)Transmit receive sequence number

S Format

The control field Supervisory format is either for basic (modulo 8) operation or for extended (modulo 128) operation:

The encoding values of the two S bits included in the first octet of the control field are listed and ordered according to their hexadecimal code.

Basic Operation: S Format

1st Octet:
Bits 1-21 0
Bits 3-4S SS: supervisory function bit
Bit 5P/FPoll bit when issued as a command
Final bit when issued as a response (1 = Poll/Final)
Bits 6-8N(R)Transmit receive sequence number
Bits 3-4 = SSCommandResponseFrame Designation
0 0RRRRReceive Ready
0 1RNRRNRReceive Not Ready
1 0REJREJReject
1 1SREJSREJSelective Reject

Extended Operation: S Format

1st Octet:
Bits 1-21 0
Bits 3-4S SS: supervisory function bit
Bits 5-8X X X XX: reserved and set to 0
Bits 3-4 = SSCommandResponseFrame Designation
0 0RRRRReceive Ready
0 1RNRRNRReceive Not Ready
1 0REJREJReject
1 1SREJSREJSelective Reject
2nd Octet:
Bit 1P/FPoll bit when issued as a command
Final bit when issued as a response (1 = Poll/Final)
Bits 2-8N(R)Transmit receive sequence number

S Format: Hex Codes

Octet CodeTypeC/RFrame Designation
x1RRC/RReceive Ready
x9RNRC/RReceive Not Ready
x5REJC/RReject
xDSREJC/RSelective Reject

Note: Hexadecimal code corresponds to b8-b1.

U Format

The control field Unnumbered format is either for basic (modulo 8) operation or for extended (modulo 128) operation:

The encoding values of the five M bits included in the first octet of the control field are listed and ordered according to their hexadecimal code or their type (mnemonic).

Basic Operation: U Format

1st Octet:
Bits 1-21 1
Bits 3-4M MM: modifier function bit
Bit 5P/FPoll bit when issued as a command
Final bit when issued as a response (1 = Poll/Final)
Bits 6-8M M MM: modifier function bit