Class: RubySMB::Dcerpc::Ndr::NdrContextHandle

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/ruby_smb/dcerpc/ndr.rb

Overview

An NDR Context Handle representation as defined in IDL Data Type Declarations - Basic Type Declarations

Instance Method Summary collapse

Instance Method Details

#getObject



1302
1303
1304
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 1302

def get
  {:context_handle_attributes => context_handle_attributes, :context_handle_uuid => context_handle_uuid}
end

#set(handle) ⇒ Object



1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 1306

def set(handle)
  if handle.is_a?(Hash)
    self.context_handle_attributes = handle[:context_handle_attributes]
    self.context_handle_uuid = handle[:context_handle_uuid]
  elsif handle.is_a?(NdrContextHandle)
    read(handle.to_binary_s)
  else
    read(handle.to_s)
  end
end