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(analysis): DTLS's foundation analysis wraps a DTLS protocol method, and the analysis convention is written down #2622
Owner ruling, given in session and paraphrased: pcapkit.foundation.analysis is a public API layer over protocol internals, so each function in it calls a protocol method and holds no parsing of its own. That is how ip_datagram/tcp_datagram work (#2619): they call IPv4/IPv6/TCP.analyze. The owner asked that the same rule apply to DTLS, and that the convention be recorded.
On main, foundation.analysis.dtls._read_handshake holds the logic itself: it rebuilds the message from the reassembled header and body, calls DTLS.read_handshake, and falls back to a raw DTLSHandshake on ProtocolError. The reassembly Deferred calls it too.
Plan:
Move that logic into a classmethod on the DTLS protocol. dtls_handshake and the Deferred then call it. Signatures and outputs stay the same.
Write the convention onto reassembly-integration.rst: the protocol class does the parsing; foundation.analysis and the reassembly Deferred call it; protocol code never imports foundation to do its own work.
A worker is on it. The DTLS classmethod is placed by member order, dtls_handshake and the reassembly Deferred call it, and output is byte-identical, including pickle round trips. The convention goes onto reassembly-integration.rst, cited as ruled on this issue.
Activity
JarryShaw commentedon Nov 2, 2026
A worker is on it. The DTLS classmethod is placed by member order,
dtls_handshakeand the reassemblyDeferredcall it, and output is byte-identical, including pickle round trips. The convention goes onto reassembly-integration.rst, cited as ruled on this issue.refactor(analysis): decode DTLS handshakes in DTLS.analyze_handshake (#…
fix(tests): import pcapkit before the hook sentinels go in (#2637)