Class Resolv::DNS::Resource::IN::WKS
In: lib/resolv.rb
Parent: Resource

Methods

Constants

TypeValue = 11, ClassValue = ClassValue]] = self

Attributes

address  [R] 
bitmap  [R] 
protocol  [R] 

Public Class methods

[Source]

      # File lib/resolv.rb, line 1628
1628:           def self.decode_rdata(msg)
1629:             address = IPv4.new(msg.get_bytes(4))
1630:             protocol, = msg.get_unpack("n")
1631:             bitmap = msg.get_bytes
1632:             return self.new(address, protocol, bitmap)
1633:           end

[Source]

      # File lib/resolv.rb, line 1615
1615:           def initialize(address, protocol, bitmap)
1616:             @address = IPv4.create(address)
1617:             @protocol = protocol
1618:             @bitmap = bitmap
1619:           end

Public Instance methods

[Source]

      # File lib/resolv.rb, line 1622
1622:           def encode_rdata(msg)
1623:             msg.put_bytes(@address.address)
1624:             msg.put_pack("n", @protocol)
1625:             msg.put_bytes(@bitmap)
1626:           end

[Validate]