Class: Resolv::DNS::Resource::HINFO

Inherits:
Resolv::DNS::Resource show all
Defined in:
lib/logstash/patches/resolv_9270.rb

Overview

Host Information resource.

Constant Summary collapse

TypeValue =

:nodoc:

13

Constants inherited from Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::Resource

#==, #eql?, get_class, #hash

Constructor Details

#initialize(cpu, os) ⇒ HINFO

Creates a new HINFO running os on cpu.



1933
1934
1935
1936
# File 'lib/logstash/patches/resolv_9270.rb', line 1933

def initialize(cpu, os)
  @cpu = cpu
  @os = os
end

Instance Attribute Details

#cpuObject (readonly)

CPU architecture for this resource.



1941
1942
1943
# File 'lib/logstash/patches/resolv_9270.rb', line 1941

def cpu
  @cpu
end

#osObject (readonly)

Operating system for this resource.



1946
1947
1948
# File 'lib/logstash/patches/resolv_9270.rb', line 1946

def os
  @os
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



1953
1954
1955
1956
1957
# File 'lib/logstash/patches/resolv_9270.rb', line 1953

def self.decode_rdata(msg) # :nodoc:
  cpu = msg.get_string
  os = msg.get_string
  return self.new(cpu, os)
end

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



1948
1949
1950
1951
# File 'lib/logstash/patches/resolv_9270.rb', line 1948

def encode_rdata(msg) # :nodoc:
  msg.put_string(@cpu)
  msg.put_string(@os)
end