Module jcifs

Class SmbComOpenAndX

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

public class SmbComOpenAndX extends AndXServerMessageBlock
SMB1 Open AndX request message. This command is used to open or create a file for access over the network with enhanced capabilities compared to the basic Open command.
  • Constructor Details

    • SmbComOpenAndX

      public SmbComOpenAndX(Configuration config, String fileName, int access, int shareAccess, int flags, int fileAttributes, ServerMessageBlock andx)
      Constructs an Open AndX request.
      Parameters:
      config - the configuration
      fileName - the name of the file to open
      access - the desired access mode
      shareAccess - the share access mode
      flags - the open flags
      fileAttributes - the file attributes
      andx - the next command in the chain
  • 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