3.3.4.3 Sending a Success Response

When the server responds with a success to any command sent by the client, the response message MUST be constructed as specified in this section.

The server MUST fill in the SMB2 header of the success response to match the SMB2 header of the request with the following changes:

  • The Status field of the SMB2 header MUST be set to the status code provided.

  • The NextCommand field MUST be set to zero. If this response is later combined with other responses into a compounded response, as specified in section 3.3.4.1.3, this value will change.

  • The SMB2_FLAGS_SERVER_TO_REDIR bit MUST be set in the Flags field of the SMB2 header.

  • If Request.AsyncId is nonzero, the server MUST set the AsyncId field to it, MUST set the SMB2_FLAGS_ASYNC_COMMAND bit in the Flags field, and MUST set the CreditResponse field to 0.

  • Otherwise, the server MUST set the CreditResponse field to the number of credits the server chooses to grant the request, as specified in section 3.3.1.2.

Any other additional changes to the header will be made on a command-specific basis.

The information that follows the SMB2 header is command-specific, as specified in section 3.3.5. This response MUST be sent to the client and the request MUST be removed from Connection.RequestList and freed.

Show: