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



1312
1313
1314
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 1312

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

#set(handle) ⇒ Object



1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 1316

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