[border-agent] update docs for set and clear ephemeral key APIs (#10854)

The docs are updated to mention that users can use the
`otBorderAgentDisconnect()` API to forcely disconnect from commissioner
sessions.
This commit is contained in:
Yang Sun
2024-10-23 13:11:45 +01:00
committed by GitHub
parent c519aa4534
commit 5d0853c8c9
3 changed files with 8 additions and 4 deletions
+3 -1
View File
@@ -187,6 +187,7 @@ otError otBorderAgentSetId(otInstance *aInstance, const otBorderAgentId *aId);
*
* The ephemeral key can be set when the Border Agent is already running and is not currently connected to any external
* commissioner (i.e., it is in `OT_BORDER_AGENT_STATE_STARTED` state). Otherwise `OT_ERROR_INVALID_STATE` is returned.
* To terminate active commissioner sessions, use the `otBorderAgentDisconnect()` API.
*
* The given @p aKeyString is directly used as the ephemeral PSK (excluding the trailing null `\0` character ).
* The @p aKeyString length must be between `OT_BORDER_AGENT_MIN_EPHEMERAL_KEY_LENGTH` and
@@ -230,7 +231,8 @@ otError otBorderAgentSetEphemeralKey(otInstance *aInstance,
*
* If a commissioner is connected using the ephemeral key and is currently active, calling this function does not
* change its state. In this case the `otBorderAgentIsEphemeralKeyActive()` will continue to return `TRUE` until the
* commissioner disconnects, or the ephemeral key timeout expires.
* commissioner disconnects, or the ephemeral key timeout expires. To terminate active commissioner sessions, use the
* `otBorderAgentDisconnect()` API.
*
* @param[in] aInstance The OpenThread instance.
*/
+1 -1
View File
@@ -52,7 +52,7 @@ extern "C" {
*
* @note This number versions both OpenThread platform and user APIs.
*/
#define OPENTHREAD_API_VERSION (456)
#define OPENTHREAD_API_VERSION (457)
/**
* @addtogroup api-instance
+4 -2
View File
@@ -173,7 +173,8 @@ public:
* Sets the ephemeral key for a given timeout duration.
*
* The ephemeral key can be set when the Border Agent is already running and is not currently connected to any
* external commissioner (i.e., it is in `kStateStarted` state).
* external commissioner (i.e., it is in `kStateStarted` state). To terminate active commissioner sessions,
* use the `Disconnect()` function.
*
* The given @p aKeyString is directly used as the ephemeral PSK (excluding the trailing null `\0` character). Its
* length must be between `kMinEphemeralKeyLength` and `kMaxEphemeralKeyLength`, inclusive.
@@ -209,7 +210,8 @@ public:
*
* If a commissioner is connected using the ephemeral key and is currently active, calling this method does not
* change its state. In this case the `IsEphemeralKeyActive()` will continue to return `true` until the commissioner
* disconnects, or the ephemeral key timeout expires.
* disconnects, or the ephemeral key timeout expires. To terminate active commissioner sessions, use the
* `Disconnect()` function.
*/
void ClearEphemeralKey(void);