Table of Contents Index NMS Glossary Previous Page Next Page Version


Chapter 5

Data Link Operations (LAPD)


5.1 Introduction
5.2 NMS ISDN State Machine (LAPD Configuration)
5.3 Initiating a Data Link
5.4 Responding to a Data Link Establishment Request
5.5 Sending Messages Across an Established Link

5.1 IntroductionTop of Page

This chapter describes how an application can perform various operations at the data link layer, with NMS ISDN software in LAPD configuration.

Chapter 9 of this manual documents a sample program that demonstrates LAPD operations with the NMS ISDN software.

5.2 NMS ISDN State Machine (LAPD Configuration)Top of Page

Figure 30 illustrates the NMS ISDN software LAPD configuration state machine:


chap50.gif

Figure 30. NMS ISDN State Machine (LAPD Configuration)


NMS ISDN events are generated by the NMS ISDN protocol stack running on the board. When an NMS ISDN event occurs, the event ID ISDNEVN_RCV_ MESSAGE is returned in the CTA_EVENT structure. When decoding the message, the following information is extracted:
Item

Description

LAPD message

The message is a single byte code.

Sender

The sender is the ISDN entity that has generated the message. For Layer 2 ISDN call control messages (LAPD), the sender is ENT_DL_D (the data link layer).

Recipient

The recipient is ENT_APPLI (the application).

5.3 Initiating a Data LinkTop of Page

Before a data link is established, NMS ISDN is in the IDLE state. To establish a data link, the application sends DL_EST_RQ to the NMS ISDN protocol stack. This message requests the ISDN stack to transmit a SABME (Set Asynchronous Balanced Mode Extended) message to the trunk. NMS ISDN remains in the IDLE state until the request is acknowledged by the remote side of the ISDN trunk.

If the equipment on the remote side of the ISDN trunk is prepared to complete the data link, it acknowledges the SABME message with a UA (Unnumbered Acknowledgement) message. When the stack receives the UA message, it sends DL_EST_CO to the application. The data link is established, and NMS ISDN enters the DATA_LINK_ESTABLISHED state. Messages and other information can now be passed across the data link.

Figure 31 illustrates the sequence of messages sent between the trunk, the stack, and the application when the application requests a data link:


chap51.gif

Figure 31. Message Sequence - Application Initiating Link


If the SABME message is not acknowledged (the physical link is down, or the remote equipment is not prepared to complete the link), the stack resends the SABME message four more times, at 1 second intervals. If the message is not acknowledged within five tries, the stack sends DL_REL_IN to the application. NMS ISDN remains in the IDLE state.

Figure 32 illustrates the sequence of messages sent between the trunk, the stack, and the application when the remote party does not respond to a data link request:

:
chap52.gif

Figure 32. Message Sequence - No Response to Establishment Request

5.4 Responding to a Data Link Establishment RequestTop of Page

Before a data link is established, NMS ISDN is in the IDLE state. If the NMS ISDN protocol stack receives a SABME message, it automatically responds with a UA message, and sends DL_EST_IN to the application. The data link is established, and NMS ISDN enters the DATA_LINK_ESTABLISHED state. Messages and other information can now be passed across the data link.

Figure 33 illustrates the sequence of messages sent between the trunk, the stack, and the application when the stack responds to a data link establishment request:


chap53.gif

Figure 33. Message Sequence - Responding to Establishment Request

5.5 Sending Messages Across an Established LinkTop of Page

Once NMS ISDN is in the DATA_LINK_ESTABLISHED state, your application and the remote equipment can exchange messages. To send a packet of data, the application sends either of the following:

No confirmation is returned in response to either of these requests.

Figure 34 illustrates the sequence of messages sent between the trunk, the stack, and the application when the application sends a message across an established data link:


chap54.gif

Figure 34. Message Sequence - Sending Message Across Link


When a packet is received from the remote party, the stack sends one of the following to the application:

The application does not confirm receipt of a packet.

Figure 34 illustrates the sequence of messages sent between the trunk, the stack, and the application when the application receives a message across an established data link:


chap55.gif

Figure 35. Message Sequence - Receiving Message Across Link


If the data link is broken while NMS ISDN is in DATA_LINK_ESTABLISHED state, the stack sends DL_REL_IN to the application. NMS ISDN returns to the IDLE state.



Table of Contents Index NMS Glossary Previous Page Next Page Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.