ACC X.25 Protocol User's Guide
88 Chapter4
X.25 Application Programming
ZX25CALLACC (3X) — ACC X.25
NOTES 1. The X.121 call address consists of 8 bytes, and it is used a a 15-digit
BCD number plus a length digit in the last position. For example, in
hex:
DD DD DD DD DD DD DD DL
where D is a 4-bit BCD digit, whose range is from 0 to 9
L is a 4-bit length digit, whose range is from 1 to 15
The 15 address digits should be left-justified and without leading
zero. The length digit indicates the number of address digits. For
example,to specify addresses “1773648” and “123456789012”, the hex
values of the address buffer s hould be:
17 73 64 8X XX XX XX X7 for 1773648
12 34 56 78 90 12 XX XC for 123456789012
where X is unused digit (normally should be set to zero).
2. 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 a ccess 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 vzaddr;
char fbuf[size]; /* user-defined size */
int flen;
char ubuf[size]; /* user-defined size */
int ulen;
int dbit;
unsigned char clngaddr[8]; /* user-defined size */
unsigned char caldaddr[8]; /* user-defined size */
if (ierr = zx25callacc (&zxi, &vzaddr, fbuf, flen, ubuf,
ulen, dbit, clngaddr, caldaddr)) {
/* error return code */
}
else {
/* good return code */
}










