Ends a session with the X.25 device handler.
The CIO_HALT x25sioctl operation ends a session with the X.25 device handler. A session identified by a particular session_id field can be terminated in any of the following ways:
If the CIO_HALT operation is the last for this port, appropriate termination (such as automatic disconnection, if configured) is done.
The CIO_HALT operation returns immediately to the caller before the halt completes. If the return does not indicate an error, the X.25 device handler builds a CIO_START_DONE status block on completion of the operation. For kernel-mode processes the status block is passed to the associated status function, as specified by the x25sopen entry point. For user-mode processes, the block is placed in the associated status-and-exception queue.
The parameter block for the CIO_HALT operation is the x25_halt_data structure. This structure contains the following fields:
If the CIO_HALT operation is issued to send a Clear Request packet on a session of type SESSION_SVC_OUT or SESSION_SVC_IN, the CIO_HALT operation ext parameter is used. The ext parameter points to a buffer containing the data required for the Clear Request packet. This data is in the form described in the mbuf structure.
For a kernel-mode process, the data passed in the ext parameter is an mbuf pointer. Only the calling process can free the mbuf data returned in the CIO_HALT_DONE status block. The mbuf data returned by this status block is not the same as the data passed down.
For a user-mode process, the data passed in the ext parameter is a pointer to a buffer of the same format in user space. If the pointer is null, then the Clear Request packet is sent with default cause-and-diagnostic codes (0, 0), but with no facilities or user data. When the CIO_HALT_DONE status block is received, the buffer is filled with the contents of the Clear Confirm packet.
The CIO_HALT operation can be called from the process environment only.
A return code of -1 indicates an unsuccessful operation. The kernel sets the errno global variable to one of the following values:
In addition, one of the following X.25-specific codes may be returned:
The CIO_HALT operation functions with an X.25 Interface Co-Processor/2 that has been correctly configured for use on a qualified network. Consult the adapter specifications for more information on configuring the adapter and network qualifications.
The x25sioctl entry point, x25sopen entry point.
The CIO_START x25sioctl X.25 Device Handler Operation.
Status Blocks for the X.25 Device Handler.