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(protocols): point the IP and TCP protocols' analyze at foundation.analysis #2621
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.
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.
Activity
JarryShaw commentedon Nov 2, 2026
Owner correction, given in session and paraphrased: it is
foundation.analysisthat should call the protocols'analyze, not the other way round.foundationis the public API layer that wraps the protocols' internal methods. That is how #2619 merged, withip_datagram/tcp_datagramcallingIPv4/IPv6/TCP.analyze, so nothing needs changing. The worker is stopped and no branch was pushed. Closing as not planned.