ACC X.25 Protocol User's Guide

X.25 Application Programming
ZX25L2STAT_RCVR (3X) — ACC X.25
Chapter 4118
NOTES The calling program (or thread) must call zx25info before calling this
routine. In a multi-threaded application, each thread must make a
separate call to zx25info using a per-thread ZCOM X.25 access data
buffer zxip. The per-thread data buffer can then be used to call this
routine.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomx25.h>
int ierr;
zx25info_type zxi;
zaddr_type lzaddr;
zaddr_type pzaddr;
/* Allocate our primary program ZLU. */
if (ierr = zopen (&pzaddr, 1, "myprgrm", 0)) exit (ierr);
/* Issue the prerequisite zx25info() call. */
if (ierr = zx25info (&zxi, "auxprog")) exit (ierr);
/* User written routine to find X.25 link ZLU. Returns its address. */
if (ierr = Get_Link_ZLU(&lzaddr)) exit (ierr);
/* Tell ZCOM to send X.25 link status to our application. */
if (ierr = zx25l2stat_rcvr (&zxi, Zc_ADD_PRIMARY, &lzaddr, &pzaddr)) {
/* error return code */
}
else {
/* good return code */
}
/* This code disables X.25 link status messages. */
if (ierr = zx25l2stat_rcvr (&zxi, Zc_DEL_PRIMARY, &lzaddr, &pzaddr)) {
/* error return code */
}
else {
/* good return code */
}