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_code max_resp_code} ({Types::Int16}),
-
{#reserved reserved} ({Types::Int16}),
-
{#mcast_addr mcast_addr} ({IPv6::Addr}),
-
{#flags} ({Types::Int8}), with sub-fields:
-
a 4-bit {#flag_resv} field,
-
a 1-bit {#flag_s} boolean,
-
a 3-bit {#flag_qrv} field,
-
-
{#qqic} ({Types::Int8}),
-
{#number_of_sources} ({Types::Int16}),
-
and {#source_addr}, a {IPv6::ArrayOfAddr}.
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
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
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
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
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