Class: DNS::ResourceRecord::IN::HINFO
- Defined in:
- lib/faildns/resourcerecord/IN/HINFO.rb
Overview
–
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/ CPU /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/ OS /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
CPU A <character-string> which specifies the CPU type.
OS A <character-string> which specifies the operating
system type.
Standard values for CPU and OS can be found in [RFC-1010].
HINFO records are used to acquire general information about a host. The main use is for protocols such as FTP that can use special procedures when talking between machines or operating systems of the same type. ++
Instance Attribute Summary collapse
-
#cpu ⇒ Object
readonly
Returns the value of attribute cpu.
-
#os ⇒ Object
readonly
Returns the value of attribute os.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cpu, os) ⇒ HINFO
constructor
A new instance of HINFO.
- #pack ⇒ Object
- #to_s ⇒ Object
Methods inherited from Data
Constructor Details
#initialize(cpu, os) ⇒ HINFO
Returns a new instance of HINFO.
61 62 63 64 |
# File 'lib/faildns/resourcerecord/IN/HINFO.rb', line 61 def initialize (cpu, os) @cpu = cpu @os = os end |
Instance Attribute Details
#cpu ⇒ Object (readonly)
Returns the value of attribute cpu.
59 60 61 |
# File 'lib/faildns/resourcerecord/IN/HINFO.rb', line 59 def cpu @cpu end |
#os ⇒ Object (readonly)
Returns the value of attribute os.
59 60 61 |
# File 'lib/faildns/resourcerecord/IN/HINFO.rb', line 59 def os @os end |
Class Method Details
Instance Method Details
#pack ⇒ Object
66 67 68 |
# File 'lib/faildns/resourcerecord/IN/HINFO.rb', line 66 def pack [@cpu.length].unpack('C') + @cpu + [@os.length].unpack('C') + @os end |
#to_s ⇒ Object
70 71 72 |
# File 'lib/faildns/resourcerecord/IN/HINFO.rb', line 70 def to_s "#{@os} on #{@cpu}" end |