Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/source/contributing/pep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions docs/source/ext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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` +----------------+-----------------------+-------------------------------------------------------------+
Expand Down
3 changes: 2 additions & 1 deletion docs/source/pcapkit/protocols/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
15 changes: 10 additions & 5 deletions docs/source/pcapkit/protocols/internet/igmp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pcapkit.protocols.internet.igmpv1.IGMP>` and
:class:`IGMPv2 <pcapkit.protocols.internet.igmpv2.IGMP>` set :attr:`version`
and reuse this schema and data model as-is; IGMPv3's wire format differs
materially by message, so :class:`IGMPv3 <pcapkit.protocols.internet.igmpv3.IGMP>`
carries its own instead -- see :doc:`igmpv3`. :attr:`alias` names the version
of each message read.
:class:`IGMPv2 <pcapkit.protocols.internet.igmpv2.IGMP>` 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 <pcapkit.protocols.internet.igmpv3.IGMP>` 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
Expand All @@ -32,6 +35,8 @@ Octets Bits Name Description
.. autoproperty:: alias
.. autoproperty:: length

.. automethod:: id

.. automethod:: read
.. automethod:: make

Expand Down
6 changes: 5 additions & 1 deletion pcapkit/protocols/internet/igmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading