SCCPRetrieveMessage

Retrieves the next message from the SCCP layer.

Prototype

DWORD SCCPRetrieveMessage ( CTAHD ctahd, SccpAllMsgs *message, SccpRcvInfoBlk *infoBlk, Bool wait)

Argument

Description

ctahd

Natural Access handle returned by ctaCreateContext.

message

Pointer to the address of the caller's message buffer where the received message (if any) is returned to the caller.

infoBlk

Pointer to the address of the 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 board number             */
  U8         indType;  /* indication/confirm type             */
  U8         evntType; /* event type for status indications   */
  U8         spare1;   /* spare for alignment                 */
  S16        suId;     /* service user id - connectionless
                        * msgs only                           */
  U16        spare2;   /* spare for alignment                 */
  SccpConnId connId;   /* connection ID - connection-oriented
                        * messages only                       */
  U32        opc;      /* originating point code              */
} RcvInfoBlk;

Refer to the Details section for more information.

wait

Not used.


Return values

Return value

Description

SCCP_SUCCESS

 

SCCPERR_NOMSG

No event messages waiting.

CTAERR_BAD_ARGUMENT

One or more arguments are invalid.

CTAERR_DRIVER_RECEIVE_FAILED

Service could not communicate with the device driver.

CTAERR_INVALID_CTAHD

Natural Access handle is invalid.


Details

SCCPRetrieveMessage receives events (messages) from the SCCP layer. Refer to Establishing connections for more information.

When a message is received, SCCPRetrieveMessage copies the event to the caller's event buffer and performs any necessary byte order translations to convert to the host's native byte ordering. Information about the received message is returned to the caller in the infoBlk parameter.

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 out of service (OOS) indication

SCCPCOORDCFM

0xB4

Coordinated out of service (OOS) confirm

SCCPSTATEIND

0xB5

Subsystem state indication

SCCPPCSTIND

0xB6

Point code state indication

SCCPCONNAUDCFM

0xBF

Connection audit confirmation

SCCPINACTIND

0xE0

Connection inactivity indication

SCCPRUNSTATEIND

0xEF

Run state (primary/backup/standalone) indication


 

The evntType field identifies the actual message received for status and connection status indications.

Note: The application must save the service provider instance id (spInstId) field from the first event received from the SCCP layer for each connection and use it in subsequent requests associated with that connection.

The event structure associated with a received message depends on the type of message received from the SCCP layer. Refer to Event reference overview for more information.