次の方法で共有


3.3.5.2 Receiving Any Message

If ProtocolId in the header of the received message is 0x424D53FF and the command received is SMB_COM_NEGOTIATE, the client MUST process the request as specified in section 3.3.5.3.

If the server implements the SMB 3.x dialect family, and the ProtocolId in the header of the received message is 0x424D53FD, the server MUST decrypt the message as specified in section 3.3.5.2.1.1 before performing the following steps.

If the server implements the SMB 3.1.1 dialect and the ProtocolId in the header of the received message is 0x424D53FC, the server MUST decompress the message as specified in section 3.3.5.2.1.2 before performing the following steps.

If ProtocolId in the header of the received message is 0x424D53FE, the server MUST perform the following:

If the received request is not an SMB2 CANCEL, the server MUST create a new Request object initialized as follows, and insert it into the Connection.RequestList before verifying the connection state, sequence number, or signature.

  • Request.MessageId MUST be set to the MessageId value in the SMB2 header.

  • Request.AsyncId MUST be set to 0.

  • Request.CancelRequestId MUST be set to a unique identifier generated by the server. In each invocation of an object store operation, the server MUST pass the CancelRequestId as an additional parameter to the operation, in order to support cancellation of in-progress operations as specified in section 3.3.5.16.<251>

  • Request.Open MUST be set to NULL.

  • If the server implements the SMB 3.x dialect family, Request.IsEncrypted MUST be initialized to FALSE and Request.TransformSessionId MUST be initialized to empty. If the request was successfully received as encrypted as specified in section 3.3.5.2.1.1, Request.IsEncrypted MUST be set to TRUE and Request.TransformSessionId MUST be set to the SessionId value in the SMB2 TRANSFORM_HEADER.

  • If IsCompressionSupported is TRUE, and the request was successfully received as compressed as specified in section 3.3.5.2.1.1 or section 3.3.5.2.1.2, Request.CompressReply MAY be set to TRUE.<252>

    If the length of the message exceeds Connection.MaxTransactSize+256, the server MUST disconnect the connection.

    For a compound request, the server MUST register each SMB2 command as a separate entry in the Connection.RequestList, and Request.MessageId MUST be set to the MessageId values from the individual command headers.

    If Connection.SupportsMultiCredit is FALSE and the size of the request is greater than 68*1024 bytes, the server SHOULD<253> terminate the connection.

    If Connection.SupportsMultiCredit is TRUE, the command is other than READ, WRITE, IOCTL, QUERY_DIRECTORY, CHANGE_NOTIFY, QUERY_INFO, or SET_INFO, and the size of the request is greater than 68*1024 bytes, the server MUST terminate the connection.

    For every message received, the server MUST calculate the total number of bytes in the message and update the values of ServerStatistics.sts0_bytesrcvd_low and ServerStatistics.sts0_bytesrcvd_high.

Otherwise, the server MUST disconnect the connection as specified in section 3.3.7.1.