3.3.5.2.4 Receiving any Batched ("AndX") Request

When a server receives an AndX Request message, the server MUST process the batched requests sequentially. For the first operation, the identifiers for the FID, SID, and TID, if any, MUST be taken from the received operation. For every subsequent operation in the current batch, the values used for FID, SID, and TID MUST be either those in first operation or those generated by the previous operation. Each request is processed as specified in its respective Message Processing subsection, with the exception that if a response is generated, it MUST NOT be sent immediately. Instead, the server MUST batch the response into an AndX Response chain.

The server MUST use the information in the request header as the header information for each batched request. If processing a batched request causes a change in state that would affect the information in the header, the updated header information MUST be used when the server processes the subsequent request in the chain. If any of the requests in the AndX Request chain generate an error, the error MUST be stored in the SMB_Header.Status field of the response, the AndX Response chain MUST be terminated at that response, and any further requests in the AndX Request chain (if any) MUST NOT be processed.

Once the AndX Response chain is terminated, an AndX Response message MUST be constructed as follows:

  • The server MUST construct the SMB Header (section 2.2.3.1) using the header information as it was at the termination of the AndX Request chain.

  • The AndX Response chain of Parameter and Data block pairs MUST be sequentially appended to the response message.

  • If Connection.IsSigningActive is TRUE, the entire batched message is signed as specified in section 3.1.4.1.

The server MUST send the completed batch response to the client.