Class: Gem::Resolv::DNS::Resource::IN::WKS
- Inherits:
-
Gem::Resolv::DNS::Resource
- Object
- Query
- Gem::Resolv::DNS::Resource
- Gem::Resolv::DNS::Resource::IN::WKS
- Defined in:
- lib/rubygems/vendor/resolv/lib/resolv.rb
Overview
Well Known Service resource.
Constant Summary collapse
- TypeValue =
11
- ClassValue =
IN::ClassValue
Constants inherited from Gem::Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
The host these services run on.
-
#bitmap ⇒ Object
readonly
A bit map of enabled services on this host.
-
#protocol ⇒ Object
readonly
IP protocol number for these services.
Attributes inherited from Gem::Resolv::DNS::Resource
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#initialize(address, protocol, bitmap) ⇒ WKS
constructor
A new instance of WKS.
Methods inherited from Gem::Resolv::DNS::Resource
Constructor Details
Instance Attribute Details
#address ⇒ Object (readonly)
The host these services run on.
2667 2668 2669 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2667 def address @address end |
#bitmap ⇒ Object (readonly)
A bit map of enabled services on this host.
If protocol is 6 (TCP) then the 26th bit corresponds to the SMTP service (port 25). If this bit is set, then an SMTP server should be listening on TCP port 25; if zero, SMTP service is not supported.
2682 2683 2684 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2682 def bitmap @bitmap end |
#protocol ⇒ Object (readonly)
IP protocol number for these services.
2672 2673 2674 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2672 def protocol @protocol end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
2690 2691 2692 2693 2694 2695 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2690 def self.decode_rdata(msg) # :nodoc: address = IPv4.new(msg.get_bytes(4)) protocol, = msg.get_unpack("n") bitmap = msg.get_bytes return self.new(address, protocol, bitmap) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
:nodoc:
2684 2685 2686 2687 2688 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2684 def encode_rdata(msg) # :nodoc: msg.put_bytes(@address.address) msg.put_pack("n", @protocol) msg.put_bytes(@bitmap) end |