Reference Driver

73M1866B/73M1966B Reference Driver User Guide UG_1x66B_015
22 Rev. 2.7
6 IOCTL Commands Description
Upon successful opening of a device or channel descriptor the application layer can control the operation
of the device and the FXO channel. The application in user space communicates with the driver via
standard Linux driver interface IOCTL calls.
Unless specified, in general, the IOCTL function returns zero (0) for successful request, or a negative
value of EFAULT (-EFAULT) if any error is detected during the processing of the IOCTL. The more detail
cause of error, or also known as error code, is stored internally and can be retrieved with the
M1966_ERROR_CODE_GET IOCTL. The driver keeps only the last error code of the last IOCTL per device
or channel descriptor. Therefore, if required, the error code must be retrieved immediately after the
execution of the IOCTL or before the next IOCTL is executed. The error codes are listed in Section 7.4.
The following sections describe the detail of each IOCTL command. The driver IOCTL belongs to one of
the following categories:
Initialization
Event and Status Services
FXO Hook Switch Control Services
Caller-ID Services
Ring Detection Services
Line State Analysis Services
GPIO Services
Miscellaneous Service