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 1674
1674:           def self.decode_rdata(msg)
1675:             address = IPv4.new(msg.get_bytes(4))
1676:             protocol, = msg.get_unpack("n")
1677:             bitmap = msg.get_bytes
1678:             return self.new(address, protocol, bitmap)
1679:           end

[Source]

      # File lib/resolv.rb, line 1661
1661:           def initialize(address, protocol, bitmap)
1662:             @address = IPv4.create(address)
1663:             @protocol = protocol
1664:             @bitmap = bitmap
1665:           end

Public Instance methods

[Source]

      # File lib/resolv.rb, line 1668
1668:           def encode_rdata(msg)
1669:             msg.put_bytes(@address.address)
1670:             msg.put_pack("n", @protocol)
1671:             msg.put_bytes(@bitmap)
1672:           end

[Validate]