Repository navigation
feat(link): implement LINUX_SLL and LINUX_SLL2 dissectors - #2443
Conversation
|
Review: NEEDS CHANGES at Must fix:
Confirmed correct, no change needed: both wire layouts byte-exact against spec (v1: 16 bytes, v2: 20 bytes, verified field-by-field); the dispatch mechanism itself works as described (only the rule it applies is wrong, above); Minor, non-blocking: |
|
Coverage: 94.52% (unit tier, Python 3.15,
Per-file detail: the |
4767730 to
986e42f
Compare
|
All three required fixes applied and verified directly (new head |
|
NEEDS CHANGES (cross-review round 2, different model from the author). All three round-1 fixes independently re-derived as correct against the real spec (tcpdump.org, Linux kernel One blocker, trivial: Should-fix (not blocking): the Also flagging for awareness (not a defect in this PR): a predicted conflict with #2441 in |
986e42f to
3fb62f7
Compare
|
isort fix applied and verified directly (new head |
|
Confirmed CI's red X at this head is the same inherited |
3fb62f7 to
6df2526
Compare
|
Changelog bullet removed per #2449's new standing practice (centralized changelog, not per-PR). Verified directly: diff at new head |
6df2526 to
5dacd83
Compare
|
Rebased onto |
|
Should we have a thin abstract layer and/or dispatcher for v1 and v2? Since they stand the same name/family. For those not ethertype types, do we have corresponding protocol for each? If so, are we properly dispatching to decode them? |
|
My reading of your 03:34Z comment: the base class goes in |
|
|
|
My reading of your 03:59Z comment: bring the |
|
Held: Actions queue at 50 (above the hold line). The |
|
Rework pushed as Decision needed: is that the house convention you meant from your 03:59Z comment? It makes |
|
yes, that's the convention. now is correct. |
|
if no LinkType dispatches LINUX_SLL headers, how are we gonna use the two protocols? |
|
Answer to your 04:49Z question: the PCAP and PCAPNG frame dispatch maps LINUX_SLL to |
|
Then their |
|
My reading of your 04:51Z comment: |
Add LinuxSLL1 (LINKTYPE_LINUX_SLL) and LinuxSLL2 (LINKTYPE_LINUX_SLL2) on a shared LinuxSLL base, wired into Frame and PCAPNG link-type dispatch. The protocol_type is an EtherType except for the five ARPHRD types in pcapkit.const.linux.arphrd.ARPHRD, which keep it as a Raw payload.
|
NEEDS CHANGES (Sonnet,
|
Owner ruling: registry maps follow enum value order. LINUX_SLL (113) moves between LOOP (108) and IPV4 (228) in the frame and pcapng __proto__ maps and their docs tables. LINUX_SLL2 (276) stays after IPV6.
|
GOOD TO GO (Sonnet, |
|
Red legs on |
- ARPHRD is the one const registry the LINUX_SLL work adds; the sweep expectations in the four census files are bumped by exactly its contribution. origin/main passes the previous values unchanged. - ARPHRD(0) raises: pcapkit names no 0 (ARPHRD_NETROM is unnamed), so it joins EXPECTED_TO_REJECT_ZERO. - ARPHRD is hand-written on EnumLookup, not the generated EnumRegistry shape, so it joins EXCLUDED_FROM_INTENUM_CENSUS as (d). Build and test: tests/const, tests/protocols/link, dispatch registry unit tests pass on the rebased tree.
|
Hold, not pushed. The census fix is local commit |
|
(1) add it (2) move it. do the work in this PR |
|
Ruling reconciled: (1) add the |
- ARPHRD moves from EnumLookup to EnumRegistry with the generated _validate_value/_missing_ pair, members and values unchanged. - Adds NETROM = 0 (ARPHRD_NETROM), so ARPHRD(0) now resolves. - Census: drop ARPHRD from EXPECTED_TO_REJECT_ZERO and from the EXCLUDED_FROM_INTENUM_CENSUS (d) entry; generated module count 109 -> 110. - ARPHRD(999) now yields an unregistered 'Unassigned' member, not ValueError. Tests: tests/const census files, tests/protocols/link linux_sll unit tests pass.
|
Done locally, held for the queue. Commit |
|
GOOD TO GO (Sonnet, |
Please follow the guide below
isorton the changed files;pylintandmypyclean on the new modulesmake testpasses, and a test case covers the change: targeted run only, see belowdocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, centralised in chore(docs): centralize 1.6.0 changelog updates in one place, not per-feature-PR #2449What is the purpose of your pull request?
feat— adds a featureDescription of your pull request and other information
Implements #2438:
LinuxSLL1andLinuxSLL2forLINKTYPE_LINUX_SLL(113) andLINKTYPE_LINUX_SLL2(276), on the family baseLinuxSLL(linux_sll), wired into pcap and pcapng frame dispatch.id()followsIP/IPv4:'LinuxSLL'selects either version,'LinuxSLL1'selects v1 only.protocol_typeis an EtherType, except for the fiveARPHRDvalues inpcapkit.const.linux.arphrd.ARPHRD, which keep it asRaw.Targeted run only:
tests/protocols/link/test_linux_sll{1,2,_selector}_unit.py,test_dispatch_registry_unit.pyandtest_rfc_constants_one_home_1739_unit.py: 59 passed, 359 subtests.make testnot run.Closes #2438