HP X.25/9000 Programmer's Guide
Chapter 5 69
Receiving and Transmitting Out-of-band Information
Receiving Out-of-band Events
Receiving Out-of-band Events
Out-of-band events, such as RESET INDICATION, INTERRUPT, and
CLEAR INDICATION packets, occur during typical X.25 VC operation.
When an out-of-band event occurs, X.25 indicates the event by sending a
SIGURG signal and places a description of the event in the out-of-band
queue.
CAUTION Applications using X.25 programmatic access should be designed
to receive the SIGURG signal and process the information
associated with the event. If the process has not attached a
signal handler to receive this signal, the signal is ignored.
Failure to respond to some out-of-band events (a RESET packet
for example) may result in the VC being cleared by the network
provider.
Out-of-band events are placed in the out-of-band queue regardless of
whether a signal handler has been installed. While it is possible to write
applications that periodicallyexamine the out-of-band queue and get any
out-of-band events that have occurred, it is not recommended.
Signal reception
Signal handling under HP-UX is controlled by the signal(2),
sigsetmask(2), and sigvector(2) system calls. These system calls are
described in your HP-UX man pages. The sigvector() system call
allows you to specify a signal handler (signal catcher) to process signals
when they arrive.
The following example shows how a signal handler can be installed to
receive the SIGURG signal:
struct sigvec vec;
int onurg();
int pid, s;
/*
** arrange for the onurg() signal handler to be called
when SIGURG is received:
36960-90061.bk Page 69 Friday, November 10, 2000 3:42 PM










