Class: PacketGen::Header::OSPFv3::Link
- Inherits:
-
BinStruct::Struct
- Object
- BinStruct::Struct
- PacketGen::Header::OSPFv3::Link
- Includes:
- BinStruct::Structable
- Defined in:
- lib/packetgen/header/ospfv3/lsa.rb
Overview
This class handles links in a OSPFv3 LSA router payload.
Instance Attribute Summary collapse
-
#interface_id ⇒ Integer
ID for the interface being described.
-
#metric ⇒ Integer
Cost of using this router interface.
-
#neighbor_interface_id ⇒ Integer
Interface ID the neighbor router has associated with this link.
-
#neighbor_router_id ⇒ String
Router ID of the neighbor router.
- #reserved ⇒ Integer
-
#type ⇒ Integer
Kind of interface being described.
Instance Method Summary collapse
-
#to_human ⇒ String
Human-readable description.
Instance Attribute Details
#interface_id ⇒ Integer
ID for the interface being described.
34 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 34 define_attr :interface_id, BinStruct::Int32 |
#metric ⇒ Integer
Cost of using this router interface.
30 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 30 define_attr :metric, BinStruct::Int16 |
#neighbor_interface_id ⇒ Integer
Interface ID the neighbor router has associated with this link.
38 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 38 define_attr :neighbor_interface_id, BinStruct::Int32 |
#neighbor_router_id ⇒ String
Router ID of the neighbor router.
42 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 42 define_attr :neighbor_router_id, IP::Addr |
#reserved ⇒ Integer
26 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 26 define_attr :reserved, BinStruct::Int8, default: 0 |
#type ⇒ Integer
Kind of interface being described. One of the following:
* 1: Point-to-point connection to another router
* 2: Connection to a transit network
* 4: Virtual link
23 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 23 define_attr :type, BinStruct::Int8 |
Instance Method Details
#to_human ⇒ String
Human-readable description
46 47 48 49 |
# File 'lib/packetgen/header/ospfv3/lsa.rb', line 46 def to_human "Link<type:#{type},metric:#{metric},id:#{interface_id}," \ "neighbor_id:#{neighbor_interface_id},neighbor_router:#{neighbor_router_id}>" end |