IGMPv2 - Internet Group Management Protocol Version 2

pcapkit.protocols.internet.igmpv2 contains IGMPv2, which implements an extractor for Internet Group Management Protocol version 2 (IGMPv2) [RFC 2236]. It shares its header schema and data model with IGMPv1 – see igmp for both.

class pcapkit.protocols.internet.igmpv2.IGMPv2(file=None, length=None, **kwargs)[source]

Bases: IGMP[IGMP, IGMP]

This class implements Internet Group Management Protocol version 2.

property name: Literal['Internet Group Management Protocol version 2']

Name of corresponding protocol.

property version: Literal[2]

IGMP version this class reads, 2.

property alias: Literal['IGMPv2']

Acronym of corresponding protocol.

classmethod id()[source]

Index ID of the protocol.

RFC 2236 names the protocol IGMPv2, carrying its own version.

Return type:

tuple[Literal['IGMPv2']]

Returns:

Index ID of the protocol.

read(length=None, **kwargs)

Read Internet Group Management Protocol.

Parameters:
  • length (int | None) – Length of packet data.

  • **kwargs (Any) – Arbitrary keyword arguments.

Raises:

ProtocolError – If _classify() does not place the message in version.

Return type:

IGMP

Returns:

Parsed packet data.