Compartir a través de


3.3.5.2.5 Receiving Any Transaction Request

Upon receipt of an SMB_COM_TRANSACTION Request (section 2.2.4.33.1), SMB_COM_TRANSACTION2 Request (section 2.2.4.46.1), or SMB_COM_NT_TRANSACT Request (section 2.2.4.62.1), the server MUST verify that it can process the transaction. In particular, the server MUST allocate sufficient space to accept the transaction subcommand parameters and data. The server MUST also be able to allocate MaxParameterCount plus MaxDataCount bytes for the results of the transaction. If the server is unable to allocate these resources, it SHOULD<240> return STATUS_INSUFF_SERVER_RESOURCES (ERRDOS/ERRnomem).

The server SHOULD perform initial validation of the transaction itself and return an error response if an error is detected. An error response terminates the transaction.

If no initial errors are detected, the server MUST determine whether the entire transaction is contained within the initial request message. If the value of the ParameterCount field is less than that of the TotalParameterCount and/or the value of the DataCount field is less than that of the TotalDataCount, then the server MUST send an Interim Response message, setting the SMB_Parameters.WordCount and SMB_Data.ByteCount fields to 0, and prepare to receive one or more secondary requests from the client in order to complete the transfer of the transaction.

The transaction is completely transferred to the server when:

  • The total number of transaction parameter bytes received equals the smallest value of TotalParameterCount reported by the client across all of the transaction request messages sent, and

  • The total number of transaction data bytes received equals the smallest value of TotalDataCount reported by the client across all of the transaction request messages sent.

When these conditions are met, the transaction can be processed.

If the processing of the transaction results in an error, the server MUST return an error response, which cancels the transaction.

If the transaction response, which includes the response parameters and data, is greater than permitted by Server.Connection.ClientMaxBufferSize, the server MUST send multiple final response messages in order to transfer the entire transaction response.