Sha256: 39c5a93493fc95175e127f30ea770c0fb10b10e3067892b65798d592b48f799c

Contents?: true

Size: 1022 Bytes

Versions: 53

Compression:

Stored size: 1022 Bytes

Contents

module RubySMB
  module SMB2
    module Packet
      # An SMB2 Read Response Packet as defined in
      # [2.2.20 SMB2 READ Response](https://msdn.microsoft.com/en-us/library/cc246531.aspx)
      class ReadResponse < RubySMB::GenericPacket
        COMMAND = RubySMB::SMB2::Commands::READ

        endian :little

        smb2_header   :smb2_header
        uint16        :structure_size,  label: 'Structure Size',      initial_value: 17
        uint8         :data_offset,     label: 'Data Buffer Offset',  initial_value: -> { buffer.abs_offset }
        uint8         :reserved,        label: 'Reserved Space'
        uint32        :data_length,     label: 'Data Buffer Length'
        uint32        :data_remaining,  label: 'Data Remaining'
        uint32        :reserved2,       label: 'Reserved Space'
        string        :buffer,          label: 'Data Buffer', length: -> { data_length }

        def initialize_instance
          super
          smb2_header.flags.reply = 1
        end
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
ruby_smb-3.3.12 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.11 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.10 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.9 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.7 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.6 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.5 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.4 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.3 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.2 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.1 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.3.0 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.8 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.7 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.6 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.5 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.4 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.3 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.2 lib/ruby_smb/smb2/packet/read_response.rb
ruby_smb-3.2.1 lib/ruby_smb/smb2/packet/read_response.rb