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 |
|
|
Respond to peer request for identification. |
|
Send CFGR command to secondary station. Loop mode only. |
|
Send data using acknowledged data transfer (I-frame). |
|
Establish operational mode (NRM or ABM). |
|
Set initialization mode by sending SIM command or RIM response. |
|
Send a raw frame in a format not directly supported by the API. |
|
Set or clear the own receiver busy condition. |
|
Release operational mode. (set disconnected mode) |
|
Send a TEST frame and wait for TEST response. |
|
Send data using unacknowledged data transfer (UI frame). |
|
Exchange identification with peer. |
Link Layer API Primitives for MgslDlWait |
|
|
MgslDlWait call cancelled without receiving a primitive. |
|
Available primitive is larger than user supplied buffer. |
|
Configure request completed successfully (response received) or with error (response retry limit exceeded). |
|
Establishment request completed. Link is in operational mode. |
|
Initialization request completed. Link is now in initialization mode (success) or disconnected mode (error). |
|
Release request completed. Link is in disconnected mode. |
|
Test request completed successfully (response received) or with error (response retry limit exceeded). |
|
Remote peer responded to a request for identification. |
|
BCN received from secondary station (Loop Mode only). |
|
Data received using acknowledged mode data transfer. |
|
All data (I-frames) in send buffers sent and acknowledged. |
|
Operational mode established due to peer request or existing connection reestablished after severe error. |
|
Initialization mode set at request of remote peer. |
|
Received frame with unrecognized address. |
|
Busy state of peer or local receiver has changed. |
|
Connection released at peer request or due to severe error. |
|
API can accept more send data. |
|
Data received using unacknowledged data transfer. |
|
All unit data in send buffers has been sent. |
|
Remote peer requested identification. |
| Previous | Contents | Next |