Class: Net::DNS::RR::HINFO

Inherits:
Net::DNS::RR show all
Defined in:
lib/net/dns/rr/hinfo.rb

Overview

System Information Record (HINFO)

Class for DNS HINFO resource records.

Allows definition of the Hardware type and Operating System (OS) in use at a host. For security reasons these records are rarely used on public servers. If a space exists in the field it must be enclosed in quotes. Single space between CPU and OS parameters.

Constant Summary

Constants inherited from Net::DNS::RR

RRFIXEDSZ, RR_REGEXP

Constants included from Names

Names::INT16SZ

Instance Attribute Summary collapse

Attributes inherited from Net::DNS::RR

#name, #rdata, #ttl

Instance Method Summary collapse

Methods inherited from Net::DNS::RR

#cls, #comp_data, #data, #initialize, #inspect, parse, parse_packet, #to_s, #type

Methods included from Names

#dn_comp, #dn_expand, #names_array, #pack_name, #valid?

Constructor Details

This class inherits a constructor from Net::DNS::RR

Instance Attribute Details

#cpuObject (readonly)

Gets the CPU value.

Returns a String.



18
19
20
# File 'lib/net/dns/rr/hinfo.rb', line 18

def cpu
  @cpu
end

#osObject (readonly)

Gets the OS value.

Returns a String.



23
24
25
# File 'lib/net/dns/rr/hinfo.rb', line 23

def os
  @os
end

Instance Method Details

#to_aObject

Gets a list of all the attributes for this record.

Returns an Array of values.



36
37
38
# File 'lib/net/dns/rr/hinfo.rb', line 36

def to_a
  [nil, nil, cls.to_s, type.to_s, value]
end

#valueObject

Gets the standardized value for this record, represented by the value of cpu and os.

Returns a String.



29
30
31
# File 'lib/net/dns/rr/hinfo.rb', line 29

def value
  %Q("#{cpu}" "#{os}")
end