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
refactor(corekit): move the Internet checksum helpers to corekit.internet_checksum #2580
From the owner on #2543: pcapkit.protocols.misc.checksum.checksum belongs in foundation or corekit, under a name that says it is the Internet checksum (RFC 1071), not a generic one. It is new in 1.6.0 and unreleased, so it moves with no versionremoved.
Where it can go. The module imports pcapkit.protocols.protocol._rebuilding, and IPv4/IPv6/TCP/UDP/ICMP/OSPF call it from read(). Since #2528, protocol read code imports nothing from pcapkit.foundation, so foundation would invert the layers. utilities-or-corekit.rst puts what protocols are made of in corekit.
Decision needed:
(a) Split. The protocol-independent part becomes pcapkit.corekit.internet_checksum: ChecksumStatus, the RFC 1071 sum (internet_checksum, compute_checksum, partial_checksum), verify_checksum, fragment_payload, with _rebuilding moving there from protocols.protocol. The IP-specific pseudo_header and verify_upper stay next to IP_Pseudo in protocols.misc.checksum.
(b) Move the whole module to pcapkit.foundation.internet_checksum, and accept protocols importing foundation.
The ChecksumWarning class stays in pcapkit.utilities.warnings.
Recommendation: 1(a). It keeps protocol read free of foundation imports, and corekit takes only what has no protocol dependency.
1(a), but name probably should be corekit.checkum.internet, save room for future other checksum calculations that will live aside in the corekit.checksum module.
Owner chose 1(a), with a different name, paraphrased: pcapkit.corekit.checksum becomes a package, so other checksum families can sit beside it later, and the Internet checksum goes in pcapkit.corekit.checksum.internet.
Moves there:ChecksumStatus, the RFC 1071 sum, verify_checksum and fragment_payload, with _rebuilding moving from protocols.protocol.
Stays beside IP_Pseudo: the IP-specific pseudo_header and verify_upper.
Activity
JarryShaw commentedon Nov 1, 2026
1(a), but name probably should be corekit.checkum.internet, save room for future other checksum calculations that will live aside in the corekit.checksum module.
JarryShaw commentedon Nov 1, 2026
Owner chose 1(a), with a different name, paraphrased:
pcapkit.corekit.checksumbecomes a package, so other checksum families can sit beside it later, and the Internet checksum goes inpcapkit.corekit.checksum.internet.ChecksumStatus, the RFC 1071 sum,verify_checksumandfragment_payload, with_rebuildingmoving fromprotocols.protocol.IP_Pseudo: the IP-specificpseudo_headerandverify_upper.versionremoved: the module is unreleased.Dispatched.
refactor(corekit): move the Internet checksum into corekit.checksum.i…