Class: Nl::Genl::Endpoint
- Inherits:
-
Raw::Endpoint
- Object
- Raw::Endpoint
- Nl::Genl::Endpoint
- Defined in:
- nl/lib/nl/genl/protocol.rb
Overview
A generated Generic Netlink family bound to nlctrl-provided information.
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
Attributes inherited from Raw::Endpoint
Instance Method Summary collapse
- #family_id ⇒ Object
- #frame_type(_message_class) ⇒ Object
-
#initialize(definition, info) ⇒ Endpoint
constructor
A new instance of Endpoint.
- #multicast_group_id(name, _value) ⇒ Object
- #version ⇒ Object
Methods inherited from Raw::Endpoint
Constructor Details
#initialize(definition, info) ⇒ Endpoint
Returns a new instance of Endpoint.
10 11 12 13 |
# File 'nl/lib/nl/genl/protocol.rb', line 10 def initialize(definition, info) super(definition) @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
8 9 10 |
# File 'nl/lib/nl/genl/protocol.rb', line 8 def info @info end |
Instance Method Details
#family_id ⇒ Object
15 |
# File 'nl/lib/nl/genl/protocol.rb', line 15 def family_id = @info.id |
#frame_type(_message_class) ⇒ Object
17 |
# File 'nl/lib/nl/genl/protocol.rb', line 17 def frame_type() = family_id |
#multicast_group_id(name, _value) ⇒ Object
19 20 21 22 23 24 |
# File 'nl/lib/nl/genl/protocol.rb', line 19 def multicast_group_id(name, _value) @info.multicast_groups.fetch(name) do raise UnresolvedMulticastGroupError, "Generic Netlink multicast group #{name.inspect} was not resolved" end end |
#version ⇒ Object
16 |
# File 'nl/lib/nl/genl/protocol.rb', line 16 def version = @definition.version |