Skip to content

refactor(protocols): point the IP and TCP protocols' analyze at foundation.analysis #2621

Closed as not planned

Description

@JarryShaw

Owner request, given in session and paraphrased: now that foundation.analysis has IP and TCP modules (#2619), the protocols' own analyze methods should point at them.

On main, ip_datagram and tcp_datagram parse by calling IPv4.analyze, IPv6.analyze and TCP.analyze, which are ProtocolBase.analyze and Transport.analyze. This reverses that dependency: the parsing logic for a reassembled payload lives in pcapkit.foundation.analysis.ip and .tcp, and the protocol classes' analyze delegates to them.

  • Signatures are unchanged for every inheritor.
  • A custom engine's __protocol_type__ override still wins.
  • Output is byte-identical on every engine.

#2619 merged before this was folded in, so it lands as its own PR.

Activity

  1. added this to the PyPCAPKit v1.6 milestone on Nov 2, 2026
  2. added
    refactorRestructuring for its own sake — neither a fix nor a new capability (refactor: prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 2, 2026
  3. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    Owner correction, given in session and paraphrased: it is foundation.analysis that should call the protocols' analyze, not the other way round. foundation is the public API layer that wraps the protocols' internal methods. That is how #2619 merged, with ip_datagram/tcp_datagram calling IPv4/IPv6/TCP.analyze, so nothing needs changing. The worker is stopped and no branch was pushed. Closing as not planned.

  4. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 2, 2026
  5. removed this from the PyPCAPKit v1.6 milestone on Nov 2, 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

    refactorRestructuring for its own sake — neither a fix nor a new capability (refactor: prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions