Class: PacketGen::Header::OSPFv3::DbDescription
- Defined in:
- lib/packetgen/header/ospfv3/db_description.rb
Overview
This class handles OSPFv3 DB description packets payload. The DB description payload has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
| 0 | Options |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
| Interface MTU | 0 |0|0|0|0|0|I|M|MS|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
| DD sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
| |
+- -+
| |
+- An LSA Header -+
| |
+- -+
| |
+- -+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
| ... |
A DB description payload is composed of:
-
a 8-bit #reserved field (
BinStruct::Int8
), -
a 24-bit #options field (
BinStruct::Int24
), -
a 16-bit #mtu field (
BinStruct::Int16
), -
a 16-bit #flags field (
BinStruct::Int16
). Supported flags are: -
a 32-bit #sequence_number field (
BinStruct::Int32
), -
and an array of LSAHeaders (#lsas, ArrayOfLSA).
Instance Attribute Summary collapse
-
#dc_opt ⇒ Integer
This bit describes the router’s handling of demand circuits.
-
#e_opt ⇒ Integer
This bit describes the way AS-external-LSAs are flooded.
- #flags ⇒ Integer
-
#i_flag ⇒ Integer
Init bit from #flags field.
-
#lsas ⇒ ArrayOfLSA
Array of LSA headers.
-
#m_flag ⇒ Integer
More bit from #flags field.
-
#ms_flag ⇒ Integer
Master/Slave bit from #flags field.
-
#mtu ⇒ Integer
16-bit interface MTU.
-
#n_opt ⇒ Integer
This bit indicates whether or not the router is attached to an NSSA.
-
#options ⇒ Integer
24-bit options field.
-
#r_opt ⇒ Integer
This bit indicates whether the originator is an active router.
-
#reserved ⇒ Integer
8-bit zero field before #options one.
-
#sequence_number ⇒ Integer
(also: #seqnum)
32-bit DD sequence number, used to sequence the collection of Database Description Packets.
-
#v6_opt ⇒ Integer
If this bit is clear, the router/link should be excluded from IPv6 routing calculations.
-
#x_opt ⇒ Integer
This bit should be set to 0, and ignored when received.
Method Summary
Methods inherited from Base
bind, calculate_and_set_length, #header_id, inherited, #initialize, #ip_header, #ll_header
Methods included from PacketGen::Headerable
#added_to_packet, included, #method_name, #packet, #packet=, #parse?, #protocol_name, #read, #to_s
Constructor Details
This class inherits a constructor from PacketGen::Header::Base
Instance Attribute Details
#dc_opt ⇒ Integer
This bit describes the router’s handling of demand circuits.
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |
#e_opt ⇒ Integer
This bit describes the way AS-external-LSAs are flooded.
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |
#flags ⇒ Integer
91 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 91 define_bit_attr :flags, zz: 13, i_flag: 1, m_flag: 1, ms_flag: 1 |
#i_flag ⇒ Integer
Init bit from #flags field
91 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 91 define_bit_attr :flags, zz: 13, i_flag: 1, m_flag: 1, ms_flag: 1 |
#lsas ⇒ ArrayOfLSA
Array of LSA headers
104 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 104 define_attr :lsas, ArrayOfLSA, builder: ->(_h, t) { t.new(only_headers: true) } |
#m_flag ⇒ Integer
More bit from #flags field
91 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 91 define_bit_attr :flags, zz: 13, i_flag: 1, m_flag: 1, ms_flag: 1 |
#ms_flag ⇒ Integer
Master/Slave bit from #flags field
91 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 91 define_bit_attr :flags, zz: 13, i_flag: 1, m_flag: 1, ms_flag: 1 |
#mtu ⇒ Integer
16-bit interface MTU
78 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 78 define_attr :mtu, BinStruct::Int16 |
#n_opt ⇒ Integer
This bit indicates whether or not the router is attached to an NSSA.
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |
#options ⇒ Integer
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |
#r_opt ⇒ Integer
This bit indicates whether the originator is an active router.
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |
#reserved ⇒ Integer
8-bit zero field before #options one
70 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 70 define_attr :reserved, BinStruct::Int8, default: 0 |
#sequence_number ⇒ Integer Also known as: seqnum
32-bit DD sequence number, used to sequence the collection of Database Description Packets.
97 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 97 define_attr :sequence_number, BinStruct::Int32 |
#v6_opt ⇒ Integer
If this bit is clear, the router/link should be excluded from IPv6 routing calculations.
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |
#x_opt ⇒ Integer
This bit should be set to 0, and ignored when received.
73 |
# File 'lib/packetgen/header/ospfv3/db_description.rb', line 73 OSPFv3.(self) |