Class: PacketGen::Header::OSPFv2::TosMetric
- Inherits:
-
Types::Fields
- Object
- Types::Fields
- PacketGen::Header::OSPFv2::TosMetric
- Includes:
- Types::Fieldable
- Defined in:
- lib/packetgen/header/ospfv2/lsa.rb
Overview
This class handles TOS metrics for links in a LSA router payload.
Instance Attribute Summary collapse
-
#reserved ⇒ Integer
8-bit reserved field.
-
#tos ⇒ Integer
8-bit IP Type of Service that this metric refers to.
-
#tos_metric ⇒ Integer
16-bit TOS-specific metric information..
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
#reserved ⇒ Integer
8-bit reserved field.
36 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 36 define_field :reserved, Types::Int8, default: 0 |
Instance Method Details
#to_human ⇒ String
43 44 45 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 43 def to_human "TOS<type:#{type},metric:#{tos_metric}>" end |