Sha256: 7eac9da130d74cf1244b85da804f2adddbb3bfbf5a23d0bd893186172cf99f33

Contents?: true

Size: 1.13 KB

Versions: 15

Compression:

Stored size: 1.13 KB

Contents

module RubySMB
  module SMB2
    module Packet
      # An SMB2 TreeConnectResponse Packet as defined in
      # [2.2.10 SMB2 TREE_CONNECT Response](https://msdn.microsoft.com/en-us/library/cc246499.aspx)
      class TreeConnectResponse < RubySMB::GenericPacket
        COMMAND = RubySMB::SMB2::Commands::TREE_CONNECT

        # Share Types
        # Physical disk share
        SMB2_SHARE_TYPE_DISK  = 0x01
        # Named pipe share
        SMB2_SHARE_TYPE_PIPE  = 0x02
        # Printer share
        SMB2_SHARE_TYPE_PRINT = 0x03

        endian :little
        smb2_header           :smb2_header
        uint16                :structure_size, label: 'Structure Size', initial_value: 16
        uint8                 :share_type,     label: 'Share Type',     initial_value: 0x01
        uint8                 :reserved,       label: 'Reserved Space', initial_value: 0x00
        share_flags           :share_flags
        share_capabilities    :capabilities
        directory_access_mask :maximal_access, label: 'Maximal Access'

        def initialize_instance
          super
          smb2_header.flags.reply = 1
        end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ruby_smb-3.0.0 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.13 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.12 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.11 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.10 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.9 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.8 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.7 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.6 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.5 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.4 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.3 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.2 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.1 lib/ruby_smb/smb2/packet/tree_connect_response.rb
ruby_smb-2.0.0 lib/ruby_smb/smb2/packet/tree_connect_response.rb