Sha256: 3cb898be4a38b11032c8f7cdedfc8e6ab12df7926ba7cd0cb1fd16e54c105bfc

Contents?: true

Size: 1.42 KB

Versions: 53

Compression:

Stored size: 1.42 KB

Contents

module RubySMB
  module SMB2
    module Packet
      # An SMB2 Ioctl Response Packet as defined in
      # [2.2.32 SMB2 IOCTL Response](https://msdn.microsoft.com/en-us/library/cc246548.aspx)
      class IoctlResponse < RubySMB::GenericPacket
        COMMAND = RubySMB::SMB2::Commands::IOCTL

        endian :little

        smb2_header   :smb2_header
        uint16        :structure_size,      label: 'Structure Size',      initial_value: 49
        uint16        :reserved1,           label: 'Reserved Space'
        uint32        :ctl_code,            label: 'Control Code'
        smb2_fileid   :file_id,             label: 'File Id'
        uint32        :input_offset,        label: 'Input Offset'
        uint32        :input_count,         label: 'Input Count'
        uint32        :output_offset,       label: 'Output Offset'
        uint32        :output_count,        label: 'Output Count'
        uint32        :flags,               label: 'Flags'
        uint32        :reserved2,           label: 'Reserved Space'
        string        :buffer,              label: 'Input Buffer',        read_length: -> { input_count + output_count }

        def initialize_instance
          super
          smb2_header.flags.reply = 1
        end

        def input_data
          to_binary_s[input_offset, input_count]
        end

        def output_data
          to_binary_s[output_offset, output_count]
        end

      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
ruby_smb-2.0.9 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.8 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.7 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.6 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.5 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.4 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.3 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.2 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.1 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-2.0.0 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-1.1.0 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-1.0.5 lib/ruby_smb/smb2/packet/ioctl_response.rb
ruby_smb-1.0.4 lib/ruby_smb/smb2/packet/ioctl_response.rb