Class Dnsruby::RR::NXT
In: lib/dnsruby/resource/NXT.rb
Parent: RR

Class for NXT resource records.

NXT-specific data types, present in RDATA, are:

  next_domain: the next domain name, as a Name instance
  types: array of record types as numbers

RFC 2535 (www.ietf.org/rfc/rfc2535.txt)

The RFC mentions that a low bit of zero in the type RDATA indicates that the highest type code does not exceed 127, and that a low bit of 1 indicates that some mechanism other than a bitmap is being used. This class does not support such non-bitmap mechanisms, and assumes there will always be a bitmap.

Methods

Classes and Modules

Module Dnsruby::RR::NXT::NxtTypes
Class Dnsruby::RR::NXT::TypeBitmap

Constants

REQUIRED_KEYS = [:next_domain, :types]

External Aliases

name -> owner
  ‘name’ is used in the RR superclass, but ‘owner’ is the term referred to in the RFC, so we‘ll make owner an alias for name.
name= -> owner=

Attributes

next_domain  [RW] 
types  [RW] 

Public Class methods

Builds rdata from the provided information. @param next_domain either a string or a Name @param types an array of types (where each type is the numeric type code)

       or a TypeBitmap

Create an instance from an ordered parameter list, e.g.: rdata = RR::NXT.build_rdata(‘a.dnsruby.com.’, [Types::SOA, Types::NXT])

rr = RR::NXT.new_from_data(‘b.dnsruby.com.’, Types::NXT,

    Classes::IN, 10800, rdata.size, rdata, 0)

Create an instance from a hash of parameters, e.g.:

rr = RR::NXT.new_from_hash(

    name: 'b.dnsruby.com.',
    ttl: 10800,
    klass: Classes::IN,
    next_domain: 'a.dnsruby.com.',
    types: [Types::SOA, Types::NXT])

Since the type is assumed to be NXT, it will be assigned automatically, and any other value will be overwritten. Therefore, having it present in the hash is not necessary.

Create an instance from a string containing parameters, e.g.: b.dnsruby.com. 10800 IN NXT A.dnsruby.com. SOA NXT

Public Instance methods

From the RFC: NXT has the following format: foo.nil. NXT big.foo.nil NS KEY SOA NXT <owner> NXT <next_domain> <record types>

We handle the rdata, the RR superclass does the rest.

[Validate]