ACC X.25 Protocol User's Guide

X.25 Application Programming
Programmatically Configuring X.25
Chapter 4 67
Programmatically Configuring X.25
The previous chapter discussed how to create an X.25 configuration
through the TTGEN configuration file. This section discusses how to
programmatically modify the X.25 link and virtual circuit configurations
and when those changes will take effect. Before you begin to modify an
X.25 link’s configuration, all of the VC ZLUs and the X.25 link ZLU must
be disabled (using zcntl). You may then dynamically add and delete VC
ZLUs and modify the various X.25 related parameters. When the X.25
link ZLU is enabled, the ACC X.25 subsystem scans through all of the
ZLUs in the ZCOM subsystem and locates all of the VC ZLUs associated
with that link. At that point, the X.25 links configuration is “frozen” and
no further changes should be made.
Configuring the X.25 Link
The X.25 link configuration information is stored in the Logical Data
Area of the Logical Terminal Table (LTT) for the X.25 link ZLU, and in
fields of the Physical Terminal Table (PTT). The format of the X.25 link
Logical Data Area is defined by the x25cnt_type data structure in the
include file /opt/acc/include/zcom/zcomx25.h. Note that in addition to
configuration information, this structure also contains run-time data
such as link statistics and link state. This structure contains the X.25
Timer values, Logical Channel assignment table, default Level 3 packet
and window sizes, and the auto-start option. Use the zltstore() routine to
find the offset of the data structure (Logical Data Area) in the LTT and
then use zltup() to update the contents of the data structure. The link
physical device type, poll, select, and link option words are configured
with the zcntl() routine using the Set Terminal Parameters request code.
The X.121 address is kept in the ptcnfg field in the PTT. This can be
modified using the zptup() routine. To dynamically create or to delete an
X.25 link ZLU, you use the zconfig() routine. Note that if zconfig() is used
to dynamically add or delete the X.25 link ZLU, you must notify the ACC
X.25 subsystem by generating an X.25 reconfiguration System Event
Message. The zconfig() routine is used to perform this operation as well
and must be issued after the ZLU has been added or deleted. See the
example below to see how to generate the reconfiguration system event
message.