ACC X.25 Protocol User's Guide
X.25 Application Programming
Introduction
Chapter 4 65
NOTE This example is intended to show the general order of how these routines
are called and so the parameters have been omitted.
#include <zcom/zcomsys.h>
#include <zcom/zcomx25.h>
/* Initialize access to the ZCOM subsystem */
zinit(...);
/* Create a program ZLU for inbound events */
zopen(&pzlu, ...);
/* Initialize access to the ACC X.25 subsystem */
zx25info(...);
/* Scan through the current active config and look for X.25 links and VCs */
Repeat
zinfo (... PTT ...); /* Grab Physical Terminal table entry. */
zinfo (... LTT ...); /* Grab Logical Terminal table entry. */
/* Check parameters to see if this is an X.25 link or VC zlu. */
Until (All ZLUs searched)
/* Optionally configure missing X.25 links and/or VCs. */
/* Optionally modify X.25 link and/or VC configuration. */
/* Scan through all known VC ZLUs and setup the receiver,enable and activate*/
FOR (each VC ZLU)
{
zset_rcvr (&l3zlu, ...);
zcntl (&l3zlu, mode, ZCOM_MRQCODE_ACT, ...);
zcntl (&l3zlu, mode, ZCOM_MRQCODE_ENB, ...);
}
/* Scan through the X.25 link ZLUs and enable them. Optionally setup
to receive Level 2 unsolicited status messages.*/
FOR (each X.25 link ZLU)
{
zx25l2stat_rcvr (&l2zlu, ...); /* Optional */
zcntl (&l2zlu, mode, ZCOM_MRQCODE_ACT, ...);
zcntl (&l2zlu, mode, ZCOM_MRQCODE_ENB, ...);
}
/* Main body of application */
WHILE (forever)
{










