Module jcifs

Class SmbComNegotiate

java.lang.Object
org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
org.codelibs.jcifs.smb.internal.smb1.com.SmbComNegotiate
All Implemented Interfaces:
CommonServerMessageBlock, CommonServerMessageBlockRequest, CommonServerMessageBlockResponse, RequestWithPath, SmbNegotiationRequest, Message, Request, Response

public class SmbComNegotiate extends ServerMessageBlock implements SmbNegotiationRequest
SMB1 Negotiate Protocol request message. This command is used to negotiate the SMB protocol dialect and security parameters between client and server.
  • Constructor Details

    • SmbComNegotiate

      public SmbComNegotiate(Configuration config, boolean signingEnforced)
      Creates a new SMB1 negotiate request to establish protocol parameters.
      Parameters:
      config - the CIFS configuration
      signingEnforced - whether SMB signing is enforced
  • Method Details

    • isSigningEnforced

      public boolean isSigningEnforced()
      Checks whether SMB message signing is enforced by the client.
      Specified by:
      isSigningEnforced in interface SmbNegotiationRequest
      Returns:
      whether SMB signing is enforced
      See Also:
    • writeParameterWordsWireFormat

      protected int writeParameterWordsWireFormat(byte[] dst, int dstIndex)
      Description copied from class: ServerMessageBlock
      Writes the parameter words portion of the SMB message to the wire format.
      Specified by:
      writeParameterWordsWireFormat in class ServerMessageBlock
      Parameters:
      dst - the destination buffer
      dstIndex - the starting offset in the buffer
      Returns:
      the number of bytes written
    • writeBytesWireFormat

      protected int writeBytesWireFormat(byte[] dst, int dstIndex)
      Description copied from class: ServerMessageBlock
      Writes the data bytes portion of the SMB message to the wire format.
      Specified by:
      writeBytesWireFormat in class ServerMessageBlock
      Parameters:
      dst - the destination buffer
      dstIndex - the starting offset in the buffer
      Returns:
      the number of bytes written
    • readParameterWordsWireFormat

      protected int readParameterWordsWireFormat(byte[] buffer, int bufferIndex)
      Description copied from class: ServerMessageBlock
      Reads the parameter words portion of the SMB message from the wire format.
      Specified by:
      readParameterWordsWireFormat in class ServerMessageBlock
      Parameters:
      buffer - the buffer containing the message data
      bufferIndex - the starting offset in the buffer
      Returns:
      the number of bytes read
    • readBytesWireFormat

      protected int readBytesWireFormat(byte[] buffer, int bufferIndex)
      Description copied from class: ServerMessageBlock
      Reads the data bytes portion of the SMB message from the wire format.
      Specified by:
      readBytesWireFormat in class ServerMessageBlock
      Parameters:
      buffer - the buffer containing the message data
      bufferIndex - the starting offset in the buffer
      Returns:
      the number of bytes read
    • toString

      public String toString()
      Overrides:
      toString in class ServerMessageBlock