Freigeben über


3.2.4.1.4 Sending Any Batched ("AndX") Request

When sending a Batched request, the client MUST construct the message as follows:

The first request to be batched MUST be an AndX SMB command request, and MUST be included in full. That is, the SMB_Header, SMB_Parameters, and SMB_Data blocks of the request MUST be constructed, as specified in the corresponding subsection of Higher-Layer Triggered Events (section 3.2.4), with the following additional constraints:

  1. The SMB_Header of the first command MUST be the only header in the message. Follow-on commands are appended to the message without the header.

  2. The SMB_Parameters.AndXCommand field MUST contain either the command code of a valid follow-on command request to be batched, or SMB_COM_NO_ANDX_COMMAND (0xFF).

    • If SMB_Parameters.AndXCommand contains SMB_COM_NO_ANDX_COMMAND, the chain is terminated. If SMB_Parameters.AndXOffset is set to 0, no further command requests can be added to the AndX Chain.

    • If SMB_Parameters.AndXCommand is a valid follow-on command code, the SMB_Parameters.AndXOffset field MUST be set to the offset, in bytes, from the start of the SMB_Header block, of the follow-on command request's Parameters block.

  3. If SMB_Parameters.AndXCommand is a valid follow-on command code:

    • The SMB_Parameters and SMB_Data block pair of the follow-on command request MUST be constructed as specified in the corresponding subsection of Higher-Layer Triggered Events (section 3.2.4). The block pair MUST be appended to the end of the message, and the SMB Header (section 2.2.3.1) of the follow-on message MUST NOT be included.

    • If the follow-on command is NOT an AndX command, the chain is terminated and no further command requests can be added to the chain.

  4. If the follow-on command is an AndX command, the process repeats starting at step 2.<196>

The total size of the AndX message MUST NOT exceed the negotiated Client.Connection.ServerMaxBufferSize.

If signing is active for the connection on which a message is sent, the AndX message MUST be signed as a single message.