Class: ResolvFiber::DNS::Resource::IN::AAAA

Inherits:
ResolvFiber::DNS::Resource show all
Defined in:
lib/resolv_fiber.rb

Overview

An IPv6 address record.

Constant Summary collapse

TypeValue =
28
ClassValue =
IN::ClassValue

Constants inherited from ResolvFiber::DNS::Resource

ClassHash, ClassInsensitiveTypes

Instance Attribute Summary collapse

Attributes inherited from ResolvFiber::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ResolvFiber::DNS::Resource

#==, #eql?, get_class, #hash

Constructor Details

#initialize(address) ⇒ AAAA

Creates a new AAAA for address.



2272
2273
2274
# File 'lib/resolv_fiber.rb', line 2272

def initialize(address)
  @address = IPv6.create(address)
end

Instance Attribute Details

#addressObject (readonly)

The Resolv::IPv6 address for this AAAA.



2279
2280
2281
# File 'lib/resolv_fiber.rb', line 2279

def address
  @address
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



2285
2286
2287
# File 'lib/resolv_fiber.rb', line 2285

def self.decode_rdata(msg) # :nodoc:
  return self.new(IPv6.new(msg.get_bytes(16)))
end

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



2281
2282
2283
# File 'lib/resolv_fiber.rb', line 2281

def encode_rdata(msg) # :nodoc:
  msg.put_bytes(@address.address)
end