Repository navigation
Conversation
…LL (#2502) - Add `pcapkit.protocols.link.radiotap.Radiotap`: decodes the fixed 8-octet radiotap start (it_version/it_pad/it_len) and walks the present-flags chain, including bit-31 extended-word chaining, far enough to count its words. The optional-field region those bits select is skipped whole rather than decoded field by field; the 802.11 MAC frame behind it has no dissector in this package yet and is kept as Raw/NoPayload. - Register the new protocol in all 8 places (pcapkit/__init__.py, pcapkit/all.py, protocols/__init__.py, protocols/data/__init__.py, protocols/data/link/__init__.py, protocols/schema/__init__.py, protocols/schema/link/__init__.py, protocols/link/__init__.py), plus the Link base class docstring. - Wire LinuxSLL's `_import_next_layer` to dispatch ARPHRD_IEEE80211_RADIOTAP to Radiotap instead of falling back to Raw. - Add a docs page, index entry, and changelog entry (1.6.0.rst, regenerated CHANGELOG.md). - Tests: a new unit module covering the minimal header, present-field skipping, extended-presence chaining, malformed it_len (both too-small and too-large), truncated-capture round trips, and make()/validation; updated LinuxSLL1/SLL2 dispatch tests and the short-read round-trip sweep; one new UNRELATED entry in the RFC-constant-home test for radiotap's own 16-bit it_len bound. - Build: full tests/protocols/link/ (166 tests, 924 subtests) and the targeted tests/project/ modules (test_all_exports_unit, test_module_isolation, test_rfc_constants_one_home_1739_unit: 24 tests, 149 subtests) pass clean; pylint 10/10 and mypy clean on the new files. The last of #2460's five arphrd_type follow-ups to get a dissector of its own; FRAD (#2499), NETLINK (#2507) and IPGRE/IP6GRE (#2501) are tracked on their own reviews.
|
Cross-review (Sonnet) at |
|
Coverage: 94.47% (unit tier, Python 3.15,
Per-file detail: the |
…ssector # Conflicts: # CHANGELOG.md # docs/source/changelog/1.6.0.rst # pcapkit/__init__.py # pcapkit/all.py # pcapkit/protocols/__init__.py # pcapkit/protocols/link/__init__.py # pcapkit/protocols/link/linux_sll.py # tests/protocols/link/test_linux_sll1_unit.py # tests/protocols/link/test_linux_sll2_unit.py # tests/protocols/test_short_read_roundtrip_unit.py Co-authored-by: JarryShaw <15666417+JarryShaw@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
Resolved the merge conflicts by merging the current base and preserving both FRAD and Radiotap dispatch paths, then validating the targeted Linux SLL/short-read tests. Commit: |
|
This PR conflicts again. Copilot's merge ( In flight on this branch: merge current main, keeping both sides, and drop this PR's changelog hunks (per the owner, entries now consolidate in #2483). The rebase note, with the patch-id check and whether the existing verdict still stands, follows the push. |
…ssector Conflicts resolved by keeping both sides, main's entries first: - exports and imports: Netlink and Radiotap side by side, plus GRE from main - LinuxSLL._import_next_layer: Netlink, FRAD, GRE, then Radiotap - link/index.rst toctree, short-read CASES, 1739 UNRELATED map - LinuxSLL1/2 tests: both dispatch tests kept; the kept-raw loop is now empty, every _ARPHRD_NOT_ETHERTYPE member having a dissector - changelogs: both sides' entries kept (dropped in the next commit)
Merge with
|
7917cd9 dropped ARPHRD.FRAD from _ARPHRD_NOT_ETHERTYPE, so _resolve_next_layer_proto turned FRAD's protocol_type into an EtherType. Restore it where main has it, and pin it in both LinuxSLL test modules.
|
Pushed |
- add entries for the user-visible changes merged since 1.5.1 that had none: LinuxSLL, ICMP/ICMPv6, IGMP, TLS/DTLS, SSLv2, DTLS reassembly, IP_Pseudo, the IPv6 extension-header walk and the IPv6_Ext id() and membership fixes - add the Radiotap entry from #2509 - drop the FRAD, Netlink and GRE entries' stale "remain Raw" and "tracked separately" notes, and cite each entry's own PR and issue - record the centralised-changelog rule this PR introduces - regenerate CHANGELOG.md; util/changelog_md.py --check passes
|
Cross-review (Sonnet) of the merge at
Fix round: delete the dead fallback and its empty tests (#2510 removes that chain anyway), add the truncated-FRAD test, and fix the citations. It is pushed once queued runs drop below 20. |
Please follow the guide below
make pylint,make mypy,make isort)make testpasses, and a test case covers the changedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visibleWhat is the purpose of your pull request?
feat— adds a featureDescription of your pull request and other information
Part of #2460. Adds
pcapkit.protocols.link.radiotap.Radiotap, dispatched fromLinuxSLL/LinuxSLL1/LinuxSLL2forARPHRD_IEEE80211_RADIOTAPinstead of falling back toRaw.Scope (radiotap.org verified; cross-checked against the Linux kernel's
ieee80211_radiotap.h/radiotap.cand Wireshark's dissector), as #2502 itself asked for, since the full 802.11 MAC frame behind radiotap is its own protocol family with no dissector here yet:it_version/it_pad/it_len) and the present-flags chain, including bit-31 extended-word chaining — every word recorded inpresent, no individual field decoded.fields, bounded byit_len.it_lenon —Raw/NoPayload, unconditionally, same choiceNetlinkmakes for its own payloads.it_lenis clamped defensively where it disagrees with the actual present-flags chain or the captured length (tested both directions), and every case round-trips byte-exact including the truncated-capture sweep.Checklist: all 8 registration points,
Link's docstring, andLinuxSLL's dispatch.Tests: new
test_radiotap_unit.py(13 tests/46 subtests) covering minimal/skipped/extended-presence/malformed-it_len×2/truncated/make(); updated SLL1/SLL2 dispatch tests, the short-read sweep, and oneUNRELATEDentry forit_len's 16-bit bound.tests/protocols/link/is clean (166/924 subtests). The three project tests named in review guidance pass clean in isolation (24/149 subtests); a fulltests/project/run hit the same contention-driven spread the guidance warned about (235 failed, includingtest_benchmark_workflow_2125.py/test_sweeps_on_latest_only_1732.py— pure CI-script tests, unrelated), so those were isolated instead.pylint/mypyclean on the three new files.FRAD (#2499), NETLINK (#2507) and GRE (#2508) are each still open on their own PR, so this stays "Part of #2460" rather than closing it.