class PacketGen::Header::OSPFv3::Hello

This class handles {OSPFv3 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:

Create a HELLO payload

# standalone
hello = PacketGen::Header::OSPFv3::Hello.new
# in a packet
pkt = PacketGen.gen('IPv6', src: source_ip).add('OSPFv3').add('OSPFv3::Hello')
# make IPv6 header correct for OSPF
pkt.ospfize
# access to Hello payload
pkt.ospfv3_hello    # => PacketGen::Header::OSPFv3::Hello

HELLO attributes

hello.interface_id = 1
hello.priority = 1
# set options. Options may also be set one by one with #v6_opt, #e_opt,
# #n_opt, #r_opt and #dc_opt
hello.options = 0x33
hello.hello_interval = 10
hello.dead_interval = 300
hello.designated_router = '0.0.0.1'
hello.backup_designated_router = '0.0.0.2'
# set neighbors identifiers
hello.neighbors << '1.1.1.1'
hello.neighbors << '2.2.2.2'

@author Sylvain Daubert