Class: PacketGen::Header::OSPFv3::LSAIntraAreaPrefix
- Inherits:
-
LSAHeader
- Object
- BinStruct::Struct
- 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 (
BinStruct::Int16
), -
a 16-bit #ref_ls_type field (
BinStruct::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
Instance Attribute Details
#prefix_count ⇒ Integer
The number of IPv6 address prefixes contained in the LSA.
137 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 137 define_attr :prefix_count, BinStruct::Int16 |
#prefixes ⇒ ArrayOfIPv6Prefix
Array of IPv6Prefix. Note for this LSA, IPv6Prefix#reserved is used as metric
value.
160 161 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 160 define_attr :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.
155 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 155 define_attr :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.
149 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 149 define_attr :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.
143 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 143 define_attr :ref_ls_type, BinStruct::Int16Enum, enum: TYPES |