Class: Resolv::DNS::Resource::IN::AAAA

Inherits:
Resolv::DNS::Resource show all
Defined in:
lib/logstash/patches/resolv_9270.rb

Overview

An IPv6 address record.

Constant Summary collapse

TypeValue =
28
ClassValue =
IN::ClassValue

Constants inherited from Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes

Instance Attribute Summary collapse

Attributes inherited from Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::Resource

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

Constructor Details

#initialize(address) ⇒ AAAA

Creates a new AAAA for address.



2270
2271
2272
# File 'lib/logstash/patches/resolv_9270.rb', line 2270

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

Instance Attribute Details

#addressObject (readonly)

The Resolv::IPv6 address for this AAAA.



2277
2278
2279
# File 'lib/logstash/patches/resolv_9270.rb', line 2277

def address
  @address
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



2283
2284
2285
# File 'lib/logstash/patches/resolv_9270.rb', line 2283

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

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



2279
2280
2281
# File 'lib/logstash/patches/resolv_9270.rb', line 2279

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