Repository navigation
feat(link): decode radiotap's optional fields (#2576) - #2657
Conversation
|
GOOD TO GO at
|
|
I think
|
|
The owner asks for two structural changes, paraphrased:
Decoded output, round trips and the flag registries stay as reviewed. The label is |
fd4adbb to
2392363
Compare
|
NEEDS CHANGES at
|
- Decode the field-data region into Radiotap.decoded, one entry per presence bit, bits 16 and 17 included: alignment from the header start, namespaces, raw vendor data, extended words and TLVs; the rest ends as an Unknown. - Read and make each type through Radiotap.__field__, keyed by FieldType, with register_field and the register_radiotap_field wrapper for new types. - Give each type a RadiotapField schema whose fields, size and __align__ are its radiotap.org layout; bitmaps are EnumFields of their flag registries. - Add pcapkit.const.radiotap, FieldType and fourteen flag registries named after Linux's macros, each with a crawler scraping its radiotap.org page. - Tests: spec, radiotap-library and tcpdump vectors, both round trips, a registered type, a radiotap-field option family, the registrar tables. The protocols/link, const, vendor, project, foundation and corekit legs pass.
2392363 to
53e71b4
Compare
|
GOOD TO GO at
The body is refreshed for the rework. Decoding is unchanged, and the link, foundation, dumpkit, const and vendor legs pass. |
…h refusals and the Windows leg's argument file into 1.6.0 (#2449) - Breaking: MH(raw) and TCP(raw) (#2683) raise ProtocolError for an MH message whose Header Len is short of its fields, or a DSS option of a length its flags do not give, where 1.5.x read the gap as zeros and rebuilt it longer; a cut MH keeps its declared Header Len. The entry gives the old and new results, measured against v1.5.1. - Folded into unreleased entries: radiotap's decoded optional fields, Radiotap.__field__ with register_field and register_radiotap_field, the RadiotapField schemas and pcapkit.const.radiotap with its crawlers (#2657), and cut TLV items decoding zero-padded (#2690), into the Radiotap entry, with the IEEE 802.11 entry's Flags clause corrected; #2657's ruling on code to layout tables, into the conventions entry; the Windows leg's argument file (#2681), into the CI legs entry, as the cycle's other CI changes have entries. - No entry for the test-only 42a6133. - 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?
feat— adds a featureDescription of your pull request and other information
Radiotap decodes its optional fields as radiotap.org defines them, with each field's alignment counted from the header start. Extended presence words, namespace switches, vendor namespaces and TLV mode are handled. Unknown and vendor fields stay raw, and captured octets round-trip exactly.
Structure, per the ruling in review here:
Radiotap.__field__is a class-level map fromFieldTypeto its reader and maker, registered throughRadiotap.register_fieldandregister_radiotap_field(shaped likeregister_sctp_chunk).RadiotapFieldschema, re-exported asRadiotap_*.The owner's rulings on #2576:
IntFlagregistries underpcapkit.const.radiotap, crawled from radiotap.org, with undefined bits kept.ieee80211_radiotap.h, or from Wireshark or radiotap.org where Linux has none.Mixed bitmaps are split by #2647, and short TLV items are decoded by #2655.
A Sonnet cross-review checked the field layouts against scapy and radiotap.org. A second review, of the rework, found decoding identical to the first reviewed head across 6,505 vectors. The two changes that review asked for are in this head.
Closes #2576