2.2.4.22.1 Request

 SMB_Parameters
   {
   UCHAR  WordCount;
   Words
     {
     USHORT FID;
     ULONG  Offset;
     USHORT MaxCountOfBytesToReturn;
     USHORT MinCountOfBytesToReturn;
     ULONG  Timeout;
     USHORT Reserved;
     ULONG  OffsetHigh (optional);
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   }
            


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

SMB_Parameters (variable)

...

SMB_Data

SMB_Parameters (variable):


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

WordCount

Words (variable)

...

WordCount (1 byte): This field MUST be either 0x08 or 0x0A.

Words (variable):


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

FID

Offset

...

MaxCountOfBytesToReturn

MinCountOfBytesToReturn

Timeout

...

Reserved

OffsetHigh

FID (2 bytes): This field MUST be a valid 16-bit signed integer indicating the file from which the data MUST be read.

Offset (4 bytes): The offset, in bytes, from the start of the file at which the read MUST begin. This is the lower 32 bits of a 64-bit value if the WordCount is 0x0A.

MaxCountOfBytesToReturn (2 bytes): The requested maximum number of bytes to read from the file and return to the client. The value MAY exceed the negotiated buffer size.

MinCountOfBytesToReturn (2 bytes): The requested minimum number of bytes to read from the file and return to the client. This field is used only when reading from a named pipe or a device. It is ignored when reading from a standard file.

Timeout (4 bytes): The number of milliseconds that the server is requested to wait while processing this command. This field is optionally honored only when reading from a named pipe or I/O device. It does not apply when reading from a regular file.

Reserved (2 bytes): This field SHOULD be set to 0x0000.

OffsetHigh (4 bytes): This field is optional, and is included only when WordCount is 0x0A. This field is the upper 32 bits of the offset, in bytes, from the start of the file at which the read MUST start. This field allows the client request to specify 64-bit file offsets.

SMB_Data (2 bytes):


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

ByteCount

ByteCount (2 bytes): The length in bytes of the remaining SMB_Data. This field MUST be 0x0000.