Skip to content

feat(link): decode radiotap's optional fields #2576

Open

Description

@JarryShaw

Follow-up from #2502: Radiotap (#2509) records every present-flags word but keeps the optional fields it selects as raw fields. Decode them per the radiotap.org field specification: each field's alignment rule and size, the vendor namespace, and extended presence words. Keep unknown and vendor fields raw, with byte-exact round trips.

Blocked: #2575 also edits radiotap.py, its payload dispatch. This unblocks when #2575's PR merges.

Activity

  1. added
    featPull requests that add a new capability (feat: subject prefix)
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Nov 1, 2026
  2. moved this to Blocked in PyPCAPKiton Nov 1, 2026
  3. added this to the PyPCAPKit v1.6 milestone on Nov 2, 2026
  4. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    #2607 has merged, so radiotap.py is free. Unblocked. A worker is on it. Optional fields are decoded per the radiotap.org specification and cross-checked against Wireshark or the kernel. Unknown and vendor fields stay raw, with byte-exact round trips.

  5. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Nov 2, 2026
  6. moved this from Blocked to WIP in PyPCAPKiton Nov 2, 2026
  7. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    Optional-field decoding is done locally, and a Sonnet review is running.

    • Each defined field is decoded per radiotap.org, with its alignment counted from the header start. Extended presence words, the radiotap/vendor namespace switches and TLV mode are all handled.
    • Unknown and vendor fields stay raw. Captured octets round-trip exactly. Output for existing captures is unchanged.
    • The field types are a new pcapkit.const.radiotap.FieldType, generated by a crawler of radiotap.org.

    Needs deciding. The branch implements both recommendations unless you choose otherwise.

    1. Bits 16 and 17 (RTS retries, data retries). radiotap.org lists them only as unofficial, but Linux mac80211 writes bit 17 on TX-status frames. Decoding currently stops at them.
      • (a) Leave them undecoded.
      • (b) Decode both.
      • (c) Decode only bit 17, since OpenBSD writes RSSI in bit 16.
      • Recommend (c), as a follow-up.
    2. Bitmap fields stay plain integers. This covers Flags, the Channel flags, RX/TX flags and the MCS/VHT/HE known bits.
      • (a) Keep them as integers.
      • (b) Decode them into named flags. Each flag table then needs its own crawler.
      • Recommend (a). A follow-up could use the Flags FCS (0x10) and data-pad (0x20) bits to let IEEE802_11 split off the FCS and padding.
  8. added
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Nov 2, 2026
  9. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    Take (b) on both questions

  10. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    The owner chose (b) on both, paraphrased.

    1. Bits 16 and 17 are decoded. They are RTS retries and data retries, one octet each, and both are added to FieldType from radiotap.org's unofficial-fields table. The docstring notes that OpenBSD uses bit 16 differently.
    2. Bitmap fields decode into named flags rather than integers. This covers Flags, the Channel flags, RX/TX flags, and the MCS/VHT/HE/EHT/U-SIG known and flag bitmaps. Each flag table is a const registry with its own radiotap.org crawler. Undefined bits still round-trip.

    The branch is being reworked to match.

  11. removed
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Nov 2, 2026
  12. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    The (b)/(b) rework is done locally.

    • Retry fields: bits 16 and 17 decode, sourced from radiotap.org's unofficial-fields page.
    • Named flags: eight IntFlag registries, each with its own crawler of its radiotap.org page: Flags, ChannelFlags, RXFlags, TXFlags, MCSKnown, VHTKnown, VHTFlags and EHTKnown. Undefined bits still round-trip.

    Needs deciding. Each item has a recommendation, and the branch proceeds on it unless you say otherwise.

    1. Mixed bitmaps. MCS flags, HE data1/data2, HE-MU flags1/flags2 and U-SIG common mix value subfields with known bits, so radiotap.org doesn't define them bit by bit. (a) Keep them as integers; (b) split each into value subfields plus a known-bits flag. Recommend (a), with (b) as a follow-up if wanted.
    2. Other bit-by-bit bitmaps. A-MPDU flags, timestamp flags, L-SIG data1, S1G known, HE-MU-other-user per_user_known and VHT coding are defined bit by bit but weren't in the list above. Adding them is one crawler subclass each. Recommend adding them.
    3. Member names. Taken verbatim from radiotap.org, some are very long, e.g. TXFlags.Transmission_includes_a_pre_configured_sequence_number_that_should_not_be_changed_by_the_driver_s_TX_handlers. (a) Keep them verbatim; (b) add a name map in each crawler using Linux's short names (F_FCS, CHAN_2GHZ, …), as vendor/tcp/flags.py already maps TCP's. Recommend (b), for readability and per the TCP precedent.
    4. One generated member keeps radiotap.org's caption, "[Currently unspecified but used]", verbatim as source data. Recommend leaving it as is.
  13. added
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Nov 2, 2026
  14. moved this from WIP to Needs decision in PyPCAPKiton Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featPull requests that add a new capability (feat: subject prefix)needs: decisionWaiting on the maintainer to decide — not blocked by other workwipWork in flight - a covering PR is open or an agent is actively on it

    Projects

    • Status
      Needs decision

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions