Link Layer Services


The API provides link layer services to the application, which implements the next higher layer. Interaction between the API and the application is categorized into four primitives: REQUEST, CONFIRM, INDICATION, and RESPONSE.

A layer entity requests service from the next lower layer with the REQUEST primitive.

A layer providing service notifies the next higher layer of service specific activity with the INDICATION primitive. The INDICATION may be the result of an activity of the lower layer related to a REQUEST at the peer entity.

A layer may acknowledge receipt of an INDICATION from the next lower layer with the RESPONSE primitive.

A layer providing a requested service may confirm completion of the activity with the CONFIRM primitive. Requested services that generate a CONFIRM primitive are classified as confirmed services, otherwise the service is unconfirmed.

The application makes requests and responses by passing a MGSL_PRIMITIVE structure to the MgslDlCall function. The MGSL_DLPRIMITIVE structure contains details about the request or response, which are specified by the applications. The application processes indications and confirmations by calling MgslDlWait. This function returns a MGSL_DLPRIMITIVE structure that describes the indication or confirm primitive.

The MGSL_DLPRIMITIVE structure is defined as:

typedef struct _MGSL_DLPRIMITIVE
{
    ULONG Link;
    ULONG Type;
    ULONG Flags;
    ULONG Size;
    char Buffer[1];
} MGSL_DLPRIMITIVE, *PMGSL_DLPRIMITIVE;

Link identifies the link instance on which the primitive operates. Type identifies the primitive type as described below. Flags provides a generic integer value used for primitive specific purposes. The Size member identifies the size in bytes of the Buffer member. The Buffer member contains variable length, primitive specific information.

Most applications only use a few common primitives from the lists below, which provides a simple and manageable interface. The less common primitives are provided for completeness and flexibility for a wide range of applications.

Link Layer API Primitives for MgslDlCall

DLRESPONSE_XID
Respond to peer request for identification.
DLREQUEST_CONFIGURE
Send CFGR command to secondary station. Loop mode only.
DLREQUEST_DATA
Send data using acknowledged data transfer (I-frame).
DLREQUEST_ESTABLISH
Establish operational mode (NRM or ABM).
DLREQUEST_INIT_MODE
Set initialization mode by sending SIM command or RIM response.
DLREQUEST_RAWDATA
Send a raw frame in a format not directly supported by the API.
DLREQUEST_RCV_BUSY
Set or clear the own receiver busy condition.
DLREQUEST_RELEASE
Release operational mode. (set disconnected mode)
DLREQUEST_TEST
Send a TEST frame and wait for TEST response.
DLREQUEST_UNITDATA
Send data using unacknowledged data transfer (UI frame).
DLREQUEST_XID
Exchange identification with peer.

Link Layer API Primitives for MgslDlWait

DLERROR_CANCEL
MgslDlWait call cancelled without receiving a primitive.
DLERROR_INSUFFICIENT_BUFFER
Available primitive is larger than user supplied buffer.
DLCONFIRM_CONFIGURE
Configure request completed successfully (response received) or with error (response retry limit exceeded).
DLCONFIRM_ESTABLISH
Establishment request completed. Link is in operational mode.
DLCONFIRM_INIT_MODE
Initialization request completed. Link is now in initialization mode (success) or disconnected mode (error).
DLCONFIRM_RELEASE
Release request completed. Link is in disconnected mode.
DLCONFIRM_TEST
Test request completed successfully (response received) or with error (response retry limit exceeded).
DLCONFIRM_XID
Remote peer responded to a request for identification.
DLINDICATION_BEACON
BCN received from secondary station (Loop Mode only).
DLINDICATION_DATA
Data received using acknowledged mode data transfer.
DLINDICATION_DATA_DONE
All data (I-frames) in send buffers sent and acknowledged.
DLINDICATION_ESTABLISH
Operational mode established due to peer request or existing connection reestablished after severe error.
DLINDICATION_INIT_MODE
Initialization mode set at request of remote peer.
DLINDICATION_RAWDATA
Received frame with unrecognized address.
DLINDICATION_RCV_BUSY
Busy state of peer or local receiver has changed.
DLINDICATION_RELEASE
Connection released at peer request or due to severe error.
DLINDICATION_SEND_READY
API can accept more send data.
DLINDICATION_UNITDATA
Data received using unacknowledged data transfer.
DLINDICATION_UNITDATA_DONE
All unit data in send buffers has been sent.
DLINDICATION_XID
Remote peer requested identification.


Previous Contents Next