In Files

  • resolv.rb

Resolv::DNS::Resource::IN::WKS

Constants

TypeValue

Attributes

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

Public Class Methods

decode_rdata(msg) click to toggle source
 
               # File resolv.rb, line 1674
def self.decode_rdata(msg)
  address = IPv4.new(msg.get_bytes(4))
  protocol, = msg.get_unpack("n")
  bitmap = msg.get_bytes
  return self.new(address, protocol, bitmap)
end
            
new(address, protocol, bitmap) click to toggle source
 
               # File resolv.rb, line 1661
def initialize(address, protocol, bitmap)
  @address = IPv4.create(address)
  @protocol = protocol
  @bitmap = bitmap
end
            

Public Instance Methods

encode_rdata(msg) click to toggle source
 
               # File resolv.rb, line 1668
def encode_rdata(msg)
  msg.put_bytes(@address.address)
  msg.put_pack("n", @protocol)
  msg.put_bytes(@bitmap)
end