mirror of
https://github.com/espressif/openthread.git
synced 2026-10-01 21:37:39 +00:00
[clang-format] apply v14 changes (#8490)
This commit is contained in:
@@ -137,7 +137,7 @@ static void ReceiveTask(const uint8_t *aBuf, uint16_t aBufLength)
|
|||||||
static const char sEraseString[] = {'\b', ' ', '\b'};
|
static const char sEraseString[] = {'\b', ' ', '\b'};
|
||||||
static const char CRNL[] = {'\r', '\n'};
|
static const char CRNL[] = {'\r', '\n'};
|
||||||
static uint8_t sLastChar = '\0';
|
static uint8_t sLastChar = '\0';
|
||||||
const uint8_t * end;
|
const uint8_t *end;
|
||||||
|
|
||||||
end = aBuf + aBufLength;
|
end = aBuf + aBufLength;
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@
|
|||||||
|
|
||||||
// crypto key storage stubs
|
// crypto key storage stubs
|
||||||
|
|
||||||
otError otPlatCryptoImportKey(otCryptoKeyRef * aKeyRef,
|
otError otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef,
|
||||||
otCryptoKeyType aKeyType,
|
otCryptoKeyType aKeyType,
|
||||||
otCryptoKeyAlgorithm aKeyAlgorithm,
|
otCryptoKeyAlgorithm aKeyAlgorithm,
|
||||||
int aKeyUsage,
|
int aKeyUsage,
|
||||||
otCryptoKeyStorage aKeyPersistence,
|
otCryptoKeyStorage aKeyPersistence,
|
||||||
const uint8_t * aKey,
|
const uint8_t *aKey,
|
||||||
size_t aKeyLen)
|
size_t aKeyLen)
|
||||||
{
|
{
|
||||||
OT_UNUSED_VARIABLE(aKeyRef);
|
OT_UNUSED_VARIABLE(aKeyRef);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength)
|
|||||||
|
|
||||||
#if __SANITIZE_ADDRESS__ == 0
|
#if __SANITIZE_ADDRESS__ == 0
|
||||||
|
|
||||||
FILE * file = NULL;
|
FILE *file = NULL;
|
||||||
size_t readLength;
|
size_t readLength;
|
||||||
|
|
||||||
otEXPECT_ACTION(aOutput && aOutputLength, error = OT_ERROR_INVALID_ARGS);
|
otEXPECT_ACTION(aOutput && aOutputLength, error = OT_ERROR_INVALID_ARGS);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddres
|
|||||||
|
|
||||||
otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
|
otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
|
||||||
const otIp6Address *aDestAddress,
|
const otIp6Address *aDestAddress,
|
||||||
const uint8_t * aBuffer,
|
const uint8_t *aBuffer,
|
||||||
uint16_t aBufferLength)
|
uint16_t aBufferLength)
|
||||||
{
|
{
|
||||||
OT_UNUSED_VARIABLE(aInfraIfIndex);
|
OT_UNUSED_VARIABLE(aInfraIfIndex);
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ otError ProcessNodeIdFilter(void *aContext, uint8_t aArgsLength, char *aArgs[])
|
|||||||
else if (!strcmp(aArgs[0], "deny"))
|
else if (!strcmp(aArgs[0], "deny"))
|
||||||
{
|
{
|
||||||
uint16_t nodeId;
|
uint16_t nodeId;
|
||||||
char * endptr;
|
char *endptr;
|
||||||
|
|
||||||
otEXPECT_ACTION(aArgsLength == 2, error = OT_ERROR_INVALID_ARGS);
|
otEXPECT_ACTION(aArgsLength == 2, error = OT_ERROR_INVALID_ARGS);
|
||||||
|
|
||||||
@@ -1276,7 +1276,7 @@ static uint8_t generateAckIeData(uint8_t *aLinkMetricsIeData, uint8_t aLinkMetri
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
||||||
otError otPlatRadioEnableCsl(otInstance * aInstance,
|
otError otPlatRadioEnableCsl(otInstance *aInstance,
|
||||||
uint32_t aCslPeriod,
|
uint32_t aCslPeriod,
|
||||||
otShortAddress aShortAddr,
|
otShortAddress aShortAddr,
|
||||||
const otExtAddress *aExtAddr)
|
const otExtAddress *aExtAddr)
|
||||||
@@ -1307,7 +1307,7 @@ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
|
|||||||
}
|
}
|
||||||
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
||||||
|
|
||||||
void otPlatRadioSetMacKey(otInstance * aInstance,
|
void otPlatRadioSetMacKey(otInstance *aInstance,
|
||||||
uint8_t aKeyIdMode,
|
uint8_t aKeyIdMode,
|
||||||
uint8_t aKeyId,
|
uint8_t aKeyId,
|
||||||
const otMacKeyMaterial *aPrevKey,
|
const otMacKeyMaterial *aPrevKey,
|
||||||
@@ -1351,10 +1351,10 @@ exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
|
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
|
||||||
otError otPlatRadioConfigureEnhAckProbing(otInstance * aInstance,
|
otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance,
|
||||||
otLinkMetrics aLinkMetrics,
|
otLinkMetrics aLinkMetrics,
|
||||||
const otShortAddress aShortAddress,
|
const otShortAddress aShortAddress,
|
||||||
const otExtAddress * aExtAddress)
|
const otExtAddress *aExtAddress)
|
||||||
{
|
{
|
||||||
OT_UNUSED_VARIABLE(aInstance);
|
OT_UNUSED_VARIABLE(aInstance);
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
|
otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
|
||||||
otPlatSpiSlaveTransactionProcessCallback aProcessCallback,
|
otPlatSpiSlaveTransactionProcessCallback aProcessCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
OT_UNUSED_VARIABLE(aCompleteCallback);
|
OT_UNUSED_VARIABLE(aCompleteCallback);
|
||||||
OT_UNUSED_VARIABLE(aProcessCallback);
|
OT_UNUSED_VARIABLE(aProcessCallback);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static void PrintUsage(const char *aProgramName, int aExitCode)
|
|||||||
|
|
||||||
void otSysInit(int aArgCount, char *aArgVector[])
|
void otSysInit(int aArgCount, char *aArgVector[])
|
||||||
{
|
{
|
||||||
char * endptr;
|
char *endptr;
|
||||||
uint32_t speedUpFactor = 1;
|
uint32_t speedUpFactor = 1;
|
||||||
|
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
|
|||||||
@@ -366,8 +366,8 @@ void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void otPlatTrelSend(otInstance * aInstance,
|
void otPlatTrelSend(otInstance *aInstance,
|
||||||
const uint8_t * aUdpPayload,
|
const uint8_t *aUdpPayload,
|
||||||
uint16_t aUdpPayloadLen,
|
uint16_t aUdpPayloadLen,
|
||||||
const otSockAddr *aDestSockAddr)
|
const otSockAddr *aDestSockAddr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -241,8 +241,8 @@ void platformUartProcess(void)
|
|||||||
ssize_t rval;
|
ssize_t rval;
|
||||||
const int error_flags = POLLERR | POLLNVAL | POLLHUP;
|
const int error_flags = POLLERR | POLLNVAL | POLLHUP;
|
||||||
struct pollfd pollfd[] = {
|
struct pollfd pollfd[] = {
|
||||||
{s_in_fd, POLLIN | error_flags, 0},
|
{s_in_fd, POLLIN | error_flags, 0},
|
||||||
{s_out_fd, POLLOUT | error_flags, 0},
|
{s_out_fd, POLLOUT | error_flags, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|||||||
@@ -164,9 +164,9 @@ void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending,
|
|||||||
#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
|
#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
|
||||||
otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
|
otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
|
||||||
bool aIsFramePending,
|
bool aIsFramePending,
|
||||||
const uint8_t * aIeData,
|
const uint8_t *aIeData,
|
||||||
uint8_t aIeLength,
|
uint8_t aIeLength,
|
||||||
otRadioFrame * aAckFrame)
|
otRadioFrame *aAckFrame)
|
||||||
{
|
{
|
||||||
assert(aFrame != nullptr && aAckFrame != nullptr);
|
assert(aFrame != nullptr && aAckFrame != nullptr);
|
||||||
|
|
||||||
|
|||||||
@@ -221,9 +221,9 @@ void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending,
|
|||||||
*/
|
*/
|
||||||
otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
|
otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
|
||||||
bool aIsFramePending,
|
bool aIsFramePending,
|
||||||
const uint8_t * aIeData,
|
const uint8_t *aIeData,
|
||||||
uint8_t aIeLength,
|
uint8_t aIeLength,
|
||||||
otRadioFrame * aAckFrame);
|
otRadioFrame *aAckFrame);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set CSL IE content into the frame.
|
* Set CSL IE content into the frame.
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterCon
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance * aInstance,
|
void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance *aInstance,
|
||||||
const otIp6InterfaceIdentifier *aMlIid,
|
const otIp6InterfaceIdentifier *aMlIid,
|
||||||
uint8_t aStatus);
|
uint8_t aStatus);
|
||||||
|
|
||||||
@@ -242,9 +242,9 @@ typedef enum
|
|||||||
* @param[in] aAddress The IPv6 multicast address of the Multicast Listener.
|
* @param[in] aAddress The IPv6 multicast address of the Multicast Listener.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otBackboneRouterMulticastListenerCallback)(void * aContext,
|
typedef void (*otBackboneRouterMulticastListenerCallback)(void *aContext,
|
||||||
otBackboneRouterMulticastListenerEvent aEvent,
|
otBackboneRouterMulticastListenerEvent aEvent,
|
||||||
const otIp6Address * aAddress);
|
const otIp6Address *aAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets the Backbone Router Multicast Listener callback.
|
* This method sets the Backbone Router Multicast Listener callback.
|
||||||
@@ -254,9 +254,9 @@ typedef void (*otBackboneRouterMulticastListenerCallback)(void *
|
|||||||
* @param[in] aContext A user context pointer.
|
* @param[in] aContext A user context pointer.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otBackboneRouterSetMulticastListenerCallback(otInstance * aInstance,
|
void otBackboneRouterSetMulticastListenerCallback(otInstance *aInstance,
|
||||||
otBackboneRouterMulticastListenerCallback aCallback,
|
otBackboneRouterMulticastListenerCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the Multicast Listeners.
|
* Clears the Multicast Listeners.
|
||||||
@@ -329,9 +329,9 @@ typedef struct otBackboneRouterMulticastListenerInfo
|
|||||||
* @sa otBackboneRouterMulticastListenerAdd
|
* @sa otBackboneRouterMulticastListenerAdd
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otBackboneRouterMulticastListenerGetNext(otInstance * aInstance,
|
otError otBackboneRouterMulticastListenerGetNext(otInstance *aInstance,
|
||||||
otBackboneRouterMulticastListenerIterator *aIterator,
|
otBackboneRouterMulticastListenerIterator *aIterator,
|
||||||
otBackboneRouterMulticastListenerInfo * aListenerInfo);
|
otBackboneRouterMulticastListenerInfo *aListenerInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the ND Proxy events.
|
* Represents the ND Proxy events.
|
||||||
@@ -354,9 +354,9 @@ typedef enum
|
|||||||
* `OT_BACKBONE_ROUTER_NDPROXY_CLEARED`.
|
* `OT_BACKBONE_ROUTER_NDPROXY_CLEARED`.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otBackboneRouterNdProxyCallback)(void * aContext,
|
typedef void (*otBackboneRouterNdProxyCallback)(void *aContext,
|
||||||
otBackboneRouterNdProxyEvent aEvent,
|
otBackboneRouterNdProxyEvent aEvent,
|
||||||
const otIp6Address * aDua);
|
const otIp6Address *aDua);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets the Backbone Router ND Proxy callback.
|
* This method sets the Backbone Router ND Proxy callback.
|
||||||
@@ -366,9 +366,9 @@ typedef void (*otBackboneRouterNdProxyCallback)(void * aCo
|
|||||||
* @param[in] aContext A user context pointer.
|
* @param[in] aContext A user context pointer.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otBackboneRouterSetNdProxyCallback(otInstance * aInstance,
|
void otBackboneRouterSetNdProxyCallback(otInstance *aInstance,
|
||||||
otBackboneRouterNdProxyCallback aCallback,
|
otBackboneRouterNdProxyCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the Backbone Router ND Proxy info.
|
* Represents the Backbone Router ND Proxy info.
|
||||||
@@ -392,8 +392,8 @@ typedef struct otBackboneRouterNdProxyInfo
|
|||||||
* @retval OT_ERROR_NOT_FOUND Failed to find the Domain Unicast Address in the ND Proxy table.
|
* @retval OT_ERROR_NOT_FOUND Failed to find the Domain Unicast Address in the ND Proxy table.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otBackboneRouterGetNdProxyInfo(otInstance * aInstance,
|
otError otBackboneRouterGetNdProxyInfo(otInstance *aInstance,
|
||||||
const otIp6Address * aDua,
|
const otIp6Address *aDua,
|
||||||
otBackboneRouterNdProxyInfo *aNdProxyInfo);
|
otBackboneRouterNdProxyInfo *aNdProxyInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -415,9 +415,9 @@ typedef enum
|
|||||||
* @param[in] aDomainPrefix The new Domain Prefix if added or changed, nullptr otherwise.
|
* @param[in] aDomainPrefix The new Domain Prefix if added or changed, nullptr otherwise.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otBackboneRouterDomainPrefixCallback)(void * aContext,
|
typedef void (*otBackboneRouterDomainPrefixCallback)(void *aContext,
|
||||||
otBackboneRouterDomainPrefixEvent aEvent,
|
otBackboneRouterDomainPrefixEvent aEvent,
|
||||||
const otIp6Prefix * aDomainPrefix);
|
const otIp6Prefix *aDomainPrefix);
|
||||||
/**
|
/**
|
||||||
* This method sets the Backbone Router Domain Prefix callback.
|
* This method sets the Backbone Router Domain Prefix callback.
|
||||||
*
|
*
|
||||||
@@ -426,9 +426,9 @@ typedef void (*otBackboneRouterDomainPrefixCallback)(void *
|
|||||||
* @param[in] aContext A user context pointer.
|
* @param[in] aContext A user context pointer.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otBackboneRouterSetDomainPrefixCallback(otInstance * aInstance,
|
void otBackboneRouterSetDomainPrefixCallback(otInstance *aInstance,
|
||||||
otBackboneRouterDomainPrefixCallback aCallback,
|
otBackboneRouterDomainPrefixCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefi
|
|||||||
* @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data.
|
* @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otBorderRouterGetNextOnMeshPrefix(otInstance * aInstance,
|
otError otBorderRouterGetNextOnMeshPrefix(otInstance *aInstance,
|
||||||
otNetworkDataIterator *aIterator,
|
otNetworkDataIterator *aIterator,
|
||||||
otBorderRouterConfig * aConfig);
|
otBorderRouterConfig *aConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an external route configuration to the local network data.
|
* Add an external route configuration to the local network data.
|
||||||
@@ -150,7 +150,7 @@ otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPre
|
|||||||
* @retval OT_ERROR_NOT_FOUND No subsequent external route entry exists in the Thread Network Data.
|
* @retval OT_ERROR_NOT_FOUND No subsequent external route entry exists in the Thread Network Data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otBorderRouterGetNextRoute(otInstance * aInstance,
|
otError otBorderRouterGetNextRoute(otInstance *aInstance,
|
||||||
otNetworkDataIterator *aIterator,
|
otNetworkDataIterator *aIterator,
|
||||||
otExternalRouteConfig *aConfig);
|
otExternalRouteConfig *aConfig);
|
||||||
|
|
||||||
|
|||||||
@@ -240,8 +240,8 @@ otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefi
|
|||||||
* @retval OT_ERROR_NONE Successfully retrieved the favored NAT64 prefix.
|
* @retval OT_ERROR_NONE Successfully retrieved the favored NAT64 prefix.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otBorderRoutingGetFavoredNat64Prefix(otInstance * aInstance,
|
otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance,
|
||||||
otIp6Prefix * aPrefix,
|
otIp6Prefix *aPrefix,
|
||||||
otRoutePreference *aPreference);
|
otRoutePreference *aPreference);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -271,9 +271,9 @@ void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRouti
|
|||||||
* @retval OT_ERROR_NOT_FOUND No more entries in the table.
|
* @retval OT_ERROR_NOT_FOUND No more entries in the table.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otBorderRoutingGetNextPrefixTableEntry(otInstance * aInstance,
|
otError otBorderRoutingGetNextPrefixTableEntry(otInstance *aInstance,
|
||||||
otBorderRoutingPrefixTableIterator *aIterator,
|
otBorderRoutingPrefixTableIterator *aIterator,
|
||||||
otBorderRoutingPrefixTableEntry * aEntry);
|
otBorderRoutingPrefixTableEntry *aEntry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ extern "C" {
|
|||||||
typedef struct otCliCommand
|
typedef struct otCliCommand
|
||||||
{
|
{
|
||||||
const char *mName; ///< A pointer to the command string.
|
const char *mName; ///< A pointer to the command string.
|
||||||
otError (*mCommand)(void * aContext,
|
otError (*mCommand)(void *aContext,
|
||||||
uint8_t aArgsLength,
|
uint8_t aArgsLength,
|
||||||
char * aArgs[]); ///< A function pointer to process the command.
|
char *aArgs[]); ///< A function pointer to process the command.
|
||||||
} otCliCommand;
|
} otCliCommand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+39
-39
@@ -341,8 +341,8 @@ typedef enum otCoapBlockSzx
|
|||||||
* @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period.
|
* @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otCoapResponseHandler)(void * aContext,
|
typedef void (*otCoapResponseHandler)(void *aContext,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otError aResult);
|
otError aResult);
|
||||||
|
|
||||||
@@ -375,7 +375,7 @@ typedef void (*otCoapRequestHandler)(void *aContext, otMessage *aMessage, const
|
|||||||
* @retval OT_ERROR_NO_FRAME_RECEIVED Block segment missing.
|
* @retval OT_ERROR_NO_FRAME_RECEIVED Block segment missing.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef otError (*otCoapBlockwiseReceiveHook)(void * aContext,
|
typedef otError (*otCoapBlockwiseReceiveHook)(void *aContext,
|
||||||
const uint8_t *aBlock,
|
const uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
@@ -402,11 +402,11 @@ typedef otError (*otCoapBlockwiseReceiveHook)(void * aContext,
|
|||||||
* @retval OT_ERROR_INVALID_ARGS Block at @p aPosition does not exist.
|
* @retval OT_ERROR_INVALID_ARGS Block at @p aPosition does not exist.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef otError (*otCoapBlockwiseTransmitHook)(void * aContext,
|
typedef otError (*otCoapBlockwiseTransmitHook)(void *aContext,
|
||||||
uint8_t * aBlock,
|
uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t *aBlockLength,
|
uint16_t *aBlockLength,
|
||||||
bool * aMore);
|
bool *aMore);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This structure represents a CoAP resource.
|
* This structure represents a CoAP resource.
|
||||||
@@ -414,9 +414,9 @@ typedef otError (*otCoapBlockwiseTransmitHook)(void * aContext,
|
|||||||
*/
|
*/
|
||||||
typedef struct otCoapResource
|
typedef struct otCoapResource
|
||||||
{
|
{
|
||||||
const char * mUriPath; ///< The URI Path string
|
const char *mUriPath; ///< The URI Path string
|
||||||
otCoapRequestHandler mHandler; ///< The callback for handling a received request
|
otCoapRequestHandler mHandler; ///< The callback for handling a received request
|
||||||
void * mContext; ///< Application-specific context
|
void *mContext; ///< Application-specific context
|
||||||
struct otCoapResource *mNext; ///< The next CoAP resource in the list
|
struct otCoapResource *mNext; ///< The next CoAP resource in the list
|
||||||
} otCoapResource;
|
} otCoapResource;
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ typedef struct otCoapResource
|
|||||||
*/
|
*/
|
||||||
typedef struct otCoapBlockwiseResource
|
typedef struct otCoapBlockwiseResource
|
||||||
{
|
{
|
||||||
const char * mUriPath; ///< The URI Path string
|
const char *mUriPath; ///< The URI Path string
|
||||||
otCoapRequestHandler mHandler; ///< The callback for handling a received request
|
otCoapRequestHandler mHandler; ///< The callback for handling a received request
|
||||||
|
|
||||||
/** The callback for handling incoming block-wise transfer.
|
/** The callback for handling incoming block-wise transfer.
|
||||||
@@ -440,7 +440,7 @@ typedef struct otCoapBlockwiseResource
|
|||||||
* configuration is enabled.
|
* configuration is enabled.
|
||||||
*/
|
*/
|
||||||
otCoapBlockwiseTransmitHook mTransmitHook;
|
otCoapBlockwiseTransmitHook mTransmitHook;
|
||||||
void * mContext; ///< Application-specific context
|
void *mContext; ///< Application-specific context
|
||||||
struct otCoapBlockwiseResource *mNext; ///< The next CoAP resource in the list
|
struct otCoapBlockwiseResource *mNext; ///< The next CoAP resource in the list
|
||||||
} otCoapBlockwiseResource;
|
} otCoapBlockwiseResource;
|
||||||
|
|
||||||
@@ -883,11 +883,11 @@ otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSet
|
|||||||
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSendRequestWithParameters(otInstance * aInstance,
|
otError otCoapSendRequestWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otCoapTxParameters *aTxParameters);
|
const otCoapTxParameters *aTxParameters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -913,12 +913,12 @@ otError otCoapSendRequestWithParameters(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSendRequestBlockWiseWithParameters(otInstance * aInstance,
|
otError otCoapSendRequestBlockWiseWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otCoapTxParameters * aTxParameters,
|
const otCoapTxParameters *aTxParameters,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook,
|
otCoapBlockwiseTransmitHook aTransmitHook,
|
||||||
otCoapBlockwiseReceiveHook aReceiveHook);
|
otCoapBlockwiseReceiveHook aReceiveHook);
|
||||||
|
|
||||||
@@ -944,11 +944,11 @@ otError otCoapSendRequestBlockWiseWithParameters(otInstance * aIn
|
|||||||
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static inline otError otCoapSendRequestBlockWise(otInstance * aInstance,
|
static inline otError otCoapSendRequestBlockWise(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook,
|
otCoapBlockwiseTransmitHook aTransmitHook,
|
||||||
otCoapBlockwiseReceiveHook aReceiveHook)
|
otCoapBlockwiseReceiveHook aReceiveHook)
|
||||||
{
|
{
|
||||||
@@ -973,11 +973,11 @@ static inline otError otCoapSendRequestBlockWise(otInstance * aIn
|
|||||||
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static inline otError otCoapSendRequest(otInstance * aInstance,
|
static inline otError otCoapSendRequest(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
// NOLINTNEXTLINE(modernize-use-nullptr)
|
// NOLINTNEXTLINE(modernize-use-nullptr)
|
||||||
return otCoapSendRequestWithParameters(aInstance, aMessage, aMessageInfo, aHandler, aContext, NULL);
|
return otCoapSendRequestWithParameters(aInstance, aMessage, aMessageInfo, aHandler, aContext, NULL);
|
||||||
@@ -1063,9 +1063,9 @@ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandle
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSendResponseWithParameters(otInstance * aInstance,
|
otError otCoapSendResponseWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
const otCoapTxParameters *aTxParameters);
|
const otCoapTxParameters *aTxParameters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1085,11 +1085,11 @@ otError otCoapSendResponseWithParameters(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSendResponseBlockWiseWithParameters(otInstance * aInstance,
|
otError otCoapSendResponseBlockWiseWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
const otCoapTxParameters * aTxParameters,
|
const otCoapTxParameters *aTxParameters,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook);
|
otCoapBlockwiseTransmitHook aTransmitHook);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1108,10 +1108,10 @@ otError otCoapSendResponseBlockWiseWithParameters(otInstance * aI
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static inline otError otCoapSendResponseBlockWise(otInstance * aInstance,
|
static inline otError otCoapSendResponseBlockWise(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook)
|
otCoapBlockwiseTransmitHook aTransmitHook)
|
||||||
{
|
{
|
||||||
// NOLINTNEXTLINE(modernize-use-nullptr)
|
// NOLINTNEXTLINE(modernize-use-nullptr)
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ void otCoapSecureStop(otInstance *aInstance);
|
|||||||
* @param[in] aPskIdLength The PSK Identity Length.
|
* @param[in] aPskIdLength The PSK Identity Length.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otCoapSecureSetPsk(otInstance * aInstance,
|
void otCoapSecureSetPsk(otInstance *aInstance,
|
||||||
const uint8_t *aPsk,
|
const uint8_t *aPsk,
|
||||||
uint16_t aPskLength,
|
uint16_t aPskLength,
|
||||||
const uint8_t *aPskIdentity,
|
const uint8_t *aPskIdentity,
|
||||||
@@ -130,9 +130,9 @@ void otCoapSecureSetPsk(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NO_BUFS Can't allocate memory for certificate.
|
* @retval OT_ERROR_NO_BUFS Can't allocate memory for certificate.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSecureGetPeerCertificateBase64(otInstance * aInstance,
|
otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance,
|
||||||
unsigned char *aPeerCert,
|
unsigned char *aPeerCert,
|
||||||
size_t * aCertLength,
|
size_t *aCertLength,
|
||||||
size_t aCertBufferSize);
|
size_t aCertBufferSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -160,7 +160,7 @@ void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertifica
|
|||||||
* @param[in] aPrivateKeyLength The length of the private key.
|
* @param[in] aPrivateKeyLength The length of the private key.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otCoapSecureSetCertificate(otInstance * aInstance,
|
void otCoapSecureSetCertificate(otInstance *aInstance,
|
||||||
const uint8_t *aX509Cert,
|
const uint8_t *aX509Cert,
|
||||||
uint32_t aX509Length,
|
uint32_t aX509Length,
|
||||||
const uint8_t *aPrivateKey,
|
const uint8_t *aPrivateKey,
|
||||||
@@ -179,7 +179,7 @@ void otCoapSecureSetCertificate(otInstance * aInstance,
|
|||||||
* @param[in] aX509CaCertChainLength The length of chain.
|
* @param[in] aX509CaCertChainLength The length of chain.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otCoapSecureSetCaCertificateChain(otInstance * aInstance,
|
void otCoapSecureSetCaCertificateChain(otInstance *aInstance,
|
||||||
const uint8_t *aX509CaCertificateChain,
|
const uint8_t *aX509CaCertificateChain,
|
||||||
uint32_t aX509CaCertChainLength);
|
uint32_t aX509CaCertChainLength);
|
||||||
|
|
||||||
@@ -195,10 +195,10 @@ void otCoapSecureSetCaCertificateChain(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NONE Successfully started DTLS connection.
|
* @retval OT_ERROR_NONE Successfully started DTLS connection.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSecureConnect(otInstance * aInstance,
|
otError otCoapSecureConnect(otInstance *aInstance,
|
||||||
const otSockAddr * aSockAddr,
|
const otSockAddr *aSockAddr,
|
||||||
otHandleCoapSecureClientConnect aHandler,
|
otHandleCoapSecureClientConnect aHandler,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method stops the DTLS connection.
|
* This method stops the DTLS connection.
|
||||||
@@ -252,10 +252,10 @@ bool otCoapSecureIsConnectionActive(otInstance *aInstance);
|
|||||||
* @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.
|
* @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSecureSendRequestBlockWise(otInstance * aInstance,
|
otError otCoapSecureSendRequestBlockWise(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook,
|
otCoapBlockwiseTransmitHook aTransmitHook,
|
||||||
otCoapBlockwiseReceiveHook aReceiveHook);
|
otCoapBlockwiseReceiveHook aReceiveHook);
|
||||||
|
|
||||||
@@ -276,10 +276,10 @@ otError otCoapSecureSendRequestBlockWise(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.
|
* @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSecureSendRequest(otInstance * aInstance,
|
otError otCoapSecureSendRequest(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function adds a resource to the CoAP Secure server.
|
* This function adds a resource to the CoAP Secure server.
|
||||||
@@ -336,9 +336,9 @@ void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler a
|
|||||||
* @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
|
* @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otCoapSecureSetClientConnectedCallback(otInstance * aInstance,
|
void otCoapSecureSetClientConnectedCallback(otInstance *aInstance,
|
||||||
otHandleCoapSecureClientConnect aHandler,
|
otHandleCoapSecureClientConnect aHandler,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sends a CoAP response block-wise from the CoAP Secure server.
|
* This function sends a CoAP response block-wise from the CoAP Secure server.
|
||||||
@@ -356,10 +356,10 @@ void otCoapSecureSetClientConnectedCallback(otInstance * aIns
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCoapSecureSendResponseBlockWise(otInstance * aInstance,
|
otError otCoapSecureSendResponseBlockWise(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook);
|
otCoapBlockwiseTransmitHook aTransmitHook);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -170,9 +170,9 @@ typedef void (*otCommissionerStateCallback)(otCommissionerState aState, void *aC
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent,
|
typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent,
|
||||||
const otJoinerInfo * aJoinerInfo,
|
const otJoinerInfo *aJoinerInfo,
|
||||||
const otExtAddress * aJoinerId,
|
const otExtAddress *aJoinerId,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function enables the Thread Commissioner role.
|
* This function enables the Thread Commissioner role.
|
||||||
@@ -187,10 +187,10 @@ typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent,
|
|||||||
* @retval OT_ERROR_INVALID_STATE Device is not currently attached to a network.
|
* @retval OT_ERROR_INVALID_STATE Device is not currently attached to a network.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerStart(otInstance * aInstance,
|
otError otCommissionerStart(otInstance *aInstance,
|
||||||
otCommissionerStateCallback aStateCallback,
|
otCommissionerStateCallback aStateCallback,
|
||||||
otCommissionerJoinerCallback aJoinerCallback,
|
otCommissionerJoinerCallback aJoinerCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function disables the Thread Commissioner role.
|
* This function disables the Thread Commissioner role.
|
||||||
@@ -242,9 +242,9 @@ otError otCommissionerSetId(otInstance *aInstance, const char *aId);
|
|||||||
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerAddJoiner(otInstance * aInstance,
|
otError otCommissionerAddJoiner(otInstance *aInstance,
|
||||||
const otExtAddress *aEui64,
|
const otExtAddress *aEui64,
|
||||||
const char * aPskd,
|
const char *aPskd,
|
||||||
uint32_t aTimeout);
|
uint32_t aTimeout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -263,9 +263,9 @@ otError otCommissionerAddJoiner(otInstance * aInstance,
|
|||||||
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerAddJoinerWithDiscerner(otInstance * aInstance,
|
otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance,
|
||||||
const otJoinerDiscerner *aDiscerner,
|
const otJoinerDiscerner *aDiscerner,
|
||||||
const char * aPskd,
|
const char *aPskd,
|
||||||
uint32_t aTimeout);
|
uint32_t aTimeout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -351,7 +351,7 @@ otError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aPro
|
|||||||
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerAnnounceBegin(otInstance * aInstance,
|
otError otCommissionerAnnounceBegin(otInstance *aInstance,
|
||||||
uint32_t aChannelMask,
|
uint32_t aChannelMask,
|
||||||
uint8_t aCount,
|
uint8_t aCount,
|
||||||
uint16_t aPeriod,
|
uint16_t aPeriod,
|
||||||
@@ -369,7 +369,7 @@ otError otCommissionerAnnounceBegin(otInstance * aInstance,
|
|||||||
typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask,
|
typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask,
|
||||||
const uint8_t *aEnergyList,
|
const uint8_t *aEnergyList,
|
||||||
uint8_t aEnergyListLength,
|
uint8_t aEnergyListLength,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sends an Energy Scan Query message.
|
* This function sends an Energy Scan Query message.
|
||||||
@@ -390,14 +390,14 @@ typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask,
|
|||||||
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerEnergyScan(otInstance * aInstance,
|
otError otCommissionerEnergyScan(otInstance *aInstance,
|
||||||
uint32_t aChannelMask,
|
uint32_t aChannelMask,
|
||||||
uint8_t aCount,
|
uint8_t aCount,
|
||||||
uint16_t aPeriod,
|
uint16_t aPeriod,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
const otIp6Address * aAddress,
|
const otIp6Address *aAddress,
|
||||||
otCommissionerEnergyReportCallback aCallback,
|
otCommissionerEnergyReportCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function pointer is called when the Commissioner receives a PAN ID Conflict message.
|
* This function pointer is called when the Commissioner receives a PAN ID Conflict message.
|
||||||
@@ -426,12 +426,12 @@ typedef void (*otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aC
|
|||||||
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerPanIdQuery(otInstance * aInstance,
|
otError otCommissionerPanIdQuery(otInstance *aInstance,
|
||||||
uint16_t aPanId,
|
uint16_t aPanId,
|
||||||
uint32_t aChannelMask,
|
uint32_t aChannelMask,
|
||||||
const otIp6Address * aAddress,
|
const otIp6Address *aAddress,
|
||||||
otCommissionerPanIdConflictCallback aCallback,
|
otCommissionerPanIdConflictCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sends MGMT_COMMISSIONER_GET.
|
* This function sends MGMT_COMMISSIONER_GET.
|
||||||
@@ -460,9 +460,9 @@ otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, u
|
|||||||
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
|
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otCommissionerSendMgmtSet(otInstance * aInstance,
|
otError otCommissionerSendMgmtSet(otInstance *aInstance,
|
||||||
const otCommissioningDataset *aDataset,
|
const otCommissioningDataset *aDataset,
|
||||||
const uint8_t * aTlvs,
|
const uint8_t *aTlvs,
|
||||||
uint8_t aLength);
|
uint8_t aLength);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -95,15 +95,15 @@ void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t a
|
|||||||
*/
|
*/
|
||||||
void otCryptoAesCcm(const otCryptoKey *aKey,
|
void otCryptoAesCcm(const otCryptoKey *aKey,
|
||||||
uint8_t aTagLength,
|
uint8_t aTagLength,
|
||||||
const void * aNonce,
|
const void *aNonce,
|
||||||
uint8_t aNonceLength,
|
uint8_t aNonceLength,
|
||||||
const void * aHeader,
|
const void *aHeader,
|
||||||
uint32_t aHeaderLength,
|
uint32_t aHeaderLength,
|
||||||
void * aPlainText,
|
void *aPlainText,
|
||||||
void * aCipherText,
|
void *aCipherText,
|
||||||
uint32_t aLength,
|
uint32_t aLength,
|
||||||
bool aEncrypt,
|
bool aEncrypt,
|
||||||
void * aTag);
|
void *aTag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method creates ECDSA sign.
|
* This method creates ECDSA sign.
|
||||||
@@ -120,8 +120,8 @@ void otCryptoAesCcm(const otCryptoKey *aKey,
|
|||||||
* @retval OT_ERROR_INVALID_ARGS Private key is not valid EC Private Key.
|
* @retval OT_ERROR_INVALID_ARGS Private key is not valid EC Private Key.
|
||||||
* @retval OT_ERROR_FAILED Error during signing.
|
* @retval OT_ERROR_FAILED Error during signing.
|
||||||
*/
|
*/
|
||||||
otError otCryptoEcdsaSign(uint8_t * aOutput,
|
otError otCryptoEcdsaSign(uint8_t *aOutput,
|
||||||
uint16_t * aOutputLength,
|
uint16_t *aOutputLength,
|
||||||
const uint8_t *aInputHash,
|
const uint8_t *aInputHash,
|
||||||
uint16_t aInputHashLength,
|
uint16_t aInputHashLength,
|
||||||
const uint8_t *aPrivateKey,
|
const uint8_t *aPrivateKey,
|
||||||
|
|||||||
@@ -479,11 +479,11 @@ otError otDatasetSetPendingTlvs(otInstance *aInstance, const otOperationalDatase
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDatasetSendMgmtActiveGet(otInstance * aInstance,
|
otError otDatasetSendMgmtActiveGet(otInstance *aInstance,
|
||||||
const otOperationalDatasetComponents *aDatasetComponents,
|
const otOperationalDatasetComponents *aDatasetComponents,
|
||||||
const uint8_t * aTlvTypes,
|
const uint8_t *aTlvTypes,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
const otIp6Address * aAddress);
|
const otIp6Address *aAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends MGMT_ACTIVE_SET.
|
* Sends MGMT_ACTIVE_SET.
|
||||||
@@ -500,12 +500,12 @@ otError otDatasetSendMgmtActiveGet(otInstance * aInstan
|
|||||||
* @retval OT_ERROR_BUSY A previous request is ongoing.
|
* @retval OT_ERROR_BUSY A previous request is ongoing.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDatasetSendMgmtActiveSet(otInstance * aInstance,
|
otError otDatasetSendMgmtActiveSet(otInstance *aInstance,
|
||||||
const otOperationalDataset *aDataset,
|
const otOperationalDataset *aDataset,
|
||||||
const uint8_t * aTlvs,
|
const uint8_t *aTlvs,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
otDatasetMgmtSetCallback aCallback,
|
otDatasetMgmtSetCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends MGMT_PENDING_GET.
|
* Sends MGMT_PENDING_GET.
|
||||||
@@ -520,11 +520,11 @@ otError otDatasetSendMgmtActiveSet(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDatasetSendMgmtPendingGet(otInstance * aInstance,
|
otError otDatasetSendMgmtPendingGet(otInstance *aInstance,
|
||||||
const otOperationalDatasetComponents *aDatasetComponents,
|
const otOperationalDatasetComponents *aDatasetComponents,
|
||||||
const uint8_t * aTlvTypes,
|
const uint8_t *aTlvTypes,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
const otIp6Address * aAddress);
|
const otIp6Address *aAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends MGMT_PENDING_SET.
|
* Sends MGMT_PENDING_SET.
|
||||||
@@ -541,12 +541,12 @@ otError otDatasetSendMgmtPendingGet(otInstance * aInsta
|
|||||||
* @retval OT_ERROR_BUSY A previous request is ongoing.
|
* @retval OT_ERROR_BUSY A previous request is ongoing.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDatasetSendMgmtPendingSet(otInstance * aInstance,
|
otError otDatasetSendMgmtPendingSet(otInstance *aInstance,
|
||||||
const otOperationalDataset *aDataset,
|
const otOperationalDataset *aDataset,
|
||||||
const uint8_t * aTlvs,
|
const uint8_t *aTlvs,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
otDatasetMgmtSetCallback aCallback,
|
otDatasetMgmtSetCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function generates PSKc from a given pass-phrase, network name, and extended PAN ID.
|
* This function generates PSKc from a given pass-phrase, network name, and extended PAN ID.
|
||||||
@@ -562,10 +562,10 @@ otError otDatasetSendMgmtPendingSet(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_INVALID_ARGS If any of the input arguments is invalid.
|
* @retval OT_ERROR_INVALID_ARGS If any of the input arguments is invalid.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDatasetGeneratePskc(const char * aPassPhrase,
|
otError otDatasetGeneratePskc(const char *aPassPhrase,
|
||||||
const otNetworkName * aNetworkName,
|
const otNetworkName *aNetworkName,
|
||||||
const otExtendedPanId *aExtPanId,
|
const otExtendedPanId *aExtPanId,
|
||||||
otPskc * aPskc);
|
otPskc *aPskc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an `otNetworkName` instance from a given null terminated C string.
|
* Sets an `otNetworkName` instance from a given null terminated C string.
|
||||||
|
|||||||
@@ -88,10 +88,10 @@ typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext);
|
|||||||
* @retval OT_ERROR_NO_BUFS Could not allocated buffer to save Dataset.
|
* @retval OT_ERROR_NO_BUFS Could not allocated buffer to save Dataset.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDatasetUpdaterRequestUpdate(otInstance * aInstance,
|
otError otDatasetUpdaterRequestUpdate(otInstance *aInstance,
|
||||||
const otOperationalDataset *aDataset,
|
const otOperationalDataset *aDataset,
|
||||||
otDatasetUpdaterCallback aCallback,
|
otDatasetUpdaterCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function cancels an ongoing (if any) Operational Dataset update request.
|
* This function cancels an ongoing (if any) Operational Dataset update request.
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
otError otDiagProcessCmd(otInstance *aInstance,
|
otError otDiagProcessCmd(otInstance *aInstance,
|
||||||
uint8_t aArgsLength,
|
uint8_t aArgsLength,
|
||||||
char * aArgs[],
|
char *aArgs[],
|
||||||
char * aOutput,
|
char *aOutput,
|
||||||
size_t aOutputMaxLen);
|
size_t aOutputMaxLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ typedef struct otDnsTxtEntry
|
|||||||
* DNS message.
|
* DNS message.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char * mKey;
|
const char *mKey;
|
||||||
const uint8_t *mValue; ///< The TXT record value or already encoded TXT-DATA (depending on `mKey`).
|
const uint8_t *mValue; ///< The TXT record value or already encoded TXT-DATA (depending on `mKey`).
|
||||||
uint16_t mValueLength; ///< Number of bytes in `mValue` buffer.
|
uint16_t mValueLength; ///< Number of bytes in `mValue` buffer.
|
||||||
} otDnsTxtEntry;
|
} otDnsTxtEntry;
|
||||||
|
|||||||
@@ -203,10 +203,10 @@ typedef void (*otDnsAddressCallback)(otError aError, const otDnsAddressResponse
|
|||||||
* @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.
|
* @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsClientResolveAddress(otInstance * aInstance,
|
otError otDnsClientResolveAddress(otInstance *aInstance,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
otDnsAddressCallback aCallback,
|
otDnsAddressCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig);
|
const otDnsQueryConfig *aConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -233,10 +233,10 @@ otError otDnsClientResolveAddress(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.
|
* @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsClientResolveIp4Address(otInstance * aInstance,
|
otError otDnsClientResolveIp4Address(otInstance *aInstance,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
otDnsAddressCallback aCallback,
|
otDnsAddressCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig);
|
const otDnsQueryConfig *aConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -253,7 +253,7 @@ otError otDnsClientResolveIp4Address(otInstance * aInstance,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
|
otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
|
||||||
char * aNameBuffer,
|
char *aNameBuffer,
|
||||||
uint16_t aNameBufferSize);
|
uint16_t aNameBufferSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -279,8 +279,8 @@ otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
|
|||||||
*/
|
*/
|
||||||
otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
|
otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
otIp6Address * aAddress,
|
otIp6Address *aAddress,
|
||||||
uint32_t * aTtl);
|
uint32_t *aTtl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This type is an opaque representation of a response to a browse (service instance enumeration) DNS query.
|
* This type is an opaque representation of a response to a browse (service instance enumeration) DNS query.
|
||||||
@@ -318,11 +318,11 @@ typedef struct otDnsServiceInfo
|
|||||||
uint16_t mPort; ///< Service port number.
|
uint16_t mPort; ///< Service port number.
|
||||||
uint16_t mPriority; ///< Service priority.
|
uint16_t mPriority; ///< Service priority.
|
||||||
uint16_t mWeight; ///< Service weight.
|
uint16_t mWeight; ///< Service weight.
|
||||||
char * mHostNameBuffer; ///< Buffer to output the service host name (can be NULL if not needed).
|
char *mHostNameBuffer; ///< Buffer to output the service host name (can be NULL if not needed).
|
||||||
uint16_t mHostNameBufferSize; ///< Size of `mHostNameBuffer`.
|
uint16_t mHostNameBufferSize; ///< Size of `mHostNameBuffer`.
|
||||||
otIp6Address mHostAddress; ///< The host IPv6 address. Set to all zero if not available.
|
otIp6Address mHostAddress; ///< The host IPv6 address. Set to all zero if not available.
|
||||||
uint32_t mHostAddressTtl; ///< The host address TTL.
|
uint32_t mHostAddressTtl; ///< The host address TTL.
|
||||||
uint8_t * mTxtData; ///< Buffer to output TXT data (can be NULL if not needed).
|
uint8_t *mTxtData; ///< Buffer to output TXT data (can be NULL if not needed).
|
||||||
uint16_t mTxtDataSize; ///< On input, size of `mTxtData` buffer. On output number bytes written.
|
uint16_t mTxtDataSize; ///< On input, size of `mTxtData` buffer. On output number bytes written.
|
||||||
bool mTxtDataTruncated; ///< Indicates if TXT data could not fit in `mTxtDataSize` and was truncated.
|
bool mTxtDataTruncated; ///< Indicates if TXT data could not fit in `mTxtDataSize` and was truncated.
|
||||||
uint32_t mTxtDataTtl; ///< The TXT data TTL.
|
uint32_t mTxtDataTtl; ///< The TXT data TTL.
|
||||||
@@ -347,10 +347,10 @@ typedef struct otDnsServiceInfo
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
|
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsClientBrowse(otInstance * aInstance,
|
otError otDnsClientBrowse(otInstance *aInstance,
|
||||||
const char * aServiceName,
|
const char *aServiceName,
|
||||||
otDnsBrowseCallback aCallback,
|
otDnsBrowseCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig);
|
const otDnsQueryConfig *aConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -367,7 +367,7 @@ otError otDnsClientBrowse(otInstance * aInstance,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
|
||||||
char * aNameBuffer,
|
char *aNameBuffer,
|
||||||
uint16_t aNameBufferSize);
|
uint16_t aNameBufferSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -394,7 +394,7 @@ otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
|
|||||||
*/
|
*/
|
||||||
otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aResponse,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
char * aLabelBuffer,
|
char *aLabelBuffer,
|
||||||
uint8_t aLabelBufferSize);
|
uint8_t aLabelBufferSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -425,8 +425,8 @@ otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aRespon
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
|
||||||
const char * aInstanceLabel,
|
const char *aInstanceLabel,
|
||||||
otDnsServiceInfo * aServiceInfo);
|
otDnsServiceInfo *aServiceInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function gets the host IPv6 address from a DNS browse (service instance enumeration) response.
|
* This function gets the host IPv6 address from a DNS browse (service instance enumeration) response.
|
||||||
@@ -450,10 +450,10 @@ otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
otIp6Address * aAddress,
|
otIp6Address *aAddress,
|
||||||
uint32_t * aTtl);
|
uint32_t *aTtl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This type is an opaque representation of a response to a service instance resolution DNS query.
|
* This type is an opaque representation of a response to a service instance resolution DNS query.
|
||||||
@@ -502,11 +502,11 @@ typedef void (*otDnsServiceCallback)(otError aError, const otDnsServiceResponse
|
|||||||
* @retval OT_ERROR_INVALID_ARGS @p aInstanceLabel is NULL.
|
* @retval OT_ERROR_INVALID_ARGS @p aInstanceLabel is NULL.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsClientResolveService(otInstance * aInstance,
|
otError otDnsClientResolveService(otInstance *aInstance,
|
||||||
const char * aInstanceLabel,
|
const char *aInstanceLabel,
|
||||||
const char * aServiceName,
|
const char *aServiceName,
|
||||||
otDnsServiceCallback aCallback,
|
otDnsServiceCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig);
|
const otDnsQueryConfig *aConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -526,9 +526,9 @@ otError otDnsClientResolveService(otInstance * aInstance,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse,
|
otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse,
|
||||||
char * aLabelBuffer,
|
char *aLabelBuffer,
|
||||||
uint8_t aLabelBufferSize,
|
uint8_t aLabelBufferSize,
|
||||||
char * aNameBuffer,
|
char *aNameBuffer,
|
||||||
uint16_t aNameBufferSize);
|
uint16_t aNameBufferSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -577,10 +577,10 @@ otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse,
|
otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
otIp6Address * aAddress,
|
otIp6Address *aAddress,
|
||||||
uint32_t * aTtl);
|
uint32_t *aTtl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|||||||
@@ -112,15 +112,15 @@ typedef void otDnssdQuery;
|
|||||||
*/
|
*/
|
||||||
typedef struct otDnssdServiceInstanceInfo
|
typedef struct otDnssdServiceInstanceInfo
|
||||||
{
|
{
|
||||||
const char * mFullName; ///< Full instance name (e.g. "OpenThread._ipps._tcp.default.service.arpa.").
|
const char *mFullName; ///< Full instance name (e.g. "OpenThread._ipps._tcp.default.service.arpa.").
|
||||||
const char * mHostName; ///< Host name (e.g. "ot-host.default.service.arpa.").
|
const char *mHostName; ///< Host name (e.g. "ot-host.default.service.arpa.").
|
||||||
uint8_t mAddressNum; ///< Number of host IPv6 addresses.
|
uint8_t mAddressNum; ///< Number of host IPv6 addresses.
|
||||||
const otIp6Address *mAddresses; ///< Host IPv6 addresses.
|
const otIp6Address *mAddresses; ///< Host IPv6 addresses.
|
||||||
uint16_t mPort; ///< Service port.
|
uint16_t mPort; ///< Service port.
|
||||||
uint16_t mPriority; ///< Service priority.
|
uint16_t mPriority; ///< Service priority.
|
||||||
uint16_t mWeight; ///< Service weight.
|
uint16_t mWeight; ///< Service weight.
|
||||||
uint16_t mTxtLength; ///< Service TXT RDATA length.
|
uint16_t mTxtLength; ///< Service TXT RDATA length.
|
||||||
const uint8_t * mTxtData; ///< Service TXT RDATA.
|
const uint8_t *mTxtData; ///< Service TXT RDATA.
|
||||||
uint32_t mTtl; ///< Service TTL (in seconds).
|
uint32_t mTtl; ///< Service TTL (in seconds).
|
||||||
} otDnssdServiceInstanceInfo;
|
} otDnssdServiceInstanceInfo;
|
||||||
|
|
||||||
@@ -177,10 +177,10 @@ typedef struct otDnssdCounters
|
|||||||
* @param[in] aContext A pointer to the application-specific context.
|
* @param[in] aContext A pointer to the application-specific context.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otDnssdQuerySetCallbacks(otInstance * aInstance,
|
void otDnssdQuerySetCallbacks(otInstance *aInstance,
|
||||||
otDnssdQuerySubscribeCallback aSubscribe,
|
otDnssdQuerySubscribeCallback aSubscribe,
|
||||||
otDnssdQueryUnsubscribeCallback aUnsubscribe,
|
otDnssdQueryUnsubscribeCallback aUnsubscribe,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function notifies a discovered service instance.
|
* This function notifies a discovered service instance.
|
||||||
@@ -195,8 +195,8 @@ void otDnssdQuerySetCallbacks(otInstance * aInstance,
|
|||||||
* @param[in] aInstanceInfo A pointer to the discovered service instance information.
|
* @param[in] aInstanceInfo A pointer to the discovered service instance information.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otDnssdQueryHandleDiscoveredServiceInstance(otInstance * aInstance,
|
void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aInstance,
|
||||||
const char * aServiceFullName,
|
const char *aServiceFullName,
|
||||||
otDnssdServiceInstanceInfo *aInstanceInfo);
|
otDnssdServiceInstanceInfo *aInstanceInfo);
|
||||||
/**
|
/**
|
||||||
* This function notifies a discovered host.
|
* This function notifies a discovered host.
|
||||||
|
|||||||
@@ -251,9 +251,9 @@ void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator);
|
|||||||
* @returns A pointer to `otHistoryTrackerNetworkInfo` entry or `NULL` if no more entries in the list.
|
* @returns A pointer to `otHistoryTrackerNetworkInfo` entry or `NULL` if no more entries in the list.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInstance * aInstance,
|
const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the unicast address history list.
|
* This function iterates over the entries in the unicast address history list.
|
||||||
@@ -269,9 +269,9 @@ const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInsta
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressHistory(
|
const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressHistory(
|
||||||
otInstance * aInstance,
|
otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the multicast address history list.
|
* This function iterates over the entries in the multicast address history list.
|
||||||
@@ -287,9 +287,9 @@ const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressH
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddressHistory(
|
const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddressHistory(
|
||||||
otInstance * aInstance,
|
otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the RX message history list.
|
* This function iterates over the entries in the RX message history list.
|
||||||
@@ -304,9 +304,9 @@ const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddr
|
|||||||
* @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list.
|
* @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance * aInstance,
|
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the TX message history list.
|
* This function iterates over the entries in the TX message history list.
|
||||||
@@ -321,9 +321,9 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance *
|
|||||||
* @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list.
|
* @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance * aInstance,
|
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the neighbor history list.
|
* This function iterates over the entries in the neighbor history list.
|
||||||
@@ -338,9 +338,9 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance *
|
|||||||
* @returns The `otHistoryTrackerNeighborInfo` entry or `NULL` if no more entries in the list.
|
* @returns The `otHistoryTrackerNeighborInfo` entry or `NULL` if no more entries in the list.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otInstance * aInstance,
|
const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the Network Data on mesh prefix entry history list.
|
* This function iterates over the entries in the Network Data on mesh prefix entry history list.
|
||||||
@@ -355,9 +355,9 @@ const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otIns
|
|||||||
* @returns The `otHistoryTrackerOnMeshPrefixInfo` entry or `NULL` if no more entries in the list.
|
* @returns The `otHistoryTrackerOnMeshPrefixInfo` entry or `NULL` if no more entries in the list.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHistory(otInstance * aInstance,
|
const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function iterates over the entries in the Network Data external route entry history list.
|
* This function iterates over the entries in the Network Data external route entry history list.
|
||||||
@@ -373,9 +373,9 @@ const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHisto
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHistory(
|
const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHistory(
|
||||||
otInstance * aInstance,
|
otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge);
|
uint32_t *aEntryAge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function converts a given entry age to a human-readable string.
|
* This function converts a given entry age to a human-readable string.
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ typedef struct otIcmp6Header otIcmp6Header;
|
|||||||
* @param[in] aIcmpHeader A pointer to the received ICMPv6 header.
|
* @param[in] aIcmpHeader A pointer to the received ICMPv6 header.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otIcmp6ReceiveCallback)(void * aContext,
|
typedef void (*otIcmp6ReceiveCallback)(void *aContext,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
const otIcmp6Header *aIcmpHeader);
|
const otIcmp6Header *aIcmpHeader);
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ typedef void (*otIcmp6ReceiveCallback)(void * aContext,
|
|||||||
typedef struct otIcmp6Handler
|
typedef struct otIcmp6Handler
|
||||||
{
|
{
|
||||||
otIcmp6ReceiveCallback mReceiveCallback; ///< The ICMPv6 received callback
|
otIcmp6ReceiveCallback mReceiveCallback; ///< The ICMPv6 received callback
|
||||||
void * mContext; ///< A pointer to arbitrary context information.
|
void *mContext; ///< A pointer to arbitrary context information.
|
||||||
struct otIcmp6Handler *mNext; ///< A pointer to the next handler in the list.
|
struct otIcmp6Handler *mNext; ///< A pointer to the next handler in the list.
|
||||||
} otIcmp6Handler;
|
} otIcmp6Handler;
|
||||||
|
|
||||||
@@ -190,8 +190,8 @@ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler);
|
|||||||
* May be zero.
|
* May be zero.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otIcmp6SendEchoRequest(otInstance * aInstance,
|
otError otIcmp6SendEchoRequest(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
uint16_t aIdentifier);
|
uint16_t aIdentifier);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ extern "C" {
|
|||||||
* @note This number versions both OpenThread platform and user APIs.
|
* @note This number versions both OpenThread platform and user APIs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define OPENTHREAD_API_VERSION (265)
|
#define OPENTHREAD_API_VERSION (266)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup api-instance
|
* @addtogroup api-instance
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ typedef struct otMessageInfo
|
|||||||
otIp6Address mPeerAddr; ///< The peer IPv6 address.
|
otIp6Address mPeerAddr; ///< The peer IPv6 address.
|
||||||
uint16_t mSockPort; ///< The local transport-layer port.
|
uint16_t mSockPort; ///< The local transport-layer port.
|
||||||
uint16_t mPeerPort; ///< The peer transport-layer port.
|
uint16_t mPeerPort; ///< The peer transport-layer port.
|
||||||
const void * mLinkInfo; ///< A pointer to link-specific information.
|
const void *mLinkInfo; ///< A pointer to link-specific information.
|
||||||
uint8_t mHopLimit; ///< The IPv6 Hop Limit value. Only applies if `mAllowZeroHopLimit` is FALSE.
|
uint8_t mHopLimit; ///< The IPv6 Hop Limit value. Only applies if `mAllowZeroHopLimit` is FALSE.
|
||||||
///< If `0`, IPv6 Hop Limit is default value `OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT`.
|
///< If `0`, IPv6 Hop Limit is default value `OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT`.
|
||||||
///< Otherwise, specifies the IPv6 Hop Limit.
|
///< Otherwise, specifies the IPv6 Hop Limit.
|
||||||
@@ -414,8 +414,8 @@ otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSett
|
|||||||
* @sa otMessageFree
|
* @sa otMessageFree
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otMessage *otIp6NewMessageFromBuffer(otInstance * aInstance,
|
otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance,
|
||||||
const uint8_t * aData,
|
const uint8_t *aData,
|
||||||
uint16_t aDataLength,
|
uint16_t aDataLength,
|
||||||
const otMessageSettings *aSettings);
|
const otMessageSettings *aSettings);
|
||||||
|
|
||||||
@@ -786,7 +786,7 @@ void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFi
|
|||||||
* @sa otIp6RegisterMulticastListeners
|
* @sa otIp6RegisterMulticastListeners
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otIp6RegisterMulticastListenersCallback)(void * aContext,
|
typedef void (*otIp6RegisterMulticastListenersCallback)(void *aContext,
|
||||||
otError aError,
|
otError aError,
|
||||||
uint8_t aMlrStatus,
|
uint8_t aMlrStatus,
|
||||||
const otIp6Address *aFailedAddresses,
|
const otIp6Address *aFailedAddresses,
|
||||||
@@ -820,12 +820,12 @@ typedef void (*otIp6RegisterMulticastListenersCallback)(void * aCon
|
|||||||
* @sa otIp6RegisterMulticastListenersCallback
|
* @sa otIp6RegisterMulticastListenersCallback
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otIp6RegisterMulticastListeners(otInstance * aInstance,
|
otError otIp6RegisterMulticastListeners(otInstance *aInstance,
|
||||||
const otIp6Address * aAddresses,
|
const otIp6Address *aAddresses,
|
||||||
uint8_t aAddressNum,
|
uint8_t aAddressNum,
|
||||||
const uint32_t * aTimeout,
|
const uint32_t *aTimeout,
|
||||||
otIp6RegisterMulticastListenersCallback aCallback,
|
otIp6RegisterMulticastListenersCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sets the Mesh Local IID (for test purpose).
|
* This function sets the Mesh Local IID (for test purpose).
|
||||||
|
|||||||
@@ -112,15 +112,15 @@ typedef void (*otJoinerCallback)(otError aError, void *aContext);
|
|||||||
* @retval OT_ERROR_INVALID_STATE The IPv6 stack is not enabled or Thread stack is fully enabled.
|
* @retval OT_ERROR_INVALID_STATE The IPv6 stack is not enabled or Thread stack is fully enabled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otJoinerStart(otInstance * aInstance,
|
otError otJoinerStart(otInstance *aInstance,
|
||||||
const char * aPskd,
|
const char *aPskd,
|
||||||
const char * aProvisioningUrl,
|
const char *aProvisioningUrl,
|
||||||
const char * aVendorName,
|
const char *aVendorName,
|
||||||
const char * aVendorModel,
|
const char *aVendorModel,
|
||||||
const char * aVendorSwVersion,
|
const char *aVendorSwVersion,
|
||||||
const char * aVendorData,
|
const char *aVendorData,
|
||||||
otJoinerCallback aCallback,
|
otJoinerCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables the Thread Joiner role.
|
* Disables the Thread Joiner role.
|
||||||
|
|||||||
@@ -430,11 +430,11 @@ typedef void (*otHandleActiveScanResult)(otActiveScanResult *aResult, void *aCon
|
|||||||
* @retval OT_ERROR_BUSY Already performing an Active Scan.
|
* @retval OT_ERROR_BUSY Already performing an Active Scan.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkActiveScan(otInstance * aInstance,
|
otError otLinkActiveScan(otInstance *aInstance,
|
||||||
uint32_t aScanChannels,
|
uint32_t aScanChannels,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
otHandleActiveScanResult aCallback,
|
otHandleActiveScanResult aCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
|
* This function indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
|
||||||
@@ -468,11 +468,11 @@ typedef void (*otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aCon
|
|||||||
* @retval OT_ERROR_BUSY Could not start the energy scan.
|
* @retval OT_ERROR_BUSY Could not start the energy scan.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkEnergyScan(otInstance * aInstance,
|
otError otLinkEnergyScan(otInstance *aInstance,
|
||||||
uint32_t aScanChannels,
|
uint32_t aScanChannels,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
otHandleEnergyScanResult aCallback,
|
otHandleEnergyScanResult aCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
|
* This function indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
|
||||||
|
|||||||
@@ -116,10 +116,10 @@ typedef enum otLinkMetricsStatus
|
|||||||
* @param[in] aContext A pointer to application-specific context.
|
* @param[in] aContext A pointer to application-specific context.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otLinkMetricsReportCallback)(const otIp6Address * aSource,
|
typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
uint8_t aStatus,
|
uint8_t aStatus,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
/**
|
/**
|
||||||
* This function pointer is called when a Link Metrics Management Response is received.
|
* This function pointer is called when a Link Metrics Management Response is received.
|
||||||
*
|
*
|
||||||
@@ -140,9 +140,9 @@ typedef void (*otLinkMetricsMgmtResponseCallback)(const otIp6Address *aSource, u
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress aShortAddress,
|
typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress aShortAddress,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sends an MLE Data Request to query Link Metrics.
|
* This function sends an MLE Data Request to query Link Metrics.
|
||||||
@@ -162,12 +162,12 @@ typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress
|
|||||||
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkMetricsQuery(otInstance * aInstance,
|
otError otLinkMetricsQuery(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
uint8_t aSeriesId,
|
uint8_t aSeriesId,
|
||||||
const otLinkMetrics * aLinkMetricsFlags,
|
const otLinkMetrics *aLinkMetricsFlags,
|
||||||
otLinkMetricsReportCallback aCallback,
|
otLinkMetricsReportCallback aCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an MLE Link Metrics Management Request to configure or clear a Forward Tracking Series.
|
* Sends an MLE Link Metrics Management Request to configure or clear a Forward Tracking Series.
|
||||||
@@ -189,13 +189,13 @@ otError otLinkMetricsQuery(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkMetricsConfigForwardTrackingSeries(otInstance * aInstance,
|
otError otLinkMetricsConfigForwardTrackingSeries(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
uint8_t aSeriesId,
|
uint8_t aSeriesId,
|
||||||
otLinkMetricsSeriesFlags aSeriesFlags,
|
otLinkMetricsSeriesFlags aSeriesFlags,
|
||||||
const otLinkMetrics * aLinkMetricsFlags,
|
const otLinkMetrics *aLinkMetricsFlags,
|
||||||
otLinkMetricsMgmtResponseCallback aCallback,
|
otLinkMetricsMgmtResponseCallback aCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sends an MLE Link Metrics Management Request to configure/clear an Enhanced-ACK Based Probing.
|
* This function sends an MLE Link Metrics Management Request to configure/clear an Enhanced-ACK Based Probing.
|
||||||
@@ -218,14 +218,14 @@ otError otLinkMetricsConfigForwardTrackingSeries(otInstance *
|
|||||||
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkMetricsConfigEnhAckProbing(otInstance * aInstance,
|
otError otLinkMetricsConfigEnhAckProbing(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
otLinkMetricsEnhAckFlags aEnhAckFlags,
|
otLinkMetricsEnhAckFlags aEnhAckFlags,
|
||||||
const otLinkMetrics * aLinkMetricsFlags,
|
const otLinkMetrics *aLinkMetricsFlags,
|
||||||
otLinkMetricsMgmtResponseCallback aCallback,
|
otLinkMetricsMgmtResponseCallback aCallback,
|
||||||
void * aCallbackContext,
|
void *aCallbackContext,
|
||||||
otLinkMetricsEnhAckProbingIeReportCallback aEnhAckCallback,
|
otLinkMetricsEnhAckProbingIeReportCallback aEnhAckCallback,
|
||||||
void * aEnhAckCallbackContext);
|
void *aEnhAckCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an MLE Link Probe message.
|
* Sends an MLE Link Probe message.
|
||||||
@@ -242,7 +242,7 @@ otError otLinkMetricsConfigEnhAckProbing(otInstance *
|
|||||||
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkMetricsSendLinkProbe(otInstance * aInstance,
|
otError otLinkMetricsSendLinkProbe(otInstance *aInstance,
|
||||||
const otIp6Address *aDestination,
|
const otIp6Address *aDestination,
|
||||||
uint8_t aSeriesId,
|
uint8_t aSeriesId,
|
||||||
uint8_t aLength);
|
uint8_t aLength);
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ otRadioFrame *otLinkRawGetTransmitBuffer(otInstance *aInstance);
|
|||||||
* OT_ERROR_ABORT when transmission was aborted for other reasons.
|
* OT_ERROR_ABORT when transmission was aborted for other reasons.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otLinkRawTransmitDone)(otInstance * aInstance,
|
typedef void (*otLinkRawTransmitDone)(otInstance *aInstance,
|
||||||
otRadioFrame *aFrame,
|
otRadioFrame *aFrame,
|
||||||
otRadioFrame *aAckFrame,
|
otRadioFrame *aAckFrame,
|
||||||
otError aError);
|
otError aError);
|
||||||
@@ -241,7 +241,7 @@ typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergySca
|
|||||||
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
|
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkRawEnergyScan(otInstance * aInstance,
|
otError otLinkRawEnergyScan(otInstance *aInstance,
|
||||||
uint8_t aScanChannel,
|
uint8_t aScanChannel,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
otLinkRawEnergyScanDone aCallback);
|
otLinkRawEnergyScanDone aCallback);
|
||||||
@@ -346,7 +346,7 @@ otError otLinkRawSrcMatchClearExtEntries(otInstance *aInstance);
|
|||||||
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
|
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otLinkRawSetMacKey(otInstance * aInstance,
|
otError otLinkRawSetMacKey(otInstance *aInstance,
|
||||||
uint8_t aKeyIdMode,
|
uint8_t aKeyIdMode,
|
||||||
uint8_t aKeyId,
|
uint8_t aKeyId,
|
||||||
const otMacKey *aPrevKey,
|
const otMacKey *aPrevKey,
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ typedef struct otMultiRadioNeighborInfo
|
|||||||
* @retval OT_ERROR_NOT_FOUND Could not find a neighbor with @p aExtAddress.
|
* @retval OT_ERROR_NOT_FOUND Could not find a neighbor with @p aExtAddress.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otMultiRadioGetNeighborInfo(otInstance * aInstance,
|
otError otMultiRadioGetNeighborInfo(otInstance *aInstance,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
otMultiRadioNeighborInfo *aNeighborInfo);
|
otMultiRadioNeighborInfo *aNeighborInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -222,9 +222,9 @@ void otNat64InitAddressMappingIterator(otInstance *aInstance, otNat64AddressMapp
|
|||||||
* @retval OT_ERROR_NOT_FOUND No subsequent NAT64 address mapping info was found.
|
* @retval OT_ERROR_NOT_FOUND No subsequent NAT64 address mapping info was found.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otNat64GetNextAddressMapping(otInstance * aInstance,
|
otError otNat64GetNextAddressMapping(otInstance *aInstance,
|
||||||
otNat64AddressMappingIterator *aIterator,
|
otNat64AddressMappingIterator *aIterator,
|
||||||
otNat64AddressMapping * aMapping);
|
otNat64AddressMapping *aMapping);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* States of NAT64.
|
* States of NAT64.
|
||||||
|
|||||||
@@ -148,9 +148,9 @@ otError otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_
|
|||||||
* @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data.
|
* @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otNetDataGetNextOnMeshPrefix(otInstance * aInstance,
|
otError otNetDataGetNextOnMeshPrefix(otInstance *aInstance,
|
||||||
otNetworkDataIterator *aIterator,
|
otNetworkDataIterator *aIterator,
|
||||||
otBorderRouterConfig * aConfig);
|
otBorderRouterConfig *aConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function gets the next external route in the partition's Network Data.
|
* This function gets the next external route in the partition's Network Data.
|
||||||
@@ -227,7 +227,7 @@ struct otJoinerDiscerner;
|
|||||||
* @retval OT_ERROR_NOT_FOUND @p aDiscerner is not included in the steering data.
|
* @retval OT_ERROR_NOT_FOUND @p aDiscerner is not included in the steering data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otNetDataSteeringDataCheckJoinerWithDiscerner(otInstance * aInstance,
|
otError otNetDataSteeringDataCheckJoinerWithDiscerner(otInstance *aInstance,
|
||||||
const struct otJoinerDiscerner *aDiscerner);
|
const struct otJoinerDiscerner *aDiscerner);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ typedef void (*otNetDataDnsSrpServicePublisherCallback)(otNetDataPublisherEvent
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent,
|
typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent,
|
||||||
const otIp6Prefix * aPrefix,
|
const otIp6Prefix *aPrefix,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data.
|
* This function requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data.
|
||||||
@@ -170,9 +170,9 @@ bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance);
|
|||||||
* @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked).
|
* @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otNetDataSetDnsSrpServicePublisherCallback(otInstance * aInstance,
|
void otNetDataSetDnsSrpServicePublisherCallback(otInstance *aInstance,
|
||||||
otNetDataDnsSrpServicePublisherCallback aCallback,
|
otNetDataDnsSrpServicePublisherCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unpublishes any previously added DNS/SRP (Anycast or Unicast) Service entry from the Thread Network
|
* Unpublishes any previously added DNS/SRP (Anycast or Unicast) Service entry from the Thread Network
|
||||||
@@ -265,9 +265,9 @@ bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix);
|
|||||||
* @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked).
|
* @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otNetDataSetPrefixPublisherCallback(otInstance * aInstance,
|
void otNetDataSetPrefixPublisherCallback(otInstance *aInstance,
|
||||||
otNetDataPrefixPublisherCallback aCallback,
|
otNetDataPrefixPublisherCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unpublishes a previously published On-Mesh or External Route Prefix.
|
* Unpublishes a previously published On-Mesh or External Route Prefix.
|
||||||
|
|||||||
@@ -276,9 +276,9 @@ typedef struct otNetworkDiagTlv
|
|||||||
* @Note A subsequent call to this function is allowed only when current return value is OT_ERROR_NONE.
|
* @Note A subsequent call to this function is allowed only when current return value is OT_ERROR_NONE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadGetNextDiagnosticTlv(const otMessage * aMessage,
|
otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage,
|
||||||
otNetworkDiagIterator *aIterator,
|
otNetworkDiagIterator *aIterator,
|
||||||
otNetworkDiagTlv * aNetworkDiagTlv);
|
otNetworkDiagTlv *aNetworkDiagTlv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function pointer is called when Network Diagnostic Get response is received.
|
* This function pointer is called when Network Diagnostic Get response is received.
|
||||||
@@ -292,9 +292,9 @@ otError otThreadGetNextDiagnosticTlv(const otMessage * aMessage,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otReceiveDiagnosticGetCallback)(otError aError,
|
typedef void (*otReceiveDiagnosticGetCallback)(otError aError,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a Network Diagnostic Get request.
|
* Send a Network Diagnostic Get request.
|
||||||
@@ -311,12 +311,12 @@ typedef void (*otReceiveDiagnosticGetCallback)(otError aError,
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_GET.req.
|
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_GET.req.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadSendDiagnosticGet(otInstance * aInstance,
|
otError otThreadSendDiagnosticGet(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
const uint8_t aTlvTypes[],
|
const uint8_t aTlvTypes[],
|
||||||
uint8_t aCount,
|
uint8_t aCount,
|
||||||
otReceiveDiagnosticGetCallback aCallback,
|
otReceiveDiagnosticGetCallback aCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a Network Diagnostic Reset request.
|
* Send a Network Diagnostic Reset request.
|
||||||
@@ -330,7 +330,7 @@ otError otThreadSendDiagnosticGet(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_RST.ntf.
|
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_RST.ntf.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadSendDiagnosticReset(otInstance * aInstance,
|
otError otThreadSendDiagnosticReset(otInstance *aInstance,
|
||||||
const otIp6Address *aDestination,
|
const otIp6Address *aDestination,
|
||||||
const uint8_t aTlvTypes[],
|
const uint8_t aTlvTypes[],
|
||||||
uint8_t aCount);
|
uint8_t aCount);
|
||||||
|
|||||||
@@ -145,9 +145,9 @@ uint16_t otNetworkTimeGetXtalThreshold(otInstance *aInstance);
|
|||||||
* @param[in] aCallbackContext The context to be passed to the callback function upon invocation
|
* @param[in] aCallbackContext The context to be passed to the callback function upon invocation
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otNetworkTimeSyncSetCallback(otInstance * aInstance,
|
void otNetworkTimeSyncSetCallback(otInstance *aInstance,
|
||||||
otNetworkTimeSyncCallbackFn aCallbackFn,
|
otNetworkTimeSyncCallbackFn aCallbackFn,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ typedef struct otPingSenderConfig
|
|||||||
otPingSenderReplyCallback mReplyCallback; ///< Callback function to report replies (can be NULL if not needed).
|
otPingSenderReplyCallback mReplyCallback; ///< Callback function to report replies (can be NULL if not needed).
|
||||||
otPingSenderStatisticsCallback
|
otPingSenderStatisticsCallback
|
||||||
mStatisticsCallback; ///< Callback function to report statistics (can be NULL if not needed).
|
mStatisticsCallback; ///< Callback function to report statistics (can be NULL if not needed).
|
||||||
void * mCallbackContext; ///< A pointer to the callback application-specific context.
|
void *mCallbackContext; ///< A pointer to the callback application-specific context.
|
||||||
uint16_t mSize; ///< Data size (# of bytes) excludes IPv6/ICMPv6 header. Zero for default.
|
uint16_t mSize; ///< Data size (# of bytes) excludes IPv6/ICMPv6 header. Zero for default.
|
||||||
uint16_t mCount; ///< Number of ping messages to send. Zero to use default.
|
uint16_t mCount; ///< Number of ping messages to send. Zero to use default.
|
||||||
uint32_t mInterval; ///< Ping tx interval in milliseconds. Zero to use default.
|
uint32_t mInterval; ///< Ping tx interval in milliseconds. Zero to use default.
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ typedef struct otCryptoKey
|
|||||||
*/
|
*/
|
||||||
typedef struct otCryptoContext
|
typedef struct otCryptoContext
|
||||||
{
|
{
|
||||||
void * mContext; ///< Pointer to the context.
|
void *mContext; ///< Pointer to the context.
|
||||||
uint16_t mContextSize; ///< The length of the context in bytes.
|
uint16_t mContextSize; ///< The length of the context in bytes.
|
||||||
} otCryptoContext;
|
} otCryptoContext;
|
||||||
|
|
||||||
@@ -249,12 +249,12 @@ void otPlatCryptoInit(void);
|
|||||||
* This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
|
* This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatCryptoImportKey(otCryptoKeyRef * aKeyRef,
|
otError otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef,
|
||||||
otCryptoKeyType aKeyType,
|
otCryptoKeyType aKeyType,
|
||||||
otCryptoKeyAlgorithm aKeyAlgorithm,
|
otCryptoKeyAlgorithm aKeyAlgorithm,
|
||||||
int aKeyUsage,
|
int aKeyUsage,
|
||||||
otCryptoKeyStorage aKeyPersistence,
|
otCryptoKeyStorage aKeyPersistence,
|
||||||
const uint8_t * aKey,
|
const uint8_t *aKey,
|
||||||
size_t aKeyLen);
|
size_t aKeyLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -453,9 +453,9 @@ otError otPlatCryptoHkdfInit(otCryptoContext *aContext);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatCryptoHkdfExpand(otCryptoContext *aContext,
|
otError otPlatCryptoHkdfExpand(otCryptoContext *aContext,
|
||||||
const uint8_t * aInfo,
|
const uint8_t *aInfo,
|
||||||
uint16_t aInfoLength,
|
uint16_t aInfoLength,
|
||||||
uint8_t * aOutputKey,
|
uint8_t *aOutputKey,
|
||||||
uint16_t aOutputKeyLength);
|
uint16_t aOutputKeyLength);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -470,8 +470,8 @@ otError otPlatCryptoHkdfExpand(otCryptoContext *aContext,
|
|||||||
* @retval OT_ERROR_FAILED HKDF Extract failed.
|
* @retval OT_ERROR_FAILED HKDF Extract failed.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatCryptoHkdfExtract(otCryptoContext * aContext,
|
otError otPlatCryptoHkdfExtract(otCryptoContext *aContext,
|
||||||
const uint8_t * aSalt,
|
const uint8_t *aSalt,
|
||||||
uint16_t aSaltLength,
|
uint16_t aSaltLength,
|
||||||
const otCryptoKey *aInputKey);
|
const otCryptoKey *aInputKey);
|
||||||
|
|
||||||
@@ -621,8 +621,8 @@ otError otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair,
|
otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair,
|
||||||
const otPlatCryptoSha256Hash * aHash,
|
const otPlatCryptoSha256Hash *aHash,
|
||||||
otPlatCryptoEcdsaSignature * aSignature);
|
otPlatCryptoEcdsaSignature *aSignature);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the key from the input context to verify the ECDSA signature of a hashed message.
|
* Use the key from the input context to verify the ECDSA signature of a hashed message.
|
||||||
@@ -641,7 +641,7 @@ otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey,
|
otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey,
|
||||||
const otPlatCryptoSha256Hash * aHash,
|
const otPlatCryptoSha256Hash *aHash,
|
||||||
const otPlatCryptoEcdsaSignature *aSignature);
|
const otPlatCryptoEcdsaSignature *aSignature);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ typedef enum
|
|||||||
*/
|
*/
|
||||||
otError otPlatDiagProcess(otInstance *aInstance,
|
otError otPlatDiagProcess(otInstance *aInstance,
|
||||||
uint8_t aArgsLength,
|
uint8_t aArgsLength,
|
||||||
char * aArgs[],
|
char *aArgs[],
|
||||||
char * aOutput,
|
char *aOutput,
|
||||||
size_t aOutputMaxLen);
|
size_t aOutputMaxLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddres
|
|||||||
*/
|
*/
|
||||||
otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
|
otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
|
||||||
const otIp6Address *aDestAddress,
|
const otIp6Address *aDestAddress,
|
||||||
const uint8_t * aBuffer,
|
const uint8_t *aBuffer,
|
||||||
uint16_t aBufferLength);
|
uint16_t aBufferLength);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,10 +106,10 @@ otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
|
|||||||
* address and the IP Hop Limit MUST be 255.
|
* address and the IP Hop Limit MUST be 255.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
extern void otPlatInfraIfRecvIcmp6Nd(otInstance * aInstance,
|
extern void otPlatInfraIfRecvIcmp6Nd(otInstance *aInstance,
|
||||||
uint32_t aInfraIfIndex,
|
uint32_t aInfraIfIndex,
|
||||||
const otIp6Address *aSrcAddress,
|
const otIp6Address *aSrcAddress,
|
||||||
const uint8_t * aBuffer,
|
const uint8_t *aBuffer,
|
||||||
uint16_t aBufferLength);
|
uint16_t aBufferLength);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,7 +158,7 @@ otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex);
|
|||||||
* @param[in] aIp6Prefix A pointer to NAT64 prefix.
|
* @param[in] aIp6Prefix A pointer to NAT64 prefix.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
extern void otPlatInfraIfDiscoverNat64PrefixDone(otInstance * aInstance,
|
extern void otPlatInfraIfDiscoverNat64PrefixDone(otInstance *aInstance,
|
||||||
uint32_t aInfraIfIndex,
|
uint32_t aInfraIfIndex,
|
||||||
const otIp6Prefix *aIp6Prefix);
|
const otIp6Prefix *aIp6Prefix);
|
||||||
|
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ typedef struct otRadioFrame
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
const otMacKeyMaterial *mAesKey; ///< The key material used for AES-CCM frame security.
|
const otMacKeyMaterial *mAesKey; ///< The key material used for AES-CCM frame security.
|
||||||
otRadioIeInfo * mIeInfo; ///< The pointer to the Header IE(s) related information.
|
otRadioIeInfo *mIeInfo; ///< The pointer to the Header IE(s) related information.
|
||||||
uint32_t mTxDelay; ///< The delay time for this transmission (based on `mTxDelayBaseTime`).
|
uint32_t mTxDelay; ///< The delay time for this transmission (based on `mTxDelayBaseTime`).
|
||||||
uint32_t mTxDelayBaseTime; ///< The base time for the transmission delay.
|
uint32_t mTxDelayBaseTime; ///< The base time for the transmission delay.
|
||||||
uint8_t mMaxCsmaBackoffs; ///< Maximum number of backoffs attempts before declaring CCA failure.
|
uint8_t mMaxCsmaBackoffs; ///< Maximum number of backoffs attempts before declaring CCA failure.
|
||||||
@@ -594,7 +594,7 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable);
|
|||||||
* @param[in] aKeyType Key Type used.
|
* @param[in] aKeyType Key Type used.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otPlatRadioSetMacKey(otInstance * aInstance,
|
void otPlatRadioSetMacKey(otInstance *aInstance,
|
||||||
uint8_t aKeyIdMode,
|
uint8_t aKeyIdMode,
|
||||||
uint8_t aKeyId,
|
uint8_t aKeyId,
|
||||||
const otMacKeyMaterial *aPrevKey,
|
const otMacKeyMaterial *aPrevKey,
|
||||||
@@ -1032,7 +1032,7 @@ otError otPlatRadioGetCoexMetrics(otInstance *aInstance, otRadioCoexMetrics *aCo
|
|||||||
* @retval kErrorNone Successfully enabled or disabled CSL.
|
* @retval kErrorNone Successfully enabled or disabled CSL.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatRadioEnableCsl(otInstance * aInstance,
|
otError otPlatRadioEnableCsl(otInstance *aInstance,
|
||||||
uint32_t aCslPeriod,
|
uint32_t aCslPeriod,
|
||||||
otShortAddress aShortAddr,
|
otShortAddress aShortAddr,
|
||||||
const otExtAddress *aExtAddr);
|
const otExtAddress *aExtAddr);
|
||||||
@@ -1139,7 +1139,7 @@ otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode);
|
|||||||
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
|
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatRadioConfigureEnhAckProbing(otInstance * aInstance,
|
otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance,
|
||||||
otLinkMetrics aLinkMetrics,
|
otLinkMetrics aLinkMetrics,
|
||||||
otShortAddress aShortAddress,
|
otShortAddress aShortAddress,
|
||||||
const otExtAddress *aExtAddress);
|
const otExtAddress *aExtAddress);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ extern "C" {
|
|||||||
* @returns TRUE if after this call returns the platform should invoke the process callback `aProcessCallback`,
|
* @returns TRUE if after this call returns the platform should invoke the process callback `aProcessCallback`,
|
||||||
* FALSE if there is nothing to process and no need to invoke the process callback.
|
* FALSE if there is nothing to process and no need to invoke the process callback.
|
||||||
*/
|
*/
|
||||||
typedef bool (*otPlatSpiSlaveTransactionCompleteCallback)(void * aContext,
|
typedef bool (*otPlatSpiSlaveTransactionCompleteCallback)(void *aContext,
|
||||||
uint8_t *aOutputBuf,
|
uint8_t *aOutputBuf,
|
||||||
uint16_t aOutputBufLen,
|
uint16_t aOutputBufLen,
|
||||||
uint8_t *aInputBuf,
|
uint8_t *aInputBuf,
|
||||||
@@ -115,7 +115,7 @@ typedef void (*otPlatSpiSlaveTransactionProcessCallback)(void *aContext);
|
|||||||
*/
|
*/
|
||||||
otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
|
otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
|
||||||
otPlatSpiSlaveTransactionProcessCallback aProcessCallback,
|
otPlatSpiSlaveTransactionProcessCallback aProcessCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shutdown and disable the SPI slave interface.
|
* Shutdown and disable the SPI slave interface.
|
||||||
|
|||||||
@@ -178,8 +178,8 @@ void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint
|
|||||||
* @param[in] aDestSockAddr The destination socket address.
|
* @param[in] aDestSockAddr The destination socket address.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otPlatTrelSend(otInstance * aInstance,
|
void otPlatTrelSend(otInstance *aInstance,
|
||||||
const uint8_t * aUdpPayload,
|
const uint8_t *aUdpPayload,
|
||||||
uint16_t aUdpPayloadLen,
|
uint16_t aUdpPayloadLen,
|
||||||
const otSockAddr *aDestSockAddr);
|
const otSockAddr *aDestSockAddr);
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ otError otPlatUdpSend(otUdpSocket *aUdpSocket, otMessage *aMessage, const otMess
|
|||||||
* @retval OT_ERROR_FAILED Failed to join the multicast group.
|
* @retval OT_ERROR_FAILED Failed to join the multicast group.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatUdpJoinMulticastGroup(otUdpSocket * aUdpSocket,
|
otError otPlatUdpJoinMulticastGroup(otUdpSocket *aUdpSocket,
|
||||||
otNetifIdentifier aNetifIdentifier,
|
otNetifIdentifier aNetifIdentifier,
|
||||||
const otIp6Address *aAddress);
|
const otIp6Address *aAddress);
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ otError otPlatUdpJoinMulticastGroup(otUdpSocket * aUdpSocket,
|
|||||||
* @retval OT_ERROR_FAILED Failed to leave the multicast group.
|
* @retval OT_ERROR_FAILED Failed to leave the multicast group.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otPlatUdpLeaveMulticastGroup(otUdpSocket * aUdpSocket,
|
otError otPlatUdpLeaveMulticastGroup(otUdpSocket *aUdpSocket,
|
||||||
otNetifIdentifier aNetifIdentifier,
|
otNetifIdentifier aNetifIdentifier,
|
||||||
const otIp6Address *aAddress);
|
const otIp6Address *aAddress);
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ otError otServerAddService(otInstance *aInstance, const otServiceConfig *aConfig
|
|||||||
* @sa otServerRegister
|
* @sa otServerRegister
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otServerRemoveService(otInstance * aInstance,
|
otError otServerRemoveService(otInstance *aInstance,
|
||||||
uint32_t aEnterpriseNumber,
|
uint32_t aEnterpriseNumber,
|
||||||
const uint8_t *aServiceData,
|
const uint8_t *aServiceData,
|
||||||
uint8_t aServiceDataLength);
|
uint8_t aServiceDataLength);
|
||||||
|
|||||||
@@ -93,10 +93,10 @@ typedef void (*otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aR
|
|||||||
* @param[in] aContext A pointer to arbitrary context information.
|
* @param[in] aContext A pointer to arbitrary context information.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otSntpClientQuery(otInstance * aInstance,
|
otError otSntpClientQuery(otInstance *aInstance,
|
||||||
const otSntpQuery * aQuery,
|
const otSntpQuery *aQuery,
|
||||||
otSntpResponseHandler aHandler,
|
otSntpResponseHandler aHandler,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sets the unix era number.
|
* This function sets the unix era number.
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ typedef enum
|
|||||||
*/
|
*/
|
||||||
typedef struct otSrpClientHostInfo
|
typedef struct otSrpClientHostInfo
|
||||||
{
|
{
|
||||||
const char * mName; ///< Host name (label) string (NULL if not yet set).
|
const char *mName; ///< Host name (label) string (NULL if not yet set).
|
||||||
const otIp6Address * mAddresses; ///< Array of host IPv6 addresses (NULL if not set or auto address is enabled).
|
const otIp6Address *mAddresses; ///< Array of host IPv6 addresses (NULL if not set or auto address is enabled).
|
||||||
uint8_t mNumAddresses; ///< Number of IPv6 addresses in `mAddresses` array.
|
uint8_t mNumAddresses; ///< Number of IPv6 addresses in `mAddresses` array.
|
||||||
bool mAutoAddress; ///< Indicates whether auto address mode is enabled or not.
|
bool mAutoAddress; ///< Indicates whether auto address mode is enabled or not.
|
||||||
otSrpClientItemState mState; ///< Host info state.
|
otSrpClientItemState mState; ///< Host info state.
|
||||||
@@ -103,10 +103,10 @@ typedef struct otSrpClientHostInfo
|
|||||||
*/
|
*/
|
||||||
typedef struct otSrpClientService
|
typedef struct otSrpClientService
|
||||||
{
|
{
|
||||||
const char * mName; ///< The service labels (e.g., "_mt._udp", not the full domain name).
|
const char *mName; ///< The service labels (e.g., "_mt._udp", not the full domain name).
|
||||||
const char * mInstanceName; ///< The service instance name label (not the full name).
|
const char *mInstanceName; ///< The service instance name label (not the full name).
|
||||||
const char *const * mSubTypeLabels; ///< Array of sub-type labels (must end with `NULL` or can be `NULL`).
|
const char *const *mSubTypeLabels; ///< Array of sub-type labels (must end with `NULL` or can be `NULL`).
|
||||||
const otDnsTxtEntry * mTxtEntries; ///< Array of TXT entries (`mNumTxtEntries` gives num of entries).
|
const otDnsTxtEntry *mTxtEntries; ///< Array of TXT entries (`mNumTxtEntries` gives num of entries).
|
||||||
uint16_t mPort; ///< The service port number.
|
uint16_t mPort; ///< The service port number.
|
||||||
uint16_t mPriority; ///< The service priority.
|
uint16_t mPriority; ///< The service priority.
|
||||||
uint16_t mWeight; ///< The service weight.
|
uint16_t mWeight; ///< The service weight.
|
||||||
@@ -175,9 +175,9 @@ typedef struct otSrpClientService
|
|||||||
*/
|
*/
|
||||||
typedef void (*otSrpClientCallback)(otError aError,
|
typedef void (*otSrpClientCallback)(otError aError,
|
||||||
const otSrpClientHostInfo *aHostInfo,
|
const otSrpClientHostInfo *aHostInfo,
|
||||||
const otSrpClientService * aServices,
|
const otSrpClientService *aServices,
|
||||||
const otSrpClientService * aRemovedServices,
|
const otSrpClientService *aRemovedServices,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function pointer type defines the callback used by SRP client to notify user when it is auto-started or stopped.
|
* This function pointer type defines the callback used by SRP client to notify user when it is auto-started or stopped.
|
||||||
|
|||||||
@@ -429,9 +429,9 @@ otError otSrpServerSetLeaseConfig(otInstance *aInstance, const otSrpServerLeaseC
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otSrpServerServiceUpdateHandler)(otSrpServerServiceUpdateId aId,
|
typedef void (*otSrpServerServiceUpdateHandler)(otSrpServerServiceUpdateId aId,
|
||||||
const otSrpServerHost * aHost,
|
const otSrpServerHost *aHost,
|
||||||
uint32_t aTimeout,
|
uint32_t aTimeout,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sets the SRP service updates handler on SRP server.
|
* This function sets the SRP service updates handler on SRP server.
|
||||||
@@ -442,9 +442,9 @@ typedef void (*otSrpServerServiceUpdateHandler)(otSrpServerServiceUpdateId aId,
|
|||||||
* May be NULL if not used.
|
* May be NULL if not used.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otSrpServerSetServiceUpdateHandler(otInstance * aInstance,
|
void otSrpServerSetServiceUpdateHandler(otInstance *aInstance,
|
||||||
otSrpServerServiceUpdateHandler aServiceHandler,
|
otSrpServerServiceUpdateHandler aServiceHandler,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function reports the result of processing a SRP update to the SRP server.
|
* This function reports the result of processing a SRP update to the SRP server.
|
||||||
@@ -537,7 +537,7 @@ void otSrpServerHostGetLeaseInfo(const otSrpServerHost *aHost, otSrpServerLeaseI
|
|||||||
* @returns A pointer to the next service or NULL if there is no more services.
|
* @returns A pointer to the next service or NULL if there is no more services.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost * aHost,
|
const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost *aHost,
|
||||||
const otSrpServerService *aService);
|
const otSrpServerService *aService);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -572,11 +572,11 @@ const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost *
|
|||||||
* @returns A pointer to the next matching service or NULL if no matching service could be found.
|
* @returns A pointer to the next matching service or NULL if no matching service could be found.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const otSrpServerService *otSrpServerHostFindNextService(const otSrpServerHost * aHost,
|
const otSrpServerService *otSrpServerHostFindNextService(const otSrpServerHost *aHost,
|
||||||
const otSrpServerService *aPrevService,
|
const otSrpServerService *aPrevService,
|
||||||
otSrpServerServiceFlags aFlags,
|
otSrpServerServiceFlags aFlags,
|
||||||
const char * aServiceName,
|
const char *aServiceName,
|
||||||
const char * aInstanceName);
|
const char *aInstanceName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function indicates whether or not the SRP service has been deleted.
|
* This function indicates whether or not the SRP service has been deleted.
|
||||||
|
|||||||
+11
-11
@@ -63,7 +63,7 @@ extern "C" {
|
|||||||
typedef struct otLinkedBuffer
|
typedef struct otLinkedBuffer
|
||||||
{
|
{
|
||||||
struct otLinkedBuffer *mNext; ///< Pointer to the next linked buffer in the chain, or NULL if it is the end.
|
struct otLinkedBuffer *mNext; ///< Pointer to the next linked buffer in the chain, or NULL if it is the end.
|
||||||
const uint8_t * mData; ///< Pointer to data referenced by this linked buffer.
|
const uint8_t *mData; ///< Pointer to data referenced by this linked buffer.
|
||||||
size_t mLength; ///< Length of this linked buffer (number of bytes).
|
size_t mLength; ///< Length of this linked buffer (number of bytes).
|
||||||
} otLinkedBuffer;
|
} otLinkedBuffer;
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ struct otTcpEndpoint
|
|||||||
} mTcb;
|
} mTcb;
|
||||||
|
|
||||||
struct otTcpEndpoint *mNext; ///< A pointer to the next TCP endpoint (internal use only)
|
struct otTcpEndpoint *mNext; ///< A pointer to the next TCP endpoint (internal use only)
|
||||||
void * mContext; ///< A pointer to application-specific context
|
void *mContext; ///< A pointer to application-specific context
|
||||||
|
|
||||||
otTcpEstablished mEstablishedCallback; ///< "Established" callback function
|
otTcpEstablished mEstablishedCallback; ///< "Established" callback function
|
||||||
otTcpSendDone mSendDoneCallback; ///< "Send done" callback function
|
otTcpSendDone mSendDoneCallback; ///< "Send done" callback function
|
||||||
@@ -279,7 +279,7 @@ typedef struct otTcpEndpointInitializeArgs
|
|||||||
otTcpReceiveAvailable mReceiveAvailableCallback; ///< "Receive available" callback function
|
otTcpReceiveAvailable mReceiveAvailableCallback; ///< "Receive available" callback function
|
||||||
otTcpDisconnected mDisconnectedCallback; ///< "Disconnected" callback function
|
otTcpDisconnected mDisconnectedCallback; ///< "Disconnected" callback function
|
||||||
|
|
||||||
void * mReceiveBuffer; ///< Pointer to memory provided to the system for the TCP receive buffer
|
void *mReceiveBuffer; ///< Pointer to memory provided to the system for the TCP receive buffer
|
||||||
size_t mReceiveBufferSize; ///< Size of memory provided to the system for the TCP receive buffer
|
size_t mReceiveBufferSize; ///< Size of memory provided to the system for the TCP receive buffer
|
||||||
} otTcpEndpointInitializeArgs;
|
} otTcpEndpointInitializeArgs;
|
||||||
|
|
||||||
@@ -325,8 +325,8 @@ typedef struct otTcpEndpointInitializeArgs
|
|||||||
* @retval OT_ERROR_FAILED Failed to open the TCP endpoint.
|
* @retval OT_ERROR_FAILED Failed to open the TCP endpoint.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otTcpEndpointInitialize(otInstance * aInstance,
|
otError otTcpEndpointInitialize(otInstance *aInstance,
|
||||||
otTcpEndpoint * aEndpoint,
|
otTcpEndpoint *aEndpoint,
|
||||||
const otTcpEndpointInitializeArgs *aArgs);
|
const otTcpEndpointInitializeArgs *aArgs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -624,9 +624,9 @@ typedef enum otTcpIncomingConnectionAction
|
|||||||
* @returns Description of how to handle the incoming connection.
|
* @returns Description of how to handle the incoming connection.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef otTcpIncomingConnectionAction (*otTcpAcceptReady)(otTcpListener * aListener,
|
typedef otTcpIncomingConnectionAction (*otTcpAcceptReady)(otTcpListener *aListener,
|
||||||
const otSockAddr *aPeer,
|
const otSockAddr *aPeer,
|
||||||
otTcpEndpoint ** aAcceptInto);
|
otTcpEndpoint **aAcceptInto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This callback indicates that the TCP connection is now ready for two-way
|
* This callback indicates that the TCP connection is now ready for two-way
|
||||||
@@ -670,11 +670,11 @@ struct otTcpListener
|
|||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint8_t mSize[OT_TCP_LISTENER_TCB_SIZE_BASE + OT_TCP_LISTENER_TCB_NUM_PTR * sizeof(void *)];
|
uint8_t mSize[OT_TCP_LISTENER_TCB_SIZE_BASE + OT_TCP_LISTENER_TCB_NUM_PTR * sizeof(void *)];
|
||||||
void * mAlign;
|
void *mAlign;
|
||||||
} mTcbListen;
|
} mTcbListen;
|
||||||
|
|
||||||
struct otTcpListener *mNext; ///< A pointer to the next TCP listener (internal use only)
|
struct otTcpListener *mNext; ///< A pointer to the next TCP listener (internal use only)
|
||||||
void * mContext; ///< A pointer to application-specific context
|
void *mContext; ///< A pointer to application-specific context
|
||||||
|
|
||||||
otTcpAcceptReady mAcceptReadyCallback; ///< "Accept ready" callback function
|
otTcpAcceptReady mAcceptReadyCallback; ///< "Accept ready" callback function
|
||||||
otTcpAcceptDone mAcceptDoneCallback; ///< "Accept done" callback function
|
otTcpAcceptDone mAcceptDoneCallback; ///< "Accept done" callback function
|
||||||
@@ -709,8 +709,8 @@ typedef struct otTcpListenerInitializeArgs
|
|||||||
* @retval OT_ERROR_FAILED Failed to open the TCP listener.
|
* @retval OT_ERROR_FAILED Failed to open the TCP listener.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otTcpListenerInitialize(otInstance * aInstance,
|
otError otTcpListenerInitialize(otInstance *aInstance,
|
||||||
otTcpListener * aListener,
|
otTcpListener *aListener,
|
||||||
const otTcpListenerInitializeArgs *aArgs);
|
const otTcpListenerInitializeArgs *aArgs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -150,11 +150,11 @@ enum
|
|||||||
* @returns OT_ERROR_NONE Successfully copied data into the send buffer and sent it on the TCP endpoint.
|
* @returns OT_ERROR_NONE Successfully copied data into the send buffer and sent it on the TCP endpoint.
|
||||||
* @returns OT_ERROR_FAILED Failed to send out data on the TCP endpoint.
|
* @returns OT_ERROR_FAILED Failed to send out data on the TCP endpoint.
|
||||||
*/
|
*/
|
||||||
otError otTcpCircularSendBufferWrite(otTcpEndpoint * aEndpoint,
|
otError otTcpCircularSendBufferWrite(otTcpEndpoint *aEndpoint,
|
||||||
otTcpCircularSendBuffer *aSendBuffer,
|
otTcpCircularSendBuffer *aSendBuffer,
|
||||||
const void * aData,
|
const void *aData,
|
||||||
size_t aLength,
|
size_t aLength,
|
||||||
size_t * aWritten,
|
size_t *aWritten,
|
||||||
uint32_t aFlags);
|
uint32_t aFlags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+16
-16
@@ -278,13 +278,13 @@ bool otThreadIsSingleton(otInstance *aInstance);
|
|||||||
* @retval OT_ERROR_BUSY Thread Discovery Scan is already in progress.
|
* @retval OT_ERROR_BUSY Thread Discovery Scan is already in progress.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadDiscover(otInstance * aInstance,
|
otError otThreadDiscover(otInstance *aInstance,
|
||||||
uint32_t aScanChannels,
|
uint32_t aScanChannels,
|
||||||
uint16_t aPanId,
|
uint16_t aPanId,
|
||||||
bool aJoiner,
|
bool aJoiner,
|
||||||
bool aEnableEui64Filtering,
|
bool aEnableEui64Filtering,
|
||||||
otHandleActiveScanResult aCallback,
|
otHandleActiveScanResult aCallback,
|
||||||
void * aCallbackContext);
|
void *aCallbackContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function determines if an MLE Thread Discovery is currently in progress.
|
* This function determines if an MLE Thread Discovery is currently in progress.
|
||||||
@@ -311,7 +311,7 @@ bool otThreadIsDiscoverInProgress(otInstance *aInstance);
|
|||||||
* @retval OT_ERROR_INVALID_ARGS Invalid AdvData.
|
* @retval OT_ERROR_INVALID_ARGS Invalid AdvData.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadSetJoinerAdvertisement(otInstance * aInstance,
|
otError otThreadSetJoinerAdvertisement(otInstance *aInstance,
|
||||||
uint32_t aOui,
|
uint32_t aOui,
|
||||||
const uint8_t *aAdvData,
|
const uint8_t *aAdvData,
|
||||||
uint8_t aAdvDataLength);
|
uint8_t aAdvDataLength);
|
||||||
@@ -933,9 +933,9 @@ typedef void (*otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo
|
|||||||
* @param[in] aContext A pointer to callback client-specific context.
|
* @param[in] aContext A pointer to callback client-specific context.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otThreadRegisterParentResponseCallback(otInstance * aInstance,
|
void otThreadRegisterParentResponseCallback(otInstance *aInstance,
|
||||||
otThreadParentResponseCallback aCallback,
|
otThreadParentResponseCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This structure represents the Thread Discovery Request data.
|
* This structure represents the Thread Discovery Request data.
|
||||||
@@ -965,9 +965,9 @@ typedef void (*otThreadDiscoveryRequestCallback)(const otThreadDiscoveryRequestI
|
|||||||
* @param[in] aContext A pointer to callback application-specific context.
|
* @param[in] aContext A pointer to callback application-specific context.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otThreadSetDiscoveryRequestCallback(otInstance * aInstance,
|
void otThreadSetDiscoveryRequestCallback(otInstance *aInstance,
|
||||||
otThreadDiscoveryRequestCallback aCallback,
|
otThreadDiscoveryRequestCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function pointer type defines the callback to notify the outcome of a `otThreadLocateAnycastDestination()`
|
* This function pointer type defines the callback to notify the outcome of a `otThreadLocateAnycastDestination()`
|
||||||
@@ -982,7 +982,7 @@ void otThreadSetDiscoveryRequestCallback(otInstance * aInsta
|
|||||||
* @param[in] aRloc16 The RLOC16 of the destination if found, otherwise invalid RLOC16 (0xfffe).
|
* @param[in] aRloc16 The RLOC16 of the destination if found, otherwise invalid RLOC16 (0xfffe).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otThreadAnycastLocatorCallback)(void * aContext,
|
typedef void (*otThreadAnycastLocatorCallback)(void *aContext,
|
||||||
otError aError,
|
otError aError,
|
||||||
const otIp6Address *aMeshLocalAddress,
|
const otIp6Address *aMeshLocalAddress,
|
||||||
uint16_t aRloc16);
|
uint16_t aRloc16);
|
||||||
@@ -1004,10 +1004,10 @@ typedef void (*otThreadAnycastLocatorCallback)(void * aContext,
|
|||||||
* @retval OT_ERROR_NO_BUFS Out of buffer to prepare and send the request message.
|
* @retval OT_ERROR_NO_BUFS Out of buffer to prepare and send the request message.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadLocateAnycastDestination(otInstance * aInstance,
|
otError otThreadLocateAnycastDestination(otInstance *aInstance,
|
||||||
const otIp6Address * aAnycastAddress,
|
const otIp6Address *aAnycastAddress,
|
||||||
otThreadAnycastLocatorCallback aCallback,
|
otThreadAnycastLocatorCallback aCallback,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function indicates whether an anycast locate request is currently in progress.
|
* This function indicates whether an anycast locate request is currently in progress.
|
||||||
@@ -1032,9 +1032,9 @@ bool otThreadIsAnycastLocateInProgress(otInstance *aInstance);
|
|||||||
* @param[in] aMlIid The ML-IID of the ADDR_NTF.ntf message.
|
* @param[in] aMlIid The ML-IID of the ADDR_NTF.ntf message.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otThreadSendAddressNotification(otInstance * aInstance,
|
void otThreadSendAddressNotification(otInstance *aInstance,
|
||||||
otIp6Address * aDestination,
|
otIp6Address *aDestination,
|
||||||
otIp6Address * aTarget,
|
otIp6Address *aTarget,
|
||||||
otIp6InterfaceIdentifier *aMlIid);
|
otIp6InterfaceIdentifier *aMlIid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1051,8 +1051,8 @@ void otThreadSendAddressNotification(otInstance * aInstance,
|
|||||||
* @retval OT_ERROR_NO_BUFS If insufficient message buffers available.
|
* @retval OT_ERROR_NO_BUFS If insufficient message buffers available.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadSendProactiveBackboneNotification(otInstance * aInstance,
|
otError otThreadSendProactiveBackboneNotification(otInstance *aInstance,
|
||||||
otIp6Address * aTarget,
|
otIp6Address *aTarget,
|
||||||
otIp6InterfaceIdentifier *aMlIid,
|
otIp6InterfaceIdentifier *aMlIid,
|
||||||
uint32_t aTimeSinceLastTransaction);
|
uint32_t aTimeSinceLastTransaction);
|
||||||
|
|
||||||
|
|||||||
@@ -498,10 +498,10 @@ otError otThreadGetChildInfoByIndex(otInstance *aInstance, uint16_t aChildIndex,
|
|||||||
* @sa otThreadGetChildInfoByIndex
|
* @sa otThreadGetChildInfoByIndex
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
otError otThreadGetChildNextIp6Address(otInstance * aInstance,
|
otError otThreadGetChildNextIp6Address(otInstance *aInstance,
|
||||||
uint16_t aChildIndex,
|
uint16_t aChildIndex,
|
||||||
otChildIp6AddressIterator *aIterator,
|
otChildIp6AddressIterator *aIterator,
|
||||||
otIp6Address * aAddress);
|
otIp6Address *aAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current Router ID Sequence.
|
* Get the current Router ID Sequence.
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ typedef struct otUdpReceiver
|
|||||||
{
|
{
|
||||||
struct otUdpReceiver *mNext; ///< A pointer to the next UDP receiver (internal use only).
|
struct otUdpReceiver *mNext; ///< A pointer to the next UDP receiver (internal use only).
|
||||||
otUdpHandler mHandler; ///< A function pointer to the receiver callback.
|
otUdpHandler mHandler; ///< A function pointer to the receiver callback.
|
||||||
void * mContext; ///< A pointer to application-specific context.
|
void *mContext; ///< A pointer to application-specific context.
|
||||||
} otUdpReceiver;
|
} otUdpReceiver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -125,8 +125,8 @@ typedef struct otUdpSocket
|
|||||||
otSockAddr mSockName; ///< The local IPv6 socket address.
|
otSockAddr mSockName; ///< The local IPv6 socket address.
|
||||||
otSockAddr mPeerName; ///< The peer IPv6 socket address.
|
otSockAddr mPeerName; ///< The peer IPv6 socket address.
|
||||||
otUdpReceive mHandler; ///< A function pointer to the application callback.
|
otUdpReceive mHandler; ///< A function pointer to the application callback.
|
||||||
void * mContext; ///< A pointer to application-specific context.
|
void *mContext; ///< A pointer to application-specific context.
|
||||||
void * mHandle; ///< A handle to platform's UDP.
|
void *mHandle; ///< A handle to platform's UDP.
|
||||||
struct otUdpSocket *mNext; ///< A pointer to the next UDP socket (internal use only).
|
struct otUdpSocket *mNext; ///< A pointer to the next UDP socket (internal use only).
|
||||||
} otUdpSocket;
|
} otUdpSocket;
|
||||||
|
|
||||||
@@ -278,11 +278,11 @@ otUdpSocket *otUdpGetSockets(otInstance *aInstance);
|
|||||||
* @param[in] aContext A pointer to application-specific context.
|
* @param[in] aContext A pointer to application-specific context.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef void (*otUdpForwarder)(otMessage * aMessage,
|
typedef void (*otUdpForwarder)(otMessage *aMessage,
|
||||||
uint16_t aPeerPort,
|
uint16_t aPeerPort,
|
||||||
otIp6Address *aPeerAddr,
|
otIp6Address *aPeerAddr,
|
||||||
uint16_t aSockPort,
|
uint16_t aSockPort,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set UDP forward callback to deliver UDP packets to host.
|
* Set UDP forward callback to deliver UDP packets to host.
|
||||||
@@ -306,8 +306,8 @@ void otUdpForwardSetForwarder(otInstance *aInstance, otUdpForwarder aForwarder,
|
|||||||
* @warning No matter the call success or fail, the message is freed.
|
* @warning No matter the call success or fail, the message is freed.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void otUdpForwardReceive(otInstance * aInstance,
|
void otUdpForwardReceive(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
uint16_t aPeerPort,
|
uint16_t aPeerPort,
|
||||||
const otIp6Address *aPeerAddr,
|
const otIp6Address *aPeerAddr,
|
||||||
uint16_t aSockPort);
|
uint16_t aSockPort);
|
||||||
|
|||||||
+27
-27
@@ -208,7 +208,7 @@ const char *Interpreter::LinkModeToString(const otLinkModeConfig &aLinkMode, cha
|
|||||||
template <> otError Interpreter::Process<Cmd("diag")>(Arg aArgs[])
|
template <> otError Interpreter::Process<Cmd("diag")>(Arg aArgs[])
|
||||||
{
|
{
|
||||||
otError error;
|
otError error;
|
||||||
char * args[kMaxArgs];
|
char *args[kMaxArgs];
|
||||||
char output[OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE];
|
char output[OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE];
|
||||||
|
|
||||||
// all diagnostics related features are processed within diagnostics module
|
// all diagnostics related features are processed within diagnostics module
|
||||||
@@ -340,7 +340,7 @@ otError Interpreter::ParseEnableOrDisable(const Arg &aArg, bool &aEnable)
|
|||||||
otError Interpreter::ParseJoinerDiscerner(Arg &aArg, otJoinerDiscerner &aDiscerner)
|
otError Interpreter::ParseJoinerDiscerner(Arg &aArg, otJoinerDiscerner &aDiscerner)
|
||||||
{
|
{
|
||||||
otError error;
|
otError error;
|
||||||
char * separator;
|
char *separator;
|
||||||
|
|
||||||
VerifyOrExit(!aArg.IsEmpty(), error = OT_ERROR_INVALID_ARGS);
|
VerifyOrExit(!aArg.IsEmpty(), error = OT_ERROR_INVALID_ARGS);
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ exit:
|
|||||||
otError Interpreter::ParsePingInterval(const Arg &aArg, uint32_t &aInterval)
|
otError Interpreter::ParsePingInterval(const Arg &aArg, uint32_t &aInterval)
|
||||||
{
|
{
|
||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
const char * string = aArg.GetCString();
|
const char *string = aArg.GetCString();
|
||||||
const uint32_t msFactor = 1000;
|
const uint32_t msFactor = 1000;
|
||||||
uint32_t factor = msFactor;
|
uint32_t factor = msFactor;
|
||||||
|
|
||||||
@@ -457,10 +457,10 @@ const char *Interpreter::PreferenceToString(signed int aPreference)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
otError Interpreter::ParseToIp6Address(otInstance * aInstance,
|
otError Interpreter::ParseToIp6Address(otInstance *aInstance,
|
||||||
const Arg & aArg,
|
const Arg &aArg,
|
||||||
otIp6Address &aAddress,
|
otIp6Address &aAddress,
|
||||||
bool & aSynthesized)
|
bool &aSynthesized)
|
||||||
{
|
{
|
||||||
Error error = kErrorNone;
|
Error error = kErrorNone;
|
||||||
|
|
||||||
@@ -959,7 +959,7 @@ template <> otError Interpreter::Process<Cmd("nat64")>(Arg aArgs[])
|
|||||||
};
|
};
|
||||||
static const uint8_t kNat64CounterTableHeaderColumns[] = {15, 25, 25};
|
static const uint8_t kNat64CounterTableHeaderColumns[] = {15, 25, 25};
|
||||||
static const char *const kNat64CounterTableSubHeader[] = {
|
static const char *const kNat64CounterTableSubHeader[] = {
|
||||||
"Protocol", "Pkts", "Bytes", "Pkts", "Bytes",
|
"Protocol", "Pkts", "Bytes", "Pkts", "Bytes",
|
||||||
};
|
};
|
||||||
static const uint8_t kNat64CounterTableSubHeaderColumns[] = {
|
static const uint8_t kNat64CounterTableSubHeaderColumns[] = {
|
||||||
15, 10, 14, 10, 14,
|
15, 10, 14, 10, 14,
|
||||||
@@ -1574,7 +1574,7 @@ template <> otError Interpreter::Process<Cmd("bufferinfo")>(Arg aArgs[])
|
|||||||
struct BufferInfoName
|
struct BufferInfoName
|
||||||
{
|
{
|
||||||
const otMessageQueueInfo otBufferInfo::*mQueuePtr;
|
const otMessageQueueInfo otBufferInfo::*mQueuePtr;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const BufferInfoName kBufferInfoNames[] = {
|
static const BufferInfoName kBufferInfoNames[] = {
|
||||||
@@ -2384,7 +2384,7 @@ template <> otError Interpreter::Process<Cmd("coex")>(Arg aArgs[])
|
|||||||
struct RadioCoexMetricName
|
struct RadioCoexMetricName
|
||||||
{
|
{
|
||||||
const uint32_t otRadioCoexMetrics::*mValuePtr;
|
const uint32_t otRadioCoexMetrics::*mValuePtr;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const RadioCoexMetricName kTxMetricNames[] = {
|
static const RadioCoexMetricName kTxMetricNames[] = {
|
||||||
@@ -2517,7 +2517,7 @@ template <> otError Interpreter::Process<Cmd("counters")>(Arg aArgs[])
|
|||||||
struct BrCounterName
|
struct BrCounterName
|
||||||
{
|
{
|
||||||
const otPacketsAndBytes otBorderRoutingCounters::*mPacketsAndBytes;
|
const otPacketsAndBytes otBorderRoutingCounters::*mPacketsAndBytes;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const BrCounterName kCounterNames[] = {
|
static const BrCounterName kCounterNames[] = {
|
||||||
@@ -2614,7 +2614,7 @@ template <> otError Interpreter::Process<Cmd("counters")>(Arg aArgs[])
|
|||||||
struct MacCounterName
|
struct MacCounterName
|
||||||
{
|
{
|
||||||
const uint32_t otMacCounters::*mValuePtr;
|
const uint32_t otMacCounters::*mValuePtr;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MacCounterName kTxCounterNames[] = {
|
static const MacCounterName kTxCounterNames[] = {
|
||||||
@@ -2716,7 +2716,7 @@ template <> otError Interpreter::Process<Cmd("counters")>(Arg aArgs[])
|
|||||||
struct MleCounterName
|
struct MleCounterName
|
||||||
{
|
{
|
||||||
const uint16_t otMleCounters::*mValuePtr;
|
const uint16_t otMleCounters::*mValuePtr;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MleCounterName kCounterNames[] = {
|
static const MleCounterName kCounterNames[] = {
|
||||||
@@ -2742,7 +2742,7 @@ template <> otError Interpreter::Process<Cmd("counters")>(Arg aArgs[])
|
|||||||
struct MleTimeCounterName
|
struct MleTimeCounterName
|
||||||
{
|
{
|
||||||
const uint64_t otMleCounters::*mValuePtr;
|
const uint64_t otMleCounters::*mValuePtr;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MleTimeCounterName kTimeCounterNames[] = {
|
static const MleTimeCounterName kTimeCounterNames[] = {
|
||||||
@@ -2802,7 +2802,7 @@ template <> otError Interpreter::Process<Cmd("counters")>(Arg aArgs[])
|
|||||||
struct IpCounterName
|
struct IpCounterName
|
||||||
{
|
{
|
||||||
const uint32_t otIpCounters::*mValuePtr;
|
const uint32_t otIpCounters::*mValuePtr;
|
||||||
const char * mName;
|
const char *mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const IpCounterName kCounterNames[] = {
|
static const IpCounterName kCounterNames[] = {
|
||||||
@@ -4163,10 +4163,10 @@ template <> otError Interpreter::Process<Cmd("leaderweight")>(Arg aArgs[])
|
|||||||
#endif // OPENTHREAD_FTD
|
#endif // OPENTHREAD_FTD
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
|
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
|
||||||
void Interpreter::HandleLinkMetricsReport(const otIp6Address * aAddress,
|
void Interpreter::HandleLinkMetricsReport(const otIp6Address *aAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
uint8_t aStatus,
|
uint8_t aStatus,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
static_cast<Interpreter *>(aContext)->HandleLinkMetricsReport(aAddress, aMetricsValues, aStatus);
|
static_cast<Interpreter *>(aContext)->HandleLinkMetricsReport(aAddress, aMetricsValues, aStatus);
|
||||||
}
|
}
|
||||||
@@ -4196,7 +4196,7 @@ void Interpreter::PrintLinkMetricsValue(const otLinkMetricsValues *aMetricsValue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleLinkMetricsReport(const otIp6Address * aAddress,
|
void Interpreter::HandleLinkMetricsReport(const otIp6Address *aAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
uint8_t aStatus)
|
uint8_t aStatus)
|
||||||
{
|
{
|
||||||
@@ -4233,15 +4233,15 @@ void Interpreter::HandleLinkMetricsMgmtResponse(const otIp6Address *aAddress, ui
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
void Interpreter::HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
static_cast<Interpreter *>(aContext)->HandleLinkMetricsEnhAckProbingIe(aShortAddress, aExtAddress, aMetricsValues);
|
static_cast<Interpreter *>(aContext)->HandleLinkMetricsEnhAckProbingIe(aShortAddress, aExtAddress, aMetricsValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
void Interpreter::HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues)
|
const otLinkMetricsValues *aMetricsValues)
|
||||||
{
|
{
|
||||||
OutputFormat("Received Link Metrics data in Enh Ack from neighbor, short address:0x%02x , extended address:",
|
OutputFormat("Received Link Metrics data in Enh Ack from neighbor, short address:0x%02x , extended address:",
|
||||||
@@ -4525,7 +4525,7 @@ otError Interpreter::ProcessLinkMetricsMgmt(Arg aArgs[])
|
|||||||
{
|
{
|
||||||
otLinkMetricsEnhAckFlags enhAckFlags;
|
otLinkMetricsEnhAckFlags enhAckFlags;
|
||||||
otLinkMetrics linkMetrics;
|
otLinkMetrics linkMetrics;
|
||||||
otLinkMetrics * pLinkMetrics = &linkMetrics;
|
otLinkMetrics *pLinkMetrics = &linkMetrics;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cli linkmetrics mgmt enhanced-ack clear
|
* @cli linkmetrics mgmt enhanced-ack clear
|
||||||
@@ -4630,7 +4630,7 @@ exit:
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleLocateResult(void * aContext,
|
void Interpreter::HandleLocateResult(void *aContext,
|
||||||
otError aError,
|
otError aError,
|
||||||
const otIp6Address *aMeshLocalAddress,
|
const otIp6Address *aMeshLocalAddress,
|
||||||
uint16_t aRloc16)
|
uint16_t aRloc16)
|
||||||
@@ -4786,7 +4786,7 @@ exit:
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleMlrRegResult(void * aContext,
|
void Interpreter::HandleMlrRegResult(void *aContext,
|
||||||
otError aError,
|
otError aError,
|
||||||
uint8_t aMlrStatus,
|
uint8_t aMlrStatus,
|
||||||
const otIp6Address *aFailedAddresses,
|
const otIp6Address *aFailedAddresses,
|
||||||
@@ -6841,7 +6841,7 @@ template <> otError Interpreter::Process<Cmd("trel")>(Arg aArgs[])
|
|||||||
{
|
{
|
||||||
uint16_t index = 0;
|
uint16_t index = 0;
|
||||||
otTrelPeerIterator iterator;
|
otTrelPeerIterator iterator;
|
||||||
const otTrelPeer * peer;
|
const otTrelPeer *peer;
|
||||||
bool isTable = true;
|
bool isTable = true;
|
||||||
|
|
||||||
if (aArgs[1] == "list")
|
if (aArgs[1] == "list")
|
||||||
@@ -6936,16 +6936,16 @@ exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleDiagnosticGetResponse(otError aError,
|
void Interpreter::HandleDiagnosticGetResponse(otError aError,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
static_cast<Interpreter *>(aContext)->HandleDiagnosticGetResponse(
|
static_cast<Interpreter *>(aContext)->HandleDiagnosticGetResponse(
|
||||||
aError, aMessage, static_cast<const Ip6::MessageInfo *>(aMessageInfo));
|
aError, aMessage, static_cast<const Ip6::MessageInfo *>(aMessageInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::HandleDiagnosticGetResponse(otError aError,
|
void Interpreter::HandleDiagnosticGetResponse(otError aError,
|
||||||
const otMessage * aMessage,
|
const otMessage *aMessage,
|
||||||
const Ip6::MessageInfo *aMessageInfo)
|
const Ip6::MessageInfo *aMessageInfo)
|
||||||
{
|
{
|
||||||
uint8_t buf[16];
|
uint8_t buf[16];
|
||||||
|
|||||||
+18
-15
@@ -153,7 +153,10 @@ public:
|
|||||||
* @returns Whether the interpreter is initialized.
|
* @returns Whether the interpreter is initialized.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static bool IsInitialized(void) { return sInterpreter != nullptr; }
|
static bool IsInitialized(void)
|
||||||
|
{
|
||||||
|
return sInterpreter != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method interprets a CLI command.
|
* This method interprets a CLI command.
|
||||||
@@ -251,10 +254,10 @@ public:
|
|||||||
* @retval OT_ERROR_INVALID_STATE No valid NAT64 prefix in the network data.
|
* @retval OT_ERROR_INVALID_STATE No valid NAT64 prefix in the network data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static otError ParseToIp6Address(otInstance * aInstance,
|
static otError ParseToIp6Address(otInstance *aInstance,
|
||||||
const Arg & aArg,
|
const Arg &aArg,
|
||||||
otIp6Address &aAddress,
|
otIp6Address &aAddress,
|
||||||
bool & aSynthesized);
|
bool &aSynthesized);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static Interpreter *sInterpreter;
|
static Interpreter *sInterpreter;
|
||||||
@@ -392,14 +395,14 @@ private:
|
|||||||
otError ParseLinkMetricsFlags(otLinkMetrics &aLinkMetrics, const Arg &aFlags);
|
otError ParseLinkMetricsFlags(otLinkMetrics &aLinkMetrics, const Arg &aFlags);
|
||||||
#endif
|
#endif
|
||||||
#if OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE
|
#if OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE
|
||||||
static void HandleLocateResult(void * aContext,
|
static void HandleLocateResult(void *aContext,
|
||||||
otError aError,
|
otError aError,
|
||||||
const otIp6Address *aMeshLocalAddress,
|
const otIp6Address *aMeshLocalAddress,
|
||||||
uint16_t aRloc16);
|
uint16_t aRloc16);
|
||||||
void HandleLocateResult(otError aError, const otIp6Address *aMeshLocalAddress, uint16_t aRloc16);
|
void HandleLocateResult(otError aError, const otIp6Address *aMeshLocalAddress, uint16_t aRloc16);
|
||||||
#endif
|
#endif
|
||||||
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
|
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
|
||||||
static void HandleMlrRegResult(void * aContext,
|
static void HandleMlrRegResult(void *aContext,
|
||||||
otError aError,
|
otError aError,
|
||||||
uint8_t aMlrStatus,
|
uint8_t aMlrStatus,
|
||||||
const otIp6Address *aFailedAddresses,
|
const otIp6Address *aFailedAddresses,
|
||||||
@@ -432,9 +435,9 @@ private:
|
|||||||
#if OPENTHREAD_FTD || (OPENTHREAD_MTD && OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE)
|
#if OPENTHREAD_FTD || (OPENTHREAD_MTD && OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE)
|
||||||
void HandleDiagnosticGetResponse(otError aError, const otMessage *aMessage, const Ip6::MessageInfo *aMessageInfo);
|
void HandleDiagnosticGetResponse(otError aError, const otMessage *aMessage, const Ip6::MessageInfo *aMessageInfo);
|
||||||
static void HandleDiagnosticGetResponse(otError aError,
|
static void HandleDiagnosticGetResponse(otError aError,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
void OutputMode(uint8_t aIndentSize, const otLinkModeConfig &aMode);
|
void OutputMode(uint8_t aIndentSize, const otLinkModeConfig &aMode);
|
||||||
void OutputConnectivity(uint8_t aIndentSize, const otNetworkDiagConnectivity &aConnectivity);
|
void OutputConnectivity(uint8_t aIndentSize, const otNetworkDiagConnectivity &aConnectivity);
|
||||||
@@ -475,12 +478,12 @@ private:
|
|||||||
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
|
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
|
||||||
void PrintLinkMetricsValue(const otLinkMetricsValues *aMetricsValues);
|
void PrintLinkMetricsValue(const otLinkMetricsValues *aMetricsValues);
|
||||||
|
|
||||||
static void HandleLinkMetricsReport(const otIp6Address * aAddress,
|
static void HandleLinkMetricsReport(const otIp6Address *aAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
uint8_t aStatus,
|
uint8_t aStatus,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
void HandleLinkMetricsReport(const otIp6Address * aAddress,
|
void HandleLinkMetricsReport(const otIp6Address *aAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
uint8_t aStatus);
|
uint8_t aStatus);
|
||||||
|
|
||||||
@@ -489,12 +492,12 @@ private:
|
|||||||
void HandleLinkMetricsMgmtResponse(const otIp6Address *aAddress, uint8_t aStatus);
|
void HandleLinkMetricsMgmtResponse(const otIp6Address *aAddress, uint8_t aStatus);
|
||||||
|
|
||||||
static void HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
static void HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues,
|
const otLinkMetricsValues *aMetricsValues,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
|
|
||||||
void HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
void HandleLinkMetricsEnhAckProbingIe(otShortAddress aShortAddress,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
const otLinkMetricsValues *aMetricsValues);
|
const otLinkMetricsValues *aMetricsValues);
|
||||||
|
|
||||||
const char *LinkMetricsStatusToStr(uint8_t aStatus);
|
const char *LinkMetricsStatusToStr(uint8_t aStatus);
|
||||||
@@ -518,7 +521,7 @@ private:
|
|||||||
|
|
||||||
const otCliCommand *mUserCommands;
|
const otCliCommand *mUserCommands;
|
||||||
uint8_t mUserCommandsLength;
|
uint8_t mUserCommandsLength;
|
||||||
void * mUserCommandsContext;
|
void *mUserCommandsContext;
|
||||||
bool mCommandIsPending;
|
bool mCommandIsPending;
|
||||||
|
|
||||||
TimerMilliContext mTimer;
|
TimerMilliContext mTimer;
|
||||||
|
|||||||
+10
-10
@@ -75,7 +75,7 @@ Coap::Coap(otInstance *aInstance, OutputImplementer &aOutputImplementer)
|
|||||||
otError Coap::CancelResourceSubscription(void)
|
otError Coap::CancelResourceSubscription(void)
|
||||||
{
|
{
|
||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
otMessage * message = nullptr;
|
otMessage *message = nullptr;
|
||||||
otMessageInfo messageInfo;
|
otMessageInfo messageInfo;
|
||||||
|
|
||||||
memset(&messageInfo, 0, sizeof(messageInfo));
|
memset(&messageInfo, 0, sizeof(messageInfo));
|
||||||
@@ -192,7 +192,7 @@ exit:
|
|||||||
template <> otError Coap::Process<Cmd("set")>(Arg aArgs[])
|
template <> otError Coap::Process<Cmd("set")>(Arg aArgs[])
|
||||||
{
|
{
|
||||||
#if OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
|
||||||
otMessage * notificationMessage = nullptr;
|
otMessage *notificationMessage = nullptr;
|
||||||
otMessageInfo messageInfo;
|
otMessageInfo messageInfo;
|
||||||
#endif
|
#endif
|
||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
@@ -273,7 +273,7 @@ template <> otError Coap::Process<Cmd("stop")>(Arg aArgs[])
|
|||||||
template <> otError Coap::Process<Cmd("parameters")>(Arg aArgs[])
|
template <> otError Coap::Process<Cmd("parameters")>(Arg aArgs[])
|
||||||
{
|
{
|
||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
bool * defaultTxParameters;
|
bool *defaultTxParameters;
|
||||||
otCoapTxParameters *txParameters;
|
otCoapTxParameters *txParameters;
|
||||||
|
|
||||||
if (aArgs[0] == "request")
|
if (aArgs[0] == "request")
|
||||||
@@ -362,7 +362,7 @@ otError Coap::ProcessRequest(Arg aArgs[], otCoapCode aCoapCode)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
otMessage * message = nullptr;
|
otMessage *message = nullptr;
|
||||||
otMessageInfo messageInfo;
|
otMessageInfo messageInfo;
|
||||||
uint16_t payloadLength = 0;
|
uint16_t payloadLength = 0;
|
||||||
|
|
||||||
@@ -800,8 +800,8 @@ exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
|
||||||
void Coap::HandleNotificationResponse(void * aContext,
|
void Coap::HandleNotificationResponse(void *aContext,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otError aError)
|
otError aError)
|
||||||
{
|
{
|
||||||
@@ -874,7 +874,7 @@ void Coap::HandleResponse(otMessage *aMessage, const otMessageInfo *aMessageInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
otError Coap::BlockwiseReceiveHook(void * aContext,
|
otError Coap::BlockwiseReceiveHook(void *aContext,
|
||||||
const uint8_t *aBlock,
|
const uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
@@ -903,11 +903,11 @@ otError Coap::BlockwiseReceiveHook(const uint8_t *aBlock,
|
|||||||
return OT_ERROR_NONE;
|
return OT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
otError Coap::BlockwiseTransmitHook(void * aContext,
|
otError Coap::BlockwiseTransmitHook(void *aContext,
|
||||||
uint8_t * aBlock,
|
uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t *aBlockLength,
|
uint16_t *aBlockLength,
|
||||||
bool * aMore)
|
bool *aMore)
|
||||||
{
|
{
|
||||||
return static_cast<Coap *>(aContext)->BlockwiseTransmitHook(aBlock, aPosition, aBlockLength, aMore);
|
return static_cast<Coap *>(aContext)->BlockwiseTransmitHook(aBlock, aPosition, aBlockLength, aMore);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,8 +106,8 @@ private:
|
|||||||
void HandleRequest(otMessage *aMessage, const otMessageInfo *aMessageInfo);
|
void HandleRequest(otMessage *aMessage, const otMessageInfo *aMessageInfo);
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
|
||||||
static void HandleNotificationResponse(void * aContext,
|
static void HandleNotificationResponse(void *aContext,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otError aError);
|
otError aError);
|
||||||
void HandleNotificationResponse(otMessage *aMessage, const otMessageInfo *aMessageInfo, otError aError);
|
void HandleNotificationResponse(otMessage *aMessage, const otMessageInfo *aMessageInfo, otError aError);
|
||||||
@@ -118,7 +118,7 @@ private:
|
|||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
|
|
||||||
static otError BlockwiseReceiveHook(void * aContext,
|
static otError BlockwiseReceiveHook(void *aContext,
|
||||||
const uint8_t *aBlock,
|
const uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
@@ -129,11 +129,11 @@ private:
|
|||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
bool aMore,
|
bool aMore,
|
||||||
uint32_t aTotalLength);
|
uint32_t aTotalLength);
|
||||||
static otError BlockwiseTransmitHook(void * aContext,
|
static otError BlockwiseTransmitHook(void *aContext,
|
||||||
uint8_t * aBlock,
|
uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t *aBlockLength,
|
uint16_t *aBlockLength,
|
||||||
bool * aMore);
|
bool *aMore);
|
||||||
otError BlockwiseTransmitHook(uint8_t *aBlock, uint32_t aPosition, uint16_t *aBlockLength, bool *aMore);
|
otError BlockwiseTransmitHook(uint8_t *aBlock, uint32_t aPosition, uint16_t *aBlockLength, bool *aMore);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -694,7 +694,7 @@ exit:
|
|||||||
#endif // CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER
|
#endif // CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
otError CoapSecure::BlockwiseReceiveHook(void * aContext,
|
otError CoapSecure::BlockwiseReceiveHook(void *aContext,
|
||||||
const uint8_t *aBlock,
|
const uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
@@ -724,11 +724,11 @@ otError CoapSecure::BlockwiseReceiveHook(const uint8_t *aBlock,
|
|||||||
return OT_ERROR_NONE;
|
return OT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
otError CoapSecure::BlockwiseTransmitHook(void * aContext,
|
otError CoapSecure::BlockwiseTransmitHook(void *aContext,
|
||||||
uint8_t * aBlock,
|
uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t *aBlockLength,
|
uint16_t *aBlockLength,
|
||||||
bool * aMore)
|
bool *aMore)
|
||||||
{
|
{
|
||||||
return static_cast<CoapSecure *>(aContext)->BlockwiseTransmitHook(aBlock, aPosition, aBlockLength, aMore);
|
return static_cast<CoapSecure *>(aContext)->BlockwiseTransmitHook(aBlock, aPosition, aBlockLength, aMore);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ private:
|
|||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
|
|
||||||
static otError BlockwiseReceiveHook(void * aContext,
|
static otError BlockwiseReceiveHook(void *aContext,
|
||||||
const uint8_t *aBlock,
|
const uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
@@ -122,11 +122,11 @@ private:
|
|||||||
uint16_t aBlockLength,
|
uint16_t aBlockLength,
|
||||||
bool aMore,
|
bool aMore,
|
||||||
uint32_t aTotalLength);
|
uint32_t aTotalLength);
|
||||||
static otError BlockwiseTransmitHook(void * aContext,
|
static otError BlockwiseTransmitHook(void *aContext,
|
||||||
uint8_t * aBlock,
|
uint8_t *aBlock,
|
||||||
uint32_t aPosition,
|
uint32_t aPosition,
|
||||||
uint16_t *aBlockLength,
|
uint16_t *aBlockLength,
|
||||||
bool * aMore);
|
bool *aMore);
|
||||||
otError BlockwiseTransmitHook(uint8_t *aBlock, uint32_t aPosition, uint16_t *aBlockLength, bool *aMore);
|
otError BlockwiseTransmitHook(uint8_t *aBlock, uint32_t aPosition, uint16_t *aBlockLength, bool *aMore);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -385,16 +385,16 @@ const char *Commissioner::StateToString(otCommissionerState aState)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Commissioner::HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
void Commissioner::HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
||||||
const otJoinerInfo * aJoinerInfo,
|
const otJoinerInfo *aJoinerInfo,
|
||||||
const otExtAddress * aJoinerId,
|
const otExtAddress *aJoinerId,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
static_cast<Commissioner *>(aContext)->HandleJoinerEvent(aEvent, aJoinerInfo, aJoinerId);
|
static_cast<Commissioner *>(aContext)->HandleJoinerEvent(aEvent, aJoinerInfo, aJoinerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Commissioner::HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
void Commissioner::HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
||||||
const otJoinerInfo * aJoinerInfo,
|
const otJoinerInfo *aJoinerInfo,
|
||||||
const otExtAddress * aJoinerId)
|
const otExtAddress *aJoinerId)
|
||||||
{
|
{
|
||||||
static const char *const kEventStrings[] = {
|
static const char *const kEventStrings[] = {
|
||||||
"start", // (0) OT_COMMISSIONER_JOINER_START
|
"start", // (0) OT_COMMISSIONER_JOINER_START
|
||||||
@@ -476,7 +476,7 @@ exit:
|
|||||||
void Commissioner::HandleEnergyReport(uint32_t aChannelMask,
|
void Commissioner::HandleEnergyReport(uint32_t aChannelMask,
|
||||||
const uint8_t *aEnergyList,
|
const uint8_t *aEnergyList,
|
||||||
uint8_t aEnergyListLength,
|
uint8_t aEnergyListLength,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
static_cast<Commissioner *>(aContext)->HandleEnergyReport(aChannelMask, aEnergyList, aEnergyListLength);
|
static_cast<Commissioner *>(aContext)->HandleEnergyReport(aChannelMask, aEnergyList, aEnergyListLength);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,17 +88,17 @@ private:
|
|||||||
void HandleStateChanged(otCommissionerState aState);
|
void HandleStateChanged(otCommissionerState aState);
|
||||||
|
|
||||||
static void HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
static void HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
||||||
const otJoinerInfo * aJoinerInfo,
|
const otJoinerInfo *aJoinerInfo,
|
||||||
const otExtAddress * aJoinerId,
|
const otExtAddress *aJoinerId,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
void HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
void HandleJoinerEvent(otCommissionerJoinerEvent aEvent,
|
||||||
const otJoinerInfo * aJoinerInfo,
|
const otJoinerInfo *aJoinerInfo,
|
||||||
const otExtAddress * aJoinerId);
|
const otExtAddress *aJoinerId);
|
||||||
|
|
||||||
static void HandleEnergyReport(uint32_t aChannelMask,
|
static void HandleEnergyReport(uint32_t aChannelMask,
|
||||||
const uint8_t *aEnergyList,
|
const uint8_t *aEnergyList,
|
||||||
uint8_t aEnergyListLength,
|
uint8_t aEnergyListLength,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
void HandleEnergyReport(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength);
|
void HandleEnergyReport(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength);
|
||||||
|
|
||||||
static void HandlePanIdConflict(uint16_t aPanId, uint32_t aChannelMask, void *aContext);
|
static void HandlePanIdConflict(uint16_t aPanId, uint32_t aChannelMask, void *aContext);
|
||||||
|
|||||||
+12
-5
@@ -90,9 +90,14 @@ public:
|
|||||||
OutputImplementer(otCliOutputCallback aCallback, void *aCallbackContext);
|
OutputImplementer(otCliOutputCallback aCallback, void *aCallbackContext);
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
|
#if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
|
||||||
void SetEmittingCommandOutput(bool aEmittingOutput) { mEmittingCommandOutput = aEmittingOutput; }
|
void SetEmittingCommandOutput(bool aEmittingOutput)
|
||||||
|
{
|
||||||
|
mEmittingCommandOutput = aEmittingOutput;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
void SetEmittingCommandOutput(bool) {}
|
void SetEmittingCommandOutput(bool)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -101,7 +106,7 @@ private:
|
|||||||
void OutputV(const char *aFormat, va_list aArguments);
|
void OutputV(const char *aFormat, va_list aArguments);
|
||||||
|
|
||||||
otCliOutputCallback mCallback;
|
otCliOutputCallback mCallback;
|
||||||
void * mCallbackContext;
|
void *mCallbackContext;
|
||||||
#if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
|
#if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
|
||||||
char mOutputString[kInputOutputLogStringSize];
|
char mOutputString[kInputOutputLogStringSize];
|
||||||
uint16_t mOutputLength;
|
uint16_t mOutputLength;
|
||||||
@@ -507,7 +512,9 @@ protected:
|
|||||||
#if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
|
#if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
|
||||||
void LogInput(const Arg *aArgs);
|
void LogInput(const Arg *aArgs);
|
||||||
#else
|
#else
|
||||||
void LogInput(const Arg *) {}
|
void LogInput(const Arg *)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -516,7 +523,7 @@ private:
|
|||||||
void OutputTableHeader(uint8_t aNumColumns, const char *const aTitles[], const uint8_t aWidths[]);
|
void OutputTableHeader(uint8_t aNumColumns, const char *const aTitles[], const uint8_t aWidths[]);
|
||||||
void OutputTableSeparator(uint8_t aNumColumns, const uint8_t aWidths[]);
|
void OutputTableSeparator(uint8_t aNumColumns, const uint8_t aWidths[]);
|
||||||
|
|
||||||
otInstance * mInstance;
|
otInstance *mInstance;
|
||||||
OutputImplementer &mImplementer;
|
OutputImplementer &mImplementer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ template <> otError SrpClient::Process<Cmd("host")>(Arg aArgs[])
|
|||||||
{
|
{
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
char * hostName;
|
char *hostName;
|
||||||
|
|
||||||
VerifyOrExit(aArgs[2].IsEmpty(), error = OT_ERROR_INVALID_ARGS);
|
VerifyOrExit(aArgs[2].IsEmpty(), error = OT_ERROR_INVALID_ARGS);
|
||||||
hostName = otSrpClientBuffersGetHostNameString(GetInstancePtr(), &size);
|
hostName = otSrpClientBuffersGetHostNameString(GetInstancePtr(), &size);
|
||||||
@@ -359,9 +359,9 @@ otError SrpClient::ProcessServiceAdd(Arg aArgs[])
|
|||||||
|
|
||||||
otSrpClientBuffersServiceEntry *entry = nullptr;
|
otSrpClientBuffersServiceEntry *entry = nullptr;
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
char * string;
|
char *string;
|
||||||
otError error;
|
otError error;
|
||||||
char * label;
|
char *label;
|
||||||
|
|
||||||
entry = otSrpClientBuffersAllocateService(GetInstancePtr());
|
entry = otSrpClientBuffersAllocateService(GetInstancePtr());
|
||||||
|
|
||||||
@@ -562,17 +562,17 @@ template <> otError SrpClient::Process<Cmd("ttl")>(Arg aArgs[])
|
|||||||
|
|
||||||
void SrpClient::HandleCallback(otError aError,
|
void SrpClient::HandleCallback(otError aError,
|
||||||
const otSrpClientHostInfo *aHostInfo,
|
const otSrpClientHostInfo *aHostInfo,
|
||||||
const otSrpClientService * aServices,
|
const otSrpClientService *aServices,
|
||||||
const otSrpClientService * aRemovedServices,
|
const otSrpClientService *aRemovedServices,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
static_cast<SrpClient *>(aContext)->HandleCallback(aError, aHostInfo, aServices, aRemovedServices);
|
static_cast<SrpClient *>(aContext)->HandleCallback(aError, aHostInfo, aServices, aRemovedServices);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SrpClient::HandleCallback(otError aError,
|
void SrpClient::HandleCallback(otError aError,
|
||||||
const otSrpClientHostInfo *aHostInfo,
|
const otSrpClientHostInfo *aHostInfo,
|
||||||
const otSrpClientService * aServices,
|
const otSrpClientService *aServices,
|
||||||
const otSrpClientService * aRemovedServices)
|
const otSrpClientService *aRemovedServices)
|
||||||
{
|
{
|
||||||
otSrpClientService *next;
|
otSrpClientService *next;
|
||||||
|
|
||||||
|
|||||||
@@ -92,13 +92,13 @@ private:
|
|||||||
|
|
||||||
static void HandleCallback(otError aError,
|
static void HandleCallback(otError aError,
|
||||||
const otSrpClientHostInfo *aHostInfo,
|
const otSrpClientHostInfo *aHostInfo,
|
||||||
const otSrpClientService * aServices,
|
const otSrpClientService *aServices,
|
||||||
const otSrpClientService * aRemovedServices,
|
const otSrpClientService *aRemovedServices,
|
||||||
void * aContext);
|
void *aContext);
|
||||||
void HandleCallback(otError aError,
|
void HandleCallback(otError aError,
|
||||||
const otSrpClientHostInfo *aHostInfo,
|
const otSrpClientHostInfo *aHostInfo,
|
||||||
const otSrpClientService * aServices,
|
const otSrpClientService *aServices,
|
||||||
const otSrpClientService * aRemovedServices);
|
const otSrpClientService *aRemovedServices);
|
||||||
|
|
||||||
bool mCallbackEnabled;
|
bool mCallbackEnabled;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -300,9 +300,9 @@ template <> otError SrpServer::Process<Cmd("service")>(Arg aArgs[])
|
|||||||
kAnyServiceName, kAnyInstanceName)) != nullptr)
|
kAnyServiceName, kAnyInstanceName)) != nullptr)
|
||||||
{
|
{
|
||||||
bool isDeleted = otSrpServerServiceIsDeleted(service);
|
bool isDeleted = otSrpServerServiceIsDeleted(service);
|
||||||
const char * instanceName = otSrpServerServiceGetInstanceName(service);
|
const char *instanceName = otSrpServerServiceGetInstanceName(service);
|
||||||
const otSrpServerService *subService = nullptr;
|
const otSrpServerService *subService = nullptr;
|
||||||
const uint8_t * txtData;
|
const uint8_t *txtData;
|
||||||
uint16_t txtDataLength;
|
uint16_t txtDataLength;
|
||||||
bool hasSubType = false;
|
bool hasSubType = false;
|
||||||
otSrpServerLeaseInfo leaseInfo;
|
otSrpServerLeaseInfo leaseInfo;
|
||||||
|
|||||||
+9
-9
@@ -423,16 +423,16 @@ void TcpExample::HandleTcpDisconnectedCallback(otTcpEndpoint *aEndpoint, otTcpDi
|
|||||||
static_cast<TcpExample *>(otTcpEndpointGetContext(aEndpoint))->HandleTcpDisconnected(aEndpoint, aReason);
|
static_cast<TcpExample *>(otTcpEndpointGetContext(aEndpoint))->HandleTcpDisconnected(aEndpoint, aReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
otTcpIncomingConnectionAction TcpExample::HandleTcpAcceptReadyCallback(otTcpListener * aListener,
|
otTcpIncomingConnectionAction TcpExample::HandleTcpAcceptReadyCallback(otTcpListener *aListener,
|
||||||
const otSockAddr *aPeer,
|
const otSockAddr *aPeer,
|
||||||
otTcpEndpoint ** aAcceptInto)
|
otTcpEndpoint **aAcceptInto)
|
||||||
{
|
{
|
||||||
return static_cast<TcpExample *>(otTcpListenerGetContext(aListener))
|
return static_cast<TcpExample *>(otTcpListenerGetContext(aListener))
|
||||||
->HandleTcpAcceptReady(aListener, aPeer, aAcceptInto);
|
->HandleTcpAcceptReady(aListener, aPeer, aAcceptInto);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TcpExample::HandleTcpAcceptDoneCallback(otTcpListener * aListener,
|
void TcpExample::HandleTcpAcceptDoneCallback(otTcpListener *aListener,
|
||||||
otTcpEndpoint * aEndpoint,
|
otTcpEndpoint *aEndpoint,
|
||||||
const otSockAddr *aPeer)
|
const otSockAddr *aPeer)
|
||||||
{
|
{
|
||||||
static_cast<TcpExample *>(otTcpListenerGetContext(aListener))->HandleTcpAcceptDone(aListener, aEndpoint, aPeer);
|
static_cast<TcpExample *>(otTcpListenerGetContext(aListener))->HandleTcpAcceptDone(aListener, aEndpoint, aPeer);
|
||||||
@@ -567,9 +567,9 @@ void TcpExample::HandleTcpDisconnected(otTcpEndpoint *aEndpoint, otTcpDisconnect
|
|||||||
otTcpCircularSendBufferForceDiscardAll(&mSendBuffer);
|
otTcpCircularSendBufferForceDiscardAll(&mSendBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
otTcpIncomingConnectionAction TcpExample::HandleTcpAcceptReady(otTcpListener * aListener,
|
otTcpIncomingConnectionAction TcpExample::HandleTcpAcceptReady(otTcpListener *aListener,
|
||||||
const otSockAddr *aPeer,
|
const otSockAddr *aPeer,
|
||||||
otTcpEndpoint ** aAcceptInto)
|
otTcpEndpoint **aAcceptInto)
|
||||||
{
|
{
|
||||||
otTcpIncomingConnectionAction action;
|
otTcpIncomingConnectionAction action;
|
||||||
|
|
||||||
@@ -610,9 +610,9 @@ otError TcpExample::ContinueBenchmarkCircularSend(void)
|
|||||||
{
|
{
|
||||||
size_t toSendThisIteration = OT_MIN(mBenchmarkBytesUnsent, sBenchmarkDataLength);
|
size_t toSendThisIteration = OT_MIN(mBenchmarkBytesUnsent, sBenchmarkDataLength);
|
||||||
uint32_t flag = (toSendThisIteration < freeSpace && toSendThisIteration < mBenchmarkBytesUnsent)
|
uint32_t flag = (toSendThisIteration < freeSpace && toSendThisIteration < mBenchmarkBytesUnsent)
|
||||||
? OT_TCP_CIRCULAR_SEND_BUFFER_WRITE_MORE_TO_COME
|
? OT_TCP_CIRCULAR_SEND_BUFFER_WRITE_MORE_TO_COME
|
||||||
: 0;
|
: 0;
|
||||||
size_t written;
|
size_t written;
|
||||||
|
|
||||||
SuccessOrExit(error = otTcpCircularSendBufferWrite(&mEndpoint, &mSendBuffer, sBenchmarkData,
|
SuccessOrExit(error = otTcpCircularSendBufferWrite(&mEndpoint, &mSendBuffer, sBenchmarkData,
|
||||||
toSendThisIteration, &written, flag));
|
toSendThisIteration, &written, flag));
|
||||||
|
|||||||
+7
-7
@@ -88,11 +88,11 @@ private:
|
|||||||
bool aEndOfStream,
|
bool aEndOfStream,
|
||||||
size_t aBytesRemaining);
|
size_t aBytesRemaining);
|
||||||
static void HandleTcpDisconnectedCallback(otTcpEndpoint *aEndpoint, otTcpDisconnectedReason aReason);
|
static void HandleTcpDisconnectedCallback(otTcpEndpoint *aEndpoint, otTcpDisconnectedReason aReason);
|
||||||
static otTcpIncomingConnectionAction HandleTcpAcceptReadyCallback(otTcpListener * aListener,
|
static otTcpIncomingConnectionAction HandleTcpAcceptReadyCallback(otTcpListener *aListener,
|
||||||
const otSockAddr *aPeer,
|
const otSockAddr *aPeer,
|
||||||
otTcpEndpoint ** aAcceptInto);
|
otTcpEndpoint **aAcceptInto);
|
||||||
static void HandleTcpAcceptDoneCallback(otTcpListener * aListener,
|
static void HandleTcpAcceptDoneCallback(otTcpListener *aListener,
|
||||||
otTcpEndpoint * aEndpoint,
|
otTcpEndpoint *aEndpoint,
|
||||||
const otSockAddr *aPeer);
|
const otSockAddr *aPeer);
|
||||||
|
|
||||||
void HandleTcpEstablished(otTcpEndpoint *aEndpoint);
|
void HandleTcpEstablished(otTcpEndpoint *aEndpoint);
|
||||||
@@ -103,9 +103,9 @@ private:
|
|||||||
bool aEndOfStream,
|
bool aEndOfStream,
|
||||||
size_t aBytesRemaining);
|
size_t aBytesRemaining);
|
||||||
void HandleTcpDisconnected(otTcpEndpoint *aEndpoint, otTcpDisconnectedReason aReason);
|
void HandleTcpDisconnected(otTcpEndpoint *aEndpoint, otTcpDisconnectedReason aReason);
|
||||||
otTcpIncomingConnectionAction HandleTcpAcceptReady(otTcpListener * aListener,
|
otTcpIncomingConnectionAction HandleTcpAcceptReady(otTcpListener *aListener,
|
||||||
const otSockAddr *aPeer,
|
const otSockAddr *aPeer,
|
||||||
otTcpEndpoint ** aAcceptInto);
|
otTcpEndpoint **aAcceptInto);
|
||||||
void HandleTcpAcceptDone(otTcpListener *aListener, otTcpEndpoint *aEndpoint, const otSockAddr *aPeer);
|
void HandleTcpAcceptDone(otTcpListener *aListener, otTcpEndpoint *aEndpoint, const otSockAddr *aPeer);
|
||||||
|
|
||||||
otTcpEndpoint mEndpoint;
|
otTcpEndpoint mEndpoint;
|
||||||
@@ -127,7 +127,7 @@ private:
|
|||||||
uint32_t mBenchmarkBytesUnsent;
|
uint32_t mBenchmarkBytesUnsent;
|
||||||
TimeMilli mBenchmarkStart;
|
TimeMilli mBenchmarkStart;
|
||||||
|
|
||||||
static constexpr const char * sBenchmarkData = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
static constexpr const char *sBenchmarkData = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||||||
static constexpr const size_t sBenchmarkDataLength = 52;
|
static constexpr const size_t sBenchmarkDataLength = 52;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -123,7 +123,7 @@ exit:
|
|||||||
template <> otError UdpExample::Process<Cmd("send")>(Arg aArgs[])
|
template <> otError UdpExample::Process<Cmd("send")>(Arg aArgs[])
|
||||||
{
|
{
|
||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
otMessage * message = nullptr;
|
otMessage *message = nullptr;
|
||||||
otMessageInfo messageInfo;
|
otMessageInfo messageInfo;
|
||||||
otMessageSettings messageSettings = {mLinkSecurityEnabled, OT_MESSAGE_PRIORITY_NORMAL};
|
otMessageSettings messageSettings = {mLinkSecurityEnabled, OT_MESSAGE_PRIORITY_NORMAL};
|
||||||
|
|
||||||
|
|||||||
@@ -87,23 +87,23 @@ otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterCon
|
|||||||
return AsCoreType(aInstance).Get<BackboneRouter::Local>().GetDomainPrefix(AsCoreType(aConfig));
|
return AsCoreType(aInstance).Get<BackboneRouter::Local>().GetDomainPrefix(AsCoreType(aConfig));
|
||||||
}
|
}
|
||||||
|
|
||||||
void otBackboneRouterSetDomainPrefixCallback(otInstance * aInstance,
|
void otBackboneRouterSetDomainPrefixCallback(otInstance *aInstance,
|
||||||
otBackboneRouterDomainPrefixCallback aCallback,
|
otBackboneRouterDomainPrefixCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<BackboneRouter::Local>().SetDomainPrefixCallback(aCallback, aContext);
|
return AsCoreType(aInstance).Get<BackboneRouter::Local>().SetDomainPrefixCallback(aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE
|
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE
|
||||||
void otBackboneRouterSetNdProxyCallback(otInstance * aInstance,
|
void otBackboneRouterSetNdProxyCallback(otInstance *aInstance,
|
||||||
otBackboneRouterNdProxyCallback aCallback,
|
otBackboneRouterNdProxyCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<BackboneRouter::NdProxyTable>().SetCallback(aCallback, aContext);
|
AsCoreType(aInstance).Get<BackboneRouter::NdProxyTable>().SetCallback(aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otBackboneRouterGetNdProxyInfo(otInstance * aInstance,
|
otError otBackboneRouterGetNdProxyInfo(otInstance *aInstance,
|
||||||
const otIp6Address * aDua,
|
const otIp6Address *aDua,
|
||||||
otBackboneRouterNdProxyInfo *aNdProxyInfo)
|
otBackboneRouterNdProxyInfo *aNdProxyInfo)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aNdProxyInfo);
|
AssertPointerIsNotNull(aNdProxyInfo);
|
||||||
@@ -114,15 +114,15 @@ otError otBackboneRouterGetNdProxyInfo(otInstance * aInstance,
|
|||||||
#endif // OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE
|
#endif // OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||||
void otBackboneRouterSetMulticastListenerCallback(otInstance * aInstance,
|
void otBackboneRouterSetMulticastListenerCallback(otInstance *aInstance,
|
||||||
otBackboneRouterMulticastListenerCallback aCallback,
|
otBackboneRouterMulticastListenerCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<BackboneRouter::MulticastListenersTable>().SetCallback(aCallback, aContext);
|
AsCoreType(aInstance).Get<BackboneRouter::MulticastListenersTable>().SetCallback(aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otBackboneRouterMulticastListenerGetNext(otInstance * aInstance,
|
otError otBackboneRouterMulticastListenerGetNext(otInstance *aInstance,
|
||||||
otChildIp6AddressIterator * aIterator,
|
otChildIp6AddressIterator *aIterator,
|
||||||
otBackboneRouterMulticastListenerInfo *aListenerInfo)
|
otBackboneRouterMulticastListenerInfo *aListenerInfo)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aIterator);
|
AssertPointerIsNotNull(aIterator);
|
||||||
@@ -134,7 +134,7 @@ otError otBackboneRouterMulticastListenerGetNext(otInstance *
|
|||||||
|
|
||||||
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE
|
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE
|
||||||
void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance * aInstance,
|
void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance *aInstance,
|
||||||
const otIp6InterfaceIdentifier *aMlIid,
|
const otIp6InterfaceIdentifier *aMlIid,
|
||||||
uint8_t aStatus)
|
uint8_t aStatus)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefi
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otBorderRouterGetNextOnMeshPrefix(otInstance * aInstance,
|
otError otBorderRouterGetNextOnMeshPrefix(otInstance *aInstance,
|
||||||
otNetworkDataIterator *aIterator,
|
otNetworkDataIterator *aIterator,
|
||||||
otBorderRouterConfig * aConfig)
|
otBorderRouterConfig *aConfig)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aIterator);
|
AssertPointerIsNotNull(aIterator);
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPre
|
|||||||
return AsCoreType(aInstance).Get<NetworkData::Local>().RemoveHasRoutePrefix(AsCoreType(aPrefix));
|
return AsCoreType(aInstance).Get<NetworkData::Local>().RemoveHasRoutePrefix(AsCoreType(aPrefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otBorderRouterGetNextRoute(otInstance * aInstance,
|
otError otBorderRouterGetNextRoute(otInstance *aInstance,
|
||||||
otNetworkDataIterator *aIterator,
|
otNetworkDataIterator *aIterator,
|
||||||
otExternalRouteConfig *aConfig)
|
otExternalRouteConfig *aConfig)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefi
|
|||||||
return AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetNat64Prefix(AsCoreType(aPrefix));
|
return AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetNat64Prefix(AsCoreType(aPrefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otBorderRoutingGetFavoredNat64Prefix(otInstance * aInstance,
|
otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance,
|
||||||
otIp6Prefix * aPrefix,
|
otIp6Prefix *aPrefix,
|
||||||
otRoutePreference *aPreference)
|
otRoutePreference *aPreference)
|
||||||
{
|
{
|
||||||
otError error;
|
otError error;
|
||||||
@@ -120,9 +120,9 @@ void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRouti
|
|||||||
AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().InitPrefixTableIterator(*aIterator);
|
AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().InitPrefixTableIterator(*aIterator);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otBorderRoutingGetNextPrefixTableEntry(otInstance * aInstance,
|
otError otBorderRoutingGetNextPrefixTableEntry(otInstance *aInstance,
|
||||||
otBorderRoutingPrefixTableIterator *aIterator,
|
otBorderRoutingPrefixTableIterator *aIterator,
|
||||||
otBorderRoutingPrefixTableEntry * aEntry)
|
otBorderRoutingPrefixTableEntry *aEntry)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aIterator);
|
AssertPointerIsNotNull(aIterator);
|
||||||
AssertPointerIsNotNull(aEntry);
|
AssertPointerIsNotNull(aEntry);
|
||||||
|
|||||||
+18
-18
@@ -55,7 +55,7 @@ void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode)
|
|||||||
|
|
||||||
otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aRequest, otCoapType aType, otCoapCode aCode)
|
otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aRequest, otCoapType aType, otCoapCode aCode)
|
||||||
{
|
{
|
||||||
Coap::Message & response = AsCoapMessage(aResponse);
|
Coap::Message &response = AsCoapMessage(aResponse);
|
||||||
const Coap::Message &request = AsCoapMessage(aRequest);
|
const Coap::Message &request = AsCoapMessage(aRequest);
|
||||||
|
|
||||||
response.Init(MapEnum(aType), MapEnum(aCode));
|
response.Init(MapEnum(aType), MapEnum(aCode));
|
||||||
@@ -217,12 +217,12 @@ otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
otError otCoapSendRequestBlockWiseWithParameters(otInstance * aInstance,
|
otError otCoapSendRequestBlockWiseWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otCoapTxParameters * aTxParameters,
|
const otCoapTxParameters *aTxParameters,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook,
|
otCoapBlockwiseTransmitHook aTransmitHook,
|
||||||
otCoapBlockwiseReceiveHook aReceiveHook)
|
otCoapBlockwiseReceiveHook aReceiveHook)
|
||||||
{
|
{
|
||||||
@@ -243,11 +243,11 @@ exit:
|
|||||||
}
|
}
|
||||||
#endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
|
|
||||||
otError otCoapSendRequestWithParameters(otInstance * aInstance,
|
otError otCoapSendRequestWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otCoapTxParameters *aTxParameters)
|
const otCoapTxParameters *aTxParameters)
|
||||||
{
|
{
|
||||||
Error error;
|
Error error;
|
||||||
@@ -304,11 +304,11 @@ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandle
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
otError otCoapSendResponseBlockWiseWithParameters(otInstance * aInstance,
|
otError otCoapSendResponseBlockWiseWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
const otCoapTxParameters * aTxParameters,
|
const otCoapTxParameters *aTxParameters,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook)
|
otCoapBlockwiseTransmitHook aTransmitHook)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).GetApplicationCoap().SendMessage(AsCoapMessage(aMessage), AsCoreType(aMessageInfo),
|
return AsCoreType(aInstance).GetApplicationCoap().SendMessage(AsCoapMessage(aMessage), AsCoreType(aMessageInfo),
|
||||||
@@ -317,9 +317,9 @@ otError otCoapSendResponseBlockWiseWithParameters(otInstance * aI
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
otError otCoapSendResponseWithParameters(otInstance * aInstance,
|
otError otCoapSendResponseWithParameters(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
const otCoapTxParameters *aTxParameters)
|
const otCoapTxParameters *aTxParameters)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).GetApplicationCoap().SendMessage(
|
return AsCoreType(aInstance).GetApplicationCoap().SendMessage(
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
#ifdef MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
||||||
void otCoapSecureSetCertificate(otInstance * aInstance,
|
void otCoapSecureSetCertificate(otInstance *aInstance,
|
||||||
const uint8_t *aX509Cert,
|
const uint8_t *aX509Cert,
|
||||||
uint32_t aX509Length,
|
uint32_t aX509Length,
|
||||||
const uint8_t *aPrivateKey,
|
const uint8_t *aPrivateKey,
|
||||||
@@ -61,7 +61,7 @@ void otCoapSecureSetCertificate(otInstance * aInstance,
|
|||||||
aPrivateKeyLength);
|
aPrivateKeyLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
void otCoapSecureSetCaCertificateChain(otInstance * aInstance,
|
void otCoapSecureSetCaCertificateChain(otInstance *aInstance,
|
||||||
const uint8_t *aX509CaCertificateChain,
|
const uint8_t *aX509CaCertificateChain,
|
||||||
uint32_t aX509CaCertChainLength)
|
uint32_t aX509CaCertChainLength)
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@ void otCoapSecureSetCaCertificateChain(otInstance * aInstance,
|
|||||||
#endif // MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
#endif // MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
||||||
|
|
||||||
#ifdef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
#ifdef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
||||||
void otCoapSecureSetPsk(otInstance * aInstance,
|
void otCoapSecureSetPsk(otInstance *aInstance,
|
||||||
const uint8_t *aPsk,
|
const uint8_t *aPsk,
|
||||||
uint16_t aPskLength,
|
uint16_t aPskLength,
|
||||||
const uint8_t *aPskIdentity,
|
const uint8_t *aPskIdentity,
|
||||||
@@ -85,9 +85,9 @@ void otCoapSecureSetPsk(otInstance * aInstance,
|
|||||||
#endif // MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
#endif // MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
||||||
|
|
||||||
#if defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
#if defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||||
otError otCoapSecureGetPeerCertificateBase64(otInstance * aInstance,
|
otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance,
|
||||||
unsigned char *aPeerCert,
|
unsigned char *aPeerCert,
|
||||||
size_t * aCertLength,
|
size_t *aCertLength,
|
||||||
size_t aCertBufferSize)
|
size_t aCertBufferSize)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aPeerCert);
|
AssertPointerIsNotNull(aPeerCert);
|
||||||
@@ -102,10 +102,10 @@ void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertifica
|
|||||||
AsCoreType(aInstance).GetApplicationCoapSecure().SetSslAuthMode(aVerifyPeerCertificate);
|
AsCoreType(aInstance).GetApplicationCoapSecure().SetSslAuthMode(aVerifyPeerCertificate);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otCoapSecureConnect(otInstance * aInstance,
|
otError otCoapSecureConnect(otInstance *aInstance,
|
||||||
const otSockAddr * aSockAddr,
|
const otSockAddr *aSockAddr,
|
||||||
otHandleCoapSecureClientConnect aHandler,
|
otHandleCoapSecureClientConnect aHandler,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).GetApplicationCoapSecure().Connect(AsCoreType(aSockAddr), aHandler, aContext);
|
return AsCoreType(aInstance).GetApplicationCoapSecure().Connect(AsCoreType(aSockAddr), aHandler, aContext);
|
||||||
}
|
}
|
||||||
@@ -131,10 +131,10 @@ void otCoapSecureStop(otInstance *aInstance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
otError otCoapSecureSendRequestBlockWise(otInstance * aInstance,
|
otError otCoapSecureSendRequestBlockWise(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook,
|
otCoapBlockwiseTransmitHook aTransmitHook,
|
||||||
otCoapBlockwiseReceiveHook aReceiveHook)
|
otCoapBlockwiseReceiveHook aReceiveHook)
|
||||||
{
|
{
|
||||||
@@ -143,10 +143,10 @@ otError otCoapSecureSendRequestBlockWise(otInstance * aInstance,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
otError otCoapSecureSendRequest(otInstance * aInstance,
|
otError otCoapSecureSendRequest(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
otCoapResponseHandler aHandler,
|
otCoapResponseHandler aHandler,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).GetApplicationCoapSecure().SendMessage(AsCoapMessage(aMessage), aHandler, aContext);
|
return AsCoreType(aInstance).GetApplicationCoapSecure().SendMessage(AsCoapMessage(aMessage), aHandler, aContext);
|
||||||
}
|
}
|
||||||
@@ -173,9 +173,9 @@ void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource
|
|||||||
AsCoreType(aInstance).GetApplicationCoapSecure().RemoveResource(AsCoreType(aResource));
|
AsCoreType(aInstance).GetApplicationCoapSecure().RemoveResource(AsCoreType(aResource));
|
||||||
}
|
}
|
||||||
|
|
||||||
void otCoapSecureSetClientConnectedCallback(otInstance * aInstance,
|
void otCoapSecureSetClientConnectedCallback(otInstance *aInstance,
|
||||||
otHandleCoapSecureClientConnect aHandler,
|
otHandleCoapSecureClientConnect aHandler,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).GetApplicationCoapSecure().SetClientConnectedCallback(aHandler, aContext);
|
AsCoreType(aInstance).GetApplicationCoapSecure().SetClientConnectedCallback(aHandler, aContext);
|
||||||
}
|
}
|
||||||
@@ -186,10 +186,10 @@ void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler a
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
#if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE
|
||||||
otError otCoapSecureSendResponseBlockWise(otInstance * aInstance,
|
otError otCoapSecureSendResponseBlockWise(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo * aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
otCoapBlockwiseTransmitHook aTransmitHook)
|
otCoapBlockwiseTransmitHook aTransmitHook)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).GetApplicationCoapSecure().SendMessage(
|
return AsCoreType(aInstance).GetApplicationCoapSecure().SendMessage(
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otCommissionerStart(otInstance * aInstance,
|
otError otCommissionerStart(otInstance *aInstance,
|
||||||
otCommissionerStateCallback aStateCallback,
|
otCommissionerStateCallback aStateCallback,
|
||||||
otCommissionerJoinerCallback aJoinerCallback,
|
otCommissionerJoinerCallback aJoinerCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().Start(aStateCallback, aJoinerCallback, aCallbackContext);
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().Start(aStateCallback, aJoinerCallback, aCallbackContext);
|
||||||
}
|
}
|
||||||
@@ -82,9 +82,9 @@ exit:
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otCommissionerAddJoinerWithDiscerner(otInstance * aInstance,
|
otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance,
|
||||||
const otJoinerDiscerner *aDiscerner,
|
const otJoinerDiscerner *aDiscerner,
|
||||||
const char * aPskd,
|
const char *aPskd,
|
||||||
uint32_t aTimeout)
|
uint32_t aTimeout)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().AddJoiner(AsCoreType(aDiscerner), aPskd, aTimeout);
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().AddJoiner(AsCoreType(aDiscerner), aPskd, aTimeout);
|
||||||
@@ -127,7 +127,7 @@ const char *otCommissionerGetProvisioningUrl(otInstance *aInstance)
|
|||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().GetProvisioningUrl();
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().GetProvisioningUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otCommissionerAnnounceBegin(otInstance * aInstance,
|
otError otCommissionerAnnounceBegin(otInstance *aInstance,
|
||||||
uint32_t aChannelMask,
|
uint32_t aChannelMask,
|
||||||
uint8_t aCount,
|
uint8_t aCount,
|
||||||
uint16_t aPeriod,
|
uint16_t aPeriod,
|
||||||
@@ -137,25 +137,25 @@ otError otCommissionerAnnounceBegin(otInstance * aInstance,
|
|||||||
aChannelMask, aCount, aPeriod, AsCoreType(aAddress));
|
aChannelMask, aCount, aPeriod, AsCoreType(aAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otCommissionerEnergyScan(otInstance * aInstance,
|
otError otCommissionerEnergyScan(otInstance *aInstance,
|
||||||
uint32_t aChannelMask,
|
uint32_t aChannelMask,
|
||||||
uint8_t aCount,
|
uint8_t aCount,
|
||||||
uint16_t aPeriod,
|
uint16_t aPeriod,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
const otIp6Address * aAddress,
|
const otIp6Address *aAddress,
|
||||||
otCommissionerEnergyReportCallback aCallback,
|
otCommissionerEnergyReportCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().GetEnergyScanClient().SendQuery(
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().GetEnergyScanClient().SendQuery(
|
||||||
aChannelMask, aCount, aPeriod, aScanDuration, AsCoreType(aAddress), aCallback, aContext);
|
aChannelMask, aCount, aPeriod, aScanDuration, AsCoreType(aAddress), aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otCommissionerPanIdQuery(otInstance * aInstance,
|
otError otCommissionerPanIdQuery(otInstance *aInstance,
|
||||||
uint16_t aPanId,
|
uint16_t aPanId,
|
||||||
uint32_t aChannelMask,
|
uint32_t aChannelMask,
|
||||||
const otIp6Address * aAddress,
|
const otIp6Address *aAddress,
|
||||||
otCommissionerPanIdConflictCallback aCallback,
|
otCommissionerPanIdConflictCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().GetPanIdQueryClient().SendQuery(
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().GetPanIdQueryClient().SendQuery(
|
||||||
aPanId, aChannelMask, AsCoreType(aAddress), aCallback, aContext);
|
aPanId, aChannelMask, AsCoreType(aAddress), aCallback, aContext);
|
||||||
@@ -166,9 +166,9 @@ otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, u
|
|||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().SendMgmtCommissionerGetRequest(aTlvs, aLength);
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().SendMgmtCommissionerGetRequest(aTlvs, aLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otCommissionerSendMgmtSet(otInstance * aInstance,
|
otError otCommissionerSendMgmtSet(otInstance *aInstance,
|
||||||
const otCommissioningDataset *aDataset,
|
const otCommissioningDataset *aDataset,
|
||||||
const uint8_t * aTlvs,
|
const uint8_t *aTlvs,
|
||||||
uint8_t aLength)
|
uint8_t aLength)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().SendMgmtCommissionerSetRequest(AsCoreType(aDataset),
|
return AsCoreType(aInstance).Get<MeshCoP::Commissioner>().SendMgmtCommissionerSetRequest(AsCoreType(aDataset),
|
||||||
|
|||||||
@@ -60,15 +60,15 @@ void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t a
|
|||||||
|
|
||||||
void otCryptoAesCcm(const otCryptoKey *aKey,
|
void otCryptoAesCcm(const otCryptoKey *aKey,
|
||||||
uint8_t aTagLength,
|
uint8_t aTagLength,
|
||||||
const void * aNonce,
|
const void *aNonce,
|
||||||
uint8_t aNonceLength,
|
uint8_t aNonceLength,
|
||||||
const void * aHeader,
|
const void *aHeader,
|
||||||
uint32_t aHeaderLength,
|
uint32_t aHeaderLength,
|
||||||
void * aPlainText,
|
void *aPlainText,
|
||||||
void * aCipherText,
|
void *aCipherText,
|
||||||
uint32_t aLength,
|
uint32_t aLength,
|
||||||
bool aEncrypt,
|
bool aEncrypt,
|
||||||
void * aTag)
|
void *aTag)
|
||||||
{
|
{
|
||||||
AesCcm aesCcm;
|
AesCcm aesCcm;
|
||||||
|
|
||||||
@@ -92,8 +92,8 @@ void otCryptoAesCcm(const otCryptoKey *aKey,
|
|||||||
|
|
||||||
#if OPENTHREAD_CONFIG_ECDSA_ENABLE
|
#if OPENTHREAD_CONFIG_ECDSA_ENABLE
|
||||||
|
|
||||||
otError otCryptoEcdsaSign(uint8_t * aOutput,
|
otError otCryptoEcdsaSign(uint8_t *aOutput,
|
||||||
uint16_t * aOutputLength,
|
uint16_t *aOutputLength,
|
||||||
const uint8_t *aInputHash,
|
const uint8_t *aInputHash,
|
||||||
uint16_t aInputHashLength,
|
uint16_t aInputHashLength,
|
||||||
const uint8_t *aPrivateKey,
|
const uint8_t *aPrivateKey,
|
||||||
|
|||||||
@@ -95,53 +95,53 @@ otError otDatasetSetPendingTlvs(otInstance *aInstance, const otOperationalDatase
|
|||||||
return AsCoreType(aInstance).Get<MeshCoP::PendingDatasetManager>().Save(*aDataset);
|
return AsCoreType(aInstance).Get<MeshCoP::PendingDatasetManager>().Save(*aDataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otDatasetSendMgmtActiveGet(otInstance * aInstance,
|
otError otDatasetSendMgmtActiveGet(otInstance *aInstance,
|
||||||
const otOperationalDatasetComponents *aDatasetComponents,
|
const otOperationalDatasetComponents *aDatasetComponents,
|
||||||
const uint8_t * aTlvTypes,
|
const uint8_t *aTlvTypes,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
const otIp6Address * aAddress)
|
const otIp6Address *aAddress)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::ActiveDatasetManager>().SendGetRequest(AsCoreType(aDatasetComponents),
|
return AsCoreType(aInstance).Get<MeshCoP::ActiveDatasetManager>().SendGetRequest(AsCoreType(aDatasetComponents),
|
||||||
aTlvTypes, aLength, aAddress);
|
aTlvTypes, aLength, aAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otDatasetSendMgmtActiveSet(otInstance * aInstance,
|
otError otDatasetSendMgmtActiveSet(otInstance *aInstance,
|
||||||
const otOperationalDataset *aDataset,
|
const otOperationalDataset *aDataset,
|
||||||
const uint8_t * aTlvs,
|
const uint8_t *aTlvs,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
otDatasetMgmtSetCallback aCallback,
|
otDatasetMgmtSetCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::ActiveDatasetManager>().SendSetRequest(AsCoreType(aDataset), aTlvs,
|
return AsCoreType(aInstance).Get<MeshCoP::ActiveDatasetManager>().SendSetRequest(AsCoreType(aDataset), aTlvs,
|
||||||
aLength, aCallback, aContext);
|
aLength, aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otDatasetSendMgmtPendingGet(otInstance * aInstance,
|
otError otDatasetSendMgmtPendingGet(otInstance *aInstance,
|
||||||
const otOperationalDatasetComponents *aDatasetComponents,
|
const otOperationalDatasetComponents *aDatasetComponents,
|
||||||
const uint8_t * aTlvTypes,
|
const uint8_t *aTlvTypes,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
const otIp6Address * aAddress)
|
const otIp6Address *aAddress)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::PendingDatasetManager>().SendGetRequest(AsCoreType(aDatasetComponents),
|
return AsCoreType(aInstance).Get<MeshCoP::PendingDatasetManager>().SendGetRequest(AsCoreType(aDatasetComponents),
|
||||||
aTlvTypes, aLength, aAddress);
|
aTlvTypes, aLength, aAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otDatasetSendMgmtPendingSet(otInstance * aInstance,
|
otError otDatasetSendMgmtPendingSet(otInstance *aInstance,
|
||||||
const otOperationalDataset *aDataset,
|
const otOperationalDataset *aDataset,
|
||||||
const uint8_t * aTlvs,
|
const uint8_t *aTlvs,
|
||||||
uint8_t aLength,
|
uint8_t aLength,
|
||||||
otDatasetMgmtSetCallback aCallback,
|
otDatasetMgmtSetCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::PendingDatasetManager>().SendSetRequest(AsCoreType(aDataset), aTlvs,
|
return AsCoreType(aInstance).Get<MeshCoP::PendingDatasetManager>().SendSetRequest(AsCoreType(aDataset), aTlvs,
|
||||||
aLength, aCallback, aContext);
|
aLength, aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_FTD
|
#if OPENTHREAD_FTD
|
||||||
otError otDatasetGeneratePskc(const char * aPassPhrase,
|
otError otDatasetGeneratePskc(const char *aPassPhrase,
|
||||||
const otNetworkName * aNetworkName,
|
const otNetworkName *aNetworkName,
|
||||||
const otExtendedPanId *aExtPanId,
|
const otExtendedPanId *aExtPanId,
|
||||||
otPskc * aPskc)
|
otPskc *aPskc)
|
||||||
{
|
{
|
||||||
return MeshCoP::GeneratePskc(aPassPhrase, AsCoreType(aNetworkName), AsCoreType(aExtPanId), AsCoreType(aPskc));
|
return MeshCoP::GeneratePskc(aPassPhrase, AsCoreType(aNetworkName), AsCoreType(aExtPanId), AsCoreType(aPskc));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,10 +43,10 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otDatasetUpdaterRequestUpdate(otInstance * aInstance,
|
otError otDatasetUpdaterRequestUpdate(otInstance *aInstance,
|
||||||
const otOperationalDataset *aDataset,
|
const otOperationalDataset *aDataset,
|
||||||
otDatasetUpdaterCallback aCallback,
|
otDatasetUpdaterCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::DatasetUpdater>().RequestUpdate(AsCoreType(aDataset), aCallback,
|
return AsCoreType(aInstance).Get<MeshCoP::DatasetUpdater>().RequestUpdate(AsCoreType(aDataset), aCallback,
|
||||||
aContext);
|
aContext);
|
||||||
|
|||||||
+28
-28
@@ -81,10 +81,10 @@ void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsClientResolveAddress(otInstance * aInstance,
|
otError otDnsClientResolveAddress(otInstance *aInstance,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
otDnsAddressCallback aCallback,
|
otDnsAddressCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig)
|
const otDnsQueryConfig *aConfig)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aHostName);
|
AssertPointerIsNotNull(aHostName);
|
||||||
@@ -94,10 +94,10 @@ otError otDnsClientResolveAddress(otInstance * aInstance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE
|
#if OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE
|
||||||
otError otDnsClientResolveIp4Address(otInstance * aInstance,
|
otError otDnsClientResolveIp4Address(otInstance *aInstance,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
otDnsAddressCallback aCallback,
|
otDnsAddressCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig)
|
const otDnsQueryConfig *aConfig)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aHostName);
|
AssertPointerIsNotNull(aHostName);
|
||||||
@@ -108,7 +108,7 @@ otError otDnsClientResolveIp4Address(otInstance * aInstance,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
|
otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
|
||||||
char * aNameBuffer,
|
char *aNameBuffer,
|
||||||
uint16_t aNameBufferSize)
|
uint16_t aNameBufferSize)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aNameBuffer);
|
AssertPointerIsNotNull(aNameBuffer);
|
||||||
@@ -118,8 +118,8 @@ otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
|
|||||||
|
|
||||||
otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
|
otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
otIp6Address * aAddress,
|
otIp6Address *aAddress,
|
||||||
uint32_t * aTtl)
|
uint32_t *aTtl)
|
||||||
{
|
{
|
||||||
uint32_t ttl;
|
uint32_t ttl;
|
||||||
|
|
||||||
@@ -128,10 +128,10 @@ otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
|
|||||||
|
|
||||||
#if OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE
|
#if OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE
|
||||||
|
|
||||||
otError otDnsClientBrowse(otInstance * aInstance,
|
otError otDnsClientBrowse(otInstance *aInstance,
|
||||||
const char * aServiceName,
|
const char *aServiceName,
|
||||||
otDnsBrowseCallback aCallback,
|
otDnsBrowseCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig)
|
const otDnsQueryConfig *aConfig)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aServiceName);
|
AssertPointerIsNotNull(aServiceName);
|
||||||
@@ -140,7 +140,7 @@ otError otDnsClientBrowse(otInstance * aInstance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
|
||||||
char * aNameBuffer,
|
char *aNameBuffer,
|
||||||
uint16_t aNameBufferSize)
|
uint16_t aNameBufferSize)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aNameBuffer);
|
AssertPointerIsNotNull(aNameBuffer);
|
||||||
@@ -150,7 +150,7 @@ otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
|
|||||||
|
|
||||||
otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aResponse,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
char * aLabelBuffer,
|
char *aLabelBuffer,
|
||||||
uint8_t aLabelBufferSize)
|
uint8_t aLabelBufferSize)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aLabelBuffer);
|
AssertPointerIsNotNull(aLabelBuffer);
|
||||||
@@ -159,8 +159,8 @@ otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aRespon
|
|||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
|
||||||
const char * aInstanceLabel,
|
const char *aInstanceLabel,
|
||||||
otDnsServiceInfo * aServiceInfo)
|
otDnsServiceInfo *aServiceInfo)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aInstanceLabel);
|
AssertPointerIsNotNull(aInstanceLabel);
|
||||||
|
|
||||||
@@ -168,10 +168,10 @@ otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
|
|||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
|
otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
otIp6Address * aAddress,
|
otIp6Address *aAddress,
|
||||||
uint32_t * aTtl)
|
uint32_t *aTtl)
|
||||||
{
|
{
|
||||||
uint32_t ttl;
|
uint32_t ttl;
|
||||||
|
|
||||||
@@ -180,11 +180,11 @@ otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
|
|||||||
return AsCoreType(aResponse).GetHostAddress(aHostName, aIndex, AsCoreType(aAddress), aTtl != nullptr ? *aTtl : ttl);
|
return AsCoreType(aResponse).GetHostAddress(aHostName, aIndex, AsCoreType(aAddress), aTtl != nullptr ? *aTtl : ttl);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsClientResolveService(otInstance * aInstance,
|
otError otDnsClientResolveService(otInstance *aInstance,
|
||||||
const char * aInstanceLabel,
|
const char *aInstanceLabel,
|
||||||
const char * aServiceName,
|
const char *aServiceName,
|
||||||
otDnsServiceCallback aCallback,
|
otDnsServiceCallback aCallback,
|
||||||
void * aContext,
|
void *aContext,
|
||||||
const otDnsQueryConfig *aConfig)
|
const otDnsQueryConfig *aConfig)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aInstanceLabel);
|
AssertPointerIsNotNull(aInstanceLabel);
|
||||||
@@ -195,9 +195,9 @@ otError otDnsClientResolveService(otInstance * aInstance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse,
|
otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse,
|
||||||
char * aLabelBuffer,
|
char *aLabelBuffer,
|
||||||
uint8_t aLabelBufferSize,
|
uint8_t aLabelBufferSize,
|
||||||
char * aNameBuffer,
|
char *aNameBuffer,
|
||||||
uint16_t aNameBufferSize)
|
uint16_t aNameBufferSize)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aLabelBuffer);
|
AssertPointerIsNotNull(aLabelBuffer);
|
||||||
@@ -212,10 +212,10 @@ otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse
|
|||||||
}
|
}
|
||||||
|
|
||||||
otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse,
|
otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse,
|
||||||
const char * aHostName,
|
const char *aHostName,
|
||||||
uint16_t aIndex,
|
uint16_t aIndex,
|
||||||
otIp6Address * aAddress,
|
otIp6Address *aAddress,
|
||||||
uint32_t * aTtl)
|
uint32_t *aTtl)
|
||||||
{
|
{
|
||||||
uint32_t ttl;
|
uint32_t ttl;
|
||||||
|
|
||||||
|
|||||||
@@ -41,16 +41,16 @@ using namespace ot;
|
|||||||
|
|
||||||
#if OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE
|
#if OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE
|
||||||
|
|
||||||
void otDnssdQuerySetCallbacks(otInstance * aInstance,
|
void otDnssdQuerySetCallbacks(otInstance *aInstance,
|
||||||
otDnssdQuerySubscribeCallback aSubscribe,
|
otDnssdQuerySubscribeCallback aSubscribe,
|
||||||
otDnssdQueryUnsubscribeCallback aUnsubscribe,
|
otDnssdQueryUnsubscribeCallback aUnsubscribe,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<Dns::ServiceDiscovery::Server>().SetQueryCallbacks(aSubscribe, aUnsubscribe, aContext);
|
AsCoreType(aInstance).Get<Dns::ServiceDiscovery::Server>().SetQueryCallbacks(aSubscribe, aUnsubscribe, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
void otDnssdQueryHandleDiscoveredServiceInstance(otInstance * aInstance,
|
void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aInstance,
|
||||||
const char * aServiceFullName,
|
const char *aServiceFullName,
|
||||||
otDnssdServiceInstanceInfo *aInstanceInfo)
|
otDnssdServiceInstanceInfo *aInstanceInfo)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aServiceFullName);
|
AssertPointerIsNotNull(aServiceFullName);
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator)
|
|||||||
AsCoreType(aIterator).Init();
|
AsCoreType(aIterator).Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInstance * aInstance,
|
const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
@@ -58,9 +58,9 @@ const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInsta
|
|||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressHistory(
|
const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressHistory(
|
||||||
otInstance * aInstance,
|
otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
@@ -69,9 +69,9 @@ const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressH
|
|||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddressHistory(
|
const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddressHistory(
|
||||||
otInstance * aInstance,
|
otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
@@ -79,36 +79,36 @@ const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddr
|
|||||||
*aEntryAge);
|
*aEntryAge);
|
||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance * aInstance,
|
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
return AsCoreType(aInstance).Get<Utils::HistoryTracker>().IterateRxHistory(AsCoreType(aIterator), *aEntryAge);
|
return AsCoreType(aInstance).Get<Utils::HistoryTracker>().IterateRxHistory(AsCoreType(aIterator), *aEntryAge);
|
||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance * aInstance,
|
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
return AsCoreType(aInstance).Get<Utils::HistoryTracker>().IterateTxHistory(AsCoreType(aIterator), *aEntryAge);
|
return AsCoreType(aInstance).Get<Utils::HistoryTracker>().IterateTxHistory(AsCoreType(aIterator), *aEntryAge);
|
||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otInstance * aInstance,
|
const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
return AsCoreType(aInstance).Get<Utils::HistoryTracker>().IterateNeighborHistory(AsCoreType(aIterator), *aEntryAge);
|
return AsCoreType(aInstance).Get<Utils::HistoryTracker>().IterateNeighborHistory(AsCoreType(aIterator), *aEntryAge);
|
||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHistory(otInstance * aInstance,
|
const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHistory(otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
@@ -117,9 +117,9 @@ const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHisto
|
|||||||
}
|
}
|
||||||
|
|
||||||
const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHistory(
|
const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHistory(
|
||||||
otInstance * aInstance,
|
otInstance *aInstance,
|
||||||
otHistoryTrackerIterator *aIterator,
|
otHistoryTrackerIterator *aIterator,
|
||||||
uint32_t * aEntryAge)
|
uint32_t *aEntryAge)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aEntryAge);
|
AssertPointerIsNotNull(aEntryAge);
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler)
|
|||||||
return AsCoreType(aInstance).Get<Ip6::Icmp>().RegisterHandler(AsCoreType(aHandler));
|
return AsCoreType(aInstance).Get<Ip6::Icmp>().RegisterHandler(AsCoreType(aHandler));
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otIcmp6SendEchoRequest(otInstance * aInstance,
|
otError otIcmp6SendEchoRequest(otInstance *aInstance,
|
||||||
otMessage * aMessage,
|
otMessage *aMessage,
|
||||||
const otMessageInfo *aMessageInfo,
|
const otMessageInfo *aMessageInfo,
|
||||||
uint16_t aIdentifier)
|
uint16_t aIdentifier)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSett
|
|||||||
return AsCoreType(aInstance).Get<Ip6::Ip6>().NewMessage(0, Message::Settings::From(aSettings));
|
return AsCoreType(aInstance).Get<Ip6::Ip6>().NewMessage(0, Message::Settings::From(aSettings));
|
||||||
}
|
}
|
||||||
|
|
||||||
otMessage *otIp6NewMessageFromBuffer(otInstance * aInstance,
|
otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance,
|
||||||
const uint8_t * aData,
|
const uint8_t *aData,
|
||||||
uint16_t aDataLength,
|
uint16_t aDataLength,
|
||||||
const otMessageSettings *aSettings)
|
const otMessageSettings *aSettings)
|
||||||
{
|
{
|
||||||
@@ -241,12 +241,12 @@ exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
|
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
|
||||||
otError otIp6RegisterMulticastListeners(otInstance * aInstance,
|
otError otIp6RegisterMulticastListeners(otInstance *aInstance,
|
||||||
const otIp6Address * aAddresses,
|
const otIp6Address *aAddresses,
|
||||||
uint8_t aAddressNum,
|
uint8_t aAddressNum,
|
||||||
const uint32_t * aTimeout,
|
const uint32_t *aTimeout,
|
||||||
otIp6RegisterMulticastListenersCallback aCallback,
|
otIp6RegisterMulticastListenersCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MlrManager>().RegisterMulticastListeners(aAddresses, aAddressNum, aTimeout,
|
return AsCoreType(aInstance).Get<MlrManager>().RegisterMulticastListeners(aAddresses, aAddressNum, aTimeout,
|
||||||
aCallback, aContext);
|
aCallback, aContext);
|
||||||
|
|||||||
@@ -43,15 +43,15 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otJoinerStart(otInstance * aInstance,
|
otError otJoinerStart(otInstance *aInstance,
|
||||||
const char * aPskd,
|
const char *aPskd,
|
||||||
const char * aProvisioningUrl,
|
const char *aProvisioningUrl,
|
||||||
const char * aVendorName,
|
const char *aVendorName,
|
||||||
const char * aVendorModel,
|
const char *aVendorModel,
|
||||||
const char * aVendorSwVersion,
|
const char *aVendorSwVersion,
|
||||||
const char * aVendorData,
|
const char *aVendorData,
|
||||||
otJoinerCallback aCallback,
|
otJoinerCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<MeshCoP::Joiner>().Start(aPskd, aProvisioningUrl, aVendorName, aVendorModel,
|
return AsCoreType(aInstance).Get<MeshCoP::Joiner>().Start(aPskd, aProvisioningUrl, aVendorName, aVendorModel,
|
||||||
aVendorSwVersion, aVendorData, aCallback, aContext);
|
aVendorSwVersion, aVendorData, aCallback, aContext);
|
||||||
|
|||||||
@@ -367,11 +367,11 @@ void otLinkResetCounters(otInstance *aInstance)
|
|||||||
AsCoreType(aInstance).Get<Mac::Mac>().ResetCounters();
|
AsCoreType(aInstance).Get<Mac::Mac>().ResetCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otLinkActiveScan(otInstance * aInstance,
|
otError otLinkActiveScan(otInstance *aInstance,
|
||||||
uint32_t aScanChannels,
|
uint32_t aScanChannels,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
otHandleActiveScanResult aCallback,
|
otHandleActiveScanResult aCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<Mac::Mac>().ActiveScan(aScanChannels, aScanDuration, aCallback, aCallbackContext);
|
return AsCoreType(aInstance).Get<Mac::Mac>().ActiveScan(aScanChannels, aScanDuration, aCallback, aCallbackContext);
|
||||||
}
|
}
|
||||||
@@ -381,11 +381,11 @@ bool otLinkIsActiveScanInProgress(otInstance *aInstance)
|
|||||||
return AsCoreType(aInstance).Get<Mac::Mac>().IsActiveScanInProgress();
|
return AsCoreType(aInstance).Get<Mac::Mac>().IsActiveScanInProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otLinkEnergyScan(otInstance * aInstance,
|
otError otLinkEnergyScan(otInstance *aInstance,
|
||||||
uint32_t aScanChannels,
|
uint32_t aScanChannels,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
otHandleEnergyScanResult aCallback,
|
otHandleEnergyScanResult aCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<Mac::Mac>().EnergyScan(aScanChannels, aScanDuration, aCallback, aCallbackContext);
|
return AsCoreType(aInstance).Get<Mac::Mac>().EnergyScan(aScanChannels, aScanDuration, aCallback, aCallbackContext);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,12 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otLinkMetricsQuery(otInstance * aInstance,
|
otError otLinkMetricsQuery(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
uint8_t aSeriesId,
|
uint8_t aSeriesId,
|
||||||
const otLinkMetrics * aLinkMetricsFlags,
|
const otLinkMetrics *aLinkMetricsFlags,
|
||||||
otLinkMetricsReportCallback aCallback,
|
otLinkMetricsReportCallback aCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<LinkMetrics::LinkMetrics>().SetReportCallback(aCallback, aCallbackContext);
|
AsCoreType(aInstance).Get<LinkMetrics::LinkMetrics>().SetReportCallback(aCallback, aCallbackContext);
|
||||||
|
|
||||||
@@ -55,13 +55,13 @@ otError otLinkMetricsQuery(otInstance * aInstance,
|
|||||||
AsCoreTypePtr(aLinkMetricsFlags));
|
AsCoreTypePtr(aLinkMetricsFlags));
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otLinkMetricsConfigForwardTrackingSeries(otInstance * aInstance,
|
otError otLinkMetricsConfigForwardTrackingSeries(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
uint8_t aSeriesId,
|
uint8_t aSeriesId,
|
||||||
const otLinkMetricsSeriesFlags aSeriesFlags,
|
const otLinkMetricsSeriesFlags aSeriesFlags,
|
||||||
const otLinkMetrics * aLinkMetricsFlags,
|
const otLinkMetrics *aLinkMetricsFlags,
|
||||||
otLinkMetricsMgmtResponseCallback aCallback,
|
otLinkMetricsMgmtResponseCallback aCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
LinkMetrics::LinkMetrics &linkMetrics = AsCoreType(aInstance).Get<LinkMetrics::LinkMetrics>();
|
LinkMetrics::LinkMetrics &linkMetrics = AsCoreType(aInstance).Get<LinkMetrics::LinkMetrics>();
|
||||||
|
|
||||||
@@ -72,14 +72,14 @@ otError otLinkMetricsConfigForwardTrackingSeries(otInstance *
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
|
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
|
||||||
otError otLinkMetricsConfigEnhAckProbing(otInstance * aInstance,
|
otError otLinkMetricsConfigEnhAckProbing(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
otLinkMetricsEnhAckFlags aEnhAckFlags,
|
otLinkMetricsEnhAckFlags aEnhAckFlags,
|
||||||
const otLinkMetrics * aLinkMetricsFlags,
|
const otLinkMetrics *aLinkMetricsFlags,
|
||||||
otLinkMetricsMgmtResponseCallback aCallback,
|
otLinkMetricsMgmtResponseCallback aCallback,
|
||||||
void * aCallbackContext,
|
void *aCallbackContext,
|
||||||
otLinkMetricsEnhAckProbingIeReportCallback aEnhAckCallback,
|
otLinkMetricsEnhAckProbingIeReportCallback aEnhAckCallback,
|
||||||
void * aEnhAckCallbackContext)
|
void *aEnhAckCallbackContext)
|
||||||
{
|
{
|
||||||
LinkMetrics::LinkMetrics &linkMetrics = AsCoreType(aInstance).Get<LinkMetrics::LinkMetrics>();
|
LinkMetrics::LinkMetrics &linkMetrics = AsCoreType(aInstance).Get<LinkMetrics::LinkMetrics>();
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ otError otLinkMetricsConfigEnhAckProbing(otInstance *
|
|||||||
AsCoreTypePtr(aLinkMetricsFlags));
|
AsCoreTypePtr(aLinkMetricsFlags));
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otLinkMetricsSendLinkProbe(otInstance * aInstance,
|
otError otLinkMetricsSendLinkProbe(otInstance *aInstance,
|
||||||
const otIp6Address *aDestination,
|
const otIp6Address *aDestination,
|
||||||
uint8_t aSeriesId,
|
uint8_t aSeriesId,
|
||||||
uint8_t aLength)
|
uint8_t aLength)
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ otRadioCaps otLinkRawGetCaps(otInstance *aInstance)
|
|||||||
return AsCoreType(aInstance).Get<Mac::LinkRaw>().GetCaps();
|
return AsCoreType(aInstance).Get<Mac::LinkRaw>().GetCaps();
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otLinkRawEnergyScan(otInstance * aInstance,
|
otError otLinkRawEnergyScan(otInstance *aInstance,
|
||||||
uint8_t aScanChannel,
|
uint8_t aScanChannel,
|
||||||
uint16_t aScanDuration,
|
uint16_t aScanDuration,
|
||||||
otLinkRawEnergyScanDone aCallback)
|
otLinkRawEnergyScanDone aCallback)
|
||||||
@@ -157,7 +157,7 @@ otError otLinkRawSrcMatchAddExtEntry(otInstance *aInstance, const otExtAddress *
|
|||||||
{
|
{
|
||||||
Mac::ExtAddress address;
|
Mac::ExtAddress address;
|
||||||
Error error = kErrorNone;
|
Error error = kErrorNone;
|
||||||
Instance & instance = AsCoreType(aInstance);
|
Instance &instance = AsCoreType(aInstance);
|
||||||
|
|
||||||
AssertPointerIsNotNull(aExtAddress);
|
AssertPointerIsNotNull(aExtAddress);
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ otError otLinkRawSrcMatchClearExtEntry(otInstance *aInstance, const otExtAddress
|
|||||||
{
|
{
|
||||||
Mac::ExtAddress address;
|
Mac::ExtAddress address;
|
||||||
Error error = kErrorNone;
|
Error error = kErrorNone;
|
||||||
Instance & instance = AsCoreType(aInstance);
|
Instance &instance = AsCoreType(aInstance);
|
||||||
|
|
||||||
AssertPointerIsNotNull(aExtAddress);
|
AssertPointerIsNotNull(aExtAddress);
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ exit:
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otLinkRawSetMacKey(otInstance * aInstance,
|
otError otLinkRawSetMacKey(otInstance *aInstance,
|
||||||
uint8_t aKeyIdMode,
|
uint8_t aKeyIdMode,
|
||||||
uint8_t aKeyId,
|
uint8_t aKeyId,
|
||||||
const otMacKey *aPrevKey,
|
const otMacKey *aPrevKey,
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otMultiRadioGetNeighborInfo(otInstance * aInstance,
|
otError otMultiRadioGetNeighborInfo(otInstance *aInstance,
|
||||||
const otExtAddress * aExtAddress,
|
const otExtAddress *aExtAddress,
|
||||||
otMultiRadioNeighborInfo *aNeighborInfo)
|
otMultiRadioNeighborInfo *aNeighborInfo)
|
||||||
{
|
{
|
||||||
Error error = kErrorNone;
|
Error error = kErrorNone;
|
||||||
|
|||||||
@@ -80,9 +80,9 @@ void otNat64InitAddressMappingIterator(otInstance *aInstance, otNat64AddressMapp
|
|||||||
AsCoreType(aInstance).Get<Nat64::Translator>().InitAddressMappingIterator(*aIterator);
|
AsCoreType(aInstance).Get<Nat64::Translator>().InitAddressMappingIterator(*aIterator);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otNat64GetNextAddressMapping(otInstance * aInstance,
|
otError otNat64GetNextAddressMapping(otInstance *aInstance,
|
||||||
otNat64AddressMappingIterator *aIterator,
|
otNat64AddressMappingIterator *aIterator,
|
||||||
otNat64AddressMapping * aMapping)
|
otNat64AddressMapping *aMapping)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aIterator);
|
AssertPointerIsNotNull(aIterator);
|
||||||
AssertPointerIsNotNull(aMapping);
|
AssertPointerIsNotNull(aMapping);
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ otError otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_
|
|||||||
aStable ? NetworkData::kStableSubset : NetworkData::kFullSet, aData, *aDataLength);
|
aStable ? NetworkData::kStableSubset : NetworkData::kFullSet, aData, *aDataLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otNetDataGetNextOnMeshPrefix(otInstance * aInstance,
|
otError otNetDataGetNextOnMeshPrefix(otInstance *aInstance,
|
||||||
otNetworkDataIterator *aIterator,
|
otNetworkDataIterator *aIterator,
|
||||||
otBorderRouterConfig * aConfig)
|
otBorderRouterConfig *aConfig)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aIterator);
|
AssertPointerIsNotNull(aIterator);
|
||||||
|
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance)
|
|||||||
return AsCoreType(aInstance).Get<NetworkData::Publisher>().IsDnsSrpServiceAdded();
|
return AsCoreType(aInstance).Get<NetworkData::Publisher>().IsDnsSrpServiceAdded();
|
||||||
}
|
}
|
||||||
|
|
||||||
void otNetDataSetDnsSrpServicePublisherCallback(otInstance * aInstance,
|
void otNetDataSetDnsSrpServicePublisherCallback(otInstance *aInstance,
|
||||||
otNetDataDnsSrpServicePublisherCallback aCallback,
|
otNetDataDnsSrpServicePublisherCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<NetworkData::Publisher>().SetDnsSrpServiceCallback(aCallback, aContext);
|
AsCoreType(aInstance).Get<NetworkData::Publisher>().SetDnsSrpServiceCallback(aCallback, aContext);
|
||||||
}
|
}
|
||||||
@@ -97,9 +97,9 @@ bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix)
|
|||||||
return AsCoreType(aInstance).Get<NetworkData::Publisher>().IsPrefixAdded(AsCoreType(aPrefix));
|
return AsCoreType(aInstance).Get<NetworkData::Publisher>().IsPrefixAdded(AsCoreType(aPrefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
void otNetDataSetPrefixPublisherCallback(otInstance * aInstance,
|
void otNetDataSetPrefixPublisherCallback(otInstance *aInstance,
|
||||||
otNetDataPrefixPublisherCallback aCallback,
|
otNetDataPrefixPublisherCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<NetworkData::Publisher>().SetPrefixCallback(aCallback, aContext);
|
return AsCoreType(aInstance).Get<NetworkData::Publisher>().SetPrefixCallback(aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otThreadGetNextDiagnosticTlv(const otMessage * aMessage,
|
otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage,
|
||||||
otNetworkDiagIterator *aIterator,
|
otNetworkDiagIterator *aIterator,
|
||||||
otNetworkDiagTlv * aNetworkDiagTlv)
|
otNetworkDiagTlv *aNetworkDiagTlv)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aIterator);
|
AssertPointerIsNotNull(aIterator);
|
||||||
AssertPointerIsNotNull(aNetworkDiagTlv);
|
AssertPointerIsNotNull(aNetworkDiagTlv);
|
||||||
@@ -52,18 +52,18 @@ otError otThreadGetNextDiagnosticTlv(const otMessage * aMessage,
|
|||||||
return NetworkDiagnostic::NetworkDiagnostic::GetNextDiagTlv(AsCoapMessage(aMessage), *aIterator, *aNetworkDiagTlv);
|
return NetworkDiagnostic::NetworkDiagnostic::GetNextDiagTlv(AsCoapMessage(aMessage), *aIterator, *aNetworkDiagTlv);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otThreadSendDiagnosticGet(otInstance * aInstance,
|
otError otThreadSendDiagnosticGet(otInstance *aInstance,
|
||||||
const otIp6Address * aDestination,
|
const otIp6Address *aDestination,
|
||||||
const uint8_t aTlvTypes[],
|
const uint8_t aTlvTypes[],
|
||||||
uint8_t aCount,
|
uint8_t aCount,
|
||||||
otReceiveDiagnosticGetCallback aCallback,
|
otReceiveDiagnosticGetCallback aCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<NetworkDiagnostic::NetworkDiagnostic>().SendDiagnosticGet(
|
return AsCoreType(aInstance).Get<NetworkDiagnostic::NetworkDiagnostic>().SendDiagnosticGet(
|
||||||
AsCoreType(aDestination), aTlvTypes, aCount, aCallback, aCallbackContext);
|
AsCoreType(aDestination), aTlvTypes, aCount, aCallback, aCallbackContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otThreadSendDiagnosticReset(otInstance * aInstance,
|
otError otThreadSendDiagnosticReset(otInstance *aInstance,
|
||||||
const otIp6Address *aDestination,
|
const otIp6Address *aDestination,
|
||||||
const uint8_t aTlvTypes[],
|
const uint8_t aTlvTypes[],
|
||||||
uint8_t aCount)
|
uint8_t aCount)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ otError otServerAddService(otInstance *aInstance, const otServiceConfig *aConfig
|
|||||||
aConfig->mServerConfig.mStable, serverData);
|
aConfig->mServerConfig.mStable, serverData);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otServerRemoveService(otInstance * aInstance,
|
otError otServerRemoveService(otInstance *aInstance,
|
||||||
uint32_t aEnterpriseNumber,
|
uint32_t aEnterpriseNumber,
|
||||||
const uint8_t *aServiceData,
|
const uint8_t *aServiceData,
|
||||||
uint8_t aServiceDataLength)
|
uint8_t aServiceDataLength)
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otSntpClientQuery(otInstance * aInstance,
|
otError otSntpClientQuery(otInstance *aInstance,
|
||||||
const otSntpQuery * aQuery,
|
const otSntpQuery *aQuery,
|
||||||
otSntpResponseHandler aHandler,
|
otSntpResponseHandler aHandler,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<Sntp::Client>().Query(aQuery, aHandler, aContext);
|
return AsCoreType(aInstance).Get<Sntp::Client>().Query(aQuery, aHandler, aContext);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ otError otSrpServerSetLeaseConfig(otInstance *aInstance, const otSrpServerLeaseC
|
|||||||
return AsCoreType(aInstance).Get<Srp::Server>().SetLeaseConfig(AsCoreType(aLeaseConfig));
|
return AsCoreType(aInstance).Get<Srp::Server>().SetLeaseConfig(AsCoreType(aLeaseConfig));
|
||||||
}
|
}
|
||||||
|
|
||||||
void otSrpServerSetServiceUpdateHandler(otInstance * aInstance,
|
void otSrpServerSetServiceUpdateHandler(otInstance *aInstance,
|
||||||
otSrpServerServiceUpdateHandler aServiceHandler,
|
otSrpServerServiceUpdateHandler aServiceHandler,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<Srp::Server>().SetServiceHandler(aServiceHandler, aContext);
|
AsCoreType(aInstance).Get<Srp::Server>().SetServiceHandler(aServiceHandler, aContext);
|
||||||
}
|
}
|
||||||
@@ -166,17 +166,17 @@ uint32_t otSrpServerHostGetKeyLease(const otSrpServerHost *aHost)
|
|||||||
return AsCoreType(aHost).GetKeyLease();
|
return AsCoreType(aHost).GetKeyLease();
|
||||||
}
|
}
|
||||||
|
|
||||||
const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost * aHost,
|
const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost *aHost,
|
||||||
const otSrpServerService *aService)
|
const otSrpServerService *aService)
|
||||||
{
|
{
|
||||||
return AsCoreType(aHost).FindNextService(AsCoreTypePtr(aService), Srp::Server::kFlagsBaseTypeServiceOnly);
|
return AsCoreType(aHost).FindNextService(AsCoreTypePtr(aService), Srp::Server::kFlagsBaseTypeServiceOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
const otSrpServerService *otSrpServerHostFindNextService(const otSrpServerHost * aHost,
|
const otSrpServerService *otSrpServerHostFindNextService(const otSrpServerHost *aHost,
|
||||||
const otSrpServerService *aPrevService,
|
const otSrpServerService *aPrevService,
|
||||||
otSrpServerServiceFlags aFlags,
|
otSrpServerServiceFlags aFlags,
|
||||||
const char * aServiceName,
|
const char *aServiceName,
|
||||||
const char * aInstanceName)
|
const char *aInstanceName)
|
||||||
{
|
{
|
||||||
return AsCoreType(aHost).FindNextService(AsCoreTypePtr(aPrevService), aFlags, aServiceName, aInstanceName);
|
return AsCoreType(aHost).FindNextService(AsCoreTypePtr(aPrevService), aFlags, aServiceName, aInstanceName);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
|
|
||||||
using namespace ot;
|
using namespace ot;
|
||||||
|
|
||||||
otError otTcpEndpointInitialize(otInstance * aInstance,
|
otError otTcpEndpointInitialize(otInstance *aInstance,
|
||||||
otTcpEndpoint * aEndpoint,
|
otTcpEndpoint *aEndpoint,
|
||||||
const otTcpEndpointInitializeArgs *aArgs)
|
const otTcpEndpointInitializeArgs *aArgs)
|
||||||
{
|
{
|
||||||
return AsCoreType(aEndpoint).Initialize(AsCoreType(aInstance), *aArgs);
|
return AsCoreType(aEndpoint).Initialize(AsCoreType(aInstance), *aArgs);
|
||||||
@@ -119,8 +119,8 @@ otError otTcpEndpointDeinitialize(otTcpEndpoint *aEndpoint)
|
|||||||
return AsCoreType(aEndpoint).Deinitialize();
|
return AsCoreType(aEndpoint).Deinitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otTcpListenerInitialize(otInstance * aInstance,
|
otError otTcpListenerInitialize(otInstance *aInstance,
|
||||||
otTcpListener * aListener,
|
otTcpListener *aListener,
|
||||||
const otTcpListenerInitializeArgs *aArgs)
|
const otTcpListenerInitializeArgs *aArgs)
|
||||||
{
|
{
|
||||||
return AsCoreType(aListener).Initialize(AsCoreType(aInstance), *aArgs);
|
return AsCoreType(aListener).Initialize(AsCoreType(aInstance), *aArgs);
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ void otTcpCircularSendBufferInitialize(otTcpCircularSendBuffer *aSendBuffer, voi
|
|||||||
AsCoreType(aSendBuffer).Initialize(aDataBuffer, aCapacity);
|
AsCoreType(aSendBuffer).Initialize(aDataBuffer, aCapacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otTcpCircularSendBufferWrite(otTcpEndpoint * aEndpoint,
|
otError otTcpCircularSendBufferWrite(otTcpEndpoint *aEndpoint,
|
||||||
otTcpCircularSendBuffer *aSendBuffer,
|
otTcpCircularSendBuffer *aSendBuffer,
|
||||||
const void * aData,
|
const void *aData,
|
||||||
size_t aLength,
|
size_t aLength,
|
||||||
size_t * aWritten,
|
size_t *aWritten,
|
||||||
uint32_t aFlags)
|
uint32_t aFlags)
|
||||||
{
|
{
|
||||||
AssertPointerIsNotNull(aWritten);
|
AssertPointerIsNotNull(aWritten);
|
||||||
|
|||||||
+10
-10
@@ -62,7 +62,7 @@ const otExtendedPanId *otThreadGetExtendedPanId(otInstance *aInstance)
|
|||||||
otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *aExtendedPanId)
|
otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *aExtendedPanId)
|
||||||
{
|
{
|
||||||
Error error = kErrorNone;
|
Error error = kErrorNone;
|
||||||
Instance & instance = AsCoreType(aInstance);
|
Instance &instance = AsCoreType(aInstance);
|
||||||
const MeshCoP::ExtendedPanId &extPanId = AsCoreType(aExtendedPanId);
|
const MeshCoP::ExtendedPanId &extPanId = AsCoreType(aExtendedPanId);
|
||||||
|
|
||||||
VerifyOrExit(instance.Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
|
VerifyOrExit(instance.Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
|
||||||
@@ -253,7 +253,7 @@ otError otThreadSetFixedDuaInterfaceIdentifier(otInstance *aInstance, const otIp
|
|||||||
|
|
||||||
const otIp6InterfaceIdentifier *otThreadGetFixedDuaInterfaceIdentifier(otInstance *aInstance)
|
const otIp6InterfaceIdentifier *otThreadGetFixedDuaInterfaceIdentifier(otInstance *aInstance)
|
||||||
{
|
{
|
||||||
Instance & instance = AsCoreType(aInstance);
|
Instance &instance = AsCoreType(aInstance);
|
||||||
const otIp6InterfaceIdentifier *iid = nullptr;
|
const otIp6InterfaceIdentifier *iid = nullptr;
|
||||||
|
|
||||||
if (instance.Get<DuaManager>().IsFixedDuaInterfaceIdentifierSet())
|
if (instance.Get<DuaManager>().IsFixedDuaInterfaceIdentifierSet())
|
||||||
@@ -411,20 +411,20 @@ bool otThreadIsSingleton(otInstance *aInstance)
|
|||||||
return AsCoreType(aInstance).Get<Mle::MleRouter>().IsSingleton();
|
return AsCoreType(aInstance).Get<Mle::MleRouter>().IsSingleton();
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otThreadDiscover(otInstance * aInstance,
|
otError otThreadDiscover(otInstance *aInstance,
|
||||||
uint32_t aScanChannels,
|
uint32_t aScanChannels,
|
||||||
uint16_t aPanId,
|
uint16_t aPanId,
|
||||||
bool aJoiner,
|
bool aJoiner,
|
||||||
bool aEnableEui64Filtering,
|
bool aEnableEui64Filtering,
|
||||||
otHandleActiveScanResult aCallback,
|
otHandleActiveScanResult aCallback,
|
||||||
void * aCallbackContext)
|
void *aCallbackContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<Mle::DiscoverScanner>().Discover(
|
return AsCoreType(aInstance).Get<Mle::DiscoverScanner>().Discover(
|
||||||
Mac::ChannelMask(aScanChannels), aPanId, aJoiner, aEnableEui64Filtering,
|
Mac::ChannelMask(aScanChannels), aPanId, aJoiner, aEnableEui64Filtering,
|
||||||
/* aFilterIndexes (use hash of factory EUI64) */ nullptr, aCallback, aCallbackContext);
|
/* aFilterIndexes (use hash of factory EUI64) */ nullptr, aCallback, aCallbackContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
otError otThreadSetJoinerAdvertisement(otInstance * aInstance,
|
otError otThreadSetJoinerAdvertisement(otInstance *aInstance,
|
||||||
uint32_t aOui,
|
uint32_t aOui,
|
||||||
const uint8_t *aAdvData,
|
const uint8_t *aAdvData,
|
||||||
uint8_t aAdvDataLength)
|
uint8_t aAdvDataLength)
|
||||||
@@ -457,18 +457,18 @@ void otThreadResetMleCounters(otInstance *aInstance)
|
|||||||
AsCoreType(aInstance).Get<Mle::MleRouter>().ResetCounters();
|
AsCoreType(aInstance).Get<Mle::MleRouter>().ResetCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
void otThreadRegisterParentResponseCallback(otInstance * aInstance,
|
void otThreadRegisterParentResponseCallback(otInstance *aInstance,
|
||||||
otThreadParentResponseCallback aCallback,
|
otThreadParentResponseCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
AsCoreType(aInstance).Get<Mle::MleRouter>().RegisterParentResponseStatsCallback(aCallback, aContext);
|
AsCoreType(aInstance).Get<Mle::MleRouter>().RegisterParentResponseStatsCallback(aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE
|
#if OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE
|
||||||
otError otThreadLocateAnycastDestination(otInstance * aInstance,
|
otError otThreadLocateAnycastDestination(otInstance *aInstance,
|
||||||
const otIp6Address * aAnycastAddress,
|
const otIp6Address *aAnycastAddress,
|
||||||
otThreadAnycastLocatorCallback aCallback,
|
otThreadAnycastLocatorCallback aCallback,
|
||||||
void * aContext)
|
void *aContext)
|
||||||
{
|
{
|
||||||
return AsCoreType(aInstance).Get<AnycastLocator>().Locate(AsCoreType(aAnycastAddress), aCallback, aContext);
|
return AsCoreType(aInstance).Get<AnycastLocator>().Locate(AsCoreType(aAnycastAddress), aCallback, aContext);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user