Class: PacketGen::Header::OSPFv2::Link
- Inherits:
-
Types::Fields
- Object
- Types::Fields
- PacketGen::Header::OSPFv2::Link
- Includes:
- Types::Fieldable
- Defined in:
- lib/packetgen/header/ospfv2/lsa.rb
Overview
This class handles links in a LSA router payload.
Instance Attribute Summary collapse
- #data ⇒ IP::Addr
- #id ⇒ IP::Addr
- #metric ⇒ Integer
-
#tos ⇒ ArrayOfTosMetric
Additionnal TOS metrics.
- #tos_count ⇒ Integer
- #type ⇒ Integer
Instance Method Summary collapse
Methods included from Types::Fieldable
#format_inspect, #read, #sz, #to_s, #type_name
Methods inherited from Types::Fields
#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #initialize, #inspect, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field
Constructor Details
This class inherits a constructor from PacketGen::Types::Fields
Instance Attribute Details
#data ⇒ IP::Addr
65 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 65 define_field :data, IP::Addr |
#metric ⇒ Integer
74 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 74 define_field :metric, Types::Int16 |
#tos ⇒ ArrayOfTosMetric
Additionnal TOS metrics
78 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 78 define_field :tos, ArrayOfTosMetric, builder: ->(h, t) { t.new(counter: h[:tos_count]) } |
Instance Method Details
#to_human ⇒ String
81 82 83 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 81 def to_human "<type:#{type},metric:#{metric},id:#{id},data:#{data}>" end |