HP X.25/9000 Programmer's Guide

120 AppendixA
X.25 Packet Formats
CLEAR REQUEST/INDICATION Packet
Packet Type
Identifier
Indicates the kind of packet. This field cannot be read or written directly,
but through system calls CLEAR REQUEST/INDICATION packets can
be transmitted or detected.
To read this field on an incoming packet:
recv(MSG_OOB) returns a buffer the second byte of which (
buf[1]
) will
contain
OOB_VC_CLEAR
if a CLEAR INDICATION packet was received.
To write this field on an outgoing packet:
Use a close() or shutdown() system call to transmit a CLEAR
REQUEST packet.
Clearing Cause Indicates the cause code for the clear request packet.
To read this field on an incoming packet:
recv(MSG_OOB) returns a buffer the third byte of which (
buf[2]
)
contains the clearing cause field.
To write this field on an outgoing packet:
Use ioctl(X25_WR_CAUSE_DIAG).
Diagnostic Code Contains the diagnostic code for the CLEAR REQUEST packet.
To read this field on an incoming packet:
recv(MSG_OOB) returns a buffer the fourth byte of which (
buf[3]
)
contains the clearing diagnostic field.
To write this field on an outgoing packet:
Use ioctl(X25_WR_CAUSE_DIAG) to write this field.
Calling DTE
Address (Length)
Indicates the source of the packet.
To read this field on an incoming packet:
This field can not be read by the application.
To write this field on an outgoing packet:
The X.25 subsystem computes this field. It cannot be written directly.
Called DTE
Address (Length)
Indicates the destination of the packet.
To read this field on an incoming packet:
This field can not be read by the application.
36960-90061.bk Page 120 Friday, November 10, 2000 3:42 PM