Class: Rex::Proto::MsDnsp::MsDnspAddr6

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/rex/proto/ms_dnsp.rb

Instance Method Summary collapse

Instance Method Details

#getObject



71
72
73
# File 'lib/rex/proto/ms_dnsp.rb', line 71

def get
  Rex::Socket.addr_ntoa(self.data)
end

#set(v) ⇒ Object

Raises:

  • (TypeError)


75
76
77
78
79
# File 'lib/rex/proto/ms_dnsp.rb', line 75

def set(v)
  raise TypeError, 'must be an IPv6 address' unless Rex::Socket.is_ipv6?(v)

  self.data = Rex::Socket.addr_aton(v)
end