Module jcifs

Class SmbComTreeConnectAndXResponse

All Implemented Interfaces:
CommonServerMessageBlock, CommonServerMessageBlockRequest, CommonServerMessageBlockResponse, RequestWithPath, TreeConnectResponse, Message, Request, Response

public class SmbComTreeConnectAndXResponse extends AndXServerMessageBlock implements TreeConnectResponse
SMB1 Tree Connect AndX response implementation. Handles server responses to tree connect requests in SMB1 protocol, providing information about the connected share including service type and DFS capabilities.
Author:
mbechler
  • Constructor Details

    • SmbComTreeConnectAndXResponse

      public SmbComTreeConnectAndXResponse(Configuration config, ServerMessageBlock andx)
      Constructs a tree connect AndX response.
      Parameters:
      config - the configuration to use
      andx - the next command in the AndX chain, or null
  • Method Details

    • getService

      public final String getService()
      Description copied from interface: TreeConnectResponse
      Returns the service type of the connected share (e.g., A: for disk, LPT1: for printer, IPC for named pipe).
      Specified by:
      getService in interface TreeConnectResponse
      Returns:
      the service
    • getNativeFileSystem

      public final String getNativeFileSystem()
      Returns the native file system type of the connected share.
      Returns:
      the nativeFileSystem
    • isSupportSearchBits

      public final boolean isSupportSearchBits()
      Indicates whether the share supports search operations with search bits.
      Returns:
      the supportSearchBits
    • isShareDfs

      public final boolean isShareDfs()
      Description copied from interface: TreeConnectResponse
      Indicates whether the connected share is part of a Distributed File System (DFS) namespace.
      Specified by:
      isShareDfs in interface TreeConnectResponse
      Returns:
      the shareIsInDfs
    • isValidTid

      public boolean isValidTid()
      Indicates whether the tree connection has been successfully established and has a valid tree ID.
      Specified by:
      isValidTid in interface TreeConnectResponse
      Returns:
      whether the tree id is a valid one
      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 AndXServerMessageBlock