Class: PacketGen::Header::IPv6::Option

Inherits:
AbstractTLV
  • Object
show all
Defined in:
lib/packetgen/header/ipv6/hop_by_hop.rb,
lib/packetgen/header/ipv6/hop_by_hop.rb

Overview

Option for HopByHop IPv6 extension header.

Since:

Constant Summary collapse

TYPES =

Known option types

Since:

{
  1 => 'padn',
  5 => 'router_alert'
}.freeze

Instance Method Summary collapse

Instance Method Details

#to_humanString

Returns:

  • (String)

Since:



27
28
29
30
31
32
33
34
# File 'lib/packetgen/header/ipv6/hop_by_hop.rb', line 27

def to_human
  case type
  when 1
    "pad#{self.sz}"
  else
    "#{human_type}(#{value.to_s.inspect})"
  end
end