Class: PacketGen::Header::IGMPv3::MR
- Inherits:
-
Base
- Object
- Types::Fields
- Base
- PacketGen::Header::IGMPv3::MR
- Defined in:
- lib/packetgen/header/igmpv3/mr.rb
Overview
IGMPv3 Membership Report.
This is a subpayload for IGMPv3 packets only. This kind of payload is sent by IP systems to report (to neighboring routers) the current multicast reception state, or changes in the multicast reception state, of their interfaces. Reports have 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Number of Group Records (M) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Group Record [1] .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Group Record [2] .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
. . .
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Group Record [M] .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Instance Attribute Summary collapse
-
#group_records ⇒ GroupRecords
Array of group records.
-
#number_of_gr ⇒ Integer
16-bit Number of group records in #group_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
#group_records ⇒ GroupRecords
Array of group records
61 62 |
# File 'lib/packetgen/header/igmpv3/mr.rb', line 61 define_field :group_records, GroupRecords, builder: ->(h, t) { t.new(counter: h[:number_of_gr]) } |
#number_of_gr ⇒ Integer
16-bit Number of group records in #group_records
56 |
# File 'lib/packetgen/header/igmpv3/mr.rb', line 56 define_field :number_of_gr, Types::Int16, default: 0 |