ACC X.25 Protocol User's Guide

X.25 Application Programming
Programmatically Configuring X.25
Chapter 4 69
/* rdata.data.termret.zaddr now contains X.25 link ZLU (zcom address). */
l2zlu = rdata.data.termret.zaddr;
/*
Retrieve the contents of the LTT including the Logical Data Area
*/
if (rc = zinfo(&l2zlu, 1, (char *)&ltt_lda, sizeof(ltt_lda)) {
/* Handle Error */
}
/*
Now find the Logical Data Area in the LTT (Note: X25LTAP, X25CNTN, and
X25LTSZ are all defined in zcomx25.h).
*/
if (rc = zltstore(X25LTAP, X25CNTN, X25LTSZ, &lda_offset)) {
/* Handle Error */
}
ldap = (x25cnt_type *)((char *)&ltt_lda + lda_offset);
ldap->ltenbl = X25LTENBL; /* Specify ”no_autostart” */
ldap->lthpc = 0; /* No PVCs */
ldap->ltlic = 0; /* No one-way incomming SVCs */
ldap->lthic = 0;
ldap->ltltc = 32; /* 2 two-way SVCs starting at LCN 32. */
ldap->lthtc = 33;
ldap->ltloc = 0; /* No one-way outgoing SVCs. */
ldap->lthoc = 0;
ldap->ltiwn = 7; /* Set L3 inbound and outbound window sizes */
ldap->ltown = 7;
ldap->ltipk = 9; /* Set L3 inbound packet size to 512 bytes */
ldap->ltopk = 8; /* Set L3 outbound packet size to 256 bytes */
ldap->ltmT1_res = 1; /* Use T1 timer resolution of 10 milli-seconds */
ldap->ltmT1_mlt = 40; /* Set T1 to 400 milli-seconds. */
ldap->ltmT2_res = 1; /* Use T2 timer resolution of 10 milli-seconds */
ldap->ltmT2_mlt = 20; /* Set T2 to 200 milli-seconds. */
ldap->ltmT34_res = 3; /* Use T3/T4 timer resolution of seconds */
ldap->ltmT34_mlt = 25; /* Set T3/T4 to 25 seconds. */
/*
Now insert the new configuration into the X.25 Link’s LTT
*/
if (rc = zltup(&l2zlu, ldap, sizeof(x25cnt_type), lda_offset)) {
/* Handle Error */
}