Skip to content

Commit

Permalink
openthread: Update prebuild libraries based on d9abe30
Browse files Browse the repository at this point in the history
Updating Openthread libs. Including voulnerability fix.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
  • Loading branch information
canisLupus1313 authored and rlubos committed Jul 3, 2023
1 parent c3d4ead commit acf83cd
Show file tree
Hide file tree
Showing 46 changed files with 1,263 additions and 165 deletions.
24 changes: 24 additions & 0 deletions openthread/include/openthread/border_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ extern "C" {
*
*/

/**
* The length of Border Agent/Router ID in bytes.
*
*/
#define OT_BORDER_AGENT_ID_LENGTH (16)

/**
* This enumeration defines the Border Agent state.
*
Expand Down Expand Up @@ -82,6 +88,24 @@ otBorderAgentState otBorderAgentGetState(otInstance *aInstance);
*/
uint16_t otBorderAgentGetUdpPort(otInstance *aInstance);

/**
* Gets the randomly generated Border Agent ID.
*
* The ID is saved in persistent storage and survives reboots. The typical use case of the ID is to
* be published in the MeshCoP mDNS service as the `id` TXT value for the client to identify this
* Border Router/Agent device.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aId A pointer to buffer to receive the ID.
* @param[inout] aLength Specifies the length of `aId` when used as input and receives the length
* actual ID data copied to `aId` when used as output.
*
* @retval OT_ERROR_INVALID_ARGS If value of `aLength` if smaller than `OT_BORDER_AGENT_ID_LENGTH`.
* @retval OT_ERROR_NONE If successfully retrieved the Border Agent ID.
*
*/
otError otBorderAgentGetId(otInstance *aInstance, uint8_t *aId, uint16_t *aLength);

/**
* @}
*
Expand Down
44 changes: 40 additions & 4 deletions openthread/include/openthread/border_routing.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ typedef struct otBorderRoutingPrefixTableEntry
uint32_t mPreferredLifetime; ///< Preferred lifetime of the on-link prefix when `mIsOnLink` is true.
} otBorderRoutingPrefixTableEntry;

/**
* This enumeration represents the state of Border Routing Manager.
*
*/
typedef enum
{
OT_BORDER_ROUTING_STATE_UNINITIALIZED, ///< Routing Manager is uninitialized.
OT_BORDER_ROUTING_STATE_DISABLED, ///< Routing Manager is initialized but disabled.
OT_BORDER_ROUTING_STATE_STOPPED, ///< Routing Manager in initialized and enabled but currently stopped.
OT_BORDER_ROUTING_STATE_RUNNING, ///< Routing Manager is initialized, enabled, and running.
} otBorderRoutingState;

/**
* This method initializes the Border Routing Manager on given infrastructure interface.
*
Expand Down Expand Up @@ -140,6 +152,16 @@ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool
*/
otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled);

/**
* Gets the current state of Border Routing Manager.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current state of Border Routing Manager.
*
*/
otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance);

/**
* This function gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement
* messages sent over the infrastructure link.
Expand Down Expand Up @@ -212,20 +234,34 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix, otRoutePreference *aPreference);

/**
* Gets the On-Link Prefix for the adjacent infrastructure link, for example `fd41:2650:a6f5:0::/64`.
* Gets the local On-Link Prefix for the adjacent infrastructure link.
*
* An On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a usable
* on-link prefix being advertised on the link.
* The local On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a
* usable on-link prefix being advertised on the link.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aPrefix A pointer to where the prefix will be output to.
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully retrieved the on-link prefix.
* @retval OT_ERROR_NONE Successfully retrieved the local on-link prefix.
*
*/
otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);

/**
* Gets the currently favored On-Link Prefix.
*
* The favored prefix is either a discovered on-link prefix on the infrastructure link or the local on-link prefix.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aPrefix A pointer to where the prefix will be output to.
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully retrieved the favored on-link prefix.
*
*/
otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);

/**
* Gets the local NAT64 Prefix of the Border Router.
*
Expand Down
36 changes: 24 additions & 12 deletions openthread/include/openthread/child_supervision.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* @file
* @brief
* This file includes the OpenThread API for child supervision feature
* This file includes the OpenThread API for child supervision feature.
*/

#ifndef OPENTHREAD_CHILD_SUPERVISION_H_
Expand All @@ -47,38 +47,35 @@ extern "C" {
* @brief
* This module includes functions for child supervision feature.
*
* The functions in this module are available when child supervision feature
* (`OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE`) is enabled.
*
* @{
*
*/

/**
* Gets the child supervision interval (in seconds).
* Gets the child supervision interval (in seconds) on a child.
*
* Child supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child
* within the supervision interval. If there is no transmission to the child within the supervision interval,
* OpenThread enqueues and sends a supervision message (a data message with empty payload) to the child.
* Child supervision feature provides a mechanism for a sleepy child to ask its parent to ensure to send a message to
* it within the supervision interval. If there is no transmission to the child within the supervision interval,
* parent sends a supervision message (a data message with empty payload) to the child.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The child supervision interval. Zero indicates that child supervision is disabled.
* @returns The child supervision interval. Zero indicates that supervision is disabled.
*
*/
uint16_t otChildSupervisionGetInterval(otInstance *aInstance);

/**
* Sets the child supervision interval (in seconds).
* Sets the child supervision interval (in seconds) on the child.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aInterval The supervision interval (in seconds). Zero to disable supervision on parent.
* @param[in] aInterval The supervision interval (in seconds). Zero to disable supervision.
*
*/
void otChildSupervisionSetInterval(otInstance *aInstance, uint16_t aInterval);

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

/**
* Get the value of supervision check timeout failure counter.
*
* The counter tracks the number of supervision check failures on the child. It is incremented when the child does
* not hear from its parent within the specified check timeout interval.
*
*/
uint16_t otChildSupervisionGetCheckFailureCounter(otInstance *aInstance);

/**
* Reset the supervision check timeout failure counter to zero.
*
*/
void otChildSupervisionResetCheckFailureCounter(otInstance *aInstance);

/**
* @}
*
Expand Down
13 changes: 12 additions & 1 deletion openthread/include/openthread/cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ void otCliInputLine(char *aBuf);
* @param[in] aLength @p aUserCommands length.
* @param[in] aContext @p The context passed to the handler.
*
* @retval OT_ERROR_NONE Successfully updated command table with commands from @p aUserCommands.
* @retval OT_ERROR_FAILED Maximum number of command entries have already been set.
*/
void otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength, void *aContext);
otError otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength, void *aContext);

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

/**
* Callback to allow vendor specific commands to be added to the user command table.
*
* Available when `OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE` is enabled and
* `OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES` is greater than 1.
*
*/
extern void otCliVendorSetUserCommands(void);

/**
* @}
*
Expand Down
31 changes: 29 additions & 2 deletions openthread/include/openthread/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ typedef struct otTimestamp
/**
* This structure represents an Active or Pending Operational Dataset.
*
* Components in Dataset are optional. `mComponets` structure specifies which components are present in the Dataset.
* Components in Dataset are optional. `mComponents` structure specifies which components are present in the Dataset.
*
*/
typedef struct otOperationalDataset
Expand Down Expand Up @@ -583,7 +583,7 @@ otError otDatasetGeneratePskc(const char *aPassPhrase,
otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameString);

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

/**
* Converts a given Operational Dataset to `otOperationalDatasetTlvs`.
*
* @param[in] aDataset An Operational dataset to convert to TLVs.
* @param[out] aDatasetTlvs A pointer to dataset TLVs to return the result.
*
* @retval OT_ERROR_NONE Successfully converted @p aDataset and updated @p aDatasetTlvs.
* @retval OT_ERROR_INVALID_ARGS @p aDataset is invalid, does not contain active or pending timestamps.
*
*/
otError otDatasetConvertToTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs);

/**
* Updates a given Operational Dataset.
*
* @p aDataset contains the fields to be updated and their new value.
*
* @param[in] aDataset Specifies the set of types and values to update.
* @param[in,out] aDatasetTlvs A pointer to dataset TLVs to update.
*
* @retval OT_ERROR_NONE Successfully updated @p aDatasetTlvs.
* @retval OT_ERROR_INVALID_ARGS @p aDataset contains invalid values.
* @retval OT_ERROR_NO_BUFS Not enough space space in @p aDatasetTlvs to apply the update.
*
*/
otError otDatasetUpdateTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs);

/**
* @}
*
Expand Down
Loading

0 comments on commit acf83cd

Please sign in to comment.