mirror of
https://github.com/espressif/openthread.git
synced 2026-07-26 05:53:45 +00:00
f0a6a32f5f
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.