class PacketGen::Header::OSPFv3::DbDescription

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

Create a DbDescription payload

# standalone
dbd = PacketGen::Header::OSPFv3::DbDescription.new
# in a packet
pkt = PacketGen.gen('IPv6', src: source_ip).add('OSPFv3').add('OSPFv3::DbDescription')
# access to DbDescription payload
pkt.ospfv3_dbdescription    # => PacketGen::Header::OSPFv3::DbDescription

DbDescription attributes

dbd.reserved = 0
# set options. Options may also be set one by one with #v6_opt, #e_opt,
# #n_opt, #r_opt and #dc_opt
dbd.options = 0x33
dbd.mtu = 1500
dbd.flags = 0
dbd.seqnum = 0x800001
# add a LSA Router header
dbd.lsas << { type: 'Router', age: 40, link_state_id: '0.0.0.1', advertising_router: '1.1.1.1', sequence_number: 42, checksum: 0x1234, length: 56 }
# a header may also be set from an existing lsa
dbd.lsas << existing_lsa.to_lsa_header

@author Sylvain Daubert