Class: EventMachine::SFlow::RawPacketHeader
- Inherits:
-
Object
- Object
- EventMachine::SFlow::RawPacketHeader
- Defined in:
- lib/em-sflow/packet/raw_packet_header.rb
Instance Attribute Summary collapse
-
#frame_length ⇒ Object
Returns the value of attribute frame_length.
-
#header ⇒ Object
Returns the value of attribute header.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#strip_count ⇒ Object
Returns the value of attribute strip_count.
Instance Method Summary collapse
-
#initialize(data) ⇒ RawPacketHeader
constructor
A new instance of RawPacketHeader.
Constructor Details
#initialize(data) ⇒ RawPacketHeader
Returns a new instance of RawPacketHeader.
4 5 6 7 8 9 10 11 |
# File 'lib/em-sflow/packet/raw_packet_header.rb', line 4 def initialize data data.extend EventMachine::SFlow::BinaryString @protocol, @frame_length, @strip_count, length = data.unpack("NNNN") data.advance(16) @header = data end |
Instance Attribute Details
#frame_length ⇒ Object
Returns the value of attribute frame_length.
2 3 4 |
# File 'lib/em-sflow/packet/raw_packet_header.rb', line 2 def frame_length @frame_length end |
#header ⇒ Object
Returns the value of attribute header.
2 3 4 |
# File 'lib/em-sflow/packet/raw_packet_header.rb', line 2 def header @header end |
#protocol ⇒ Object
Returns the value of attribute protocol.
2 3 4 |
# File 'lib/em-sflow/packet/raw_packet_header.rb', line 2 def protocol @protocol end |
#strip_count ⇒ Object
Returns the value of attribute strip_count.
2 3 4 |
# File 'lib/em-sflow/packet/raw_packet_header.rb', line 2 def strip_count @strip_count end |