forked from openthread/openthread
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[netdata] simplify and update
HandleTmf<kUriCommissionerSet>()
(ope…
…nthread#9550) This commit updates `HandleTmf<kUriCommissionerSet>()`, which is used to set the Commissioning Dataset. The following changes have been made: - `Tlv::Find<TlvType>()` methods are used to find and parse TLVs in the received request message. - The existing code required the dataset to contain either Joiner UDP or Steering Data TLVs. This check has been removed, making the implementation aligned with the Thread specification. This permits a commissioner to disallow MeshCoP Joining by not including Steering Data. - A new flavor of `SetCommisioningData()` is added, which reads the TLVs directly from a given `aMessage`. This method is now used when processing `kUriCommissionerSet` to avoid using temporary local buffers to read and copy the TLVs. - `SetCommisioningData()` and its related methods have been moved to `network_data_leader_ftd` since they are limited to and used on FTD devices acting as leader. - A new private `UpdateCommissioningData()` method has been added. This method first checks whether or not we can add a Commissioning Data TLV with a given length into Network Data, before removing the current TLV. This is used as a common method when Commissioning Data is set from a message or from a given data buffer.
- Loading branch information
Showing
4 changed files
with
105 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters