Class: Dnsruby::Types

Inherits:
CodeMapper show all
Defined in:
lib/dnsruby/code_mappers.rb

Overview

The RR types explicitly supported by Dnsruby.

New RR types should be added to this set

Constant Summary collapse

SIGZERO =

RFC2931 consider this a pseudo type

0
A =

RFC 1035, Section 3.4.1

1
NS =

RFC 1035, Section 3.3.11

2
MD =

RFC 1035, Section 3.3.4 (obsolete)

3
MF =

RFC 1035, Section 3.3.5 (obsolete)

4
CNAME =

RFC 1035, Section 3.3.1

5
SOA =

RFC 1035, Section 3.3.13

6
MB =

RFC 1035, Section 3.3.3

7
MG =

RFC 1035, Section 3.3.6

8
MR =

RFC 1035, Section 3.3.8

9
NULL =

RFC 1035, Section 3.3.10

10
WKS =

RFC 1035, Section 3.4.2 (deprecated)

11
PTR =

RFC 1035, Section 3.3.12

12
HINFO =

RFC 1035, Section 3.3.2

13
MINFO =

RFC 1035, Section 3.3.7

14
MX =

RFC 1035, Section 3.3.9

15
TXT =

RFC 1035, Section 3.3.14

16
RP =

RFC 1183, Section 2.2

17
AFSDB =

RFC 1183, Section 1

18
X25 =

RFC 1183, Section 3.1

19
ISDN =

RFC 1183, Section 3.2

20
RT =

RFC 1183, Section 3.3

21
NSAP =

RFC 1706, Section 5

22
NSAP_PTR =

RFC 1348 (obsolete)

23
SIG =

RFC 2535, Section 4.1

24
KEY =

RFC 2535, Section 3.1

25
PX =

RFC 2163,

26
GPOS =

RFC 1712 (obsolete)

27
AAAA =

RFC 1886, Section 2.1

28
LOC =

RFC 1876

29
NXT =

RFC 2535, Section 5.2 obsoleted by RFC3755

30
EID =

draft-ietf-nimrod-dns-xx.txt

31
NIMLOC =

draft-ietf-nimrod-dns-xx.txt

32
SRV =

RFC 2052

33
ATMA =

???

34
NAPTR =

RFC 2168

35
KX =

RFC 2230

36
CERT =

RFC 2538

37
DNAME =

RFC 2672

39
OPT =

RFC 2671

41
APL =

RFC 3123

42
DS =

RFC 4034

43
SSHFP =

RFC 4255

44
IPSECKEY =

RFC 4025

45
RRSIG =

RFC 4034

46
NSEC =

RFC 4034

47
DNSKEY =

RFC 4034

48
DHCID =

RFC 4701

49
NSEC3 =

RFC still pending at time of writing

50
NSEC3PARAM =

RFC still pending at time of writing

51
TLSA =

RFC 6698

52
HIP =

RFC 5205

55
CDS =

RFC 7344

59
CDNSKEY =

RFC 7344

60
SPF =

RFC 4408

99
UINFO =

non-standard

100
UID =

non-standard

101
GID =

non-standard

102
UNSPEC =

non-standard

103
TKEY =

RFC 2930

249
TSIG =

RFC 2931

250
IXFR =

RFC 1995

251
AXFR =

RFC 1035

252
MAILB =

RFC 1035 (MB, MG, MR)

253
MAILA =

RFC 1035 (obsolete - see MX)

254
ANY =

RFC 1035

255
URI =

RFC 7553

256
CAA =

RFC 6844

257
DLV =

RFC 4431 (informational)

32769

Instance Attribute Summary

Attributes inherited from CodeMapper

#code, #string

Instance Method Summary collapse

Methods inherited from CodeMapper

#<=>, #==, #hash, #initialize, #inspect, method_missing, regexp, #set_code, #set_string

Constructor Details

This class inherits a constructor from Dnsruby::CodeMapper

Instance Method Details

#unknown_code(arg) ⇒ Object

:nodoc: all



194
195
196
197
# File 'lib/dnsruby/code_mappers.rb', line 194

def unknown_code(arg) #:nodoc: all
  Types.add_pair('TYPE' + arg.to_s, arg)
  set_code(arg)
end

#unknown_string(arg) ⇒ Object

:nodoc: all



185
186
187
188
189
190
191
192
# File 'lib/dnsruby/code_mappers.rb', line 185

def unknown_string(arg) #:nodoc: all
  if (arg=~/^TYPE/i)
    Types.add_pair(arg, arg.gsub('TYPE', '').to_i)
    set_string(arg)
  else
    raise ArgumentError.new("String #{arg} not a member of #{self.class}")
  end
end