class PacketGen::Header::MLDv2::MLQ

This class supports MLDv2 Multicast Listener Query messages.

From RFC 3810, a MLDv2 Multicast Listener Query message has the following format:

                    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 = 130   |      Code     |           Checksum            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Maximum Response Code      |           Reserved            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
*                                                               *
|                                                               |
*                       Multicast Address                       *
|                                                               |
*                                                               *
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Resv  |S| QRV |     QQIC      |     Number of Sources (N)     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
*                                                               *
|                                                               |
*                       Source Address [1]                      *
|                                                               |
*                                                               *
|                                                               |
+-                                                             -+
|                                                               |
*                                                               *
|                                                               |
*                       Source Address [2]                      *
|                                                               |
*                                                               *
|                                                               |
+-                              .                              -+
.                               .                               .
.                               .                               .
+-                                                             -+
|                                                               |
*                                                               *
|                                                               |
*                       Source Address [N]                      *
|                                                               |
*                                                               *
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

type, code and checksum are fields from {ICMPv6} header.

MLQ fields are:

Max Resp Delay

Max Resp Delay is the real delay value. Max Resp Code is the encoded delay. So {#max_resp_delay} and {#max_resp_code} attributes reflect this difference. @author Sylvain Daubert

Public Instance Methods

max_resp_delay() click to toggle source

Getter for max_resp_code for MLDv2 packets. Use {MLDv2.decode}. @return [Integer] @note May return a different value from value previously set, as a

float encoding is used to encode big values. See {MLDv2.decode}.
# File lib/packetgen/header/mldv2/mlq.rb, line 112
def max_resp_delay
  MLDv2.decode(self[:max_resp_delay].to_i)
end
max_resp_delay=(value) click to toggle source

Setter for max_resp_code for MLDv2 packets. Use {MLDv2.encode}. @param [Integer] value @return [Integer] @note See {MLDv2.encode}.

# File lib/packetgen/header/mldv2/mlq.rb, line 120
def max_resp_delay=(value)
  self[:max_resp_delay].value = MLDv2.encode(value)
end
qqic() click to toggle source

Get QQIC value @note May return a different value from value previously set, as a

float encoding is used to encode big values. See {IGMPv3.decode}.

@return [Integer]

# File lib/packetgen/header/mldv2/mlq.rb, line 130
def qqic
  IGMPv3.decode self[:qqic].to_i
end
qqic=(value) click to toggle source

Set QQIC value @note See {IGMPv3.encode}. @param [Integer] value @return [Integer]

# File lib/packetgen/header/mldv2/mlq.rb, line 138
def qqic=(value)
  self[:qqic].value = IGMPv3.encode(value)
end