-
-
Notifications
You must be signed in to change notification settings - Fork 36
protocols: add DLT_NULL and DLT_RAW link-layer handlers #839
Copy link
Copy link
Closed
Labels
enhancementIssues requesting a new capability (set by the feature request template)Issues requesting a new capability (set by the feature request template)featPull requests that add a new capability (feat: subject prefix)Pull requests that add a new capability (feat: subject prefix)
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
enhancementIssues requesting a new capability (set by the feature request template)Issues requesting a new capability (set by the feature request template)featPull requests that add a new capability (feat: subject prefix)Pull requests that add a new capability (feat: subject prefix)
Projects
- StatusShow more project fieldsDone
Split out of #838 on the maintainer's instruction: "let's add the handlers (protocols) for DLT_NULL and DLT_RAW as part of wave 2/3 work in the work tracker then."
pcapkit/protocols/misc/pcap/frame.py:93-95registers exactly three link types:LinkType.NULL(0,DLT_NULL, BSD loopback — a 4-byte host-orderAF_family field ahead of the IP header) andLinkType.RAW(101,DLT_RAW— a bare IP packet, no link header at all) are genuine DLTs with no handler. That is what makes them unusable as a fallback for an unknown link-layer name, which is the ruling recorded on #838.Scope: a handler per DLT, registered into
Frame.__proto__, plus tests.DLT_NULL's family field decides IPv4 vs IPv6 and is written in the capturing host's byte order, so it cannot be read as fixed-endian.DLT_RAWneeds the IP version nibble to pick IPv4 vs IPv6.Not blocking #838 — that PR raises rather than guessing, which is correct with or without these handlers.