You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 41b5735
Browse filesBrowse the repository at this point in the historyBrowse files
feat(internet): implement IGMP v1/v2 as an Internet subclass
Closes#2439
- Add pcapkit/protocols/internet/igmp.py, with its data and schema modules,
covering IGMPv1 (RFC 1112 appendix I) and IGMPv2 (RFC 2236 sec. 2) from one
8-octet schema/data/protocol triple, per discussion #251. Type codes
cross-checked against RFC 1112 appendix I, RFC 2236 sec. 2.1, and IANA's
IGMP Type Numbers registry: Membership Query 0x11, v1 Report 0x12, v2
Report 0x16, Leave Group 0x17. A type outside those four -- an IGMPv3
Membership Report, DVMRP, and so on -- raises ProtocolError in read() so
the dispatch machinery's beholder falls back to Raw instead of mis-decoding
it through the v1/v2 layout.
- Add pcapkit/const/igmp/type.py and pcapkit/vendor/igmp/type.py, a new
const registry/vendor crawler pair generated from IANA's IGMP Type
Numbers CSV, formalising the raw hex values pcapkit/protocols/internet/mh.py
already referenced opaquely.
- Register IGMP onto Internet.__proto__ at TransType.IGMP (protocol number
2), and wire it into every protocols/const/vendor aggregator's __all__.
IGMPv3 (RFC 3376)'s group-record-list body is out of scope, left to a
follow-up.
- Update tests/protocols/test_dispatch_registry_unit.py and four
tests/const sweep tests for the new dispatch entry and const enum; add a
dispatch-probe builder for TransType.IGMP in examples/generators/dispatch.py.
- Add tests/protocols/internet/test_igmp_unit.py: byte fixtures for every
v1/v2 message type, a checksum-validation test, parse/make round trips,
and a regression pair proving an IGMPv3 Membership Report raises
ProtocolError directly and falls back to Raw under IPv4 dispatch.
- Open docs/source/changelog/1.6.0.rst with this PR's bullet, add the
wave-2 index entry to docs/source/changelog.rst, and regenerate
CHANGELOG.md to match.
Build: mypy and isort clean on every changed pcapkit/ file (pylint's
redefined-builtin/unused-argument noise matches AH/IPX precedent).
tests/protocols/internet/test_igmp_unit.py,
tests/project/test_issue_refs_in_comments.py,
tests/project/test_changelog_md.py and
tests/protocols/test_dispatch_registry_unit.py all pass.
0 commit comments