2.2.20 SMB2 READ Response

The SMB2 READ Response packet is sent in response to an SMB2 READ Request (section 2.2.19) packet. This response is composed 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

DataOffset

Reserved

DataLength

DataRemaining

Reserved2/Flags

Buffer (variable)

...

StructureSize (2 bytes): The server MUST set this field to 17, 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.

DataOffset (1 byte): The offset, in bytes, from the beginning of the header to the data read being returned in this response.

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

DataLength (4 bytes): The length, in bytes, of the data read being returned in this response.

DataRemaining (4 bytes): The length, in bytes, of the data being sent on the Channel specified in the request.

Reserved2/Flags (4 bytes): For SMB 2.0.2, 2.1, 3.0, and 3.0.2 dialects, this field MUST NOT be used and MUST be reserved. The server MUST set this to 0, and the client MUST ignore it on receipt.

For SMB 3.1.1 dialect, this field MUST be interpreted as Flags and MUST contain one of the following values:

Value

Meaning

SMB2_READFLAG_RESPONSE_NONE

0x00000000

None.

SMB2_READFLAG_RESPONSE_RDMA_TRANSFORM

0x00000001

The Buffer field in the response contains SMB2_RDMA_TRANSFORM specified in section 2.2.43.<61>

Buffer (variable): A variable-length buffer that contains the data read for the response, as described by DataOffset and DataLength. The minimum length is 1 byte. If 0 bytes are returned from the underlying object store, the server MUST send a failure response with status equal to STATUS_END_OF_FILE.