Sha256: fad37a2579f09c4bd170fd68d8e067d89042e6d6de95c9a3f8a5ef2c20917276

Contents?: true

Size: 1.58 KB

Versions: 15

Compression:

Stored size: 1.58 KB

Contents

module RubySMB
  module SMB1
    module Packet
      module Trans2
        # A Trans2 SET_FILE_INFORMATION Response Packet as defined in
        # [2.2.6.9.2 Response](https://msdn.microsoft.com/en-us/library/ff469853.aspx)
        class SetFileInformationResponse < RubySMB::GenericPacket
          COMMAND = RubySMB::SMB1::Commands::SMB_COM_TRANSACTION2

          class ParameterBlock < RubySMB::SMB1::Packet::Trans2::Response::ParameterBlock
          end

          # The Trans2 Parameter Block for this particular Subcommand
          class Trans2Parameters < BinData::Record
            endian :little

            uint16 :ea_error_offset, label: 'Extended Attribute Error Offset'

            # Returns the length of the Trans2Parameters struct
            # in number of bytes
            def length
              do_num_bytes
            end
          end

          # The {RubySMB::SMB1::DataBlock} specific to this packet type.
          class DataBlock < RubySMB::SMB1::Packet::Trans2::DataBlock
            string             :pad1,               length: -> { pad1_length }
            trans2_parameters  :trans2_parameters,  label: 'Trans2 Parameters'
            # trans2_data: No data is sent by this message.
          end

          smb_header        :smb_header
          parameter_block   :parameter_block
          data_block        :data_block

          def initialize_instance
            super
            parameter_block.setup << RubySMB::SMB1::Packet::Trans2::Subcommands::SET_FILE_INFORMATION
            smb_header.flags.reply = 1
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ruby_smb-3.0.6 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-3.0.5 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-3.0.4 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-3.0.3 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-3.0.2 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-3.0.1 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-3.0.0 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.13 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.12 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.11 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.10 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.9 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.8 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.7 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb
ruby_smb-2.0.6 lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb