Class: PacketGen::Header::OSPFv2::LSR
- Inherits:
-
BinStruct::Struct
- Object
- BinStruct::Struct
- PacketGen::Header::OSPFv2::LSR
- Includes:
- BinStruct::Structable
- Defined in:
- lib/packetgen/header/ospfv2/ls_request.rb
Overview
This class handle a LS request, which is composed 3 BinStruct::Int32
fields:
Instance Attribute Summary collapse
-
#advertising_router ⇒ String
The Router ID of the requested LSA.
-
#link_state_id ⇒ String
This field identifies the portion of the internet environment that is being described by the LSA to request.
-
#type ⇒ Integer
The type of the LSA to request.
Instance Method Summary collapse
-
#human_type ⇒ String
Get human-readable type.
- #to_human ⇒ String
Instance Attribute Details
#advertising_router ⇒ String
The Router ID of the requested LSA.
32 |
# File 'lib/packetgen/header/ospfv2/ls_request.rb', line 32 define_attr :advertising_router, IP::Addr |
#link_state_id ⇒ String
This field identifies the portion of the internet environment that is being described by the LSA to request.
28 |
# File 'lib/packetgen/header/ospfv2/ls_request.rb', line 28 define_attr :link_state_id, IP::Addr |
#type ⇒ Integer
The type of the LSA to request.
23 |
# File 'lib/packetgen/header/ospfv2/ls_request.rb', line 23 define_attr :type, BinStruct::Int32Enum, enum: LSAHeader::TYPES |
Instance Method Details
#human_type ⇒ String
Get human-readable type
36 37 38 |
# File 'lib/packetgen/header/ospfv2/ls_request.rb', line 36 def human_type self[:type].to_human end |
#to_human ⇒ String
41 42 43 |
# File 'lib/packetgen/header/ospfv2/ls_request.rb', line 41 def to_human "LSR<#{human_type},#{link_state_id},#{advertising_router}>" end |