Class: PacketGen::Header::OSPFv3::Hello
- Defined in:
- lib/packetgen/header/ospfv3/hello.rb
Overview
This class handles OSPFv3 HELLO packets payload. The HELLO 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interface ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Rtr Priority | Options |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HelloInterval | RouterDeadInterval |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Designated Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Backup Designated Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Neighbor ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
A HELLO payload consists of:
-
a #interface_id field (
BinStruct::Int32
), -
a #priority field (
BinStruct::Int8
), -
an #options field (
BinStruct::Int24
), -
a #hello_interval field (
BinStruct::Int16
), -
a #dead_interval field (
BinStruct::Int16
), -
a #designated_router field (IP::Addr),
-
a #backup_designated_router field (IP::Addr),
-
a #neighbors array containing neighbors as IP::Addr.
Instance Attribute Summary collapse
-
#backup_designated_router ⇒ String
The identity of the Backup Designated Router for this network, in the view of the sending router.
-
#dc_opt ⇒ Integer
This bit describes the router’s handling of demand circuits.
-
#dead_interval ⇒ Integer
The number of seconds before declaring a silent router down.
-
#designated_router ⇒ String
The identity of the Designated Router for this network, in the view of the sending router.
-
#e_opt ⇒ Integer
This bit describes the way AS-external-LSAs are flooded.
-
#hello_interval ⇒ Integer
The number of seconds between this router’s Hello packets.
-
#interface_id ⇒ String
The network mask associated with this interface.
-
#n_opt ⇒ Integer
This bit indicates whether or not the router is attached to an NSSA.
-
#neighbors ⇒ IP::ArrayOfAddr
Array of neighbors.
-
#options ⇒ Integer
24-bit options field.
-
#priority ⇒ Integer
This router’s Router Priority.
-
#r_opt ⇒ Integer
This bit indicates whether the originator is an active router.
-
#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
#backup_designated_router ⇒ String
The identity of the Backup Designated Router for this network, in the view of the sending router.
94 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 94 define_attr :backup_designated_router, IP::Addr |
#dc_opt ⇒ Integer
This bit describes the router’s handling of demand circuits.
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |
#dead_interval ⇒ Integer
The number of seconds before declaring a silent router down.
84 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 84 define_attr :dead_interval, BinStruct::Int16 |
#designated_router ⇒ String
The identity of the Designated Router for this network, in the view of the sending router.
89 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 89 define_attr :designated_router, IP::Addr |
#e_opt ⇒ Integer
This bit describes the way AS-external-LSAs are flooded.
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |
#hello_interval ⇒ Integer
The number of seconds between this router’s Hello packets.
80 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 80 define_attr :hello_interval, BinStruct::Int16 |
#interface_id ⇒ String
The network mask associated with this interface.
69 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 69 define_attr :interface_id, BinStruct::Int32 |
#n_opt ⇒ Integer
This bit indicates whether or not the router is attached to an NSSA.
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |
#neighbors ⇒ IP::ArrayOfAddr
Array of neighbors
98 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 98 define_attr :neighbors, IP::ArrayOfAddr |
#options ⇒ Integer
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |
#priority ⇒ Integer
This router’s Router Priority. Used in (Backup) Designated Router election.
74 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 74 define_attr :priority, BinStruct::Int8 |
#r_opt ⇒ Integer
This bit indicates whether the originator is an active router.
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |
#v6_opt ⇒ Integer
If this bit is clear, the router/link should be excluded from IPv6 routing calculations.
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |
#x_opt ⇒ Integer
This bit should be set to 0, and ignored when received.
76 |
# File 'lib/packetgen/header/ospfv3/hello.rb', line 76 OSPFv3.(self) |