Class: PacketGen::Header::OSPFv3::LSAIntraAreaPrefix

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

Overview

This class handles OSPFv3 LSA Intra-Area-Prefix payloads.

An Intra-Area-Prefix payloads is composed of:

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

#prefix_countInteger

The number of IPv6 address prefixes contained in the LSA.

Returns:

  • (Integer)


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

define_field :prefix_count, Types::Int16

#prefixesArrayOfIPv6Prefix

Array of IPv6Prefix. Note for this LSA, IPv6Prefix#reserved is used as metric value.

Returns:



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

define_field :prefixes, ArrayOfIPv6Prefix,
builder: ->(h, t) { t.new(counter: h[:prefix_count]) }

#ref_advertising_routerString

Used to identify the router-LSA or network-LSA with which the IPv6 address prefixes should be associated, in association with #ref_link_state_id and #ref_ls_type.

Returns:

  • (String)


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

define_field :ref_advertising_router, IP::Addr

Used to identify the router-LSA or network-LSA with which the IPv6 address prefixes should be associated, in association with #ref_ls_type and #ref_advertising_router.

Returns:

  • (String)


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

define_field :ref_link_state_id, IP::Addr

#ref_ls_typeInteger

Used to identify the router-LSA or network-LSA with which the IPv6 address prefixes should be associated, in association with #ref_link_state_id and #ref_advertising_router.

Returns:

  • (Integer)


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

define_field :ref_ls_type, Types::Int16Enum, enum: TYPES