Class: PacketGen::Header::IP::RA

Inherits:
Option
  • Object
show all
Defined in:
lib/packetgen/header/ip/option.rb

Overview

Router Alert IP option

Constant Summary

Constants inherited from Option

Option::EOL_TYPE, Option::LSRR_TYPE, Option::NOP_TYPE, Option::RA_TYPE, Option::RR_TYPE, Option::SI_TYPE, Option::SSRR_TYPE

Instance Attribute Summary collapse

Attributes inherited from Option

#copied, #data, #length, #option_class, #type

Instance Method Summary collapse

Methods inherited from Option

build, #initialize, #to_s, types

Constructor Details

This class inherits a constructor from PacketGen::Header::IP::Option

Instance Attribute Details

#valueInteger

16-bit value. Should be 0.

Returns:

  • (Integer)


216
# File 'lib/packetgen/header/ip/option.rb', line 216

define_attr :value, BinStruct::Int16, default: 0

Instance Method Details

#to_humanString

Return a human-readable string

Returns:

  • (String)


220
221
222
# File 'lib/packetgen/header/ip/option.rb', line 220

def to_human
  super << ":#{self.value}"
end