Class: PacketGen::Header::IGMPv3::MQ
- Inherits:
-
Base
- Object
- Types::Fields
- Base
- PacketGen::Header::IGMPv3::MQ
- Defined in:
- lib/packetgen/header/igmpv3/mq.rb
Overview
IGMPv3 Membership Query.
This is a subpayload for IGMPv3 packets only. This kind of payload is sent by IP multicast routers to query the multicast reception state of neighboring interfaces. Queries has 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Group Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Resv |S| QRV | QQIC | Number of Sources (N) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address [1] |
+- -+
| Source Address [2] |
+- . -+
. . .
. . .
+- -+
| Source Address [N] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields are:
-
32-bit #group_addr field (PacketGen::Header::IP::Addr type),
-
4-bit #resv, a reserved field,
-
1-bit #flag_s (Suppress Router-Side Processing),
-
3-bit #qrv (Querier’s Robustness Variable),
-
8-bit #qqic (Querier’s Query Interval Code),
-
16-bit #number_of_sources,
-
#source_addr field, a PacketGen::Header::IP::ArrayOfAddr to handle sources addresses.
Instance Attribute Summary collapse
-
#flag_s ⇒ Boolean
1-bit S flag (Suppress Router-Side Processing).
-
#group_addr ⇒ IP::Addr
IP Group address.
-
#number_of_sources ⇒ Integer
16-bit Number of Sources in #source_addr.
-
#qqic ⇒ Integer
Get QQIC value.
-
#qrv ⇒ Integer
3-bit Querier’s Robustness Variable.
-
#resv ⇒ Integer
4-bit reserved field in.
-
#source_addr ⇒ IP::ArrayOfAddr
Array of IP source addresses.
- #u8 ⇒ Integer
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
#flag_s ⇒ Boolean
1-bit S flag (Suppress Router-Side Processing)
76 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 76 define_bit_fields_on :u8, :resv, 4, :flag_s, :qrv, 3 |
#group_addr ⇒ IP::Addr
IP Group address
47 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 47 define_field :group_addr, IP::Addr, default: '0.0.0.0' |
#number_of_sources ⇒ Integer
16-bit Number of Sources in #source_addr
59 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 59 define_field :number_of_sources, Types::Int16 |
#qqic ⇒ Integer
May return a different value from value previously set, as a float encoding is used to encode big values. See PacketGen::Header::IGMPv3.decode.
Get QQIC value
55 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 55 define_field :qqic, Types::Int8 |
#qrv ⇒ Integer
3-bit Querier’s Robustness Variable
76 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 76 define_bit_fields_on :u8, :resv, 4, :flag_s, :qrv, 3 |
#resv ⇒ Integer
4-bit reserved field in
76 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 76 define_bit_fields_on :u8, :resv, 4, :flag_s, :qrv, 3 |
#source_addr ⇒ IP::ArrayOfAddr
Array of IP source addresses
64 65 |
# File 'lib/packetgen/header/igmpv3/mq.rb', line 64 define_field :source_addr, IP::ArrayOfAddr, builder: ->(h, t) { t.new(counter: h[:number_of_sources]) } |