(Page 6 of 9 in this chapter) Version


MTP3RetrieveMessage

Description

Checks for and retrieves an incoming message from the MTP 3 layer.

Prototype

short MTP3RetrieveMessage (U8 board,
void *pMsgInd,
short *Length)

board TX board number.

pMsgInd Pointer to buffer where the received message will be returned.

Length Pointer to where the length of the indication is returned.

Return Values

Details

This routine must be called periodically to process incoming messages. This can be done using a polling process or used in conjunction with MTP3SyncObj and operating system specific mechanisms to retrieve a message only when notification has indicated that one is available.

Note: The size of the buffer identified in the pMsgInd field must be large enough to contain a data indication.

Data Indication

This structure will be received by an application, via the MTP3RetrieveMessage function, when data matching the application's service information octet is received from a remote signaling point.

typedef struct data_ind_s 
  U8   code;           /* MTP3_DATA_IND (0x1A)              */
  U16  suId;           /* Service User Id from bind request */
  U32  opc;            /* Originating Point Code            */
  U32  dpc;            /* Destination Point Code            */
  U8   srvInfo;        /* Service information octet         */
  U8   lnkSel;         /* Link selector field               */
  U8   data[MAXDATA]   /* Received data packet              */
DATA_IND;
Field Name

Possible Values

Description

code

MTP3_DATA_IND

This code identifies whether an indication is data or status. Always MTP3_DATA_IND for data indications.

suId

suId specified in original MTP3Bind request

Service user identifier. This will always be the suId used by this application in the MTP3Bind request.

opc

0 - 0xFFFFFF

Point code of the remote node that sent this data.

dpc

0 - 0xFFFFFF

Destination point code from the routing label of the incoming message.

srvInfo

srvInfo specified in original MTP3Bind request

Service information octet from the incoming message. This specifies the upper layer protocol and the network indicator.

lnkSel

0 - 15 (ITU-T)
0 - 31 (ANSI)
0 - 255 (TUP only)

Link selector field from the incoming message.

data

Anything

The data that was received.

Status Indication

This structure will be received by an application, via the MTP3RetrieveMessage function, when an important status change occurs on a circuit matching the application's service information octet. These are generated by the local MTP 3 layer. Refer to Section 2.11, Status Indications, for detailed information about each possible status indication.

typedef struct stat_ind_s {
  U8   code;      /* MTP3_STAT_IND (0x7A)                 */
  U16  suId;      /* Service user Id from bind request    */
  U32  pc;        /* Point Code related to the status ind */
  S16  status;    /* Status indicator. See defines above  */
  U8   priority;  /* Priority of this status indication   */
} STAT_IND;
Field Name

Possible Values

Description

code

MTP3_STAT_IND

This code identifies whether an indication is data or status. Always MTP3_STAT_IND for status indications.

suId

suId specified in original MTP3Bind request

Service user identifier. This will always be the suId used by this application in the MTP3Bind request.

pc

0 - 0xFFFFFF

Point code of the remote node affected by this status indication.

status

One of:

StatPaused
StatResumed
StatCongested
StatUsrUnavail
StatRestart
StatRestartEnd
StatCongestionEnds
StatPrimary
StatBackup
StatStandAlone

Status event that occured:

Data traffic paused
Data traffic resumed
Data congested
User unavailable
Restart in progress
Restart completed
Congestion has ended
MTP 3 is primary in redundant configuration
MTP 3 is backup in redundant configuration
MTP is not in a redundant configuration

priority

0 (lowest) - 3 (highest)

Current congestion level for congestion related indications.

Extended Status Indication

If the application has registered to receive extended status indications, the following structure will be received by an application, via the MTP3RetrieveMessage function, when an important status change occurs on a link. These indications are generated by the local MTP 3 layer. Refer to Section 2.12, Extended Status Indications, for detailed information concerning each possible extended status indication.

type def struct xstat_ind_s {
  U8   code;    /* MTP3_XSTAT_IND (0x3A)   */
  U16  suId;    /* Service User identifier */
  U16  status;  /* Extended Status Type    */
  U16  link;    /* Affected MTP3 link      */
  U16  spare1;  /* Reserved for future use */
  U16  spare2;  /* Reserved for future use */
} XSTAT_IND;
Field Name

Possible Values

Description

code

MTP3_XSTAT_IND

This code identifies the type of indication (i.e. data or status). The value is always MTP3_XSTAT_IND for extended status indications.

suId

suId specified in original MTP3Bind request

Service user identifier. This will always be the suId used by this application in the MTP3Bind request.

link

0-15

The link number of the affected MTP 3 link.

status

One of the following:

XStatLinkUp
XStatLinkDown
XStatLinkInh
XStatLinkInhDen
XStatLinkUninh
XStatLinkUninhDen
XStatLinkRemBlock
XStatLinkRemUnblock
XStatLinkLocBlock
XStatLinkLocUnblock

The status event that occurred.

Link Up
Link Down
Link Inhibited
Link Inhibit Denied
Link Uninhibited
Link Uninhibit Denied
Link Remotely Blocked
Link Remotely Unblocked
Link Locally Blocked
Link Locally Unblocked

spare1

N/A

Reserved for future use.

spare2

N/A

Reserved for future use.

Bind Confirm

A bind confirm is received in response to a previous bind request to MTP 3. The following structure shows the fields in a bind request:

typedef struct bind_cfm_s {
  U8    code;    /* bind request packet type 0x04     */
  S16   suId;    /* Service user ID from bind request */
  S16   sapId;   /* SAP identifier from bind request  */
} BIND_CFM
Field Name

Possible Values

Description

code

MTP3_BIND_CFM

This code identifies the type of indication. Always MTP3_BIND_CFM for bind confirmations.

suId

suId specified in MTP3Bind request

Service user identifier. This will always be the suId used by this application in the MTP3Bind request.

sapId

sapId specified in MTP3Bind request

Service access point identifier. This will always be the sapId used by this application in the MTP3Bind request.

See Also

MTP3Bind, MTP3RegXStaReg, MTP3SyncObj



(Page 6 of 9 in this chapter) Version


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