(Page 10 of 29 in this chapter) Version


Mtp3InitLinkCfg

Description

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

Prototype

MTP3_STATUS Mtp3InitLinkCfg (U8 board,
MTP3LinkCfg *pLinkCfg,
S16 linkNo,
U8 linkType,
U32 dpc)

board TX board number on which the desired MTP 3 task resides. Valid range is 1 to MAXBOARD (currently 8).

pLinkCfg Pointer to the MTP3LinkCfg structure to be initialized.

linkNo The link number to assign to this data link. Valid range is 0 to the maximum number of links - 1 configured with the Mtp3SetGenCfg function.

linkType The type of link. Must be either MTP3LNK_ANSI, MTP3LNK_ANSI88, or MTP3LNK_CCITT.

dpc Point code of the remote end point of this link.

Return values

Details

This function is provided as a quick way for an application to initialize an MTP3LinkCfg structure before calling Mtp3SetLinkCfg to set the data link configuration parameters. This function sets the link number, link type, and destination point code as specified and initializes all other fields in the Mtp3SetLinkCfg structure to their defaults. Refer to the MTP3LinkCfg structure for more information about its fields and their default values.

Note: There is a single transmit queue for delivery to the next lower layer (MTP 2). This queue will build up if the application is sending faster than MTP 2 can transmit data over the link. The pxQlen fields represent the queue length thresholds at which the internal transmit congestion priority is raised to the next level. For example, the default for p1Qlen is 32. This means that when the transmit queue size reaches 32 messages, the internal transmit 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 new messages from an application when the stack is backed up. If a new 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 for transmission to MTP 2 (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. Refer to Section 2.3.4, Congestion Priorities, for further information.

The following structures are used for individual data link configuration in the MTP 3 task. Typically a pointer to an MTP3LinkCfg structure is passed to Mtp3InitLinkCfg 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 Mtp3InitLinkCfg. 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 Mtp3SetLinkCfg function, which actually sets the configuration.

Most of the default values provided by Mtp3InitLinkCfg are be adequate for most applications.

typedef struct _Mtp3SetLinkCfg
{
  U16              lnkSetId;            /* Link set number link belongs 
                                         * to                          */
  U32              adjDpc;              /* Adjacent Destination Point
                                         * Code                        */
  U8               lnkPrior;            /* Link priority within the link 
                                         * set                         */
  U8               spare1;              /* Alignment                   */
  U16              msgSize;             /* Message length              */
  U8               msgPrior;            /* Management message priority */
  U8               lnkType;             /* Link type                   */
  U8               maxSLTtry;           /* Maximum times to retry SLTM */
  U8               spare2;              /* Alignment                   */
  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                maxCredit;          /* Max credit                  */
  U16               lnkId;              /* Changeback link id          */
  U8                lnkTstSLC;          /* Link selection code for link 
                                         * test                        */
  U8                tstLen;             /* Link test pattern length    */
  U8                tst[MTP3LNKTSTMAX]; /* Link test pattern           */
  U8                ssf;                /* Sub service field           */
  Mtp3DLSapTimerCfg tmr;                /* Timer configuration         */
  U16               dstProcId;          /* Destination processor id    */
  U8                dstEnt;             /* Destination entity          */
  U8                dstInst;            /* Destination instance        */
  U8                prior;              /* Priority. Unused            */
  U8                route;              /* Route. Unused               */
  U8                selector;           /* Lower layer selector. 
                                         * Internal use only.          */
  U8                spare3;             /* Alignment                   */
  MemoryId          mem;                /* Memory region and pool id.
                                         * Unused                      */
  U8                dpcLen;             /* DPC or OPC length           */
  U8                spare4;             /* Alignment                   */
  S16               spId;               /* Service provider id         */
  U32               myOpc;              /* My OPC for Adjacent DPCs    */
  U8                dis;                /* Initial link state          */
  U8                portType;           /* Port type                   */
} MTP3LinkCfg;
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 Mtp3SetLinkCfg with the same linkNo.
Field Name

Default

Valid Values

Description

lnkSetId

1

1 - 16

Link set number of which this link is a member.

adjDpc

None

0 - 0xFFFFFF

Adjacent Destination Point Code. Must be specified via the dpc parameter.

lnkPrior

0

0 - 3

Link priority within the link set.

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...

msgSize

272 octets

1 - 65535

Maximum message length across this link. The default is highly recommended.

msgPrior

3

0 (lowest) -3 (highest)

Management message priority on this link.

lnkType

None

One of:

MTP3LNK_ANSI
MTP3LNK_ANSI88
MTP3LNK_CCITT

Protocol variant used on this link. Must be specified via the linkType parameter

maxSLTtry

2

0 - 255

Maximum times to retry SLT message.

p0Qlen

16

2 - 1024

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

p1Qlen

32

(p0Qlen + 2) - 1024

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

p2Qlen

64

(p1Qlen + 2) - 1024

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

p3Qlen

128

(p2Qlen + 2) - 1024

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

discPrior

0

0 - 3

Discard priority

lnkTstSLC

spId (linkNo) - 1

0 - 15

Link selection code for link test. This must match the configured value at the adjacent SP.

tstLen

3

1 - 15

Link test pattern length

tst

"TST"

N/A

Link test pattern

ssf

Based on lnkType

One of:


MTP3SSF_NAT
MTP3SSF_INTL
MTP3SSF_RESERVE
MTP3SSF_SPARE

Subservice field. Default based on lnkType as shown here.

LNK_ANSI or LNK_ANSI88
LNK_CCITT
Never defaulted to this.
Never defaulted to this.

tmr

See the following structure

See following structure for field defaults.

Timer configuration structure. Refer to the MTP3LinkTimerCfg structure.

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

dis

0

One of:

0 - Enabled
1 - Disabled

Initial link state.

portType

PORT_TYPE_SERIAL

One of:

PORT_TYPE_SERIAL
PORT_TYPE_TDM
PORT_TYPE_REMOTE

Physical port type.

PORT_TYPE_REMOTE indicates the link is physically present on the redundant board.

Use PORT_TYPE_SERIAL for V.35 links.

Use PORT_TYPE_TDM for T1/E1/MVIP/H.100/H.110 links.

typedef struct _Mtp3LinkTimerCfg
{
  TimerCfg t1;  /* Delay to avoid mis-sequencing on changeover     */
  TimerCfg t2;  /* Waiting for changeover ack                      */
  TimerCfg t3;  /* Delay to avoid mis-sequencing on changeback     */
  TimerCfg t4;  /* Waiting for first changeback ack                */
  TimerCfg t5;  /* Waiting for second changeback ack               */
  TimerCfg t6;  /* Delay to avoid mis-sequencing on rerouting      */
  TimerCfg t7;  /* Waiting for link connection ack                 */
  TimerCfg t11; /* Transfer restricted timer                       */
  TimerCfg t12; /* Waiting for uninhibit ack                       */
  TimerCfg t13; /* Waiting for forced uninhibit                    */
  TimerCfg t14; /* Waiting for inhibition ack                      */
  TimerCfg t17; /* Delay to avoid oscillation of initial alignment 
                 * failure                                         */
  TimerCfg t22; /* Local inhibit test timer                        */
  TimerCfg t23; /* Remote inhibit test timer                       */
  TimerCfg t24; /* Stabilizing timer                               */
  TimerCfg t31; /* BSN requested timer                             */
  TimerCfg t32; /* SLT timer                                       */
  TimerCfg t33; /* Connecting timer                                */
  TimerCfg t34; /* Periodic signaling link test timer              */
} MTP3LinkTimerCfg;

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 Mtp3SetLinkCfg with the same linkNo. Unless otherwise specified, the timer names correspond to the CCITT specification. Differences from the ANSI and/or CCITT specification are noted in parentheses in the description.
Field Name

Default
(in tenths/secs)

Range

Description

t1

10

1 - 65535

Delay to avoid mis-sequencing on changeover

t2

10

1 - 65535

Waiting for changeover acknowledgement

t3

10

1 - 65535

Time controlled diversion - Delay to avoid mis-sequencing on changeback

t4

10

1 - 65535

Waiting for first changeback acknowledgement

t5

10

1 - 65535

Waiting for second changeback acknowledgement

t6

10

1 - 65535

Delay to avoid mis-sequencing on controlled rerouting

t7

20

1 - 65535

Waiting for data link connection acknowledgement

t11

600

1 - 65535

Transfer restricted timer

t12

12

1 - 65535

Waiting for uninhibit acknowledgement

t13

10

1 - 65535

Waiting for forced uninhibit

t14

30

1 - 65535

Waiting for inhibition acknowledgement

t17

10

1 - 65535

Delay to avoid oscillation of initial alignment failure

t22

1100

1 - 65535

Local inhibit test timer (ANSI timer T20)

t23

1100

1 - 65535

Remote inhibit test timer (ANSI timer T21)

t24

40

1 - 65535

Stabilizing timer (ANSI timer N/A)

t31

50

1 - 65535

BSN requested timer (internal timer, N/A to ANSI or CCITT specs)

t32

100

1 - 65535

SLT timer (internal timer, N/A to ANSI or CCITT specs)

t33

200

1 - 65535

Connecting timer (internal timer, N/A to ANSI or CCITT specs)

t34

600

1 - 65535

Periodic signaling link test timer (internal timer, N/A to ANSI or CCITT specs)

See Also

Mtp3MgmtInit, Mtp3SetGenCfg, Mtp3SetLinkCfg



(Page 10 of 29 in this chapter) Version


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