Skip to content

Pseudo-protocol class for the IP pseudo-header (checksum/integrity groundwork) #2471

Closed

Description

@JarryShaw

Pseudo-protocol class for the IP pseudo-header (checksum/integrity groundwork)

Summary

docs/source/contributing/pep.rst, "Checksum and Integrity Verification" and "Deterministic Construction Arguments" sections: the one's-complement Internet checksum (IPv4's header, TCP, UDP, ICMP/ICMPv6, OSPF) is sixteen-bit addition with end-around carry — not hard arithmetic. What blocks every one of those protocols is that TCP/UDP/ICMPv6's checksum is computed over the enclosing IP layer's source/destination addresses, protocol number and payload length, which a parsed protocol has no way to reach today.

The owner settled the design (pep.rst, and reaffirmed 2026-10-30 on #2470): a pseudo-protocol class for the IP pseudo-header, defined once for the IP family, serving both the parsing and the constructing path — not a back-reference from a parsed protocol to its parent. A back-reference only helps verification; the construction side needs the pseudo-header to emit a correct checksum too, and a shared class means both paths agree by definition rather than by coincidence.

Scope

  • Define the pseudo-protocol class following the existing Protocol class conventions, covering the fields the one's-complement checksum needs (source/destination address, protocol number, payload length) for both IPv4 and IPv6 enclosing layers.
  • No cryptography, no existing design question open — this is the bounded first step every per-protocol checksum issue below depends on.

Not in scope

Per-protocol checksum verification/computation — see #2470 and its siblings. The cryptographic half (HIP's HIP_MAC/RVS_HMAC/RELAY_HMAC) is unblocked by this and already has precedent in ESP; it does not depend on this class.

Activity

  1. added
    enhancementIssues requesting a new capability (set by the feature request template)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 30, 2026
  2. added this to the PyPCAPKit v1.5 milestone on Oct 30, 2026
  3. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Accepted and unstarted. Not dispatching a worker this sweep: the Actions queue is at 39, and main is frozen for the 1.5.1 release while its Unit Tests run waits to start. Dispatching once that run starts, and saying so here.

  4. moved this to Pending in PyPCAPKiton Oct 30, 2026
  5. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held this sweep. The 1.5.1 release chain restarted on main's new tip 058ef5b31 (the #2463 merge), and that Unit Tests run is queued behind the previous one. A worker's pushes would queue more runs ahead of the release. Dispatching once the release reaches its approval gate.

  6. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held this sweep. The 1.5.1 release's Unit Tests run on 058ef5b31 has 24 of 32 jobs still queued (Actions queue at 30). Dispatching once GitHub Release reaches its approval gate.

  7. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held on Actions queue depth (30) while the 1.5.1 release runs.

  8. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held: Actions queue at 41 while the 1.5.1 release Unit Tests runs (14/32 jobs done).

  9. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held: Actions queue at 36 while the 1.5.1 release Unit Tests finishes (18/32 jobs done).

  10. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held: Actions queue at 29 while the 1.5.1 release Unit Tests finishes (31/46 jobs done).

  11. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held: Actions queue at 37; main's release Unit Tests is waiting on runners for its ordering legs. No new pushes from me until it completes.

  12. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held: main's release Unit Tests has 14 jobs waiting for runners (Actions queue at 31).

  13. JarryShaw commented on Oct 30, 2026

    @JarryShaw
    OwnerAuthor

    Still held: the 1.5.1 release Unit Tests re-run is in progress; no pushes until it completes.

  14. 27 remaining items

  15. JarryShaw commented on Oct 31, 2026

    @JarryShaw
    OwnerAuthor

    (a), with a per-call override only where a caller needs it.

  16. JarryShaw commented on Oct 31, 2026

    @JarryShaw
    OwnerAuthor

    Reconciled: toggle mechanism, and the open question is closed. Your ruling, paraphrased: the toggle is an environment variable, and where possible also a parameter on the Extractor and Protocol classes for per-instance control. That is option (c) from my list, with the per-call override only where a caller needs it. Combined with the default-state ruling (read path off, make path on), both questions are answered. Clearing needs: decision. Applies to #2470, #2472 to #2475 and #2489.

  17. removed
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Oct 31, 2026
  18. moved this from Needs decision to WIP in PyPCAPKiton Oct 31, 2026
  19. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 1, 2026
  20. added a commit that references this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIssues requesting a new capability (set by the feature request template)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions