IOCTL Command Summary

The parameters to the IOCTL request packet are stored in the following fields in the associated I/O request packet (IRP).

IRP.CurrentStackLocation -> IOControlCodeFunction code
IRP.SystemBufferAddress of parameter buffer (if used)
IRP.CurrentStackLocation -> InputBufferLengthLength of parameter buffer
IRP.UserBufferAddress of data buffer
IRP.CurrentStackLocation -> OutputBufferLengthLength of data buffer

Note that under Windows 2000 or Windows NT, the operating system reserves the low nibble of IOCTL function codes to determine the method used to map the various buffers passed on the DeviceIoControl function call into the driver address space. The various options available to device driver writers are:

Low nibbleIOCTL definition

For further details of the memory mapping performed by these various options, refer to the Windows 2000 or Windows NT DDK documentation.

For a driver function code of ZZ, using memory mapping code M, the IOCTL code passed on the DeviceIoControl function call is 0xZZM.

The function codes are set out as shown below. Note that all other function codes will be returned with the error ERROR_INVALID_DEVICE_REQUEST in the field IoStatus.Status. The Windows 2000/NT I/O System validates the address and length of the areas passed as parameter and data packets. If the address validation fails, an exception will be raised.

All requests must return immediately. In general, they are simple, immediate operations, but in the case of Transmit Frame and Receive Frame, the driver must not suspend the calling SNALink thread while waiting for I/O to complete — a relevant return code should be sent instead, allowing the SNALink to retry.

The complete list of functions is as follows:

FunctionFunction codeWindows 2000/NT IOCTL code
Set Event/Semaphore Handle0x410x410
Set Link Characteristics0x420x420
Set V24 Output Status0x430x430
Transmit Frame0x440x441
Abort Transmitter0x450x450
Abort Receiver0x460x460
Off-Board Load0x470x470
Get/Set Interface Record0x610x613
Get V24 Status0x620x622
Receive Frame0x630x632
Read Interface Record0x640x642

In the function descriptions in the following topics, the bit-numbering convention is: The bits in a byte are numbered 0 through 7, where bit 0 is the least significant and bit 7 is the most significant.

There is no function for the controlling autodialer across the synchronous dumb card interface. This autodial feature is implemented in the link service itself. The Microsoft link services that support the synchronous dumb card interface first perform the dial operation by sending the dial string containing the server-stored number to a COM port rather than the SDLC chip, and then sending a command to the device driver to raise DTR via an Set V24 Output Status IOCTL.