Module jcifs

Interface SmbNegotiationResponse

All Superinterfaces:
CommonServerMessageBlock, Message, Response
All Known Implementing Classes:
Smb2NegotiateResponse, SmbComNegotiateResponse

public interface SmbNegotiationResponse extends CommonServerMessageBlock, Response
Interface for SMB protocol negotiation response handling. Represents the server's response to a protocol negotiation request, containing negotiated dialect version, security settings, capabilities, and buffer sizes for the SMB connection.
Author:
mbechler
  • Method Details

    • isValid

      boolean isValid(CIFSContext cifsContext, SmbNegotiationRequest request)
      Check if the negotiation response is valid
      Parameters:
      cifsContext - the CIFS context
      request - the negotiation request
      Returns:
      whether the protocol negotiation was successful
    • getSelectedDialect

      DialectVersion getSelectedDialect()
      Gets the SMB dialect version selected by the server.
      Returns:
      selected dialect
    • isSigningEnabled

      boolean isSigningEnabled()
      Checks whether the server has SMB message signing enabled.
      Returns:
      whether the server has signing enabled
    • isSigningRequired

      boolean isSigningRequired()
      Checks whether the server requires SMB message signing.
      Returns:
      whether the server requires signing
    • isDFSSupported

      boolean isDFSSupported()
      Checks whether the server supports Distributed File System (DFS).
      Returns:
      whether the server supports DFS
    • setupRequest

      void setupRequest(CommonServerMessageBlock request)
      Sets up the given request with negotiated parameters.
      Parameters:
      request - the request to configure
    • setupResponse

      void setupResponse(Response resp)
      Sets up the given response with negotiated parameters.
      Parameters:
      resp - the response to configure
    • isSigningNegotiated

      boolean isSigningNegotiated()
      Checks whether SMB message signing has been successfully negotiated.
      Returns:
      whether signing has been negotiated
    • haveCapabilitiy

      boolean haveCapabilitiy(int cap)
      Checks whether a specific capability has been negotiated.
      Parameters:
      cap - the capability flag to check
      Returns:
      whether capability is negotiated
    • getSendBufferSize

      int getSendBufferSize()
      Gets the negotiated send buffer size.
      Returns:
      the send buffer size
    • getReceiveBufferSize

      int getReceiveBufferSize()
      Gets the negotiated receive buffer size.
      Returns:
      the receive buffer size
    • getTransactionBufferSize

      int getTransactionBufferSize()
      Gets the negotiated maximum transaction buffer size.
      Returns:
      the transaction buffer size
    • getInitialCredits

      int getInitialCredits()
      Gets the number of initial credits granted by the server for SMB2.
      Returns:
      number of initial credits the server grants
    • canReuse

      boolean canReuse(CIFSContext tc, boolean forceSigning)
      Checks whether a connection can be reused for the given configuration.
      Parameters:
      tc - the CIFS context to check compatibility with
      forceSigning - whether signing is being forced
      Returns:
      whether a connection can be reused for this config