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 Method Summary collapse

Methods inherited from Net::DNS::RR

#cls, #comp_data, #data, #initialize, #inspect, #name, parse, parse_packet, #rdata, #to_s, #ttl, #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 Method Details

#cpuObject

Gets the CPU value.

Returns a String.



20
21
22
# File 'lib/net/dns/rr/hinfo.rb', line 20

def cpu
  @cpu
end

#osObject

Gets the OS value.

Returns a String.



27
28
29
# File 'lib/net/dns/rr/hinfo.rb', line 27

def os
  @os
end

#to_aObject

Gets a list of all the attributes for this record.

Returns an Array of values.



43
44
45
# File 'lib/net/dns/rr/hinfo.rb', line 43

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.



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

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