Closes an X.25 device handler channel.
int x25sclose (devno, chan, ext) dev_t devno; int chan, ext;
|devno||Specifies major and minor device numbers.|
|chan||Identifies the channel number assigned by the x25smpx entry point.|
|ext||Not used by the x25sclose entry point.|
The x25sclose entry point closes an X.25 device handler channel. For each channel opened by the x25sopen entry point, there must be a corresponding x25sclose entry point. When the X.25 device handler receives an x25sclose entry point, the device handler frees all internal data areas associated with the corresponding x25sopen entry point. In addition, any receive data for the indicated channel is purged.
Note: The x25sclose entry point does not free the channel itself. The channel is freed by the x25smpx entry point, which the kernel calls immediately after the x25sclose entry point.
If the channel being closed is the only open channel for the minor device, the X.25 device handler does the following as well:
Before issuing the x25sclose entry point, the caller should issue a call to the CIO_HALT operation for each successful CIO_START operation. If the user does not call the CIO_HALT operation (for example, the call was invoked by the kernel after a user process ended abnormally), the X.25 device handler performs the CIO_HALT operation on all open sessions on the channel before continuing with the x25sclose function. The close purges all data waiting on the channel. No special clear data can be sent and any clear confirm data is lost.
Attention: If the user does not call a CIO_HALT, it is possible data could be lost on the channel's open sessions.
An x25sclose entry point 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:
|EINTR||Indicates that the close call was interrupted.|
|ENXIO||Indicates that the channel was invalid.|
The x25sclose entry point functions with an X.25 Interface Co-Processor/2 that has been correctly configured for use on a qualified network. Consult adapter specifications for more information on configuring the adapter and network qualifications.
The x25smpx entry point, x25sopen entry point.
The CIO_HALT x25sioctl X.25 Device Handler Operation, CIO_START x25sioctl X.25 Device Handler Operation.