Compartir a través de


3.2.4.1 Sending Any Message

Messages sent by the client MUST conform to the rules specified in section 3.1.4.1, with the following additional requirements:

  • The SMB_Header.Status field MUST be set to zero (0x00000000).

  • The SMB_FLAGS_REPLY bit in the SMB Header (section 2.2.3.1) MUST be clear.

  • The client MUST allocate or assign buffers to receive any parameters and/or data to be returned in the response message.

The caller MUST provide the following:

  • A buffer containing the message to be sent.

  • Exactly one of the following:

    • The SMB connection (Client.Connection) identifying the transport connection on which to send the request.

      OR

    • One or both of the Client.Session and Client.TreeConnect identifying the authenticated user and share respectively.

If both the Client.Session and Client.TreeConnect, are supplied by the caller, Client.Session.Connection MUST match Client.TreeConnect.Connection.

If the Connection was supplied by the caller, the same MUST be used to send the request. Otherwise, the connection identified by Client.Session.Connection (or, equivalently, Client.TreeConnect.Connection) MUST be used to send the request.

If a Client.Session is supplied by the caller, the SMB_Header.UID field MUST be set to Client.Session.SessionUID. Otherwise, the client MUST set the SMB_Header.UID field to 0x0000.

If a Client.TreeConnect is supplied by the caller, the SMB_Header.TID MUST be set to Client.TreeConnect.TreeID. Otherwise, the client MUST set the SMB_Header.TID field to 0xFFFF.

The value of SMB_Header.PID MUST be assigned as specified in section 2.2.1.6.3, and the value of SMB_Header.MID MUST be assigned as specified in section 2.2.1.6.2.