Class Net::DNS::RR::Classes
In: lib/net/dns/rr/classes.rb
Parent: Object

This is an auxiliary class to hadle RR class field in a DNS packet.

Methods

default=   inspect   new   regexp   to_i   to_s   to_str   to_str   valid?  

Constants

Classes = { 'IN' => 1, # RFC 1035 'CH' => 3, # RFC 1035 'HS' => 4, # RFC 1035 'NONE' => 254, # RFC 2136 'ANY' => 255, # RFC 1035 }   An hash with the values of each RR class stored with the respective id number

Public Class methods

Be able to control the default class to assign when cls argument is nil. Default to IN

Creates a new object representing an RR class. Performs some checks on the argument validity too. Il cls is nil, the default value is ANY or the one set with Classes.default=

Gives in output the keys from the Classes hash in a format suited for regexps

Returns the class in string format, as "IN" or "CH", given the numeric value

Checks whether cls is a valid RR class.

Public Instance methods

Returns the class in number format (default for normal use)

Returns the class in numeric format, usable by the pack methods for data transfers

Returns the class in string format, i.d. "IN" or "CH" or such a string.

Should be used only for testing purpouses

[Validate]