Class: RubySMB::SMB2::Packet::IoctlRequest

Inherits:
GenericPacket
  • Object
show all
Defined in:
lib/ruby_smb/smb2/packet/ioctl_request.rb

Overview

An SMB2 Ioctl Request Packet as defined in 2.2.31 SMB2 IOCTL Request

Instance Method Summary collapse

Methods inherited from GenericPacket

describe, #display, fields_hashed, format_field, #packet_smb_version, read, #status_code, walk_fields

Instance Method Details

#calc_input_offset ⇒ Integer

Calculates the value for the input_offset field. If the input buffer is empty then this should be set to 0, otherwise it should return the absolute offset of the input buffer.

Returns:

  • (Integer) —

    the value to store in #input_offset



43
44
45
46
47
48
49
# File 'lib/ruby_smb/smb2/packet/ioctl_request.rb', line 43

def calc_input_offset
  if input_count.zero?
    0
  else
    buffer.abs_offset
  end
end

#initialize_instance ⇒ Object



33
34
35
36
# File 'lib/ruby_smb/smb2/packet/ioctl_request.rb', line 33

def initialize_instance
  super
  smb2_header.command = RubySMB::SMB2::Commands::IOCTL
end