(Page 14 of 19 in this chapter)


SCCPRetrieveMessage

Description

Retrieves the next message from the SCCP layer.

Prototype

short SCCPRetrieveMessage (OS_FD fd,

SccpAllMsgs *message,

RcvInfoBlk *infoBlk,

Bool wait )

fd Operating system file descriptor returned from call to SCCPInitAPI. On DOS systems, this parameter is ignored.

message Address of caller's message buffer, where the received message (if any) is returned to the caller. This buffer must be large enough to accommodate any of the messages defined by the SccpAllMsgs structure (union of all message structures). The actual message structure returned (i.e., which member of the union) depends on the value of the infoBlk.indType field returned (see Details section below).

InfoBlk Address of caller's receive information block, where information regarding the received message (if any) is returned to the caller. The structure of the receive information block is as follows.

typedef struct rcvInfoBlk 
{
  U8         board;    /* sending TX Series board             */
  U8         indType;  /* indication/confirm type             */
  U8         evntType; /* event type for status indications   */
  S16        suId;     /* service user id - connectionless    */
                        * msgs only                           */
  SccpConnId connId;   /* connection ID - connection-oriented */
                        * messages only                       */
  U32        opc;      /* originating point code              */
} RcvInfoBlk;

The indication type (indType) identifies the event received and is coded to one of the following values.

SCCPCONNCFM    0xB8    /* Connect confirm                     */
SCCPCONNIND    0xB7    /* Connect indication                  */
SCCPRELIND     0xBE    /* Release indication                  */
SCCPDATIND     0xB9    /* Data (DT1 or DT2)indication         */
SCCPUDATIND    0xB1    /* Unitdata indication                 */
SCCPEDATIND    0xBA    /* Expedited data indication           */
SCCPDACKIND    0xBD    /* Data acknowledge indication         */
SCCPRESETCFM   0xBC    /* Connection reset confirm            */
SCCPRESETIND   0xBB    /* Connection reset indication         */
SCCPSTAIND     0xB2    /* Unsolicited status indication       */
SCCPCOORDIND   0xB3    /* Coordinated OOS indication          */
SCCPCOORDCFM   0xB4    /* Coordinated OOS cnfrm               */
SCCPSTATEIND   0xB5    /* Subsystem state indication          */
SCCPPCSTIND    0xB6    /* Point code state indication         */

Usage of the RcvInfoBlk for each possible event type is described in more detail in the Details section below.

The service provider connection id (spConnId) field from the first event received from the SCCP for each connection must be saved by the user application and used in subsequent requests associated with that connection.

Wait Not Used.

Return Values

Details

If a message is received, it copies the message to the caller's message buffer, performing any necessary byte order translation to convert to the host's native byte ordering. Information relative to the received message is returned to the caller in the infoBlk parameter.

The user application must periodically call this routine to receive messages from the SCCP layer.The event structure associated with a received message and the information returned in the receive information block depend on the type of message received from the SCCP layer (as determined by the value of the infoBlk.indType field). The valid data returned for each possible received message is as follows:



(Page 14 of 19 in this chapter)


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