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

### Methods

decode_rdata encode_rdata new

### Constants

TypeValue | = | 11, ClassValue = ClassValue]] = self

### Attributes

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

### Public Class methods

decode_rdata(msg)

[Source]

    # File resolv.rb, line 1628
              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)

[Source]

    # File resolv.rb, line 1615
              def initialize(address, protocol, bitmap)
                @address = IPv4.create(address)
                @protocol = protocol
                @bitmap = bitmap
              end

### Public Instance methods

encode_rdata(msg)

[Source]

    # File resolv.rb, line 1622
              def encode_rdata(msg)
                msg.put_bytes(@address.address)
                msg.put_pack("n", @protocol)
                msg.put_bytes(@bitmap)
              end

[Validate]