Class: PacketGen::Header::OSPFv2::LSARouter
- Inherits:
-
LSAHeader
- Object
- Types::Fields
- LSAHeader
- PacketGen::Header::OSPFv2::LSARouter
- Defined in:
- lib/packetgen/header/ospfv2/lsa.rb
Overview
This class handles LSA Router payloads.
A LSA router payload is composed of:
-
a header (see methods inherited from LSAHeader),
-
a 16-bit flag word #u16 (Types::Int16),
-
a 16-bit #link_count field (Types::Int16),
-
an array of #links (ArrayOfLink).
Constant Summary
Constants inherited from LSAHeader
PacketGen::Header::OSPFv2::LSAHeader::TYPES
Instance Attribute Summary collapse
- #b_flag ⇒ Boolean
- #e_flag ⇒ Boolean
-
#link_count ⇒ Integer
Number of links.
- #links ⇒ ArrayOfLink
-
#u16 ⇒ Integer
16-bit flag word.
- #v_flag ⇒ Boolean
Attributes inherited from LSAHeader
#advertising_router, #age, #checksum, #dc_opt, #dn_opt, #e_opt, #l_opt, #length, #link_state_id, #mc_opt, #mt_opt, #n_opt, #o_opt, #options, #sequence_number, #type
Method Summary
Methods inherited from LSAHeader
#calc_checksum, #calc_length, #human_type, #to_human, #to_lsa_header
Methods included from Types::Fieldable
#format_inspect, #read, #sz, #to_human, #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
#b_flag ⇒ Boolean
120 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 120 define_bit_fields_on :u16, :z, 5, :v_flag, :e_flag, :b_flag, :zz, 8 |
#e_flag ⇒ Boolean
120 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 120 define_bit_fields_on :u16, :z, 5, :v_flag, :e_flag, :b_flag, :zz, 8 |
#link_count ⇒ Integer
Number of links
109 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 109 define_field :link_count, Types::Int16 |
#links ⇒ ArrayOfLink
112 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 112 define_field :links, ArrayOfLink, builder: ->(h, t) { t.new(counter: h[:link_count]) } |
#u16 ⇒ Integer
16-bit flag word
105 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 105 define_field :u16, Types::Int16 |
#v_flag ⇒ Boolean
120 |
# File 'lib/packetgen/header/ospfv2/lsa.rb', line 120 define_bit_fields_on :u16, :z, 5, :v_flag, :e_flag, :b_flag, :zz, 8 |