HP X.25/9000 Programmer's Guide

78 Chapter5
Receiving and Transmitting Out-of-band Information
Transmitting Out-of-band Events
Transmitting Out-of-band Events
There are three types of out-of-band events that can be sent by the X.25
application: CLEAR packets, RESET packets, and INTERRUPT packets.
These packets can be sent at any time as the program requires. While
Chapter 3 discussed the use of the close() system call for the
transmission of CLEAR packets, this chapter describes the use of the
cause and diagnostic codes, as well as the facilities and user data fields.
Clearing a Switched Virtual Circuit
An SVC can be cleared when one of the processes that use it (X.25 or the
network provider) issues a CLEAR REQUEST packet. A CLEAR
REQUEST packet can be sent by the X.25 application (with a close()
call), or it is be sent if the process terminates without executing a
close() call.
Once a CLEAR REQUEST packet is issued, data cannot be sent or
received over the connection because the connection is destroyed. The
X.25 application can control the contents of certain data fields in the
CLEAR REQUEST packet. These fields and the ioctl() calls which
control them are:
cause code – ioctl(X25_WR_CAUSE_DIAG)
diagnostic code – ioctl(X25_WR_CAUSE_DIAG)
facilities – ioctl(X25_WR_FACILITIES)
user data – ioctl(X25_WR_USER_DATA)
All of these calls must be issued prior to the close() call. The
ioctl(X25_WR_CAUSE_DIAG) and ioctl(X25_WR_USER_DATA) calls are
described below. The ioctl(X25_WR_FACILITIES) call is described in
Chapter 6 , “Extended Features.”
The ioctl(X25_WR_CAUSE_DIAG) Call
The cause code that is sent depends on the cause code specified with the
ioctl(X25_WR_CAUSE_DIAG call and the network type specified during
X.25 interface configuration. The table below summarizes cause code
36960-90061.bk Page 78 Friday, November 10, 2000 3:42 PM