Class: PacketGen::Header::MLDv2::MLR
- Inherits:
-
Base
- Object
- Types::Fields
- Base
- PacketGen::Header::MLDv2::MLR
- Defined in:
- lib/packetgen/header/mldv2/mlr.rb
Overview
This class supports MLDv2 Multicast Listener Report messages.
From RFC 3810, a MLDv2 Multicast Listener Report message has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 143 | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |Nr of Mcast Address Records (M)|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Multicast Address Record [1] .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
. . .
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Multicast Address Record [M] .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
type
, code
and checksum
are fields from ICMPv6 header.
MLR fields are:
-
#number_of_mar (number of mcast address records, Types::Int16),
Instance Attribute Summary collapse
-
#number_of_mar ⇒ Integer
16-bit Number of group records in #records.
-
#records ⇒ McastAddressRecords
Array of Mcast Address Records.
-
#reserved ⇒ Object
16-bit reserved field.
Method Summary
Methods inherited from Base
bind, calculate_and_set_length, #header_id, inherited, #initialize, #ip_header, #ll_header
Methods included from PacketGen::Headerable
#added_to_packet, included, #method_name, #packet, #packet=, #parse?, #protocol_name, #read
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::Header::Base
Instance Attribute Details
#number_of_mar ⇒ Integer
16-bit Number of group records in #records
56 |
# File 'lib/packetgen/header/mldv2/mlr.rb', line 56 define_field :number_of_mar, Types::Int16, default: 0 |
#records ⇒ McastAddressRecords
Array of Mcast Address Records
61 62 |
# File 'lib/packetgen/header/mldv2/mlr.rb', line 61 define_field :records, McastAddressRecords, builder: ->(h, t) { t.new(counter: h[:number_of_mar]) } |