Class: ResolvFiber::DNS::Resource::SOA

Inherits:
ResolvFiber::DNS::Resource show all
Defined in:
lib/resolv_fiber.rb

Overview

Start Of Authority resource.

Constant Summary collapse

TypeValue =

:nodoc:

6

Constants inherited from ResolvFiber::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from ResolvFiber::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ResolvFiber::DNS::Resource

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

Constructor Details

#initialize(mname, rname, serial, refresh, retry_, expire, minimum) ⇒ SOA

Creates a new SOA record. See the attr documentation for the details of each argument.



1855
1856
1857
1858
1859
1860
1861
1862
1863
# File 'lib/resolv_fiber.rb', line 1855

def initialize(mname, rname, serial, refresh, retry_, expire, minimum)
  @mname = mname
  @rname = rname
  @serial = serial
  @refresh = refresh
  @retry = retry_
  @expire = expire
  @minimum = minimum
end

Instance Attribute Details

#expireObject (readonly)

Time in seconds that a secondary name server is to use the data before refreshing from the primary name server.



1896
1897
1898
# File 'lib/resolv_fiber.rb', line 1896

def expire
  @expire
end

#minimumObject (readonly)

The minimum number of seconds to be used for TTL values in RRs.



1901
1902
1903
# File 'lib/resolv_fiber.rb', line 1901

def minimum
  @minimum
end

#mnameObject (readonly)

Name of the host where the master zone file for this zone resides.



1868
1869
1870
# File 'lib/resolv_fiber.rb', line 1868

def mname
  @mname
end

#refreshObject (readonly)

How often, in seconds, a secondary name server is to check for updates from the primary name server.



1884
1885
1886
# File 'lib/resolv_fiber.rb', line 1884

def refresh
  @refresh
end

#retryObject (readonly)

How often, in seconds, a secondary name server is to retry after a failure to check for a refresh.



1890
1891
1892
# File 'lib/resolv_fiber.rb', line 1890

def retry
  @retry
end

#rnameObject (readonly)

The person responsible for this domain name.



1873
1874
1875
# File 'lib/resolv_fiber.rb', line 1873

def rname
  @rname
end

#serialObject (readonly)

The version number of the zone file.



1878
1879
1880
# File 'lib/resolv_fiber.rb', line 1878

def serial
  @serial
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



1909
1910
1911
1912
1913
1914
1915
# File 'lib/resolv_fiber.rb', line 1909

def self.decode_rdata(msg) # :nodoc:
  mname = msg.get_name
  rname = msg.get_name
  serial, refresh, retry_, expire, minimum = msg.get_unpack('NNNNN')
  return self.new(
    mname, rname, serial, refresh, retry_, expire, minimum)
end

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



1903
1904
1905
1906
1907
# File 'lib/resolv_fiber.rb', line 1903

def encode_rdata(msg) # :nodoc:
  msg.put_name(@mname)
  msg.put_name(@rname)
  msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum)
end