From 50785a0fc903e930601cb555f3671b77a0adf70c Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 13 Nov 2024 08:06:52 -0800 Subject: [PATCH] [mac-frame] enhance comments regarding PAN ID compression behavior (#10914) This commit adds an additional note next to the table from the specification text regarding valid combinations of flags within an encoded MAC header and the interpretation of the "PAN ID Compression" flag. --- src/core/mac/mac_frame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp index 622542031..5630e7cef 100644 --- a/src/core/mac/mac_frame.cpp +++ b/src/core/mac/mac_frame.cpp @@ -116,6 +116,12 @@ void TxFrame::Info::PrepareHeadersIn(TxFrame &aTxFrame) const // | 13 | Extended | Short | Present | Not Present | 1 | // | 14 | Short | Short | Present | Not Present | 1 | // +----+--------------+--------------+--------------+--------------+--------------+ + // + // This table shows the combination of flags allowed in an encoded MAC + // header. Regarding rows 9-14, when both Source and Destination + // Address fields are present and at least one uses a short address + // format, then if the source and destination PAN IDs are equal, PAN + // ID compression is set to 1. if (mAddrs.mDestination.IsNone()) {