(Page 11 of 29 in this chapter) Version


Mtp3InitLinkSetCfg

Description

Initializes the provided link set configuration structure with default values and the specified link set number and destination point code.

Prototype

MTP3_STATUS Mtp3InitLinkSetCfg
(MTP3LinkSetCfg *pLinkSetCfg,
S16 linkSetNo,
U32 dpc)

pLinkSetCfg Pointer to the MTP3LinkSetCfg structure to be initialized.

linkSetNo Number to assign to this link set. Valid range is 1 to the maximum number of link sets defined in the call to Mtp3SetGenCfg.

dpc Destination point code associated with this link set.

Return Values

Details

This function is provided as a quick way for an application to initialize an MTP3LinkSetCfg structure before calling Mtp3SetLinkSetCfg (see next section) to set the link set configuration parameters. This function sets the link set number and destination point code as specified and initializes all other fields in the MTP3LinkSetCfg structure to their defaults.

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

The following structures are used for individual link set configuration in the MTP 3 task. Typically a pointer to an MTP3LinkSetCfg structure is passed to Mtp3InitLinkSetCfg where default values are set. These defaults are specified below. If there is no default, either the field is unused or its value is passed as a parameter to Mtp3InitLinkSetCfg. In the latter case the parameter name is specified below. After initialization, an application may override zero to all of these values and then pass the pointer to the Mtp3SetLinkSetCfg function, which actually sets the configuration.

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

typedef struct _Mtp3LnkSetCfg   /* MTP Level 3 link set configuration */
{
  U16            lnkSetId;                 /* Link set number         */
  U32            adjDpc;                   /* Adjacent Destination Point
                                            * Code                    */
  Bool           loadShar;                 /* Load sharing indication
                                            * between links           */
  U8             spare1;                   /* Alignment               */
  U16            minNmbActLnk;             /* Target number of active
                                            * links                   */
  U16            nmbCmbLnkSet;             /* Number of defined routes
                                            * over this link set      */
  MTP3CmbLnkSet  cmbLnkSet[MTP3MAXCMBLNK]; /* Combined link sets.  See
                                            * structure below.        */
} MTP3LnkSetCfg;

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. Field names in bold indicate that the field can be updated on subsequent calls to Mtp3SetLinkSetCfg with the same lnkSetId (lnkSetNo).
Field Name

Default

Range

Description

lnkSetId

None

1 -16

Link set number. Must be specified via the lnkSetNo parameter.

adjDpc

None

0 - 0xFFFFFF

Adjacent destination point code of all links in this link set. Must be specified via the dpc parameter.

minNmbActLnk

16

0 - 16

Target number of links to keep active at any given time.

nmbCmbLnkSet

0

0 - 256

Number of combined link sets.

cmbLnkSet

Entire structure zeroed

See following structure

Array of combined link set structures.

typedef struct _Mtp3CmbLnkSet  /* MTP Level 3 combined link set cfg */
{
  U16  cmbLnkSetId;            /* Combined link set ID              */
  U8   lnkSetPrior;            /* Link set priority                 */
  U8   spare1;                 /* Alignment                         */
} MTP3CmbLnkSet;
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. Field names in bold indicate that the field can be updated on subsequent calls to Mtp3SetLinkSetCfg with the same lnkSetId (lnkSetNo).
Field Name

Default

Range

Description

cmbLnkSetId

None

1 - 256

Combined link set number.

lnkSetPrior

None

0 - 3

Priority of this link set relative to other link sets containing this route.

Note: It is crucial that priorities are not skipped. A single link must always be zero. Two links can be assigned priorities 0,0 or 0,1, etc.

See Also

Mtp3MgmtInit, Mtp3SetLinkCfg, Mtp3SetLinkSetCfg



(Page 11 of 29 in this chapter) Version


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