Files
Abtin Keshavarzian f0a6a32f5f [mac] rename KeyId to KeyIndex (in Mac::Frame) (#13341)
In the IEEE 802.15.4 Auxiliary Security Header, the Key Identifier
(Key ID) field structurally comprises two subfields:
- An optional Key Source subfield (0, 4, or 8 octets depending on the
  Key ID Mode), and
- A 1-octet Key Index subfield.

When `KeyIdMode == 1` (0x01) — which is what standard MAC Data and ACK
frames in OpenThread use — the Key Source subfield is omitted, and the
Key Identifier field contains only the 1-octet Key Index subfield.

This commit renames internal `Mac::Frame` and `SubMac` methods and
parameters (`GetKeyId()`, `SetKeyId()`, `mKeyId`, etc.) along with
associated input variables to use `KeyIndex` instead of `KeyId`. This
change makes the terminology structurally accurate and avoids confusion
between the overall Key Identifier field and its Key Index subfield.

For backward compatibility (`otPlat`) definitions (like `mAckKeyId`
inside `otRadioFrame`), or `otMacFrame*()` helper functions are
remained unchanged.
2026-07-14 15:37:37 -07:00
..