# Operational Dataset

Includes functions for the Operational Dataset API.

## Summary

For FTD builds only, Dataset Updater includes functions to manage dataset updates.

For FTD and MTD builds, the Operational Dataset API includes functions to manage Active and Pending datasets and dataset TLVs.

| ### Enumerations ||
|---|---|
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8c40a8d1b44523163be6dafa7d0ab2b4{ https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4aea0b4b1fe4daa08501ebd8df489cb5eb = 0, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4adc93e111b28e449b8880c9b137c6c372 = 1, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4afe9139fb52914581aa783383084dbaeb = 2, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a2be02dbe46a67eaa9594de1d98c4a3bf = 3, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ac542ca88848bb17660a6a85aa9a5300d = 4, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a9596865601ac0f4ac9c765b2526dc2b0 = 5, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ac19a61e32a2a8d93d44ba33145e95555 = 6, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ae7ddbd9fc00510182ab7a3fd35bd514e = 7, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a312780f897ccefd727e54495dcec7f1b = 8, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a13d44b146ce6c2e5456c0ae3859a9dce = 9, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ab9468a181a73cba0a93a2419e9fe7eff = 10, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a0699fdee56bd763f3b6bce0e5bbecb57 = 11, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a8dc051bacb4873788f9f2565a6d656d0 = 12, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a393eefd6220a56f1b462092fb2e577bc = 13, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a34c893ffa453227ddb6f6951c5253070 = 14, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a5307c409518cb268645924bb4e63a1b7 = 15, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a625fa2d512acc7f79dcd2842cd14aee9 = 16, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a703f3f37913695979189ec967bd14d27 = 17, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a811cb6b060be08d49ae32c394ec9fd86 = 18, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a69a55d0344301f3dc35da5cd0b1422c3 = 19, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4abee301b7f4827b3a55369f2a77dca3fe = 20, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a997da5a684cc27c26a1a27856d9c5d51 = 21, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ac6b9eebd72a0d65a36cf3e2cdc8b0d49 = 23, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a17e8b038bc4e260e8ec2dd0b564cb41d = 32, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4af109d8223e0eb738ffa0f3d3ceedcd85 = 33, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a1ef035923a4327f42effe54387944c83 = 34, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4aff5906fa5de4cb7292e4cbc2ec0ff917 = 35, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4afc4d25cbcaca314e284c41f4800e7f81 = 36, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a6034bcd95542b78d8ca78cd0f4361ebd = 37, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a4522213c1118ed1f80394bc1cacf807b = 48, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ab38fdb0b004586e93fb4a95f77e7d617 = 49, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4acfc71bea6963c39f9ced228f4b9c923e = 51, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4aa994ae5b855bc0892406b39aa749625a = 52, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a1fcdd706e4044dc7a91a674750d6dda9 = 53, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a0a5e140e0d5b8635fc7a85447902f150 = 54, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4aaa321f0c7ac18c8c9c8a4a9ba29c805a = 55, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a34492c7922d5f33b76af6cb78a8cff40 = 56, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ace36f197187105f25e7f1f93856ca034 = 57, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a29c6940c7ab7c30f7dd7541274770c85 = 59, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a244d4db55c1a984ad9c42d0d2342d994 = 90, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a94be9b4ef40277c83ccfe1d2c613fbf3 = 91, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a24a19991a9097cc438769103f8ed6ae0 = 92, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a42159128b05637e3abce256e6474ae73 = 128, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4ae85cd3a7fe30ce3f2a9d26dc157c48c2 = 129, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gga8c40a8d1b44523163be6dafa7d0ab2b4a64a3108f1ffcd9034951f1c9f173fae2 = 241 }` | enumRepresents meshcop TLV types. |

| ### Typedefs ||
|---|---|
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga316ddec5e36387eef45b2b1ae0180da1` | typedef `uint32_t` Represents a Channel Mask. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac3473b9b1801ed9ac915f2bf7a0cec4b)(otError aResult, void *aContext)` | typedef `void(*` Pointer is called when a response to a MGMT_SET request is received or times out. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga74784082ffc93b172099b21ce2961ab9)(otError aError, void *aContext)` | typedef `void(*` This callback function pointer is called when a Dataset update request finishes, reporting success or failure status of the Dataset update request. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga327e2980bce5b99bd98664dfe41e4579` | typedef `struct https://openthread.io/reference/struct/ot-extended-pan-id` Represents an Extended PAN ID. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga793404eed6881d520a19a09da53b5cfc` | typedef `https://openthread.io/reference/struct/ot-ip6-network-prefix` Represents a Mesh Local Prefix. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaf230540bce6d337094746833b087da39` | typedef `enum https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8c40a8d1b44523163be6dafa7d0ab2b4` Represents meshcop TLV types. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga657e694ec1567aec8678366e0c0df4df` | typedef `struct https://openthread.io/reference/struct/ot-network-key` Represents a Thread Network Key. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga9f8d0877d62959bcb9b2026358bdea62` | typedef `https://openthread.io/reference/group/plat-crypto#group__plat-crypto_1ga829b526f41c89661fdcc649d5789603b` This datatype represents KeyRef to NetworkKey. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8eeb044fe18ec13fd926f06d5b7ced94` | typedef `struct https://openthread.io/reference/struct/ot-network-name` Represents a Network Name. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaf3414393510b005825b56a4915239611` | typedef `struct https://openthread.io/reference/struct/ot-operational-dataset` Represents an Active or Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gab960f36b48c3d3c44bb264bdede7caca` | typedef `struct https://openthread.io/reference/struct/ot-operational-dataset-components` Represents presence of different components in Active or Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaa41ed3706c84e36f68db376adc086748` | typedef `struct https://openthread.io/reference/struct/ot-operational-dataset-tlvs` Represents an Active or Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8c5450f052a6e297624234a0c505d0d0` | typedef `struct https://openthread.io/reference/struct/ot-pskc` Represents a PSKc. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga714e872d0f2b7a6496ec500ad3ad9555` | typedef `https://openthread.io/reference/group/plat-crypto#group__plat-crypto_1ga829b526f41c89661fdcc649d5789603b` This datatype represents KeyRef to PSKc. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga286d65e682893ff379666f4c19083a9f` | typedef `struct https://openthread.io/reference/struct/ot-security-policy` Represents Security Policy. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga00eb5ac0fd3306f61384cfc04608e4d8` | typedef `struct https://openthread.io/reference/struct/ot-timestamp` Represents a Thread Dataset timestamp component. |

| ### Variables ||
|---|---|
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gad826edf7023439358edf9b115731be7c` | `https://openthread.io/reference/group/plat-toolchain#group__plat-toolchain_1gaba6ad63129c3a790957a9b149a65891b struct https://openthread.io/reference/struct/ot-network-key` |

| ### Functions ||
|---|---|
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga2efc5a8f53e7d8bceff178456c4cc482(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvs)` | `bool` Indicates whether or not a given Operational Dataset (in TLVs format) affects connectivity. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gafff19960f2612b4a617ebd13587d5d8b(const https://openthread.io/reference/struct/ot-operational-dataset *aDataset, https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvs)` | `void` Converts a given Operational Dataset to `https://openthread.io/reference/struct/ot-operational-dataset-tlvs`. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga95ba704e5665bcf9c0fcbc2428e4995b(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/struct/ot-operational-dataset *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` For FTD only, creates a new Operational Dataset to use when forming a new network. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga594d6d4106b52b16fe16242cdb1187ec(const char *aPassPhrase, const https://openthread.io/reference/struct/ot-network-name *aNetworkName, const https://openthread.io/reference/struct/ot-extended-pan-id *aExtPanId, https://openthread.io/reference/struct/ot-pskc *aPskc)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Generates PSKc from a given pass-phrase, network name, and extended PAN ID. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga0273fe238a465679a9dbed997d8f601b(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/struct/ot-operational-dataset *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Gets the Active Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga934a0544fcbed93a2a8a8f4d8d710214(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Gets the Active Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gab2cc490b2e0ea6af733a579062b855ec(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `uint32_t` For FTD only, gets a minimal delay timer. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga624004f9985c10b57153d84e22d763ac(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/struct/ot-operational-dataset *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Gets the Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga5b03db825c94f5a39060c4215773c0f6(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Gets the Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga6741a15b0e18a3f79dfaad8e10a3e635(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `bool` Indicates whether a valid network is present in the Active Operational Dataset or not. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gab9bfe6409de3bfd04f3945e67d402677(const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvs, bool aActive)` | `bool` Indicates whether or not the given Operational Dataset TLVs is a valid Active or Pending Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga7da5bdb9f9e32af576e2d0eeb543620f(const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvs, https://openthread.io/reference/struct/ot-operational-dataset *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Parses an Operational Dataset from a given `https://openthread.io/reference/struct/ot-operational-dataset-tlvs`. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gae52cbe5d8bd771ceb248ce63f46dfc1d(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset-components *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const https://openthread.io/reference/struct/ot-ip6-address *aAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sends MGMT_ACTIVE_GET. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga2fd530deaef7991fe1a663ded20db7f5(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset *aDataset, const uint8_t *aTlvs, uint8_t aLength, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac3473b9b1801ed9ac915f2bf7a0cec4b aCallback, void *aContext)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sends MGMT_ACTIVE_SET. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga989c557552772f233a7e30b931fa4b10(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset-components *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const https://openthread.io/reference/struct/ot-ip6-address *aAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sends MGMT_PENDING_GET. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaefa3613065565f12f25791fbf0e8d144(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset *aDataset, const uint8_t *aTlvs, uint8_t aLength, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac3473b9b1801ed9ac915f2bf7a0cec4b aCallback, void *aContext)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sends MGMT_PENDING_SET. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gacb2902b17bf805951792b139ba3a24ac(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets the Active Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga315f380142324e8aeda0b90d8102113c(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets the Active Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga317689138ad599c1df47fd7317db576b(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint32_t aDelayTimerMinimal)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` For FTD only, sets a minimal delay timer. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gad687b08eea39b4fa06f4bd72c148c4f7(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets the Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga5c083a7d2f274f1e09a2b174a8758655(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDataset)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets the Pending Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga61134bde44de7a18d81330537980e6b3(const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvsA, const https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvsB)` | `bool` Compares two Operational Dataset TLVs to determine if they contain the same set of TLVs. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gafe86d10bea1760e32054c1119e627aa0(const https://openthread.io/reference/struct/ot-operational-dataset *aDataset, https://openthread.io/reference/struct/ot-operational-dataset-tlvs *aDatasetTlvs)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Updates a given Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaa27b0145358fa1016afc62093f0047fc(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `void` Cancels an ongoing (if any) Operational Dataset update request. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga715c528c3079b354172f2a8f69ddc2bf(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `bool` Indicates whether there is an ongoing Operation Dataset update request. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga4902687297468c8a82073e2c650caf97(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-operational-dataset *aDataset, https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga74784082ffc93b172099b21ce2961ab9 aCallback, void *aContext)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Requests an update to Operational Dataset. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaa1ea67944a6a3e72afb511e624ae240a(https://openthread.io/reference/struct/ot-network-name *aNetworkName, const char *aNameString)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets an `https://openthread.io/reference/struct/ot-network-name` instance from a given null terminated C string. |

| ### Macros ||
|---|---|
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga7e92391cc3ed9f5c7e610f2bac9deb83 (1 << 10)` | Channel 10. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac0d1d9835f20eb8d382f5a1c11682a59 (1 << 11)` | Channel 11. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gafa63127dce0926f1687a3885b4b23d19 (1 << 12)` | Channel 12. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga92c7ef41a74cf2756d2d33777d856bb1 (1 << 13)` | Channel 13. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaaddee10996bb422cd3362a471e39c237 (1 << 14)` | Channel 14. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac82527ecac03fb804fe0685affff97b8 (1 << 15)` | Channel 15. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaa3d3c9ab68ebc67aa3e9ac5863a255ed (1 << 16)` | Channel 16. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga9c7e427cdebb9b2f2321c99fec8d27e7 (1 << 17)` | Channel 17. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac9fe15887d9380f5b6a54798f681cfca (1 << 18)` | Channel 18. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8ef5ad3e2f9f1bfaf39725f090110299 (1 << 19)` | Channel 19. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga5b168028140a09748e914c67ed9f219a (1 << 1)` | Channel 1. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga7e5ba15ad986f9236955fb97857cc767 (1 << 20)` | Channel 20. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaaade0454ad9ad415019cb2521ddf8212 (1 << 21)` | Channel 21. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga623c23d046b9e9eb3f6550cfbd8b69d8 (1 << 22)` | Channel 22. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gabb73359ef301b8c59ef6e17e00bc3f34 (1 << 23)` | Channel 23. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga39738095551753238540e7aa96bdde4c (1 << 24)` | Channel 24. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac85277b9c2772a7bde1c31515cd0437f (1 << 25)` | Channel 25. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gae035b3e9e851c3dbfe056ba4c1f042ad (1 << 26)` | Channel 26. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga20ee2b6ca6967b560e4c5f6e23fa1ae2 (1 << 2)` | Channel 2. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8b13827fefdf98d1b68e2a225ef508c9 (1 << 3)` | Channel 3. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaff7065420348f9e98503134306f70fcb (1 << 4)` | Channel 4. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga30f8e6777f6eea20010c211012e8d4dc (1 << 5)` | Channel 5. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga8a68c051fadb8809f7fad3048087233e (1 << 6)` | Channel 6. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga56d8757ae26f7de72432dc66350e4236 (1 << 7)` | Channel 7. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gac87b77e6d795c9a4c0d9b00eeed06fc6 (1 << 8)` | Channel 8. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga529151df0a945c4d7044d3708adfc104 (1 << 9)` | Channel 9. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga017762222488008ad247180a2304c557 8` | Size of a Thread PAN ID (bytes) |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga919cc2774da37e83abac28ce9cdb3f05 OT_IP6_PREFIX_SIZE` | Size of the Mesh Local Prefix (bytes) |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga170e591eb644a6f9282c295c434bedc2 16` | Size of the Thread Network Key (bytes) |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga2963b4d76574a6b3845b38325b47d803 16` | Maximum size of the Thread Network Name field (bytes) |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga3d65de4702ea218e1f0fd8e5a231d40f 254` | Maximum length of Operational Dataset in bytes. |
| `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gad3828b7bb7c724b6bcae12631597e408 16` | Maximum size of the PSKc (bytes) |

| ### Structs ||
|---|---|
| [otExtendedPanId](https://openthread.io/reference/struct/ot-extended-pan-id) | Represents an Extended PAN ID. |
| [otNetworkKey](https://openthread.io/reference/struct/ot-network-key) | Represents a Thread Network Key. |
| [otNetworkName](https://openthread.io/reference/struct/ot-network-name) | Represents a Network Name. |
| [otOperationalDataset](https://openthread.io/reference/struct/ot-operational-dataset) | Represents an Active or Pending Operational Dataset. |
| [otOperationalDatasetComponents](https://openthread.io/reference/struct/ot-operational-dataset-components) | Represents presence of different components in Active or Pending Operational Dataset. |
| [otOperationalDatasetTlvs](https://openthread.io/reference/struct/ot-operational-dataset-tlvs) | Represents an Active or Pending Operational Dataset. |
| [otPskc](https://openthread.io/reference/struct/ot-pskc) | Represents PSKc. |
| [otSecurityPolicy](https://openthread.io/reference/struct/ot-security-policy) | Represents Security Policy. |
| [otTimestamp](https://openthread.io/reference/struct/ot-timestamp) | Represents a Thread Dataset timestamp component. |

## Enumerations

### otMeshcopTlvType

```
 otMeshcopTlvType
```
Represents meshcop TLV types.

| Properties ||
|---|---|
| `OT_MESHCOP_TLV_ACTIVETIMESTAMP` | meshcop Active Timestamp TLV |
| `OT_MESHCOP_TLV_ADMITTER_STATE` | meshcop Admitter State TLV |
| `OT_MESHCOP_TLV_BORDER_AGENT_RLOC` | meshcop Border Agent Locator TLV |
| `OT_MESHCOP_TLV_CHANNEL` | meshcop Channel TLV |
| `OT_MESHCOP_TLV_CHANNELMASK` | meshcop Channel Mask TLV |
| `OT_MESHCOP_TLV_COMMISSIONER_ID` | meshcop Commissioner ID TLV |
| `OT_MESHCOP_TLV_COMMISSIONER_UDP_PORT` | meshcop Commissioner UDP Port TLV |
| `OT_MESHCOP_TLV_COMM_SESSION_ID` | meshcop Commissioner Session ID TLV |
| `OT_MESHCOP_TLV_COUNT` | meshcop Count TLV |
| `OT_MESHCOP_TLV_DELAYTIMER` | meshcop Delay Timer TLV |
| `OT_MESHCOP_TLV_DISCOVERYREQUEST` | meshcop Discovery Request TLV |
| `OT_MESHCOP_TLV_DISCOVERYRESPONSE` | meshcop Discovery Response TLV |
| `OT_MESHCOP_TLV_DURATION` | meshcop Duration TLV |
| `OT_MESHCOP_TLV_ENERGY_LIST` | meshcop Energy List TLV |
| `OT_MESHCOP_TLV_ENROLLER_ID` | meshcop Enroller ID TLV |
| `OT_MESHCOP_TLV_ENROLLER_MODE` | meshcop Enroller Mode TLV |
| `OT_MESHCOP_TLV_EXTPANID` | meshcop Extended Pan Id TLV |
| `OT_MESHCOP_TLV_GET` | meshcop Get TLV |
| `OT_MESHCOP_TLV_IPV6_ADDRESS_TLV` | meshcop IPv6 address TLV |
| `OT_MESHCOP_TLV_JOINERADVERTISEMENT` | meshcop Joiner Advertisement TLV (experimental) |
| `OT_MESHCOP_TLV_JOINER_DTLS` | meshcop Joiner DTLS Encapsulation TLV |
| `OT_MESHCOP_TLV_JOINER_IID` | meshcop Joiner IID TLV |
| `OT_MESHCOP_TLV_JOINER_RLOC` | meshcop Joiner Router Locator TLV |
| `OT_MESHCOP_TLV_JOINER_ROUTER_KEK` | meshcop Joiner Router KEK TLV |
| `OT_MESHCOP_TLV_JOINER_UDP_PORT` | meshcop Joiner UDP Port TLV |
| `OT_MESHCOP_TLV_MESHLOCALPREFIX` | meshcop Mesh Local Prefix TLV |
| `OT_MESHCOP_TLV_NETWORKKEY` | meshcop Network Key TLV |
| `OT_MESHCOP_TLV_NETWORKNAME` | meshcop Network Name TLV |
| `OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE` | meshcop Network Key Sequence TLV |
| `OT_MESHCOP_TLV_PANID` | meshcop Pan Id TLV |
| `OT_MESHCOP_TLV_PENDINGTIMESTAMP` | meshcop Pending Timestamp TLV |
| `OT_MESHCOP_TLV_PERIOD` | meshcop Period TLV |
| `OT_MESHCOP_TLV_PROVISIONING_URL` | meshcop Provisioning URL TLV |
| `OT_MESHCOP_TLV_PSKC` | meshcop PSKc TLV |
| `OT_MESHCOP_TLV_SCAN_DURATION` | meshcop Scan Duration TLV |
| `OT_MESHCOP_TLV_SECURITYPOLICY` | meshcop Security Policy TLV |
| `OT_MESHCOP_TLV_STATE` | meshcop State TLV |
| `OT_MESHCOP_TLV_STEERING_DATA` | meshcop Steering Data TLV |
| `OT_MESHCOP_TLV_THREAD_DOMAIN_NAME` | meshcop Thread Domain Name TLV |
| `OT_MESHCOP_TLV_UDP_ENCAPSULATION_TLV` | meshcop UDP encapsulation TLV |
| `OT_MESHCOP_TLV_VENDOR_DATA_TLV` | meshcop Vendor Data TLV |
| `OT_MESHCOP_TLV_VENDOR_MODEL_TLV` | meshcop Vendor Model TLV |
| `OT_MESHCOP_TLV_VENDOR_NAME_TLV` | meshcop Vendor Name TLV |
| `OT_MESHCOP_TLV_VENDOR_STACK_VERSION_TLV` | meshcop Vendor Stack Version TLV |
| `OT_MESHCOP_TLV_VENDOR_SW_VERSION_TLV` | meshcop Vendor SW Version TLV |

## Typedefs

### otChannelMask

```
uint32_t otChannelMask
```
Represents a Channel Mask.

The least significant bit (LSB), also referred to as bit 0, corresponds to channel number 0, and so on.

### otDatasetMgmtSetCallback

```
void(* otDatasetMgmtSetCallback)(otError aResult, void *aContext)
```
Pointer is called when a response to a MGMT_SET request is received or times out.

<br />

Details Parameters `[in] aResult` A result of the operation. `[in] aContext` A pointer to application-specific context. Return Values `OT_ERROR_NONE` The request was accepted by the leader. `OT_ERROR_REJECTED` The request was rejected by the leader. `OT_ERROR_PARSE` An error occurred during parsing the response. `OT_ERROR_ABORT` The request was reset by peer. `OT_ERROR_RESPONSE_TIMEOUT` No response or acknowledgment received during timeout period.

### otDatasetUpdaterCallback

```
void(* otDatasetUpdaterCallback)(otError aError, void *aContext)
```
This callback function pointer is called when a Dataset update request finishes, reporting success or failure status of the Dataset update request.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

<br />

Details Parameters `[in] aError` The error status. OT_ERROR_NONE indicates successful Dataset update. OT_ERROR_INVALID_STATE indicates failure due invalid state (MLE being disabled). OT_ERROR_ALREADY indicates failure due to another device within network requesting a conflicting Dataset update. `[in] aContext` A pointer to the arbitrary context (provided by user in `https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga4902687297468c8a82073e2c650caf97`).

### otExtendedPanId

```
struct otExtendedPanId otExtendedPanId
```
Represents an Extended PAN ID.

### otMeshLocalPrefix

```
otIp6NetworkPrefix otMeshLocalPrefix
```
Represents a Mesh Local Prefix.

### otMeshcopTlvType

```
enum otMeshcopTlvType otMeshcopTlvType
```
Represents meshcop TLV types.

### otNetworkKey

```
struct otNetworkKey otNetworkKey
```
Represents a Thread Network Key.

### otNetworkKeyRef

```
otCryptoKeyRef otNetworkKeyRef
```
This datatype represents KeyRef to NetworkKey.

Reference to Key

### otNetworkName

```
struct otNetworkName otNetworkName
```
Represents a Network Name.

The `https://openthread.io/reference/struct/ot-network-name` is a null terminated C string (i.e., `m8` char array MUST end with null char `\0`).

### otOperationalDataset

```
struct otOperationalDataset otOperationalDataset
```
Represents an Active or Pending Operational Dataset.

Components in Dataset are optional. `mComponents` structure specifies which components are present in the Dataset.

### otOperationalDatasetComponents

```
struct otOperationalDatasetComponents otOperationalDatasetComponents
```
Represents presence of different components in Active or Pending Operational Dataset.

### otOperationalDatasetTlvs

```
struct otOperationalDatasetTlvs otOperationalDatasetTlvs
```
Represents an Active or Pending Operational Dataset.

The Operational Dataset is TLV encoded as specified by Thread.

### otPskc

```
struct otPskc otPskc
```
Represents a PSKc.

### otPskcRef

```
otCryptoKeyRef otPskcRef
```
This datatype represents KeyRef to PSKc.

Reference to Key

### otSecurityPolicy

```
struct otSecurityPolicy otSecurityPolicy
```
Represents Security Policy.

The `mReservedBit*Cleared` fields intentionally use inverted logic (`false`/`0` means the bit is set to `1` in the Security Policy TLV, and `true`/`1` means the bit is cleared to `0` in the TLV). Per the Thread specification, reserved bits in the Security Policy TLV default to `1`. Using inverted logic ensures backward compatibility when callers zero-initialize `https://openthread.io/reference/struct/ot-security-policy` (or `https://openthread.io/reference/struct/ot-operational-dataset`), so that unset reserved fields automatically encode to their specification-mandated default value of `1` in the TLV.

### otTimestamp

```
struct otTimestamp otTimestamp
```
Represents a Thread Dataset timestamp component.

## Variables

### OT_TOOL_PACKED_END

```
OT_TOOL_PACKED_BEGIN struct otNetworkKey OT_TOOL_PACKED_END
```

## Functions

### otDatasetAffectsConnectivity

```
bool otDatasetAffectsConnectivity(
  otInstance *aInstance,
  const otOperationalDatasetTlvs *aDatasetTlvs
)
```
Indicates whether or not a given Operational Dataset (in TLVs format) affects connectivity.

A Dataset affects connectivity if it contains a different Channel, PAN ID, Mesh Local Prefix, Network Key, or Security Policy than the current values in use.

The following security policy changes are considered to affect connectivity:

- Disabling routers (R bit: 1 to 0).
- Enabling non-CCM routers (NCR bit: 0 to 1).
- Increasing the version threshold for routing (VR field).

<br />

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDatasetTlvs` A pointer to Operational Dataset TLVs. **Returns** TRUE if `aDatasetTlvs` affects connectivity, FALSE otherwise.

### otDatasetConvertToTlvs

```
void otDatasetConvertToTlvs(
  const otOperationalDataset *aDataset,
  otOperationalDatasetTlvs *aDatasetTlvs
)
```
Converts a given Operational Dataset to `https://openthread.io/reference/struct/ot-operational-dataset-tlvs`.

<br />

Details Parameters `[in] aDataset` An Operational dataset to convert to TLVs. `[out] aDatasetTlvs` A pointer to dataset TLVs to return the result.

### otDatasetCreateNewNetwork

```
otError otDatasetCreateNewNetwork(
  otInstance *aInstance,
  otOperationalDataset *aDataset
)
```
For FTD only, creates a new Operational Dataset to use when forming a new network.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[out] aDataset` The Operational Dataset. Return Values `OT_ERROR_NONE` Successfully created a new Operational Dataset. `OT_ERROR_FAILED` Failed to generate random values for new parameters.

### otDatasetGeneratePskc

```
otError otDatasetGeneratePskc(
  const char *aPassPhrase,
  const otNetworkName *aNetworkName,
  const otExtendedPanId *aExtPanId,
  otPskc *aPskc
)
```
Generates PSKc from a given pass-phrase, network name, and extended PAN ID.

PSKc is used to establish the Commissioner Session.

<br />

Details Parameters `[in] aPassPhrase` The commissioning pass-phrase. `[in] aNetworkName` The network name for PSKc computation. `[in] aExtPanId` The extended PAN ID for PSKc computation. `[out] aPskc` A pointer to variable to output the generated PSKc. Return Values `OT_ERROR_NONE` Successfully generate PSKc. `OT_ERROR_INVALID_ARGS` If any of the input arguments is invalid.

### otDatasetGetActive

```
otError otDatasetGetActive(
  otInstance *aInstance,
  otOperationalDataset *aDataset
)
```
Gets the Active Operational Dataset.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[out] aDataset` A pointer to where the Active Operational Dataset will be placed. Return Values `OT_ERROR_NONE` Successfully retrieved the Active Operational Dataset. `OT_ERROR_NOT_FOUND` No corresponding value in the setting store.

### otDatasetGetActiveTlvs

```
otError otDatasetGetActiveTlvs(
  otInstance *aInstance,
  otOperationalDatasetTlvs *aDataset
)
```
Gets the Active Operational Dataset.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[out] aDataset` A pointer to where the Active Operational Dataset will be placed. Return Values `OT_ERROR_NONE` Successfully retrieved the Active Operational Dataset. `OT_ERROR_NOT_FOUND` No corresponding value in the setting store.

### otDatasetGetDelayTimerMinimal

```
uint32_t otDatasetGetDelayTimerMinimal(
  otInstance *aInstance
)
```
For FTD only, gets a minimal delay timer.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `the` value of minimal delay timer (in ms).

### otDatasetGetPending

```
otError otDatasetGetPending(
  otInstance *aInstance,
  otOperationalDataset *aDataset
)
```
Gets the Pending Operational Dataset.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[out] aDataset` A pointer to where the Pending Operational Dataset will be placed. Return Values `OT_ERROR_NONE` Successfully retrieved the Pending Operational Dataset. `OT_ERROR_NOT_FOUND` No corresponding value in the setting store.

### otDatasetGetPendingTlvs

```
otError otDatasetGetPendingTlvs(
  otInstance *aInstance,
  otOperationalDatasetTlvs *aDataset
)
```
Gets the Pending Operational Dataset.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[out] aDataset` A pointer to where the Pending Operational Dataset will be placed. Return Values `OT_ERROR_NONE` Successfully retrieved the Pending Operational Dataset. `OT_ERROR_NOT_FOUND` No corresponding value in the setting store.

### otDatasetIsCommissioned

```
bool otDatasetIsCommissioned(
  otInstance *aInstance
)
```
Indicates whether a valid network is present in the Active Operational Dataset or not.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. **Returns** TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.

### otDatasetIsValid

```
bool otDatasetIsValid(
  const otOperationalDatasetTlvs *aDatasetTlvs,
  bool aActive
)
```
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 `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.

<br />

Details Parameters `[in] aDatasetTlvs` A pointer to dataset TLVs. `[in] aActive` TRUE for Active Dataset, FALSE for Pending Dataset. **Returns** TRUE if `aDatasetTlvs` is a valid Dataset, FALSE otherwise.

### otDatasetParseTlvs

```
otError otDatasetParseTlvs(
  const otOperationalDatasetTlvs *aDatasetTlvs,
  otOperationalDataset *aDataset
)
```
Parses an Operational Dataset from a given `https://openthread.io/reference/struct/ot-operational-dataset-tlvs`.

<br />

Details Parameters `[in] aDatasetTlvs` A pointer to dataset TLVs. `[out] aDataset` A pointer to where the dataset will be placed. Return Values `OT_ERROR_NONE` Successfully set `aDataset` from `aDatasetTlvs`. `OT_ERROR_INVALID_ARGS` `aDatasetTlvs's` length is longer than `OT_OPERATIONAL_DATASET_MAX_LENGTH`.

### otDatasetSendMgmtActiveGet

```
otError otDatasetSendMgmtActiveGet(
  otInstance *aInstance,
  const otOperationalDatasetComponents *aDatasetComponents,
  const uint8_t *aTlvTypes,
  uint8_t aLength,
  const otIp6Address *aAddress
)
```
Sends MGMT_ACTIVE_GET.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDatasetComponents` A pointer to a Dataset Components structure specifying which components to request. `[in] aTlvTypes` A pointer to array containing additional raw TLV types to be requested. `[in] aLength` The length of `aTlvTypes`. `[in] aAddress` A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default. Return Values `OT_ERROR_NONE` Successfully send the meshcop dataset command. `OT_ERROR_NO_BUFS` Insufficient buffer space to send.

### otDatasetSendMgmtActiveSet

```
otError otDatasetSendMgmtActiveSet(
  otInstance *aInstance,
  const otOperationalDataset *aDataset,
  const uint8_t *aTlvs,
  uint8_t aLength,
  otDatasetMgmtSetCallback aCallback,
  void *aContext
)
```
Sends MGMT_ACTIVE_SET.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to operational dataset. `[in] aTlvs` A pointer to TLVs. `[in] aLength` The length of TLVs. `[in] aCallback` A pointer to a function that is called on response reception or timeout. `[in] aContext` A pointer to application-specific context for `aCallback`. Return Values `OT_ERROR_NONE` Successfully send the meshcop dataset command. `OT_ERROR_NO_BUFS` Insufficient buffer space to send. `OT_ERROR_BUSY` A previous request is ongoing.

### otDatasetSendMgmtPendingGet

```
otError otDatasetSendMgmtPendingGet(
  otInstance *aInstance,
  const otOperationalDatasetComponents *aDatasetComponents,
  const uint8_t *aTlvTypes,
  uint8_t aLength,
  const otIp6Address *aAddress
)
```
Sends MGMT_PENDING_GET.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDatasetComponents` A pointer to a Dataset Components structure specifying which components to request. `[in] aTlvTypes` A pointer to array containing additional raw TLV types to be requested. `[in] aLength` The length of `aTlvTypes`. `[in] aAddress` A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default. Return Values `OT_ERROR_NONE` Successfully send the meshcop dataset command. `OT_ERROR_NO_BUFS` Insufficient buffer space to send.

### otDatasetSendMgmtPendingSet

```
otError otDatasetSendMgmtPendingSet(
  otInstance *aInstance,
  const otOperationalDataset *aDataset,
  const uint8_t *aTlvs,
  uint8_t aLength,
  otDatasetMgmtSetCallback aCallback,
  void *aContext
)
```
Sends MGMT_PENDING_SET.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to operational dataset. `[in] aTlvs` A pointer to TLVs. `[in] aLength` The length of TLVs. `[in] aCallback` A pointer to a function that is called on response reception or timeout. `[in] aContext` A pointer to application-specific context for `aCallback`. Return Values `OT_ERROR_NONE` Successfully send the meshcop dataset command. `OT_ERROR_NO_BUFS` Insufficient buffer space to send. `OT_ERROR_BUSY` A previous request is ongoing.

### otDatasetSetActive

```
otError otDatasetSetActive(
  otInstance *aInstance,
  const otOperationalDataset *aDataset
)
```
Sets the Active Operational Dataset.

If the dataset does not include an Active Timestamp, the dataset is only partially complete.

If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network.

If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.

If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.

This function consistently returns `OT_ERROR_NONE` and can effectively be treated as having a `void` return type. Previously, other errors (e.g., `OT_ERROR_NOT_IMPLEMENTED`) were allowed for legacy reasons. However, as non-volatile storage is now mandatory for Thread operation, any failure to save the dataset will trigger an assertion. The `otError` return type is retained for backward compatibility.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to the Active Operational Dataset. Return Values `OT_ERROR_NONE` Successfully set the Active Operational Dataset.

### otDatasetSetActiveTlvs

```
otError otDatasetSetActiveTlvs(
  otInstance *aInstance,
  const otOperationalDatasetTlvs *aDataset
)
```
Sets the Active Operational Dataset.

If the dataset does not include an Active Timestamp, the dataset is only partially complete.

If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network.

If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.

If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to the Active Operational Dataset. Return Values `OT_ERROR_NONE` Successfully set the Active Operational Dataset. `OT_ERROR_INVALID_ARGS` The `aDataset` is invalid. It is too long or contains incorrect TLV formatting.

### otDatasetSetDelayTimerMinimal

```
otError otDatasetSetDelayTimerMinimal(
  otInstance *aInstance,
  uint32_t aDelayTimerMinimal
)
```
For FTD only, sets a minimal delay timer.


> [!NOTE]
> **Note:** This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDelayTimerMinimal` The value of minimal delay timer (in ms). Return Values `OT_ERROR_NONE` Successfully set minimal delay timer. `OT_ERROR_INVALID_ARGS` If `aDelayTimerMinimal` is not valid.

### otDatasetSetPending

```
otError otDatasetSetPending(
  otInstance *aInstance,
  const otOperationalDataset *aDataset
)
```
Sets the Pending Operational Dataset.

This function consistently returns `OT_ERROR_NONE` and can effectively be treated as having a `void` return type. Previously, other errors (e.g., `OT_ERROR_NOT_IMPLEMENTED`) were allowed for legacy reasons. However, as non-volatile storage is now mandatory for Thread operation, any failure to save the dataset will trigger an assertion. The `otError` return type is retained for backward compatibility.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to the Pending Operational Dataset. Return Values `OT_ERROR_NONE` Successfully set the Pending Operational Dataset.

### otDatasetSetPendingTlvs

```
otError otDatasetSetPendingTlvs(
  otInstance *aInstance,
  const otOperationalDatasetTlvs *aDataset
)
```
Sets the Pending Operational Dataset.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to the Pending Operational Dataset. Return Values `OT_ERROR_NONE` Successfully set the Pending Operational Dataset. `OT_ERROR_INVALID_ARGS` The `aDataset` is invalid. It is too long or contains incorrect TLV formatting.

### otDatasetTlvsCompare

```
bool otDatasetTlvsCompare(
  const otOperationalDatasetTlvs *aDatasetTlvsA,
  const otOperationalDatasetTlvs *aDatasetTlvsB
)
```
Compares two Operational Dataset TLVs to determine if they contain the same set of TLVs.

This function performs a deep comparison. It parses both `aDatasetTlvsA` and `aDatasetTlvsB` and checks if they contain the exact same set of TLVs (same type and same value). The order of TLVs within the `https://openthread.io/reference/struct/ot-operational-dataset-tlvs` does not matter.

<br />

Details Parameters `[in] aDatasetTlvsA` A pointer to dataset TLVs A. Must not be NULL. `[in] aDatasetTlvsB` A pointer to dataset TLVs B. Must not be NULL. **Returns** TRUE if the two Operational Dataset TLVs match, FALSE otherwise (e.g., if any TLV differs, is missing, or if the TLVs are not well-formed).

### otDatasetUpdateTlvs

```
otError otDatasetUpdateTlvs(
  const otOperationalDataset *aDataset,
  otOperationalDatasetTlvs *aDatasetTlvs
)
```
Updates a given Operational Dataset.

`aDataset` contains the fields to be updated and their new value.

<br />

Details Parameters `[in] aDataset` Specifies the set of types and values to update. `[in,out] aDatasetTlvs` A pointer to dataset TLVs to update. Return Values `OT_ERROR_NONE` Successfully updated `aDatasetTlvs`. `OT_ERROR_INVALID_ARGS` `aDataset` contains invalid values. `OT_ERROR_NO_BUFS` Not enough space space in `aDatasetTlvs` to apply the update.

### otDatasetUpdaterCancelUpdate

```
void otDatasetUpdaterCancelUpdate(
  otInstance *aInstance
)
```
Cancels an ongoing (if any) Operational Dataset update request.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance.

### otDatasetUpdaterIsUpdateOngoing

```
bool otDatasetUpdaterIsUpdateOngoing(
  otInstance *aInstance
)
```
Indicates whether there is an ongoing Operation Dataset update request.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `TRUE` There is an ongoing update. `FALSE` There is no ongoing update.

### otDatasetUpdaterRequestUpdate

```
otError otDatasetUpdaterRequestUpdate(
  otInstance *aInstance,
  const otOperationalDataset *aDataset,
  otDatasetUpdaterCallback aCallback,
  void *aContext
)
```
Requests an update to Operational Dataset.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

`aDataset` should contain the fields to be updated and their new value. It must not contain Active or Pending Timestamp fields. The Delay field is optional, if not provided a default value (1000 ms) would be used.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aDataset` A pointer to the Dataset containing the fields to change. `[in] aCallback` A callback to indicate when Dataset update request finishes. `[in] aContext` An arbitrary context passed to callback. Return Values `OT_ERROR_NONE` Dataset update started successfully (`aCallback` will be invoked on completion). `OT_ERROR_INVALID_STATE` Device is disabled or not fully configured (missing or incomplete Active Dataset). `OT_ERROR_ALREADY` The `aDataset` fields already match the existing Active Dataset. `OT_ERROR_INVALID_ARGS` The `aDataset` is not valid (contains Active or Pending Timestamp). `OT_ERROR_BUSY` Cannot start update, a previous one is ongoing. `OT_ERROR_NO_BUFS` Could not allocated buffer to save Dataset.

### otNetworkNameFromString

```
otError otNetworkNameFromString(
  otNetworkName *aNetworkName,
  const char *aNameString
)
```
Sets an `https://openthread.io/reference/struct/ot-network-name` instance from a given null terminated C string.

`aNameString` must follow UTF-8 encoding and the Network Name length must not be longer than `OT_NETWORK_NAME_MAX_SIZE`.

<br />

Details Parameters `[out] aNetworkName` A pointer to the `https://openthread.io/reference/struct/ot-network-name` to set. `[in] aNameString` A name C string. Return Values `OT_ERROR_NONE` Successfully set `aNetworkName` from `aNameString`. `OT_ERROR_INVALID_ARGS` `aNameStrng` is invalid (too long or does not follow UTF-8 encoding).

## Macros

### OT_CHANNEL_10_MASK

```
 OT_CHANNEL_10_MASK (1 << 10)
```
Channel 10.

### OT_CHANNEL_11_MASK

```
 OT_CHANNEL_11_MASK (1 << 11)
```
Channel 11.

### OT_CHANNEL_12_MASK

```
 OT_CHANNEL_12_MASK (1 << 12)
```
Channel 12.

### OT_CHANNEL_13_MASK

```
 OT_CHANNEL_13_MASK (1 << 13)
```
Channel 13.

### OT_CHANNEL_14_MASK

```
 OT_CHANNEL_14_MASK (1 << 14)
```
Channel 14.

### OT_CHANNEL_15_MASK

```
 OT_CHANNEL_15_MASK (1 << 15)
```
Channel 15.

### OT_CHANNEL_16_MASK

```
 OT_CHANNEL_16_MASK (1 << 16)
```
Channel 16.

### OT_CHANNEL_17_MASK

```
 OT_CHANNEL_17_MASK (1 << 17)
```
Channel 17.

### OT_CHANNEL_18_MASK

```
 OT_CHANNEL_18_MASK (1 << 18)
```
Channel 18.

### OT_CHANNEL_19_MASK

```
 OT_CHANNEL_19_MASK (1 << 19)
```
Channel 19.

### OT_CHANNEL_1_MASK

```
 OT_CHANNEL_1_MASK (1 << 1)
```
Channel 1.

### OT_CHANNEL_20_MASK

```
 OT_CHANNEL_20_MASK (1 << 20)
```
Channel 20.

### OT_CHANNEL_21_MASK

```
 OT_CHANNEL_21_MASK (1 << 21)
```
Channel 21.

### OT_CHANNEL_22_MASK

```
 OT_CHANNEL_22_MASK (1 << 22)
```
Channel 22.

### OT_CHANNEL_23_MASK

```
 OT_CHANNEL_23_MASK (1 << 23)
```
Channel 23.

### OT_CHANNEL_24_MASK

```
 OT_CHANNEL_24_MASK (1 << 24)
```
Channel 24.

### OT_CHANNEL_25_MASK

```
 OT_CHANNEL_25_MASK (1 << 25)
```
Channel 25.

### OT_CHANNEL_26_MASK

```
 OT_CHANNEL_26_MASK (1 << 26)
```
Channel 26.

### OT_CHANNEL_2_MASK

```
 OT_CHANNEL_2_MASK (1 << 2)
```
Channel 2.

### OT_CHANNEL_3_MASK

```
 OT_CHANNEL_3_MASK (1 << 3)
```
Channel 3.

### OT_CHANNEL_4_MASK

```
 OT_CHANNEL_4_MASK (1 << 4)
```
Channel 4.

### OT_CHANNEL_5_MASK

```
 OT_CHANNEL_5_MASK (1 << 5)
```
Channel 5.

### OT_CHANNEL_6_MASK

```
 OT_CHANNEL_6_MASK (1 << 6)
```
Channel 6.

### OT_CHANNEL_7_MASK

```
 OT_CHANNEL_7_MASK (1 << 7)
```
Channel 7.

### OT_CHANNEL_8_MASK

```
 OT_CHANNEL_8_MASK (1 << 8)
```
Channel 8.

### OT_CHANNEL_9_MASK

```
 OT_CHANNEL_9_MASK (1 << 9)
```
Channel 9.

### OT_EXT_PAN_ID_SIZE

```
 OT_EXT_PAN_ID_SIZE 8
```
Size of a Thread PAN ID (bytes)

### OT_MESH_LOCAL_PREFIX_SIZE

```
 OT_MESH_LOCAL_PREFIX_SIZE OT_IP6_PREFIX_SIZE
```
Size of the Mesh Local Prefix (bytes)

### OT_NETWORK_KEY_SIZE

```
 OT_NETWORK_KEY_SIZE 16
```
Size of the Thread Network Key (bytes)

### OT_NETWORK_NAME_MAX_SIZE

```
 OT_NETWORK_NAME_MAX_SIZE 16
```
Maximum size of the Thread Network Name field (bytes)

### OT_OPERATIONAL_DATASET_MAX_LENGTH

```
 OT_OPERATIONAL_DATASET_MAX_LENGTH 254
```
Maximum length of Operational Dataset in bytes.

### OT_PSKC_MAX_SIZE

```
 OT_PSKC_MAX_SIZE 16
```
Maximum size of the PSKc (bytes)

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).