Class: PacketGen::Header::OSPFv3::LSAIntraAreaPrefix
- Inherits:
-
LSAHeader
- Object
- Types::Fields
- LSAHeader
- PacketGen::Header::OSPFv3::LSAIntraAreaPrefix
- 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:
-
a 16-bit #prefix_count field (Types::Int16),
-
a 16-bit #ref_ls_type field (Types::Int16Enum),
-
a 32-bit #ref_link_state_id (IP::Addr),
-
a 32-bit #ref_advertising_router (IP::Addr),
-
and an array of IPv6Prefix (#prefixes, ArrayOfIPv6Prefix). In this array, IPv6Prefix#reserved is used as
metric
value.
Constant Summary
Constants inherited from LSAHeader
PacketGen::Header::OSPFv3::LSAHeader::TYPES
Instance Attribute Summary collapse
-
#prefix_count ⇒ Integer
The number of IPv6 address prefixes contained in the LSA.
-
#prefixes ⇒ ArrayOfIPv6Prefix
Array of IPv6Prefix.
-
#ref_advertising_router ⇒ String
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.
-
#ref_link_state_id ⇒ String
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.
-
#ref_ls_type ⇒ Integer
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.
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_count ⇒ Integer
The number of IPv6 address prefixes contained in the LSA.
126 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 126 define_field :prefix_count, Types::Int16 |
#prefixes ⇒ ArrayOfIPv6Prefix
Array of IPv6Prefix. Note for this LSA, IPv6Prefix#reserved is used as metric
value.
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_router ⇒ String
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.
144 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 144 define_field :ref_advertising_router, IP::Addr |
#ref_link_state_id ⇒ String
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.
138 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 138 define_field :ref_link_state_id, IP::Addr |
#ref_ls_type ⇒ Integer
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.
132 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 132 define_field :ref_ls_type, Types::Int16Enum, enum: TYPES |