3.2.4.1.1 Command Processing
SMB Commands are made up of one or more messages exchanged between the client and the server. Several command requests MAY be sent together in a single message (see sections 3.2.4.1.4 and 3.2.5.1.3) or, at the other extreme, a single command MAY require several messages to complete (for example, Write MPX or any of the Transaction requests).
When a command is initiated by an application on the client, the PID and MID values of the command MUST be entered into the Client.Connection.PIDMIDList table. A single command MAY consist of several messages exchanged between the client and server. All messages that are part of the same command exchange MUST have the same PID and MID values. If a Request Expiration Timer (section 3.2.2.1) is supported, the client MUST set the Request Expiration Timer to signal at the configured time-out interval for this command, and each PIDMIDList entry MUST include the time-out time stamp of the command. If the command is sent to the server in multiple messages, the time-out time stamp MUST be updated when each part of the message is sent. The client MUST NOT allow another command with the same PID and MID values to start execution until the pending command has completed.
The SMB_COM_NT_CANCEL command is the only exception. SMB_COM_NT_CANCEL is used to cancel a pending command, and MUST use the same PID and MID as the command to be canceled. The UID and TID of the SMB_COM_NT_CANCEL command MUST also match those of the command to be canceled. The PID and MID values of the SMB_COM_NT_CANCEL command MUST NOT be entered into the Client.Connection.PIDMIDList table. No response to SMB_COM_NT_CANCEL is sent by the server (as specified in section 2.2.4.65), and the client MUST NOT perform reply processing or maintenance of session timeouts, or invoke retry or session disconnection for this command.
Once a command has completed processing, its Client.Connection.PIDMIDList entry MUST be removed from the list and discarded.