HP X.25/9000 Programmer's Guide

76 Chapter5
Receiving and Transmitting Out-of-band Information
Building a Signal Handler
OOB_VC_L2DOWN
X.25 level 2 is down. This event is returned only on a socket accessing a
permanent virtual circuit (PVC). On an SVC, a clear indication is sent.
Recover by issuing a close() on the socket, creating another socket with
the socket() system call, and binding the new socket to a PVC with the
ioctl(X25_SET_PVC) call. Level 2 will probably not come up
immediately since it usually goes down because of high noise on the line
for a sustained period of time (see “Using permanent virtual circuits” in
Chapter 3 for a description of PVC usage).
The first byte of the buffer contains the buffer length and the second byte
contains the event code.
OOB_VC_MSG_TOO_BIG
This event usually means that a message larger than the inbound buffer
size was received. The data was therefore discarded and the VC was
reset. This event occurs when the receiving side’s inbound buffer size is
set to a value too small to receive the message. In this case, you must
increase the value with the setsockopt() system call so that the buffer
size is sufficient to receive any message which may arrive, or use
ioctl(X25_SET_FRAGMENT_SIZE) to enable the reception of message
fragments.
If a shutdown(0) is issued on the socket and a DATA packet is received,
a
OOB_VC_MSG_TOO_BIG
event will be delivered to the process and a
CLEAR packet will be sent on the VC.
The first byte of the buffer contains the buffer length and the second byte
contains the event code.
OOB_VC_RESET
A RESET INDICATION packet was received on the VC. Reading this
event, without the
MSG_PEEK
flag set, causes a RESET CONFIRMATION
packet to be sent unblocking the sending process. A RESET can also be
sent by the X.25 network provider, in which case both ends of the VC will
receive RESET INDICATION packets.
When a RESET INDICATION packet is received, the out-of-band queue
is destroyed and the RESET INDICATION data is placed in the
out-of-band queue as its only event. All data that is not sent or received
(normal and out- of-band data) is discarded. You must read the RESET
INDICATION data before you can send further data on that connection.
36960-90061.bk Page 76 Friday, November 10, 2000 3:42 PM