2.2.4.23 SMB_COM_READ_MPX (0x1B)

This is command was introduced in the LAN Manager 1.0 dialect. This command is obsolescent. The command was redesigned for NT LAN Manager. This document describes only the NT LAN Manager behavior. See section 2.1.2.1 for more information.

This is a specialized read command intended to maximize the performance of reading large blocks of data from a regular file while allowing for other operations to take place between the client and the server. This command is valid only when using a multiplexed session (see section 2.1.3). The server MUST respond to the command request with one or more response messages until the requested amount of data has been returned or an error occurs. Each server response MUST contain the TID, UID, PID, MID and CID of the original client request and the Offset and Count describing the returned data (see the Response format following).

The client has received all of the data bytes when the sum of the DataLength fields received in each response equals the total amount of data bytes expected (the smallest Count received). This allows the protocol to work even if the responses are received out of sequence.

As is true in SMB_COM_READ, the total number of bytes returned can be less than the number requested only if a read specifies bytes beyond the current file size and FID refers to a disk file. In this case, only the bytes that exist MUST be returned. A read completely beyond the end of file MUST result in a single response with a Count value of 0x0000. If the total number of bytes returned is less than the number of bytes requested, this indicates end of file (if reading other than a standard blocked disk file, only zero bytes returned indicates end of file).

Once started, the Read Block Multiplexed operation is expected to go to completion. The client is expected to receive all the responses generated by the server. Conflicting commands (such as file close) MUST NOT be sent to the server while a multiplexed operation is in progress.

This command supports 32-bit file offsets only. Servers MAY<32> support this command. If the server supports this command, it MUST set the CAP_MPX_MODE (0x00000002) bit in the Capabilities field of the response to SMB Protocol negotiation on connectionless transports.