diff --git a/docs/source/contributing/pep.rst b/docs/source/contributing/pep.rst index eed7379040..d429a6f885 100644 --- a/docs/source/contributing/pep.rst +++ b/docs/source/contributing/pep.rst @@ -1150,9 +1150,9 @@ is wanted instead of sequenced *after* wave 2 rather than by preference: the multicast options embed :rfc:`9777` MLD (which obsoletes :rfc:`3810`; :rfc:`2710` for MLDv1), which rides in **ICMPv6**, and :rfc:`3376` **IGMPv3** group records. ICMPv6 and -IGMPv1/v2 are both wave 2 deliverables, now done; MLD itself remains a -follow-up to ICMPv6 (see `More Protocols, More!!!`_ above), and IGMPv3 is -:issue:`2448`. Landing the registry first would give a dispatch table with +IGMP, IGMPv3 included (:issue:`2448`), are both wave 2 deliverables, now done; +MLD itself remains a follow-up to ICMPv6 (see `More Protocols, More!!!`_ +above). Landing the registry first would give a dispatch table with :class:`~pcapkit.protocols.misc.raw.Raw` to register. The counter-argument is real though, and worth weighing rather than dismissing: changing the parsed shape from :obj:`bytes` to :class:`~pcapkit.protocols.misc.raw.Raw` is the diff --git a/docs/source/ext.rst b/docs/source/ext.rst index d4ca3b733e..cde3dd6e60 100644 --- a/docs/source/ext.rst +++ b/docs/source/ext.rst @@ -80,9 +80,11 @@ The protocol classes :mod:`pcapkit` ships: + +----------------+-----------------------+-------------------------------------------------------------+ | | | :class:`pcapkit.protocols.internet.igmp.IGMP` | + + +-----------------------+-------------------------------------------------------------+ -| | IGMP Family | :class:`pcapkit.protocols.internet.igmpv1.IGMP` | -+ + +-----------------------+-------------------------------------------------------------+ +| | | :class:`pcapkit.protocols.internet.igmpv1.IGMP` | ++ + IGMP Family +-----------------------+-------------------------------------------------------------+ | | | :class:`pcapkit.protocols.internet.igmpv2.IGMP` | ++ + +-----------------------+-------------------------------------------------------------+ +| | | :class:`pcapkit.protocols.internet.igmpv3.IGMP` | +------------------------------------------------------------------+----------------+-----------------------+-------------------------------------------------------------+ | Transport Layer | :class:`pcapkit.protocols.transport.tcp.TCP` | + (:class:`~pcapkit.protocols.transport.transport.Transport` +----------------+-----------------------+-------------------------------------------------------------+ diff --git a/docs/source/pcapkit/protocols/index.rst b/docs/source/pcapkit/protocols/index.rst index dda108c083..3bbe5f0fe7 100644 --- a/docs/source/pcapkit/protocols/index.rst +++ b/docs/source/pcapkit/protocols/index.rst @@ -106,7 +106,7 @@ from given information. The class hierarchy of :mod:`pcapkit.protocols`: end subgraph igmp [IGMP Family] - IGMP --> IGMPv1 & IGMPv2 + IGMP --> IGMPv1 & IGMPv2 & IGMPv3 end end @@ -150,6 +150,7 @@ from given information. The class hierarchy of :mod:`pcapkit.protocols`: click IGMP "internet/igmp.html#pcapkit.protocols.internet.igmp.IGMP" click IGMPv1 "internet/igmpv1.html#pcapkit.protocols.internet.igmpv1.IGMP" click IGMPv2 "internet/igmpv2.html#pcapkit.protocols.internet.igmpv2.IGMP" + click IGMPv3 "internet/igmpv3.html#pcapkit.protocols.internet.igmpv3.IGMP" click HOPOPT "internet/hopopt.html#pcapkit.protocols.internet.hopopt.HOPOPT" click ICMP "internet/icmp.html#pcapkit.protocols.internet.icmp.ICMP" click ICMPv4 "internet/icmpv4.html#pcapkit.protocols.internet.icmpv4.ICMPv4" diff --git a/docs/source/pcapkit/protocols/internet/igmp.rst b/docs/source/pcapkit/protocols/internet/igmp.rst index 212cb1ea40..5aa84631d1 100644 --- a/docs/source/pcapkit/protocols/internet/igmp.rst +++ b/docs/source/pcapkit/protocols/internet/igmp.rst @@ -8,11 +8,14 @@ IGMP - Internet Group Management Protocol Internet Group Management Protocol (IGMP) [*]_ versions 1, 2 and 3. IGMPv1 and IGMPv2 share the 8-octet structure below. :class:`IGMPv1 ` and -:class:`IGMPv2 ` set :attr:`version` -and reuse this schema and data model as-is; IGMPv3's wire format differs -materially by message, so :class:`IGMPv3 ` -carries its own instead -- see :doc:`igmpv3`. :attr:`alias` names the version -of each message read. +:class:`IGMPv2 ` set +:attr:`~pcapkit.protocols.internet.igmp.IGMP.version` and reuse this schema and +data model as-is; IGMPv3's wire format differs materially by message, so +:class:`IGMPv3 ` carries its own +instead -- see :doc:`igmpv3`. +:attr:`~pcapkit.protocols.internet.igmp.IGMP.alias` names the protocol each +message is read as: ``'IGMP'`` for IGMPv1, the name :rfc:`1112` gives it, and +``'IGMPv2'`` or ``'IGMPv3'`` for the others. ======= ========= ========================= =================================== Octets Bits Name Description @@ -32,6 +35,8 @@ Octets Bits Name Description .. autoproperty:: alias .. autoproperty:: length + .. automethod:: id + .. automethod:: read .. automethod:: make diff --git a/pcapkit/protocols/internet/igmp.py b/pcapkit/protocols/internet/igmp.py index a4b5668b66..c7ea47b9c1 100644 --- a/pcapkit/protocols/internet/igmp.py +++ b/pcapkit/protocols/internet/igmp.py @@ -76,7 +76,11 @@ def version(self) -> 'Literal[1, 2, 3]': @property def alias(self) -> 'str': - """Acronym of corresponding protocol, ``'IGMPv1'``, ``'IGMPv2'`` or ``'IGMPv3'``.""" + """Acronym of corresponding protocol, ``'IGMP'``, ``'IGMPv2'`` or ``'IGMPv3'``. + + IGMPv1 reports ``'IGMP'``, the name :rfc:`1112` gives it. + + """ return f'IGMPv{self.version}' @property