Class: Nl::Core::NlMsgHdr
- Inherits:
-
Struct
- Object
- Struct
- Nl::Core::NlMsgHdr
- Defined in:
- lib/nl/core.rb,
lib/nl/core.rb
Overview
Message header
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#len ⇒ Object
Returns the value of attribute len.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#seq ⇒ Object
Returns the value of attribute seq.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags
47 48 49 |
# File 'lib/nl/core.rb', line 47 def flags @flags end |
#len ⇒ Object
Returns the value of attribute len
47 48 49 |
# File 'lib/nl/core.rb', line 47 def len @len end |
#pid ⇒ Object
Returns the value of attribute pid
47 48 49 |
# File 'lib/nl/core.rb', line 47 def pid @pid end |
#seq ⇒ Object
Returns the value of attribute seq
47 48 49 |
# File 'lib/nl/core.rb', line 47 def seq @seq end |
#type ⇒ Object
Returns the value of attribute type
47 48 49 |
# File 'lib/nl/core.rb', line 47 def type @type end |
Class Method Details
.decode(decoder) ⇒ Object
59 60 61 62 63 |
# File 'lib/nl/core.rb', line 59 def self.decode(decoder) obj = new(*decoder.get_values(FORMAT)) decoder.align_to(Constants::NLMSG_ALIGNTO) obj end |
Instance Method Details
#encode(encoder) ⇒ Object
65 66 67 68 69 |
# File 'lib/nl/core.rb', line 65 def encode(encoder) encoder.reserve(Constants::NLMSG_HDRLEN) encoder.put_values(FORMAT, to_a) encoder.align_to(Constants::NLMSG_ALIGNTO) end |