Class: Resolv::DNS::SvcParam::IPv6Hint

Inherits:
Resolv::DNS::SvcParam show all
Defined in:
lib/resolv.rb

Overview

“ipv6hint” SvcParam – IPv6 address hints

Constant Summary collapse

KeyName =
:ipv6hint
KeyNumber =
6

Constants inherited from Resolv::DNS::SvcParam

ClassHash

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::SvcParam

key_name, key_number

Constructor Details

#initialize(addresses) ⇒ IPv6Hint

Initialize “ipv6hint” ScvParam.



2040
2041
2042
# File 'lib/resolv.rb', line 2040

def initialize(addresses)
  @addresses = addresses.map {|address| IPv6.create(address) }
end

Instance Attribute Details

#addressesObject (readonly)

Set of IPv6 addresses.



2035
2036
2037
# File 'lib/resolv.rb', line 2035

def addresses
  @addresses
end

Class Method Details

.decode(msg) ⇒ Object

:nodoc:



2050
2051
2052
2053
# File 'lib/resolv.rb', line 2050

def self.decode(msg) # :nodoc:
  addresses = msg.get_list { IPv6.new(msg.get_bytes(16)) }
  return self.new(addresses)
end

Instance Method Details

#encode(msg) ⇒ Object

:nodoc:



2044
2045
2046
2047
2048
# File 'lib/resolv.rb', line 2044

def encode(msg) # :nodoc:
  @addresses.each do |address|
    msg.put_bytes(address.address)
  end
end