LAPD



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

-------------------
Address Field

7Eh



SAPIService 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.
TEITerminal endpoint identifer
• bit-0: EA2-Second Address Extension bit which is always set to 1
CFControl Field - Type of the package
Parameter / Datenadependent on the type
FCSFrame Check Sequence


SAPI - Service Access Point Identifier:

0 Used by CCITT signaling
1 Not defined
16Used for paket-data communication
32Used for internal loop-tests only (national !!!)
63Used for management(TEI) in all services

für X31 im D-Kanal gilt dabei fix: SAPI = 16 (bis auf TEI-Management)




TEI - Terminal Endpoint Identifier:

0-63 Used by non-automatic TEI assignment user equipment
64-126Used by automatic TEI assignment equipment
127Used for a broadcast connection meant for all Terminal Endpoints

broadly usually for X31(but not fix): TEI=1




The numbering takes place after Modulo-128.



Typen:

SABME

" set asyncronous balanced mode extended "

Flag

SAPI

TEI

7Fh

FCS

Flag



7FhTyp: SABME
• bit-4: poll-bit


DM

" disconnected mode "

Flag

SAPI

TEI

1Fh

FCS

Flag



1FhTyp: DM
• bit-4: final-bit


DISC

" disconnect "

Flag

SAPI

TEI

53h

FCS

Flag



53hTyp: DISC
• bit-4: poll-bit


UA

" unnumbered acknowledgement "

Flag

SAPI

TEI

73h

FCS

Flag



73hTyp: UA
• bit-4: final-bit


FRMR
!!! should not be used !!!

" frame reject "

Flag

SAPI

TEI

87h

data-field

FCS

Flag



87hTyp: FRMR
• bit-4: final-bit
data-fieldsee ETS 300 125


XID
!!! should not be used !!!

" exchange identification node "

Flag

SAPI

TEI

AFh

data-field

FCS

Flag



AFhTyp: XID
• bit-4: poll/final-bit
data-fieldsee ETS 300 125


REJ

" reject "

Flag

SAPI

TEI

09h

xxh

FCS

Flag



09hTyp: REJ
• bit-4: poll/final-bit
xxh • bit-7..1: receive sequence number


RNR

" receive not ready "

Flag

SAPI

TEI

05h

xxh

FCS

Flag



09hTyp: RNR
• bit-4: poll/final-bit
xxh • bit-7..1: receive sequence number


RR

" receive ready "

Flag

SAPI

TEI

01h

xxh

FCS

Flag



01hTyp: RR
• bit-4: poll/final-bit
xxh • bit-7..1: receive sequence number


I-frame

" data-frame "

Flag

SAPI

TEI

xx..xx0b

xxh

data

FCS

Flag



01hTyp: I-frame
• bit-7..1: send sequence number
• bit-0: must be zero
xxh • bit-7..1: receive sequence number
• bit-0: poll -bit


UI

" unnumbered information "

Flag

SAPI

TEI

03h

[data-field]

FCS

Flag



03hTyp: UI
• bit-4: poll-bit
[data-field]optional (for example: TEI-management) - see ETS 300 125





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.