(Page 16 of 35 in this chapter)


TxX25LinkDefine

Description

Sets up the packet as an X.25 link definition packet, with required parameters.

Prototype

short TxX25LinkDefine (TXMNGPKT *req,
char *name,
unsigned short type,
unsigned short channel,
unsigned short chantype,
unsigned long baud)

req Pointer to packet to be set.

name Pointer to X.25 link name (null term ASCII string).

type Link subtype = ( DTE | DCE)] and options (#define or ENUM statement).

channel Physical or logical port number to which the link will attach (or with XLINK_MVIP to use logical MVIP port).

chantype Type of link: XLINK_PHYSICAL | XLINK_LOGICAL | XLINK_MVIP (#define or ENUM statement).

baud Baud rate to apply to port (in bits/sec). External clocking if 0.

Return Values

TX API completion code.

Details

All other link definition fields other than required parameters are left unmodified.

Note: TxX25LinkDefine assumes that the packet is already a properly initialized Define Link packet. Applications should call TxX25LinkDefault some time prior to calling TxX25LinkDefine to assure that the packet contains all the proper default values.

Applications should call TxX25LinkDefine when to use a packet to create a link for the first time, or to returning to link defaults.

The following values for type short parameter of X25 link Define function. This parameter will normally be just the following DTE/DCE type, the defaults for the options are all zero.
Value

Description

TXX25_LINK_DTE

Link is DTE (default).

TXX25_LINK_DCE

Link is DCE (may be configured).

Note: The V.24 or V.35 POD hardware must be physically configured to match the type parameter.

Options for LINK into are OR'ed into the link type for a non-standard configuration.

Initial State Options:
Option

Description

TXX25_LINK_INITENAB

Initial state is enabled (default is disabled).

TXX25_LINK_INILOCK

Initial state is locked (no more new calls: use only for links with PVCs)

Modem-related options:
Option

Description

TXX25_FLAGS_NONE

No special modem control (default).

TXX25_FLAGS_MODEM

Dial up modem supporting RI, CD.

TXX25_FLAGS_V24

Leased line supporting CD, RTS,CTS.

TXX25_FLAGS_IDLE

Idle line with continuous flags (x.25sync).

TXX25_FLAGS_NRZI

NRZ-I bit encoding.

Values for L2 modulus value options:
Option

Description

TXX25_LINK_MOD8

Default

TXX25_LINK_MOD128

MOD128

The following example code uses no options:

TxX25LinkDefine ( , TXX25_LINK_DCE, );

The following example code specifies several options:

TxX25LinkDefine ( , TXX25_LINK_DCE

TXX25_LINK_MOD128 |

TXX25_FLAGS_V24 |

TXX25_LINK_IDLE, );

The following bit values set in type parameter values for hardware type:
Value

Description

TXX25_LINK_PHYSICAL

Port is a physical serial port (default).

TXX25_LINK_LOGICAL

Port is a board-to-board link.

TXX25_LINK_MVIP

Port is an MVIP channel.

Note: Bits are reserved to configure five additional types that may be defined in the future.

See Also

TxX25LinkDefault



(Page 16 of 35 in this chapter)


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