Skip to content

Commit 6e4f78f

Browse files
Przemyslaw Bidaanangl
authored andcommitted
openthread: update libraries based on commit 2ce3d3b
Update OpenThread pre-build libraries. Signed-off-by: Przemyslaw Bida <[email protected]>
1 parent 6ed7893 commit 6e4f78f

40 files changed

+447
-152
lines changed

openthread/include/openthread/border_agent.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ typedef enum otBorderAgentState
6363
} otBorderAgentState;
6464

6565
/**
66-
* This function gets the state of Thread Border Agent role.
66+
* Gets the #otBorderAgentState of the Thread Border Agent role.
6767
*
6868
* @param[in] aInstance A pointer to an OpenThread instance.
6969
*
70-
* @returns State of the Border Agent.
70+
* @returns The current #otBorderAgentState of the Border Agent.
7171
*
7272
*/
7373
otBorderAgentState otBorderAgentGetState(otInstance *aInstance);
7474

7575
/**
76-
* This function gets the UDP port of Thread Border Agent service.
76+
* Gets the UDP port of the Thread Border Agent service.
7777
*
7878
* @param[in] aInstance A pointer to an OpenThread instance.
7979
*

openthread/include/openthread/border_router.h

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ extern "C" {
7373
otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool aInfraIfIsRunning);
7474

7575
/**
76-
* This method enables/disables the Border Routing Manager.
76+
* Enables or disables the Border Routing Manager.
7777
*
7878
* @note The Border Routing Manager is disabled by default.
7979
*
@@ -87,10 +87,36 @@ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool
8787
otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled);
8888

8989
/**
90-
* This method returns the off-mesh-routable (OMR) prefix.
90+
* This function gets the preference used when advertising Route Info Options (e.g., for discovered OMR prefixes) in
91+
* Router Advertisement messages sent over the infrastructure link.
9192
*
92-
* The randomly generated 64-bit prefix will be published
93-
* in the Thread network if there isn't already an OMR prefix.
93+
* @param[in] aInstance A pointer to an OpenThread instance.
94+
*
95+
* @returns The OMR prefix advertisement preference.
96+
*
97+
*/
98+
otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInstance);
99+
100+
/**
101+
* This function sets the preference to use when advertising Route Info Options (e.g., for discovered OMR prefixes) in
102+
* Router Advertisement messages sent over the infrastructure link.
103+
*
104+
* By default BR will use 'medium' preference level but this function allows the default value to be changed. As an
105+
* example, it can be set to 'low' preference in the case where device is a temporary BR (a mobile BR or a
106+
* battery-powered BR) to indicate that other BRs (if any) should be preferred over this BR on the infrastructure link.
107+
*
108+
* @param[in] aInstance A pointer to an OpenThread instance.
109+
* @param[in] aPreference The route preference to use.
110+
*
111+
*/
112+
void otBorderRoutingSetRouteInfoOptionPreference(otInstance *aInstance, otRoutePreference aPreference);
113+
114+
/**
115+
* Gets the Off-Mesh-Routable (OMR) Prefix, for example `fdfc:1ff5:1512:5622::/64`.
116+
*
117+
* An OMR Prefix is a randomly generated 64-bit prefix that's published in the
118+
* Thread network if there isn't already an OMR prefix. This prefix can be reached
119+
* from the local Wi-Fi or Ethernet network.
94120
*
95121
* @param[in] aInstance A pointer to an OpenThread instance.
96122
* @param[out] aPrefix A pointer to where the prefix will be output to.
@@ -102,11 +128,10 @@ otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled);
102128
otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
103129

104130
/**
105-
* This method returns the on-link prefix for the adjacent infrastructure link.
131+
* Gets the On-Link Prefix for the adjacent infrastructure link, for example `fd41:2650:a6f5:0::/64`.
106132
*
107-
* The randomly generated 64-bit prefix will be advertised
108-
* on the infrastructure link if there isn't already a usable
109-
* on-link prefix being advertised on the link.
133+
* An On-Link Prefix is a randomly generated 64-bit prefix that's advertised on the infrastructure
134+
* link if there isn't already a usable on-link prefix being advertised on the link.
110135
*
111136
* @param[in] aInstance A pointer to an OpenThread instance.
112137
* @param[out] aPrefix A pointer to where the prefix will be output to.
@@ -118,12 +143,11 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
118143
otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
119144

120145
/**
121-
* This function returns the local NAT64 prefix.
146+
* Gets the local NAT64 Prefix of the Border Router.
122147
*
123-
* This prefix might not be advertised in the Thread network.
148+
* NAT64 Prefix might not be advertised in the Thread network.
124149
*
125-
* This function is only available when `OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE`
126-
* is enabled.
150+
* `OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE` must be enabled.
127151
*
128152
* @param[in] aInstance A pointer to an OpenThread instance.
129153
* @param[out] aPrefix A pointer to where the prefix will be output to.

openthread/include/openthread/dataset.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,17 @@ typedef struct otOperationalDatasetComponents
213213
bool mIsChannelMaskPresent : 1; ///< TRUE if Channel Mask is present, FALSE otherwise.
214214
} otOperationalDatasetComponents;
215215

216+
/**
217+
* This structure represents a Thread Dataset timestamp component.
218+
*
219+
*/
220+
typedef struct otTimestamp
221+
{
222+
uint64_t mSeconds;
223+
uint16_t mTicks;
224+
bool mAuthoritative;
225+
} otTimestamp;
226+
216227
/**
217228
* This structure represents an Active or Pending Operational Dataset.
218229
*
@@ -221,8 +232,8 @@ typedef struct otOperationalDatasetComponents
221232
*/
222233
typedef struct otOperationalDataset
223234
{
224-
uint64_t mActiveTimestamp; ///< Active Timestamp
225-
uint64_t mPendingTimestamp; ///< Pending Timestamp
235+
otTimestamp mActiveTimestamp; ///< Active Timestamp
236+
otTimestamp mPendingTimestamp; ///< Pending Timestamp
226237
otNetworkKey mNetworkKey; ///< Network Key
227238
otNetworkName mNetworkName; ///< Network Name
228239
otExtendedPanId mExtendedPanId; ///< Extended PAN ID

openthread/include/openthread/dnssd_server.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,22 @@ typedef enum
147147
OT_DNSSD_QUERY_TYPE_RESOLVE_HOST = 3, ///< Service type resolve hostname.
148148
} otDnssdQueryType;
149149

150+
/**
151+
* This structure contains the counters of DNS-SD server.
152+
*
153+
*/
154+
typedef struct otDnssdCounters
155+
{
156+
uint32_t mSuccessResponse; ///< The number of successful responses
157+
uint32_t mServerFailureResponse; ///< The number of server failure responses
158+
uint32_t mFormatErrorResponse; ///< The number of format error responses
159+
uint32_t mNameErrorResponse; ///< The number of name error responses
160+
uint32_t mNotImplementedResponse; ///< The number of 'not implemented' responses
161+
uint32_t mOtherResponse; ///< The number of other responses
162+
163+
uint32_t mResolvedBySrp; ///< The number of queries completely resolved by the local SRP server
164+
} otDnssdCounters;
165+
150166
/**
151167
* This function sets DNS-SD server query callbacks.
152168
*
@@ -219,6 +235,16 @@ const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuer
219235
*/
220236
otDnssdQueryType otDnssdGetQueryTypeAndName(const otDnssdQuery *aQuery, char (*aNameOutput)[OT_DNS_MAX_NAME_SIZE]);
221237

238+
/**
239+
* This function returns the counters of the DNS-SD server.
240+
*
241+
* @param[in] aInstance The OpenThread instance structure.
242+
*
243+
* @returns A pointer to the counters of the DNS-SD server.
244+
*
245+
*/
246+
const otDnssdCounters *otDnssdGetCounters(otInstance *aInstance);
247+
222248
/**
223249
* @}
224250
*

openthread/include/openthread/instance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern "C" {
5353
* @note This number versions both OpenThread platform and user APIs.
5454
*
5555
*/
56-
#define OPENTHREAD_API_VERSION (207)
56+
#define OPENTHREAD_API_VERSION (223)
5757

5858
/**
5959
* @addtogroup api-instance

openthread/include/openthread/ip6.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,8 @@ typedef void (*otIp6RegisterMulticastListenersCallback)(void * aCon
781781
const otIp6Address *aFailedAddresses,
782782
uint8_t aFailedAddressNum);
783783

784+
#define OT_IP6_MAX_MLR_ADDRESSES 15 ///< Max number of IPv6 addresses supported by Multicast Listener Registration.
785+
784786
/**
785787
* This function registers Multicast Listeners to Primary Backbone Router.
786788
*

openthread/include/openthread/joiner.h

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef struct otJoinerDiscerner
9494
typedef void (*otJoinerCallback)(otError aError, void *aContext);
9595

9696
/**
97-
* This function enables the Thread Joiner role.
97+
* Enables the Thread Joiner role.
9898
*
9999
* @param[in] aInstance A pointer to an OpenThread instance.
100100
* @param[in] aPskd A pointer to the PSKd.
@@ -123,15 +123,15 @@ otError otJoinerStart(otInstance * aInstance,
123123
void * aContext);
124124

125125
/**
126-
* This function disables the Thread Joiner role.
126+
* Disables the Thread Joiner role.
127127
*
128128
* @param[in] aInstance A pointer to an OpenThread instance.
129129
*
130130
*/
131131
void otJoinerStop(otInstance *aInstance);
132132

133133
/**
134-
* This function returns the Joiner State.
134+
* Gets the Joiner State.
135135
*
136136
* @param[in] aInstance A pointer to an OpenThread instance.
137137
*
@@ -146,12 +146,12 @@ void otJoinerStop(otInstance *aInstance);
146146
otJoinerState otJoinerGetState(otInstance *aInstance);
147147

148148
/**
149-
* This function gets the Joiner ID.
149+
* Gets the Joiner ID.
150150
*
151151
* If a Joiner Discerner is not set, Joiner ID is the first 64 bits of the result of computing SHA-256 over
152152
* factory-assigned IEEE EUI-64. Otherwise the Joiner ID is calculated from the Joiner Discerner value.
153153
*
154-
* The Joiner ID is also used as the device's IEEE 802.15.4 Extended Address during commissioning process.
154+
* The Joiner ID is also used as the device's IEEE 802.15.4 Extended Address during the commissioning process.
155155
*
156156
* @param[in] aInstance A pointer to the OpenThread instance.
157157
*
@@ -161,13 +161,11 @@ otJoinerState otJoinerGetState(otInstance *aInstance);
161161
const otExtAddress *otJoinerGetId(otInstance *aInstance);
162162

163163
/**
164-
* This function sets the Joiner Discerner.
164+
* Sets the Joiner Discerner.
165165
*
166-
* The Joiner Discerner is used to calculate the Joiner ID used during commissioning/joining process.
167-
*
168-
* By default (when a discerner is not provided or set to NULL), Joiner ID is derived as first 64 bits of the result
169-
* of computing SHA-256 over factory-assigned IEEE EUI-64. Note that this is the main behavior expected by Thread
170-
* specification.
166+
* The Joiner Discerner is used to calculate the Joiner ID during the Thread Commissioning process. For more
167+
* information, refer to #otJoinerGetId.
168+
* @note The Joiner Discerner takes the place of the Joiner EUI-64 during the joiner session of Thread Commissioning.
171169
*
172170
* @param[in] aInstance A pointer to the OpenThread instance.
173171
* @param[in] aDiscerner A pointer to a Joiner Discerner. If NULL clears any previously set discerner.
@@ -180,7 +178,7 @@ const otExtAddress *otJoinerGetId(otInstance *aInstance);
180178
otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerner);
181179

182180
/**
183-
* This function gets the Joiner Discerner.
181+
* Gets the Joiner Discerner. For more information, refer to #otJoinerSetDiscerner.
184182
*
185183
* @param[in] aInstance A pointer to the OpenThread instance.
186184
*

openthread/include/openthread/link.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ typedef struct otActiveScanResult
391391
unsigned int mVersion : 4; ///< Version
392392
bool mIsNative : 1; ///< Native Commissioner flag
393393
bool mDiscover : 1; ///< Result from MLE Discovery
394+
395+
// Applicable/Required only when beacon payload parsing feature
396+
// (`OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE`) is enabled.
397+
bool mIsJoinable : 1; ///< Joining Permitted flag
394398
} otActiveScanResult;
395399

396400
/**
@@ -486,7 +490,6 @@ bool otLinkIsEnergyScanInProgress(otInstance *aInstance);
486490
* @param[in] aInstance A pointer to an OpenThread instance.
487491
*
488492
* @retval OT_ERROR_NONE Successfully enqueued an IEEE 802.15.4 Data Request message.
489-
* @retval OT_ERROR_ALREADY An IEEE 802.15.4 Data Request message is already enqueued.
490493
* @retval OT_ERROR_INVALID_STATE Device is not in rx-off-when-idle mode.
491494
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available.
492495
*

openthread/include/openthread/link_raw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergySca
236236
* @param[in] aCallback A pointer to a function called on completion of a scanned channel.
237237
*
238238
* @retval OT_ERROR_NONE Successfully started scanning the channel.
239+
* @retval OT_ERROR_BUSY The radio is performing enery scanning.
239240
* @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn't support energy scanning.
240241
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
241242
*

openthread/include/openthread/netdata_publisher.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ void otNetDataSetDnsSrpServicePublisherCallback(otInstance *
175175
void * aContext);
176176

177177
/**
178-
* This function unpublishes any previously added "DNS/SRP (Anycast or Unicast) Service" entry from the Thread Network
178+
* Unpublishes any previously added DNS/SRP (Anycast or Unicast) Service entry from the Thread Network
179179
* Data.
180180
*
181-
* This function requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled.
181+
* `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.
182182
*
183183
* @param[in] aInstance A pointer to an OpenThread instance.
184184
*
@@ -192,12 +192,18 @@ void otNetDataUnpublishDnsSrpService(otInstance *aInstance);
192192
*
193193
* Only stable entries can be published (i.e.,`aConfig.mStable` MUST be TRUE).
194194
*
195+
* A subsequent call to this method will replace a previous request for the same prefix. In particular, if the new call
196+
* only changes the flags (e.g., preference level) and the prefix is already added in the Network Data, the change to
197+
* flags is immediately reflected in the Network Data. This ensures that existing entries in the Network Data are not
198+
* abruptly removed. Note that a change in the preference level can potentially later cause the entry to be removed
199+
* from the Network Data after determining there are other nodes that are publishing the same prefix with the same or
200+
* higher preference.
201+
*
195202
* @param[in] aInstance A pointer to an OpenThread instance.
196203
* @param[in] aConfig The on-mesh prefix config to publish (MUST NOT be NULL).
197204
*
198205
* @retval OT_ERROR_NONE The on-mesh prefix is published successfully.
199206
* @retval OT_ERROR_INVALID_ARGS The @p aConfig is not valid (bad prefix, invalid flag combinations, or not stable).
200-
* @retval OT_ERROR_ALREADY An entry with the same prefix is already in the published list.
201207
* @retval OT_ERROR_NO_BUFS Could not allocate an entry for the new request. Publisher supports a limited number
202208
* of entries (shared between on-mesh prefix and external route) determined by config
203209
* `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_MAX_PREFIX_ENTRIES`.
@@ -213,12 +219,18 @@ otError otNetDataPublishOnMeshPrefix(otInstance *aInstance, const otBorderRouter
213219
*
214220
* Only stable entries can be published (i.e.,`aConfig.mStable` MUST be TRUE).
215221
*
222+
* A subsequent call to this method will replace a previous request for the same prefix. In particular, if the new call
223+
* only changes the flags (e.g., preference level) and the prefix is already added in the Network Data, the change to
224+
* flags is immediately reflected in the Network Data. This ensures that existing entries in the Network Data are not
225+
* abruptly removed. Note that a change in the preference level can potentially later cause the entry to be removed
226+
* from the Network Data after determining there are other nodes that are publishing the same prefix with the same or
227+
* higher preference.
228+
*
216229
* @param[in] aInstance A pointer to an OpenThread instance.
217230
* @param[in] aConfig The external route config to publish (MUST NOT be NULL).
218231
*
219232
* @retval OT_ERROR_NONE The external route is published successfully.
220233
* @retval OT_ERROR_INVALID_ARGS The @p aConfig is not valid (bad prefix, invalid flag combinations, or not stable).
221-
* @retval OT_ERROR_ALREADY An entry with the same prefix is already in the published list.
222234
* @retval OT_ERROR_NO_BUFS Could not allocate an entry for the new request. Publisher supports a limited number
223235
* of entries (shared between on-mesh prefix and external route) determined by config
224236
* `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_MAX_PREFIX_ENTRIES`.
@@ -258,9 +270,9 @@ void otNetDataSetPrefixPublisherCallback(otInstance * aInsta
258270
void * aContext);
259271

260272
/**
261-
* This function unpublishes a previously published prefix (on-mesh or external route).
273+
* Unpublishes a previously published On-Mesh or External Route Prefix.
262274
*
263-
* This function requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled.
275+
* `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` must be enabled.
264276
*
265277
* @param[in] aInstance A pointer to an OpenThread instance.
266278
* @param[in] aPrefix The prefix to unpublish (MUST NOT be NULL).

0 commit comments

Comments
 (0)