Large File Client Request ================================ |
Description =================================== |
UCHAR WordCount; | Count of parameter words = 10 or 12 |
UCHAR AndXCommand; | Secondary (X) command; 0xFF = none |
UCHAR AndXReserved; | Reserved (must be 0) |
USHORT AndXOffset; | Offset to next command WordCount |
USHORT Fid; | File handle |
ULONG Offset; | Offset in file to begin read |
USHORT MaxCount; | Max number of bytes to return |
USHORT MinCount; | Reserved |
ULONG Reserved; | Must be 0 |
USHORT Remaining; | Reserved |
ULONG OffsetHigh; | Upper 32 bits of offset (only if WordCount is 12) |
USHORT ByteCount; | Count of data bytes = 0 |
Server Response ================================ |
Description =================================== |
UCHAR WordCount; | Count of parameter words = 12 |
UCHAR AndXCommand; | Secondary (X) command; 0xFF = none |
UCHAR AndXReserved; | Reserved (must be 0) |
USHORT AndXOffset; | Offset to next command WordCount |
USHORT Remaining; | Reserved -- must be -1 |
USHORT DataCompactionMode; | |
USHORT Reserved; | Reserved (must be 0) |
USHORT DataLength; | Number of data bytes (min = 0) |
USHORT DataOffset; | Offset (from header start) to data |
USHORT Reserved[5]; | Reserved (must be 0) |
USHORT ByteCount; | Count of data bytes |
UCHAR Pad[]; | |
UCHAR Data[ DataLength]; | Data from resource |
If the negotiated dialect is NT LM 0.12
or later, the client may use the 12 parameter word version of the request. This version allows specification of 64 bit file offsets.
If CAP_LARGE_READX was indicated by the server in the negotiate protocol response, the request's MaxCount field may exceed the negotiated buffer size if Fid refers to a disk file. The server may arbitrarily elect to return fewer than MaxCount bytes in response.
The following SMBs may follow SMB_COM_READ_ANDX:
SMB_COM_CLOSE
ERRDOS/ERRnoaccess
ERRDOS/ERRbadfid
ERRDOS/ERRlock
ERRDOS/ERRbadaccess
ERRSRV/ERRinvid
ERRSRV/ERRbaduid