Repository navigation
refactor(foundation): route DTLS reassembly via toolkit and analysis (#2496) - #2528
Conversation
…2496) - DTLS.read drops its reassembly/flow/frame arguments and no longer imports pcapkit.foundation.reassembly; fragment bodies stay raw - add toolkit.pcap/pcapng.dtls_reassembly, which read each frame's fragmented handshake messages keyed on the nearest IP/UDP endpoints - add Extractor/extract(dtls=...), ReassemblyManager/ReassemblyData.dtls; the default engines feed it, the other engines disable it with a warning - add pcapkit.foundation.analysis.dtls_handshake to decode a reassembled message as an unfragmented one - SSL._make_tls_handshake_messages drops the slice-back the in-place decode needed - docs: analysis page, toolkit/engine tables, pep.rst, convention page Tests: DTLS reassembly, toolkit, engine and extraction modules pass.
|
Decisions needed:
|
|
|
Owner rulings, paraphrased and reconciled:
These go into one fix round on this branch once the Sonnet review in flight lands, so that its findings join the same commit. The fix round is pushed once queued runs drop below 20. |
|
Cross-review (Sonnet) at
|
…2496) - add DTLS.read_handshake, a public decoder for one handshake message outside any record; dtls_handshake uses it, so a message past a record's 16-bit length decodes, and _MAX_RECORD_FRAGMENT goes - split pcapkit.foundation.analysis into a package mirroring reassembly (analysis/dtls.py), exported from pcapkit.foundation and pcapkit.all - SSL._make_tls_handshake_messages cuts a whole-message fragment body to the fragment's range again, and refuses any body that does not yield exactly fragment_length octets - docs: analysis and DTLS pages, convention page without counts or timed wording, references to the defining module - tests: pin dtls_reassembly in toolkit.pcap.__all__; cover the decoder, the fragment-body rule and the exports
|
Fix round at
|
|
Coverage: 93.96% (unit tier, Python 3.15,
Per-file detail: the |
#2490, #2575) #2541's exception table was built on a base without #2528 and #2542, so main fails the member-order guard: #2528 put DTLS back in order, and #2542 renamed the IGMP classes to IGMPv3. Drop DTLS and re-key the IGMP entries. #2509 merged before #2521 required a wrapper for every class-level map, so Radiotap.__proto__ has none. Nothing dispatches by it yet; excuse it until #2575 adds Radiotap.register and register_radiotap.
|
I've added the |
- Added: one's-complement checksum verification and computation (#2543), and the IPX and SCTP registration wrappers (#2521). - Folded into unreleased entries: LinuxSLL/FRAD/Netlink registries (#2527), the IGMP class names (#2542), TLS record chaining and the SSLv2 trial's warnings (#2537), DTLS reassembly via Extractor and toolkit (#2528), and IP_Pseudo's walk at any depth (#2543). ICMP drops its stale checksum line. - Breaking: make() checksums, DRARP's module (#2540), IPv6 overlapping fragments (#2569), TCP_GAP_LIMIT replacing TCP.__window__ (#2579), and Extractor/extract's positional dtls (#2528). - Changed: member order (#2490), conventions (#2542, #2521, #2570), CI -n logical (#2572). Fixed: AppType.get (#2568), trial warnings (#2519, #2577). - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseconst— regenerates constant or registry tables, members keeping their numeric valuesDescription of your pull request and other information
Closes #2496 (points 1 and 3 of reassembly-integration.rst).
DTLS.read()no longer takesreassembly/flow/frame_num/frame_timestampand imports nothing frompcapkit.foundation.pcapkit.toolkit.pcap.dtls_reassembly(frame)andpcapkit.toolkit.pcapng.dtls_reassembly(frame), following thetcp_segmentprecedent. The buffer ID is the IP+UDP endpoints plus the epoch.Extractor(dtls=...)andextract(dtls=...), plus a'dtls'entry inExtractor.__reassembly__, fed by the PCAP and PCAP-NG engines. The other engines turn it off with a warning.pcapkit.foundation.analysis.dtls_handshakeparses the reassembled body.Open questions are below; the Sonnet review is in flight.