Module jcifs

Class SmbComTreeConnectAndX

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

public class SmbComTreeConnectAndX extends AndXServerMessageBlock
SMB1 Tree Connect AndX request message. This command is used to connect to a shared resource on the server, such as a file share or printer.
  • Constructor Details

    • SmbComTreeConnectAndX

      public SmbComTreeConnectAndX(CIFSContext ctx, ServerData server, String path, String service, ServerMessageBlock andx)
      Constructs a tree connect AndX request to establish a connection to a shared resource.
      Parameters:
      ctx - the CIFS context containing configuration
      server - the server data containing security information
      path - the UNC path to the shared resource
      service - the service type (e.g., "A:" for disk share, "LPT1:" for printer)
      andx - the next command in the AndX chain, or null
  • Method Details

    • getBatchLimit

      protected int getBatchLimit(Configuration cfg, byte cmd)
      Description copied from class: AndXServerMessageBlock
      Gets the batch limit for chained commands
      Overrides:
      getBatchLimit in class AndXServerMessageBlock
      Parameters:
      cfg - the configuration
      cmd - the command byte
      Returns:
      the batch limit
    • 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