HPlogo X25/9000: X.25/9000 Programmer's Guide > Appendix A  X.25 Packet Formats

CLEAR REQUEST/INDICATION Packet

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

A client process sends a CLEAR REQUEST/INDICATION packet to terminate an SVC with a remote host. The subsystem sends a CLEAR REQUEST/INDICATION packet when a close or shutdown() system call is issued.

Figure A-3 CLEAR REQUEST Packet

[CLEAR REQUEST Packet]

The access to the fields in the CLEAR REQUEST/INDICATION packet is described below:

General Format Identifier

Indicates the packet sequence count (modulo 8 or modulo 128). This field cannot be read or written by an X.25 application.

Logical Channel Identifier

Controlled by the subsystem. It can be read with the ioctl(X25_RD_LCI)after the call has been established.

Packet Type Identifier

Indicates the kind of packet. It cannot be read or written directly, but through system calls, the transmission and arrival can be effected.

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 the 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]) will contain the clearing cause field.

To write this field on an outgoing packet:Use the 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[4]) will contain the clearing diagnostic field.

To write this field on an outgoing packet:Use the ioctl(X25_WR_CAUSE_DIAG).

Calling DTE Address (Length)

Indicates the source of the packet.

To read this field on an incoming packet: These fields cannot be read by the application.

To write this field on an outgoing packet: The X.25 subsystem computes this field. It cannot be directly written.

Called DTE Address (Length)

Indicates the destination of the packet.

To read this field on an incoming packet: These fields cannot be read by the application.

To write this field on an outgoing packet: The X.25 subsystem computes this field.

Optional. Indicates the facilities used for this SVC.

Facilities (Length)

To read this field on an incoming packet: These fields can be read with the ioctl(X25_RD_FACILITIES).

To write this field on an outgoing packet: These fields can be written with the ioctl(X25_WR_FACILITIES).

Call User Data

Optional. Contains application-defined data.

To read this field on an incoming packet: Use the ioctl(X25_RD_USER_DATA) to read the data.

To write this field on an outgoing packet: Use the ioctl(X25_WR_USER_DATA) to write this field.