STRUCT IEEE80211_KEY_SEQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct ieee80211_key_seq β€” key sequence counter ✨

okay so bestie, we're in the Kernel API Manual, section 9, and today's main character is struct ieee80211_key_seq β€” the little struct that holds a key sequence counter. that's it, that's the vibe πŸŽ€


🌸 SYNOPSIS

struct ieee80211_key_seq {
    union {
      struct {
        u32 iv32;
        u16 iv16;
      } tkip;
      struct {
        u8 pn[6];
      } ccmp;
      struct {
        u8 pn[6];
      } aes_cmac;
      struct {
        u8 pn[6];
      } aes_gmac;
      struct {
        u8 pn[6];
      } gcmp;
      struct {
        u8 seq[IEEE80211_MAX_PN_LEN];
        u8 seq_len;
      } hw;
    };
 };

like, look at her. one anonymous union, six members, zero notes. she's serving structural elegance and honestly? ate πŸ’…


πŸ¦‹ Members

  • {unnamed_union} β€” it's anonymous πŸ™ˆ no name, no problem, she simply exists
  • tkip β€” TKIP data, containing IV32 and IV16 in host byte order πŸ“
  • ccmp β€” PN data, most significant byte first (big endian, reverse order than in packet) πŸ”₯
  • aes_cmac β€” PN data, most significant byte first (big endian, reverse order than in packet) πŸ”₯
  • aes_gmac β€” PN data, most significant byte first (big endian, reverse order than in packet) πŸ”₯
  • gcmp β€” PN data, most significant byte first (big endian, reverse order than in packet) πŸ”₯
  • hw β€” data for HW-only (e.g. cipher scheme) keys ⚑
ngl bestie, the byte order thing is the whole ballgame β€” the pn fields are big endian and reverse order than in packet, so don't go flipping them around and acting surprised later 😭

πŸ’… SEE ALSO

Kernel file ./include/net/mac80211.h β€” and literally the entire extended universe, fr fr:

ok that's the whole friend group 😭 every single one of them, no one left out, we don't do that here 🫢

✨ and that's the page bestie ✨ this one lives in ./include/net, dated October 2026, and it's struct ieee80211_key_seq(9) all day every day. go forth and byte-order correctly, ily πŸ’œπŸ¦‹

πŸ“¦ where this page comes from