pub unsafe extern "C" fn otDatasetIsValid(
aDatasetTlvs: *const otOperationalDatasetTlvs,
aActive: bool,
) -> boolExpand description
Indicates whether or not the given Operational Dataset TLVs is a valid Active or Pending Dataset.
A valid Active Dataset MUST contain all the required TLVs (Active Timestamp, Channel, Channel Mask, Extended PAN ID, Mesh-Local Prefix, Network Key, Network Name, PAN ID, PSKc, and Security Policy).
A valid Pending Dataset MUST contain all the required TLVs for an Active Dataset and additionally MUST contain Pending Timestamp and Delay Timer TLVs.
This method also checks whether there are duplicated TLVs or the TLVs are not well-formed in the @p aDatasetTlvs.
In addition to the TLV lengths, the values of the following TLVs are validated: Channel and Wake-up Channel (the
channel page must be supported and the channel within range), Channel Mask (well-formed entries), PAN ID (must not
be the broadcast PAN ID 0xffff), Extended PAN ID (must not be all-zeros or all-ones), Mesh-Local Prefix (must be a
locally assigned ULA prefix, i.e., fd00::/8), Network Name (1 to 16 bytes, valid UTF-8, no control characters),
and Security Policy.
@param[in] aDatasetTlvs A pointer to dataset TLVs. @param[in] aActive TRUE for Active Dataset, FALSE for Pending Dataset.
@returns TRUE if @p aDatasetTlvs is a valid Dataset, FALSE otherwise.