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



200
201
202
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 200

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

#set(handle) ⇒ Object



204
205
206
207
208
209
210
211
212
213
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 204

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