(Page 1 of 1 in this chapter)


Chapter 5

Data Link Operations (LAPD Configuration)


5.1 Introduction
5.2 The AG 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 Introduction

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

Chapter 10 of this manual documents a sample program included with the AG ISDN software that demonstrates LAPD operations with the AG ISDN software.

5.2 The AG ISDN State Machine (LAPD Configuration)

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

Figure 30. AG ISDN State Machine (LAPD Configuration)


AG ISDN events are generated by the AG ISDN protocol stack running on the AG board. When an AG 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 Link

Before a data link is established, AG ISDN is in the IDLE state. To establish a data link, the application sends DL_EST_RQ to the AG ISDN protocol stack. This message requests the ISDN stack to transmit a SABME (Set Asynchronous Balanced Mode Extended) message to the trunk. AG 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 AG 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:

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. AG 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:

:

Figure 32. Message Sequence - No Response to Establishment Request

5.4 Responding to a Data Link Establishment Request

Before a data link is established, AG ISDN is in the IDLE state. If the AG 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 AG 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 application responds to a data link establishment request:

Figure 33. Message Sequence - Responding to Establishment Request

5.5 Sending Messages across an Established Link

Once AG 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:

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:

Figure 35. Message Sequence - Receiving Message Across Link


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



(Page 1 of 1 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.