ACC X.25 Protocol User's Guide
X.25 Application Programming
Sending and Receiving Data
Chapter 4 77
Receiving and Confirming Interrupt Data
Inbound interrupt data packets always arrive in unsolicited status
messages. Specifically the data returned by zread() will have a message
type (mstype) of ZCOM_MSTYPE_RSLT, a message request code
(mrqcode) of ZCOM_MRQCODE_STATUS, and a message status code
(mrqstat) value of ST26INTPT. From the example above, rlen contains
the length of the interrupt data and rdata contains the interrupt data,
itself.
In the X.25 protocol, only one unconfirmed Interrupt Data Packet is
allowed at any given point in time on a Virtual Circuit. If a second
Interrupt Data packet arrives before the first is confirmed, it causes the
VC to be reset. The VC option word is used to control how the
confirmation is handled for inbound interrupt data. If the INTC bit
(bit 1) is set to zero, then the application can simply read the interrupt
data with no further action needed. The X.25 firmware running on the
card automatically sends an Interrupt Confirm packet immediately upon
arrival of an Interrupt Data Packet.
However, if the INTC bit in the option word is set to one, then the
application is expected to confirm each and every arriving interrupt
packet using the ZCOM API call zx25int_conf(). Further, the application
must confirm an inbound interrupt data before the T26 timer expires
(nominally 180 seconds). Setting the INTC bit allows two cooperating
applications to receive end-to-end acknowledgment for the processing of
interrupt data. The following code fragment demonstrates how to
confirm and interrupt packet:
#include <zcom/zcomsys.h>
#include <zcom/zcomx25.h>
int rc; /* General return code. */
zx25info_type zxi; /* ZCOM X.25 access data structure. */
zaddr_type vc_zlu; /* Our X.25 Virtual Circuit ZLU. */
/*
Issue a request to send interrupt confirmation on the VC ZLU. Note: For the
purposes of this example, assume the vc_zlu has already been initialized.
*/
if (rc = zx25int_conf(&zxi, &l3zlu)) {
/* Handle Error */
}










