2.2.32 SMB2 IOCTL Response

The SMB2 IOCTL Response packet is sent by the server to transmit the results of a client SMB2 IOCTL Request. This response consists of an SMB2 header, as specified in section 2.2.1, followed by this response structure:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

StructureSize

Reserved

CtlCode

FileId

...

...

...

InputOffset

InputCount

OutputOffset

OutputCount

Flags

Reserved2

Buffer (variable)

...

StructureSize (2 bytes): The server MUST set this field to 49, indicating the size of the response structure, not including the header. This value MUST be used regardless of how large Buffer[] is in the actual response.

Reserved (2 bytes): This field MUST NOT be used and MUST be reserved. The server MUST set this field to 0, and the client MUST ignore it on receipt.

CtlCode (4 bytes): The control code of the FSCTL/IOCTL method that was executed. SMB2-specific values are listed in section 2.2.31.

FileId (16 bytes): An SMB2_FILEID identifier of the file on which the command was performed. If the CtlCode field value is FSCTL_DFS_GET_REFERRALS or FSCTL_PIPE_WAIT, this field MUST be set to { 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF } by the server and MUST be ignored by the client.

InputOffset (4 bytes): The InputOffset field SHOULD be set to the offset, in bytes, from the beginning of the SMB2 header to the Buffer[] field of the IOCTL response.

InputCount (4 bytes): The InputCount field SHOULD<66> be set to zero in the IOCTL response. An exception for pass-through operations is discussed in section 3.3.5.15.8.

OutputOffset (4 bytes): The offset, in bytes, from the beginning of the SMB2 header to the output data buffer. If output data is returned, the output offset MUST be set to InputOffset + InputCount rounded up to a multiple of 8. If no output data is returned for the FSCTL/IOCTL command that was issued, then this value SHOULD<67> be set to 0.

OutputCount (4 bytes): The size, in bytes, of the output data.

Flags (4 bytes): This field MUST NOT be used and MUST be reserved. The server MUST set this field to 0, and the client MUST ignore it on receipt.

Reserved2 (4 bytes): This field MUST NOT be used and MUST be reserved. The server MUST set this field to 0, and the client MUST ignore it on receipt.

Buffer (variable): A variable-length buffer that contains the input and output data buffer for the response, as described by InputOffset, InputCount, OutputOffset, and OutputCount. For more details, refer to section 3.3.5.15.

The following FSCTL responses do not provide an output buffer:

  • FSCTL_PIPE_WAIT

  • FSCTL_LMR_REQUEST_RESILIENCY