LAPD, Link Access Protocol - Channel D, a Layer 2 protocol is defined in CCITT Q.920/921 as well as ETS 300 125. LAPD works exclusively in the Asynchronous Balanced Mode. X31 in the D-chanal (package service) is one of the typical applications.
The here presented data only serve as short overview over the types of LAPD-pakets. For detailed information, the ETS 300 125 only is responsible.

broadly:


Flag

SAPI

TEI

CF

Parameter / Daten

FCS

Flag

    7Eh                                                                                  7Eh

dependent on the type

Control Field
Type of the package                Frame Check Sequence

   |---------------------| Address Field

Terminal endpoint identifer
  bit-0 EA2-Second Address Extension bit which is always set to 1.

Service access point identifer
  bit-1 C/R-Command/Response bit.
    (Frames from the user with this bit set to 0 are command frames,
    as are frames from the network with this bit set to 1.
    Other values indicate a response frame.)
  bit-0 EA1-First Address Extension bit which is always set to 0.

 

SAPI – Service Access Point Identifier:

0

Used by CCITT signaling

1

Not defined

16

Used for paket-data communication

32

Used for internal loop-tests only (national !!!)

63

Used for management(TEI) in all services

for X31 in the D-chanal is valid pronto on that occasion: SAPI = 16 (as far as on TEI-Management)


TEI - Terminal Endpoint Identifier:

0-63

Used by non-automatic TEI assignment user equipment.

64-126

Used by automatic TEI assignment equipment.

127

Used for a broadcast connection meant for all Terminal Endpoints.

broadly usually for X31(not pronto): TEI=1


The numbering takes place after Modulo-128.



Types:

" set asyncronous balanced mode extended "

Flag

SAPI

TEI

7Fh

FCS

Flag

  bit-4 poll-bit

SABME

 

" disconnected mode "

Flag

SAPI

TEI

1Fh

FCS

Flag

  bit-4 final-bit

DM

 

" disconnect "

Flag

SAPI

TEI

53h

FCS

Flag

  bit-4 poll-bit

DISC

 

" unnumbered acknowledgement "

Flag

SAPI

TEI

73h

FCS

Flag

  bit-4 final-bit

UA

 

" frame reject "

!!! it should not be used!!!

Flag

SAPI

TEI

87h

data-field

FCS

Flag

see ETS 300 125 for data-field

  bit-4 final-bit

FRMR

 

" exchange identification node "

!!! it should not be used!!!

Flag

SAPI

TEI

AFh

data-field

FCS

Flag

see ETS 300 125 for data-field

  bit-4 poll/final-bit

XID

 

" reject "

Flag

SAPI

TEI

09h

xxh

FCS

Flag

  bit-7..1 receive sequence number

  bit-4 poll/final-bit

REJ

 

" receive not ready "

Flag

SAPI

TEI

05h

xxh

FCS

Flag

  bit-7..1 receive sequence number

  bit-4 poll/final-bit

RNR

 

" receive ready "

Flag

SAPI

TEI

01h

xxh

FCS

Flag

  bit-7..1 receive sequence number

  bit-4 poll/final-bit

RR

 

" data-frame "

Flag

SAPI

TEI

xx..xx0b

xxh

data

FCS

Flag

bit-7..1 receive sequence number
bit-0 poll -bit

  bit-7..1 send sequence number
  bit-0 must be zero

I-frame

 

" unnumbered-information "

Flag

SAPI

TEI

03h

[data-field]

FCS

Flag

optional (for example: TEI-management)
see ETS 300 125

  bit-4 poll-bit

UI




In the standard to LAPD, costly State-diagrams are represented to the respective transitions and mistake treatments. Getting a variation about a space-saving and simultaneously good to in the habit of state/change-mechanism is the implementation by means of a State-Table. The current status is used as line and the received Paket-Typ on that occasion as columns. The there deposited byte returns the necessary reaction and the low Nibble the new State in the upper Nibble. There sufficiently exceptions exists, however even further evaluations are around necessary about such a table, sees ETS 300 125.