(Page 12 of 29 in this chapter) Version


Mtp3InitNSapCfg

Description

Initializes the provided network SAP configuration structure with default values and the link type specified.

Prototype

MTP3_STATUS Mtp3InitNSapCfg (MTP3NSapCfg *pNSapCfg,
U8 linkType)

pNSapCfg Pointer to the MTP3NSapCfg structure to be initialized.

linkType Type of link. This must be either MTP3LNK_ANSI, MTP3LNK_ANSI88, or MTP3LNK_CCITT.

Return Values

Details

This function is provided as a quick way for an application to initialize an MTP3NSapCfg structure before calling Mtp3SetNSapCfg (see next section) to set the network SAP configuration parameters. This function sets the link type as specified and initializes all other fields in the MTP3NSapCfg structure to their defaults.

Refer to the MTP3NSapCfg structure for more information about its fields and their default values.

The pxQlen fields represent the queue length thresholds at which the internal congestion priority is raised to the next level. For example, the default for p1Qlen is 16. This means that when the receive queue size reaches 16 messages, the internal congestion priority is raised from 0 to 1. 0 is the lowest priority, 3 is the highest. The congestion priority in combination with the discard priority (discPrior field) is used to determine what to do with newly received messages when flow control is on. If a newly received message has a priority less than the congestion priority and less than the discard priority, the message is discarded. Otherwise MTP 3 attempts to queue the message (assuming buffer space exists). Therefore a discard priority of 0 means that all messages will attempt to be queued regardless of the internal congestion priority. The congestion priority is also used to notify adjacent signaling points of the level of congestion being experience by this node so that they may re-route future messages or take other corrective actions. Refer to section Section 2.3.4, Congestion Priorities, for further information.

The following structure is used for network service access point (NSAP) configuration in the MTP 3 task. Typically a pointer to an MTP3NSapCfg structure is passed to Mtp3InitNSapCfg where default values are set. These defaults are specified in the following table. If there is no default, either the field is unused or its value is passed as a parameter to Mtp3InitNSapCfg. After initialization, an application may override zero to all of these values and then pass the pointer to the Mtp3SetNSapCfg function, which actually sets the configuration.

Most of the default values provided by Mtp3InitNSapCfg will be adequate for most applications.

typedef struct _Mtp3NSAPCfg
{
  S16      p0QLen;    /* Queue threshold where cong. prior is increased
                       * to 0                                          */
  S16      p1QLen;    /* Queue threshold where cong. prior is increased
                       * to 1                                          */
  S16      p2QLen;    /* Queue threshold where cong. prior is increased
                       * to 2                                          */
  S16      p3QLen;    /* Queue threshold where cong. prior is increased
                       * to 3                                          */
  U8       discPrior; /* Discard priority                              */
  U8       lnkType;   /* Link type                                     */
  U8       selector;  /* Upper layer selector                          */
  U8       spare1;    /* Alignment                                     */
  MemoryId mem;       /* Memory region and pool id. (Unused)           */
  U8       dpcLen;    /* DPC or OPC length                             */
  U8       prior;     /* Priority                                      */
  U8       route;     /* Route                                         */
  U8       spare2;    /* Alignment                                     */
  U32      opc;       /* Default opc for user layer.  Internal use.    */
} MTP3NSapCfg;

Fields that do not appear in the following table are either unused or for internal use only. Those fields should not be modified by the user. All of the NSAP configuration fields are can be updated by a subsequent call to Mtp3SetNSapCfg.
Field Name

Default

Valid Values

Description

p0Qlen

8

2- 1024

Receive queue length threshold at which the congestion priority is raised to 0.

p1Qlen

16

(p0Qlen + 2) - 1024

Receive queue length threshold at which the congestion priority is raised to 1.

p2Qlen

32

(p1Qlen + 2) - 1024

Receive queue length threshold at which the congestion priority is raised to 2.

p3Qlen

64

(p2Qlen + 2) - 1024

Receive queue length threshold at which the congestion priority is raised to 3.

discPrior

0

0 - 3

Discard priority. See note above.

lnkType

None

One of:

MTP3LNK_ANSI
MTP3LNK_ANSI88
MTP3LNK_CCITT

Protocol variant used by this NSAP. Must be specified via the linkType parameter.

dpcLen

Based on lnkType

One of:


24
14

DPC and OPC length. Defaults based on lnkType as shown here.

LNK_ANSI or LNK_ANSI88
LNK_CCITT

See Also

Mtp3MgmtInit, Mtp3SetNSapCfg



(Page 12 of 29 in this chapter) Version


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