Compartilhar via


3.3.5.33 Receiving an SMB_COM_ECHO Request

When the server receives an SMB_COM_ECHO Request (section 2.2.4.39.1), message handling proceeds as follows:

The value of the TID field MUST be either a valid TID (see section 3.3.5.2) or 0xFFFF.<293>

If EchoCount is zero, a response MUST NOT be sent. If EchoCount is nonzero, the server SHOULD reply with the requested number of responses. The server MAY enforce any nonzero limit in the number of responses that it returns.

The server MUST construct an SMB_COM_ECHO response message as specified in section 2.2.4.39 and initialize it as follows:

  • The SMB_Parameters.Words.SequenceNumber field MUST be set to 1.

  • The SMB_Data.Bytes.Data field MUST be the same as that received in the request.

While SMB_Parameters.Words.SequenceNumber is less than or equal to EchoCount:

  • The response MUST be sent to the client as described in section 3.3.4.1.

  • The SMB_Parameters.Words.SequenceNumber field MUST be incremented.

Note that SMB_Parameters.Words.SequenceNumber is not the signing sequence number. If signing is enabled, each outgoing Echo response message is signed individually. The same signing sequence number, provided by the Server.Connection.ServerSendSequenceNumber table, is used for all Echo response messages to the same Echo request.

If the server receives an SMB_COM_NT_CANCEL Request (section 2.2.4.65.1) that matches the SMB_COM_ECHO (section 2.2.4.39) during Processing of the Echo, the Echo operation is canceled and no further responses are sent.