Class: PacketGen::Header::OSPFv3::LSA

Inherits:
LSAHeader show all
Defined in:
lib/packetgen/header/ospfv3/lsa.rb

Overview

This class handles unsupported OSPFv3 LSA payloads. A LSA payload is a LSAHeader with a #body field.

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

Constant Summary

Constants inherited from LSAHeader

PacketGen::Header::OSPFv3::LSAHeader::TYPES

Instance Attribute Summary collapse

Attributes inherited from LSAHeader

#advertising_router, #age, #checksum, #length, #link_state_id, #sequence_number, #type

Method Summary

Methods inherited from LSAHeader

#calc_checksum, #calc_length, #human_type, #to_human, #to_lsa_header

Methods included from Types::Fieldable

#format_inspect, #read, #sz, #to_human, #to_s, #type_name

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

#bodyString

LSA body

Returns:

  • (String)

56
57
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 56

define_field :body, Types::String,
builder: ->(h, t) { t.new(length_from: -> { h.length - 20 }) }