Class: PacketGen::Header::OSPFv2::External

Inherits:
Types::Fields show all
Defined in:
lib/packetgen/header/ospfv2/lsa.rb

Overview

This class handles external links in LSA AS-External payloads.

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

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::Fields

Instance Attribute Details

#e_flagBoolean



156
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 156

define_bit_fields_on :u8, :e_flag, :tos, 7

#ext_route_tagInteger



150
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 150

define_field :ext_route_tag, Types::Int32

#forwarding_addrIP::Addr



147
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 147

define_field :forwarding_addr, IP::Addr

#metricInteger



144
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 144

define_field :metric, Types::Int24

#tosInteger



156
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 156

define_bit_fields_on :u8, :e_flag, :tos, 7

#u8Integer



141
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 141

define_field :u8, Types::Int8

Instance Method Details

#to_humanString

Since:

  • 2.5.0



159
160
161
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 159

def to_human
  "<type:#{e_flag? ? 2 : 1},tos:#{tos},metric:#{metric},fwaddr:#{forwarding_addr},tag:#{ext_route_tag}>"
end