Sha256: 098420ef9794bce32a415260058d387cbd997f0eba435b7ab983b7bd5306e8dc

Contents?: true

Size: 1.41 KB

Versions: 10

Compression:

Stored size: 1.41 KB

Contents

module RubySMB
  module SMB2
    module Packet
      # An SMB2 Write Request Packet as defined in
      # [2.2.21 SMB2 WRITE Request](https://msdn.microsoft.com/en-us/library/cc246532.aspx)
      class WriteRequest < RubySMB::GenericPacket
        endian :little

        smb2_header           :smb2_header
        uint16                :structure_size,        label: 'Structure Size',  initial_value: 49
        uint16                :data_offset,           label: 'Data Offset' ,    initial_value: lambda { self.buffer.abs_offset }
        uint32                :write_length,          label: 'Write Length',    initial_value: lambda { self.buffer.do_num_bytes }
        uint64                :write_offset,          label: 'File Write Offset'
        smb2_fileid           :file_id,               label: 'File ID'
        uint32                :channel,               label: 'Channel'
        uint32                :remaining_bytes,       label: 'Remaining Bytes'
        uint16                :channel_offset,        label: 'Write Channel Info Offset'
        uint16                :channel_length,        label: 'Write Channel Info Length'
        uint32                :flags,                 label: 'Flags'
        string                :buffer,                label: 'Write Data Buffer'

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby_smb-1.0.3 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-1.0.2 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-1.0.1 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-1.0.0 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-0.0.24 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-0.0.23 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-0.0.22 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-0.0.21 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-0.0.20 lib/ruby_smb/smb2/packet/write_request.rb
ruby_smb-0.0.19 lib/ruby_smb/smb2/packet/write_request.rb