Class: PacketGen::Header::IPv6::Option
- Inherits:
-
Types::TLV
- Object
- Types::Fields
- Types::TLV
- PacketGen::Header::IPv6::Option
- Defined in:
- lib/packetgen/header/ipv6/hop_by_hop.rb
Overview
Option for HopByHop IPv6 extension header
Constant Summary collapse
- TYPES =
Known option types
{ 1 => 'padn', 5 => 'router_alert' }.freeze
Instance Attribute Summary
Attributes inherited from Types::TLV
Instance Method Summary collapse
Methods inherited from Types::TLV
#human_type, #initialize, #old_type=, #read
Methods inherited from Types::Fields
#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #initialize, #inspect, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field
Constructor Details
This class inherits a constructor from PacketGen::Types::TLV
Instance Method Details
#to_human ⇒ String
21 22 23 24 25 26 27 28 |
# File 'lib/packetgen/header/ipv6/hop_by_hop.rb', line 21 def to_human case type when 1 "pad#{self.sz}" else "#{human_type}(#{value.to_s.inspect})" end end |