Class: PacketGen::Header::OSPFv2::TosMetric
- Inherits:
-
BinStruct::Struct
- Object
- BinStruct::Struct
- PacketGen::Header::OSPFv2::TosMetric
- Includes:
- BinStruct::Structable
- 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
Instance Attribute Details
#reserved ⇒ Integer
8-bit reserved field.
36 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 36 define_attr :reserved, BinStruct::Int8, default: 0 |
#tos ⇒ Integer
8-bit IP Type of Service that this metric refers to.
32 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 32 define_attr :tos, BinStruct::Int8 |
#tos_metric ⇒ Integer
16-bit TOS-specific metric information..
40 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 40 define_attr :tos_metric, BinStruct::Int16 |
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 |