Skip to content

Commit acf83cd

Browse files
Przemyslaw Bidarlubos
authored andcommitted
openthread: Update prebuild libraries based on d9abe30
Updating Openthread libs. Including voulnerability fix. Signed-off-by: Przemyslaw Bida <[email protected]>
1 parent c3d4ead commit acf83cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1263
-165
lines changed

openthread/include/openthread/border_agent.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ extern "C" {
5151
*
5252
*/
5353

54+
/**
55+
* The length of Border Agent/Router ID in bytes.
56+
*
57+
*/
58+
#define OT_BORDER_AGENT_ID_LENGTH (16)
59+
5460
/**
5561
* This enumeration defines the Border Agent state.
5662
*
@@ -82,6 +88,24 @@ otBorderAgentState otBorderAgentGetState(otInstance *aInstance);
8288
*/
8389
uint16_t otBorderAgentGetUdpPort(otInstance *aInstance);
8490

91+
/**
92+
* Gets the randomly generated Border Agent ID.
93+
*
94+
* The ID is saved in persistent storage and survives reboots. The typical use case of the ID is to
95+
* be published in the MeshCoP mDNS service as the `id` TXT value for the client to identify this
96+
* Border Router/Agent device.
97+
*
98+
* @param[in] aInstance A pointer to an OpenThread instance.
99+
* @param[out] aId A pointer to buffer to receive the ID.
100+
* @param[inout] aLength Specifies the length of `aId` when used as input and receives the length
101+
* actual ID data copied to `aId` when used as output.
102+
*
103+
* @retval OT_ERROR_INVALID_ARGS If value of `aLength` if smaller than `OT_BORDER_AGENT_ID_LENGTH`.
104+
* @retval OT_ERROR_NONE If successfully retrieved the Border Agent ID.
105+
*
106+
*/
107+
otError otBorderAgentGetId(otInstance *aInstance, uint8_t *aId, uint16_t *aLength);
108+
85109
/**
86110
* @}
87111
*

openthread/include/openthread/border_routing.h

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ typedef struct otBorderRoutingPrefixTableEntry
106106
uint32_t mPreferredLifetime; ///< Preferred lifetime of the on-link prefix when `mIsOnLink` is true.
107107
} otBorderRoutingPrefixTableEntry;
108108

109+
/**
110+
* This enumeration represents the state of Border Routing Manager.
111+
*
112+
*/
113+
typedef enum
114+
{
115+
OT_BORDER_ROUTING_STATE_UNINITIALIZED, ///< Routing Manager is uninitialized.
116+
OT_BORDER_ROUTING_STATE_DISABLED, ///< Routing Manager is initialized but disabled.
117+
OT_BORDER_ROUTING_STATE_STOPPED, ///< Routing Manager in initialized and enabled but currently stopped.
118+
OT_BORDER_ROUTING_STATE_RUNNING, ///< Routing Manager is initialized, enabled, and running.
119+
} otBorderRoutingState;
120+
109121
/**
110122
* This method initializes the Border Routing Manager on given infrastructure interface.
111123
*
@@ -140,6 +152,16 @@ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool
140152
*/
141153
otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled);
142154

155+
/**
156+
* Gets the current state of Border Routing Manager.
157+
*
158+
* @param[in] aInstance A pointer to an OpenThread instance.
159+
*
160+
* @returns The current state of Border Routing Manager.
161+
*
162+
*/
163+
otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance);
164+
143165
/**
144166
* This function gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement
145167
* messages sent over the infrastructure link.
@@ -212,20 +234,34 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
212234
otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix, otRoutePreference *aPreference);
213235

214236
/**
215-
* Gets the On-Link Prefix for the adjacent infrastructure link, for example `fd41:2650:a6f5:0::/64`.
237+
* Gets the local On-Link Prefix for the adjacent infrastructure link.
216238
*
217-
* An On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a usable
218-
* on-link prefix being advertised on the link.
239+
* The local On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a
240+
* usable on-link prefix being advertised on the link.
219241
*
220242
* @param[in] aInstance A pointer to an OpenThread instance.
221243
* @param[out] aPrefix A pointer to where the prefix will be output to.
222244
*
223245
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
224-
* @retval OT_ERROR_NONE Successfully retrieved the on-link prefix.
246+
* @retval OT_ERROR_NONE Successfully retrieved the local on-link prefix.
225247
*
226248
*/
227249
otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
228250

251+
/**
252+
* Gets the currently favored On-Link Prefix.
253+
*
254+
* The favored prefix is either a discovered on-link prefix on the infrastructure link or the local on-link prefix.
255+
*
256+
* @param[in] aInstance A pointer to an OpenThread instance.
257+
* @param[out] aPrefix A pointer to where the prefix will be output to.
258+
*
259+
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
260+
* @retval OT_ERROR_NONE Successfully retrieved the favored on-link prefix.
261+
*
262+
*/
263+
otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
264+
229265
/**
230266
* Gets the local NAT64 Prefix of the Border Router.
231267
*

openthread/include/openthread/child_supervision.h

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* @file
3131
* @brief
32-
* This file includes the OpenThread API for child supervision feature
32+
* This file includes the OpenThread API for child supervision feature.
3333
*/
3434

3535
#ifndef OPENTHREAD_CHILD_SUPERVISION_H_
@@ -47,38 +47,35 @@ extern "C" {
4747
* @brief
4848
* This module includes functions for child supervision feature.
4949
*
50-
* The functions in this module are available when child supervision feature
51-
* (`OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE`) is enabled.
52-
*
5350
* @{
5451
*
5552
*/
5653

5754
/**
58-
* Gets the child supervision interval (in seconds).
55+
* Gets the child supervision interval (in seconds) on a child.
5956
*
60-
* Child supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child
61-
* within the supervision interval. If there is no transmission to the child within the supervision interval,
62-
* OpenThread enqueues and sends a supervision message (a data message with empty payload) to the child.
57+
* Child supervision feature provides a mechanism for a sleepy child to ask its parent to ensure to send a message to
58+
* it within the supervision interval. If there is no transmission to the child within the supervision interval,
59+
* parent sends a supervision message (a data message with empty payload) to the child.
6360
*
6461
* @param[in] aInstance A pointer to an OpenThread instance.
6562
*
66-
* @returns The child supervision interval. Zero indicates that child supervision is disabled.
63+
* @returns The child supervision interval. Zero indicates that supervision is disabled.
6764
*
6865
*/
6966
uint16_t otChildSupervisionGetInterval(otInstance *aInstance);
7067

7168
/**
72-
* Sets the child supervision interval (in seconds).
69+
* Sets the child supervision interval (in seconds) on the child.
7370
*
7471
* @param[in] aInstance A pointer to an OpenThread instance.
75-
* @param[in] aInterval The supervision interval (in seconds). Zero to disable supervision on parent.
72+
* @param[in] aInterval The supervision interval (in seconds). Zero to disable supervision.
7673
*
7774
*/
7875
void otChildSupervisionSetInterval(otInstance *aInstance, uint16_t aInterval);
7976

8077
/**
81-
* Gets the supervision check timeout interval (in seconds).
78+
* Gets the supervision check timeout interval (in seconds) on the child.
8279
*
8380
* If the device is a sleepy child and it does not hear from its parent within the specified check timeout, it initiates
8481
* the re-attach process (MLE Child Update Request/Response exchange with its parent).
@@ -99,6 +96,21 @@ uint16_t otChildSupervisionGetCheckTimeout(otInstance *aInstance);
9996
*/
10097
void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout);
10198

99+
/**
100+
* Get the value of supervision check timeout failure counter.
101+
*
102+
* The counter tracks the number of supervision check failures on the child. It is incremented when the child does
103+
* not hear from its parent within the specified check timeout interval.
104+
*
105+
*/
106+
uint16_t otChildSupervisionGetCheckFailureCounter(otInstance *aInstance);
107+
108+
/**
109+
* Reset the supervision check timeout failure counter to zero.
110+
*
111+
*/
112+
void otChildSupervisionResetCheckFailureCounter(otInstance *aInstance);
113+
102114
/**
103115
* @}
104116
*

openthread/include/openthread/cli.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ void otCliInputLine(char *aBuf);
104104
* @param[in] aLength @p aUserCommands length.
105105
* @param[in] aContext @p The context passed to the handler.
106106
*
107+
* @retval OT_ERROR_NONE Successfully updated command table with commands from @p aUserCommands.
108+
* @retval OT_ERROR_FAILED Maximum number of command entries have already been set.
107109
*/
108-
void otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength, void *aContext);
110+
otError otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength, void *aContext);
109111

110112
/**
111113
* Write a number of bytes to the CLI console as a hex string.
@@ -146,6 +148,15 @@ void otCliAppendResult(otError aError);
146148
*/
147149
void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs);
148150

151+
/**
152+
* Callback to allow vendor specific commands to be added to the user command table.
153+
*
154+
* Available when `OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE` is enabled and
155+
* `OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES` is greater than 1.
156+
*
157+
*/
158+
extern void otCliVendorSetUserCommands(void);
159+
149160
/**
150161
* @}
151162
*

openthread/include/openthread/dataset.h

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ typedef struct otTimestamp
229229
/**
230230
* This structure represents an Active or Pending Operational Dataset.
231231
*
232-
* Components in Dataset are optional. `mComponets` structure specifies which components are present in the Dataset.
232+
* Components in Dataset are optional. `mComponents` structure specifies which components are present in the Dataset.
233233
*
234234
*/
235235
typedef struct otOperationalDataset
@@ -583,7 +583,7 @@ otError otDatasetGeneratePskc(const char *aPassPhrase,
583583
otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameString);
584584

585585
/**
586-
* This function parses an Operational Dataset from a `otOperationalDatasetTlvs`.
586+
* Parses an Operational Dataset from a given `otOperationalDatasetTlvs`.
587587
*
588588
* @param[in] aDatasetTlvs A pointer to dataset TLVs.
589589
* @param[out] aDataset A pointer to where the dataset will be placed.
@@ -594,6 +594,33 @@ otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameSt
594594
*/
595595
otError otDatasetParseTlvs(const otOperationalDatasetTlvs *aDatasetTlvs, otOperationalDataset *aDataset);
596596

597+
/**
598+
* Converts a given Operational Dataset to `otOperationalDatasetTlvs`.
599+
*
600+
* @param[in] aDataset An Operational dataset to convert to TLVs.
601+
* @param[out] aDatasetTlvs A pointer to dataset TLVs to return the result.
602+
*
603+
* @retval OT_ERROR_NONE Successfully converted @p aDataset and updated @p aDatasetTlvs.
604+
* @retval OT_ERROR_INVALID_ARGS @p aDataset is invalid, does not contain active or pending timestamps.
605+
*
606+
*/
607+
otError otDatasetConvertToTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs);
608+
609+
/**
610+
* Updates a given Operational Dataset.
611+
*
612+
* @p aDataset contains the fields to be updated and their new value.
613+
*
614+
* @param[in] aDataset Specifies the set of types and values to update.
615+
* @param[in,out] aDatasetTlvs A pointer to dataset TLVs to update.
616+
*
617+
* @retval OT_ERROR_NONE Successfully updated @p aDatasetTlvs.
618+
* @retval OT_ERROR_INVALID_ARGS @p aDataset contains invalid values.
619+
* @retval OT_ERROR_NO_BUFS Not enough space space in @p aDatasetTlvs to apply the update.
620+
*
621+
*/
622+
otError otDatasetUpdateTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs);
623+
597624
/**
598625
* @}
599626
*

0 commit comments

Comments
 (0)