[doxygen] remove empty line at end of block (#10748)

This commit is contained in:
Jonathan Hui
2024-09-24 09:51:34 -07:00
committed by GitHub
parent c0b5a54e10
commit c182933979
484 changed files with 1 additions and 9070 deletions
-2
View File
@@ -160,7 +160,6 @@
* @}
*
* @}
*
*/
/**
@@ -193,5 +192,4 @@
* @defgroup plat-trel TREL - Platform
*
* @}
*
*/
-1
View File
@@ -88,5 +88,4 @@
* @defgroup config-wakeup Wake-up
*
* @}
*
*/
-4
View File
@@ -49,7 +49,6 @@
* @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
*
* The size of CLI UART RX buffer in bytes.
*
*/
#ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
@@ -63,7 +62,6 @@
* @def OPENTHREAD_CONFIG_CLI_TX_BUFFER_SIZE
*
* The size of CLI message buffer in bytes.
*
*/
#ifndef OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE
#define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 1024
@@ -106,7 +104,6 @@ uint16_t sSendLength;
/**
* Macro to acquire an exclusive lock of uart cli output
* Default implementation does nothing
*
*/
#ifndef OT_CLI_UART_OUTPUT_LOCK
#define OT_CLI_UART_OUTPUT_LOCK() \
@@ -118,7 +115,6 @@ uint16_t sSendLength;
/**
* Macro to release the exclusive lock of uart cli output
* Default implementation does nothing
*
*/
#ifndef OT_CLI_UART_OUTPUT_UNLOCK
#define OT_CLI_UART_OUTPUT_UNLOCK() \
-1
View File
@@ -51,7 +51,6 @@
* Initializes the CLI app.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
extern void otAppCliInit(otInstance *aInstance);
-1
View File
@@ -56,7 +56,6 @@
* Initializes the NCP app.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
extern void otAppNcpInit(otInstance *aInstance);
extern void otAppNcpInitMulti(otInstance **aInstances, uint8_t count);
@@ -29,7 +29,6 @@
/**
* This header file defines the OpenThread core configuration example for an Border Router. This is intended for use
* in `script/check-size`.
*
*/
#ifndef OT_CORE_CONFIG_CHECK_SIZE_BR_H_
@@ -29,7 +29,6 @@
/**
* This header file defines the OpenThread core configuration example for an FTD device (not acting as BR). This is
* intended for use in `script/check-size`.
*
*/
#ifndef OT_CORE_CONFIG_CHECK_SIZE_FTD_H_
@@ -29,7 +29,6 @@
/**
* This header file defines the OpenThread core configuration example for an MTD/SED device. This is intended for use
* in `script/check-size`.
*
*/
#ifndef OT_CORE_CONFIG_CHECK_SIZE_MTD_H_
-5
View File
@@ -49,7 +49,6 @@ extern "C" {
*
* @param[in] argc Number of arguments in @p argv.
* @param[in] argv Argument vector.
*
*/
void otSysInit(int argc, char *argv[]);
@@ -58,7 +57,6 @@ void otSysInit(int argc, char *argv[]);
*
* @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
* when deinitialization of OpenThread's drivers is most appropriate.
*
*/
void otSysDeinit(void);
@@ -69,7 +67,6 @@ void otSysDeinit(void);
*
* @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
* in the main loop to determine when to shut down and re-initialize the OpenThread instance.
*
*/
bool otSysPseudoResetWasRequested(void);
@@ -80,7 +77,6 @@ bool otSysPseudoResetWasRequested(void);
* in the main loop when processing OpenThread's drivers is most appropriate.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otSysProcessDrivers(otInstance *aInstance);
@@ -89,7 +85,6 @@ void otSysProcessDrivers(otInstance *aInstance);
*
* @note This function is not handled by the OpenThread library. Instead, the system/RTOS should handle this function
* and schedule a call to `otSysProcessDrivers()`.
*
*/
extern void otSysEventSignalPending(void);
-1
View File
@@ -44,7 +44,6 @@
/**
* Diagnostics mode variables.
*
*/
static bool sDiagMode = false;
-1
View File
@@ -29,7 +29,6 @@
/**
* @file
* This file implements an entropy source based on /dev/urandom or pseudo-random generator.
*
*/
#include "platform-simulation.h"
@@ -29,14 +29,12 @@
/**
* @file
* This file includes the platform-specific configuration.
*
*/
/**
* @def OPENTHREAD_SIMULATION_UART_BAUDRATE
*
* This setting configures the baud rate of the UART.
*
*/
#ifndef OPENTHREAD_SIMULATION_UART_BAUDRATE
#define OPENTHREAD_SIMULATION_UART_BAUDRATE B115200
@@ -46,7 +44,6 @@
* @def OPENTHREAD_SIMULATION_VIRTUAL_TIME
*
* This setting configures whether to use virtual time (used for simulation) in simulation platform.
*
*/
#ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME
#define OPENTHREAD_SIMULATION_VIRTUAL_TIME 0
@@ -56,7 +53,6 @@
* @def OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART
*
* This setting configures whether to use virtual time for UART.
*
*/
#ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART
#define OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART 0
@@ -66,7 +62,6 @@
* @def OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
*
* Define as 1 to enable pseudo-reset.
*
*/
#ifndef OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
#define OPENTHREAD_PLATFORM_USE_PSEUDO_RESET 0
@@ -76,7 +71,6 @@
* @def OPENTHREAD_CONFIG_NCP_SPI_ENABLE
*
* Define as 1 to enable SPI NCP interface.
*
*/
#ifndef OPENTHREAD_CONFIG_NCP_SPI_ENABLE
#define OPENTHREAD_CONFIG_NCP_SPI_ENABLE 0
@@ -84,7 +78,6 @@
/**
* Check OTNS configurations
*
*/
#if OPENTHREAD_CONFIG_OTNS_ENABLE
@@ -98,7 +91,6 @@
* @def OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE
*
* This setting configures the maximum network size in simulation.
*
*/
#ifndef OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE
#define OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE 33
@@ -111,7 +103,6 @@
* socket.
*
* This is intended for testing of the OpenThread Multicast DNS (mDNS) module.
*
*/
#ifndef OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX
#define OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX 0
@@ -121,7 +112,6 @@
* @def OPENTHREAD_SIMULATION_IMPLMENT_INFRA_IF
*
* Define as 1 for the simulation platform to provide implementation of `otPlatInfra` APIs.
*
*/
#ifndef OPENTHREAD_SIMULATION_IMPLEMENT_INFRA_IF
#define OPENTHREAD_SIMULATION_IMPLEMENT_INFRA_IF 1
@@ -86,13 +86,11 @@ enum
/**
* Unique node ID.
*
*/
extern uint32_t gNodeId;
/**
* Initializes the alarm service used by OpenThread.
*
*/
void platformAlarmInit(uint32_t aSpeedUpFactor);
@@ -100,7 +98,6 @@ void platformAlarmInit(uint32_t aSpeedUpFactor);
* Retrieves the time remaining until the alarm fires.
*
* @param[out] aTimeout A pointer to the timeval struct.
*
*/
void platformAlarmUpdateTimeout(struct timeval *aTimeout);
@@ -108,7 +105,6 @@ void platformAlarmUpdateTimeout(struct timeval *aTimeout);
* Performs alarm driver processing.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void platformAlarmProcess(otInstance *aInstance);
@@ -116,7 +112,6 @@ void platformAlarmProcess(otInstance *aInstance);
* Returns the duration to the next alarm event time (in micro seconds)
*
* @returns The duration (in micro seconds) to the next alarm event.
*
*/
uint64_t platformAlarmGetNext(void);
@@ -124,7 +119,6 @@ uint64_t platformAlarmGetNext(void);
* Returns the current alarm time.
*
* @returns The current alarm time.
*
*/
uint64_t platformAlarmGetNow(void);
@@ -132,19 +126,16 @@ uint64_t platformAlarmGetNow(void);
* Advances the alarm time by @p aDelta.
*
* @param[in] aDelta The amount of time to advance.
*
*/
void platformAlarmAdvanceNow(uint64_t aDelta);
/**
* Initializes the radio service used by OpenThread.
*
*/
void platformRadioInit(void);
/**
* Shuts down the radio service used by OpenThread.
*
*/
void platformRadioDeinit(void);
@@ -154,7 +145,6 @@ void platformRadioDeinit(void);
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[in] aBuf A pointer to the received radio frame.
* @param[in] aBufLength The size of the received radio frame.
*
*/
void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLength);
@@ -165,7 +155,6 @@ void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLen
* @param[in,out] aWriteFdSet A pointer to the write file descriptors.
* @param[in,out] aTimeout A pointer to the timeout.
* @param[in,out] aMaxFd A pointer to the max file descriptor.
*
*/
void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd);
@@ -175,13 +164,11 @@ void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct ti
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aReadFdSet A pointer to the read file descriptors.
* @param[in] aWriteFdSet A pointer to the write file descriptors.
*
*/
void platformRadioProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet);
/**
* Initializes the random number service used by OpenThread.
*
*/
void platformRandomInit(void);
@@ -189,7 +176,6 @@ void platformRandomInit(void);
* This functions set the file name to use for logging.
*
* @param[in] aName The file name.
*
*/
void platformLoggingSetFileName(const char *aName);
@@ -197,13 +183,11 @@ void platformLoggingSetFileName(const char *aName);
* Initializes the platform logging service.
*
* @param[in] aName The log module name to set with syslog.
*
*/
void platformLoggingInit(const char *aName);
/**
* Finalizes the platform logging service.
*
*/
void platformLoggingDeinit(void);
@@ -213,19 +197,16 @@ void platformLoggingDeinit(void);
* @param[in,out] aReadFdSet A pointer to the read file descriptors.
* @param[in,out] aWriteFdSet A pointer to the write file descriptors.
* @param[in,out] aMaxFd A pointer to the max file descriptor.
*
*/
void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd);
/**
* Performs radio driver processing.
*
*/
void platformUartProcess(void);
/**
* Restores the Uart.
*
*/
void platformUartRestore(void);
@@ -233,7 +214,6 @@ void platformUartRestore(void);
* Sends a simulation event.
*
* @param[in] aEvent A pointer to the simulation event to send
*
*/
void otSimSendEvent(const struct Event *aEvent);
@@ -242,7 +222,6 @@ void otSimSendEvent(const struct Event *aEvent);
*
* @param[in] aData A pointer to the UART data.
* @param[in] aLength Length of UART data.
*
*/
void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength);
@@ -250,7 +229,6 @@ void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength);
* Checks if radio transmitting is pending.
*
* @returns Whether radio transmitting is pending.
*
*/
bool platformRadioIsTransmitPending(void);
@@ -262,7 +240,6 @@ bool platformRadioIsTransmitPending(void);
*
* @param[in] aEnvName The name of the environment variable.
* @param[out] aValue A pointer to the unsigned 16-bit integer.
*
*/
void parseFromEnvAsUint16(const char *aEnvName, uint16_t *aValue);
@@ -272,13 +249,11 @@ void parseFromEnvAsUint16(const char *aEnvName, uint16_t *aValue);
* Initializes the TREL service.
*
* @param[in] aSpeedUpFactor The time speed-up factor.
*
*/
void platformTrelInit(uint32_t aSpeedUpFactor);
/**
* Shuts down the TREL service.
*
*/
void platformTrelDeinit(void);
@@ -289,7 +264,6 @@ void platformTrelDeinit(void);
* @param[in,out] aWriteFdSet A pointer to the write file descriptors.
* @param[in,out] aTimeout A pointer to the timeout.
* @param[in,out] aMaxFd A pointer to the max file descriptor.
*
*/
void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd);
@@ -299,7 +273,6 @@ void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct tim
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aReadFdSet A pointer to the read file descriptors.
* @param[in] aWriteFdSet A pointer to the write file descriptors.
*
*/
void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet);
@@ -309,13 +282,11 @@ void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const
/**
* Initializes the platform infra-if module.
*
*/
void platformInfraIfInit(void);
/**
* Shuts down the platform infra-if module.
*
*/
void platformInfraIfDeinit(void);
@@ -325,7 +296,6 @@ void platformInfraIfDeinit(void);
* @param[in,out] aReadFdSet A pointer to the read file descriptors.
* @param[in,out] aWriteFdSet A pointer to the write file descriptors.
* @param[in,out] aMaxFd A pointer to the max file descriptor.
*
*/
void platformInfraIfUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd);
@@ -335,7 +305,6 @@ void platformInfraIfUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aM
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aReadFdSet A pointer to the read file descriptors.
* @param[in] aWriteFdSet A pointer to the write file descriptors.
*
*/
void platformInfraIfProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet);
@@ -348,7 +317,6 @@ void platformInfraIfProcess(otInstance *aInstance, const fd_set *aReadFdSet, con
*
* @param[in,out] aReadFdSet A pointer to the read file descriptors.
* @param[in,out] aMaxFd A pointer to the max file descriptor.
*
*/
void platformMdnsSocketUpdateFdSet(fd_set *aReadFdSet, int *aMaxFd);
@@ -357,7 +325,6 @@ void platformMdnsSocketUpdateFdSet(fd_set *aReadFdSet, int *aMaxFd);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aReadFdSet A pointer to the read file descriptors.
*
*/
void platformMdnsSocketProcess(otInstance *aInstance, const fd_set *aReadFdSet);
@@ -365,7 +332,6 @@ void platformMdnsSocketProcess(otInstance *aInstance, const fd_set *aReadFdSet);
/**
* Shuts down the BLE service used by OpenThread.
*
*/
void platformBleDeinit(void);
@@ -376,7 +342,6 @@ void platformBleDeinit(void);
* @param[in,out] aWriteFdSet A pointer to the write file descriptors.
* @param[in,out] aTimeout A pointer to the timeout.
* @param[in,out] aMaxFd A pointer to the max file descriptor.
*
*/
void platformBleUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd);
@@ -386,7 +351,6 @@ void platformBleUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct time
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aReadFdSet A pointer to the read file descriptors.
* @param[in] aWriteFdSet A pointer to the write file descriptors.
*
*/
void platformBleProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet);
@@ -35,7 +35,6 @@
* Represents a socket for communication with other simulation node.
*
* This is used for emulation of 15.4 radio or other interfaces.
*
*/
typedef struct utilsSocket
{
@@ -60,7 +59,6 @@ extern const char *gLocalInterface; ///< Local interface name or address to use
* @param[in] aFd The FD to add.
* @param[in] aFdSet The FD set to add to.
* @param[in] aMaxFd A pointer to track maximum FD in @p aFdSet (can be NULL).
*
*/
void utilsAddFdToFdSet(int aFd, fd_set *aFdSet, int *aMaxFd);
@@ -69,7 +67,6 @@ void utilsAddFdToFdSet(int aFd, fd_set *aFdSet, int *aMaxFd);
*
* @param[in] aSocket The socket to initialize.
* @param[in] aPortBase The base port number value. Nodes will determine their port as `aPortBased + gNodeId`.
*
*/
void utilsInitSocket(utilsSocket *aSocket, uint16_t aPortBase);
@@ -77,7 +74,6 @@ void utilsInitSocket(utilsSocket *aSocket, uint16_t aPortBase);
* De-initializes the socket.
*
* @param[in] aSocket The socket to de-initialize.
*
*/
void utilsDeinitSocket(utilsSocket *aSocket);
@@ -87,7 +83,6 @@ void utilsDeinitSocket(utilsSocket *aSocket);
* @param[in] aSocket The socket.
* @param[in] aFdSet The (read) FD set to add to.
* @param[in] aMaxFd A pointer to track maximum FD in @p aFdSet (can be NULL).
*
*/
void utilsAddSocketRxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd);
@@ -97,7 +92,6 @@ void utilsAddSocketRxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd)
* @param[in] aSocket The socket.
* @param[in] aFdSet The (write) FD set to add to.
* @param[in] aMaxFd A pointer to track maximum FD in @p aFdSet (can be NULL).
*
*/
void utilsAddSocketTxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd);
@@ -109,7 +103,6 @@ void utilsAddSocketTxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd)
*
* @retval TRUE The socket RX FD is in @p aReadFdSet, and socket can receive.
* @retval FALSE The socket RX FD is not in @p aReadFdSet. Socket is not ready to receive.
*
*/
bool utilsCanSocketReceive(const utilsSocket *aSocket, const fd_set *aReadFdSet);
@@ -121,7 +114,6 @@ bool utilsCanSocketReceive(const utilsSocket *aSocket, const fd_set *aReadFdSet)
*
* @retval TRUE The socket TX FD is in @p aWriteFdSet, and socket can send.
* @retval FALSE The socket TX FD is not in @p aWriteFdSet. Socket is not ready to send.
*
*/
bool utilsCanSocketSend(const utilsSocket *aSocket, const fd_set *aWriteFdSet);
@@ -137,7 +129,6 @@ bool utilsCanSocketSend(const utilsSocket *aSocket, const fd_set *aWriteFdSet);
* Can be NULL if not needed.
*
* @returns The number of received bytes written into @p aBuffer.
*
*/
uint16_t utilsReceiveFromSocket(const utilsSocket *aSocket,
void *aBuffer,
@@ -150,7 +141,6 @@ uint16_t utilsReceiveFromSocket(const utilsSocket *aSocket,
* @param[in] aSocket The socket.
* @param[in] aBuffer The buffer containing the bytes to sent.
* @param[in] aBufferSize Size of data in @p buffer in bytes.
*
*/
void utilsSendOverSocket(const utilsSocket *aSocket, const void *aBuffer, uint16_t aBufferLength);
-1
View File
@@ -70,7 +70,6 @@ static void handleSignal(int aSignal)
/**
* Defines the argument return values.
*
*/
enum
{
-3
View File
@@ -40,7 +40,6 @@
* condition is false.
*
* @param[in] aCondition A Boolean expression to be evaluated.
*
*/
#define otEXPECT(aCondition) \
do \
@@ -59,7 +58,6 @@
* @param[in] aCondition A Boolean expression to be evaluated.
* @param[in] aAction An expression or block to execute when the
* assertion fails.
*
*/
#define otEXPECT_ACTION(aCondition, aAction) \
do \
@@ -77,7 +75,6 @@
* @param[in] aArray Name of the array variable.
*
* @returns Number of elements in the array.
*
*/
#define otARRAY_LENGTH(aArray) (sizeof(aArray) / sizeof(aArray[0]))
-1
View File
@@ -47,7 +47,6 @@
* @param[in] aSource The byte array.
*
* @returns The 64-bit value as a uint64_t.
*
*/
static inline uint64_t otEncodingReadUint64Le(const uint8_t *aSource)
{
@@ -50,7 +50,6 @@ class LinkMetricsDataInfo : public LinkedListEntry<LinkMetricsDataInfo>, public
public:
/**
* Constructor.
*
*/
LinkMetricsDataInfo(void) { Clear(); };
@@ -61,7 +60,6 @@ public:
* @param[in] aShortAddress Short Address of the Probing Initiator tracked by this object.
* @param[in] aExtAddress A reference to the Extended Address of the Probing Initiator tracked by this
* object.
*
*/
void Set(otLinkMetrics aLinkMetrics, otShortAddress aShortAddress, const otExtAddress &aExtAddress)
{
@@ -81,7 +79,6 @@ public:
* at least 2 bytes (per spec 4.11.3.4.4.6). Otherwise the behavior would be undefined.
*
* @returns The number of bytes written. `0` on failure.
*
*/
uint8_t GetEnhAckData(uint8_t aLqi, int8_t aRssi, uint8_t *aData) const
{
@@ -117,7 +114,6 @@ public:
* Gets the length of Link Metrics Data.
*
* @returns The number of bytes for the data.
*
*/
uint8_t GetEnhAckDataLen() const
{
@@ -129,7 +125,6 @@ public:
* Gets the metrics configured for the Enhanced-ACK Based Probing.
*
* @returns The metrics configured.
*
*/
otLinkMetrics GetLinkMetrics(void) const { return mLinkMetrics; }
-6
View File
@@ -33,7 +33,6 @@
*
* APIs defined in this module could be used by a platform to implement Enhanced-ACK Based Probing feature
* (Probing Subject side) in its radio driver.
*
*/
#ifndef OPENTHREAD_UTILS_LINK_METRICS_H
@@ -52,7 +51,6 @@ extern "C" {
*
* @param[in] aNoiseFloor The noise floor used by Link Metrics. It should be set to the platform's
* noise floor (measured noise floor, receiver sensitivity or a constant).
*
*/
void otLinkMetricsInit(int8_t aNoiseFloor);
@@ -72,7 +70,6 @@ void otLinkMetricsInit(int8_t aNoiseFloor);
* @retval OT_ERROR_INVALID_ARGS @p aExtAddress is `nullptr`.
* @retval OT_ERROR_NOT_FOUND The Initiator indicated by @p aShortAddress is not found when trying to clear.
* @retval OT_ERROR_NO_BUFS No more Initiator can be supported.
*
*/
otError otLinkMetricsConfigureEnhAckProbing(otShortAddress aShortAddress,
const otExtAddress *aExtAddress,
@@ -93,7 +90,6 @@ otError otLinkMetricsConfigureEnhAckProbing(otShortAddress aShortAddress,
* configured before.
*
* @returns The size of data read. Would be `0` if the Initiator is not found or @p aData is invalid.
*
*/
uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi, int8_t aRssi, uint8_t *aData);
@@ -103,13 +99,11 @@ uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi
* @param[in] aMacAddress The Mac address of the Initiator.
*
* @returns The size of data. `0` if it's not configured for the Initiator.
*
*/
uint8_t otLinkMetricsEnhAckGetDataLen(const otMacAddress *aMacAddress);
/**
* This method resets Enhanced-ACK Based Probing data.
*
*/
void otLinkMetricsResetEnhAckProbing(void);
-1
View File
@@ -29,7 +29,6 @@
/**
* @file
* This file implements the OpenThread platform abstraction for logging.
*
*/
#include <openthread-core-config.h>
-9
View File
@@ -51,7 +51,6 @@ extern "C" {
* @def LOG_RTT_BUFFER_INDEX
*
* RTT's buffer index.
*
*/
#ifndef LOG_RTT_BUFFER_INDEX
#define LOG_RTT_BUFFER_INDEX 0
@@ -62,7 +61,6 @@ extern "C" {
*
* RTT's name. Only used if LOG_RTT_BUFFER_INDEX is not 0. Otherwise,
* the buffer name is fixed to "Terminal".
*
*/
#ifndef LOG_RTT_BUFFER_NAME
#define LOG_RTT_BUFFER_NAME "Terminal"
@@ -74,7 +72,6 @@ extern "C" {
* LOG RTT's buffer size. Only used if LOG_RTT_BUFFER_INDEX is not 0. To
* configure buffer #0 size, check the BUFFER_SIZE_UP definition in
* SEGGER_RTT_Conf.h
*
*/
#ifndef LOG_RTT_BUFFER_SIZE
#define LOG_RTT_BUFFER_SIZE 256
@@ -84,7 +81,6 @@ extern "C" {
* @def LOG_RTT_COLOR_ENABLE
*
* Enable colors on RTT Viewer.
*
*/
#ifndef LOG_RTT_COLOR_ENABLE
#define LOG_RTT_COLOR_ENABLE 1
@@ -95,7 +91,6 @@ extern "C" {
*
* LOG buffer used to parse print format. It will be locally allocated on the
* stack.
*
*/
#ifndef LOG_PARSE_BUFFER_SIZE
#define LOG_PARSE_BUFFER_SIZE 128
@@ -105,7 +100,6 @@ extern "C" {
* @def LOG_TIMESTAMP_ENABLE
*
* Enable timestamp in the logs.
*
*/
#ifndef LOG_TIMESTAMP_ENABLE
#define LOG_TIMESTAMP_ENABLE 1
@@ -113,13 +107,11 @@ extern "C" {
/**
* Initialization of Logger driver.
*
*/
void utilsLogRttInit(void);
/**
* Deinitialization of Logger driver.
*
*/
void utilsLogRttDeinit(void);
@@ -130,7 +122,6 @@ void utilsLogRttDeinit(void);
* @param[in] aLogRegion The log region.
* @param[in] aFormat A pointer to the format string.
* @param[in] ap va_list matching information for aFormat
*
*/
void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap);
-28
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file defines the mac frame interface for OpenThread platform radio drivers.
*
*/
#ifndef OPENTHREAD_UTILS_MAC_FRAME_H
@@ -44,7 +43,6 @@ extern "C" {
/**
* Specifies the IEEE 802.15.4 Address type.
*
*/
typedef enum
{
@@ -55,7 +53,6 @@ typedef enum
/**
* Represents an IEEE 802.15.4 short or extended Address.
*
*/
typedef struct otMacAddress
{
@@ -75,7 +72,6 @@ typedef struct otMacAddress
*
* @retval true It is an ACK frame.
* @retval false It is not an ACK frame.
*
*/
bool otMacFrameIsAck(const otRadioFrame *aFrame);
@@ -86,7 +82,6 @@ bool otMacFrameIsAck(const otRadioFrame *aFrame);
*
* @retval true It is a Data frame.
* @retval false It is not a Data frame.
*
*/
bool otMacFrameIsData(const otRadioFrame *aFrame);
@@ -97,7 +92,6 @@ bool otMacFrameIsData(const otRadioFrame *aFrame);
*
* @retval true It is a Command frame.
* @retval false It is not a Command frame.
*
*/
bool otMacFrameIsCommand(const otRadioFrame *aFrame);
@@ -109,7 +103,6 @@ bool otMacFrameIsCommand(const otRadioFrame *aFrame);
*
* @retval true It is a Data Request Command frame.
* @retval false It is not a Data Request Command frame.
*
*/
bool otMacFrameIsDataRequest(const otRadioFrame *aFrame);
@@ -120,7 +113,6 @@ bool otMacFrameIsDataRequest(const otRadioFrame *aFrame);
*
* @retval true It requests ACK.
* @retval false It does not request ACK.
*
*/
bool otMacFrameIsAckRequested(const otRadioFrame *aFrame);
@@ -134,7 +126,6 @@ bool otMacFrameIsAckRequested(const otRadioFrame *aFrame);
*
* @retval true It is a broadcast or matches with the PAN id and one of the addresses.
* @retval false It doesn't match.
*
*/
bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame,
otPanId aPanId,
@@ -149,7 +140,6 @@ bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame,
*
* @retval OT_ERROR_NONE Successfully got the source MAC address.
* @retval OT_ERROR_PARSE Failed to parse the source MAC address.
*
*/
otError otMacFrameGetSrcAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress);
@@ -161,7 +151,6 @@ otError otMacFrameGetSrcAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddre
*
* @retval OT_ERROR_NONE Successfully got the destination MAC address.
* @retval OT_ERROR_PARSE Failed to parse the destination MAC address.
*
*/
otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress);
@@ -173,7 +162,6 @@ otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddre
*
* @retval OT_ERROR_NONE Successfully got the sequence.
* @retval OT_ERROR_PARSE Failed to parse the sequence.
*
*/
otError otMacFrameGetSequence(const otRadioFrame *aFrame, uint8_t *aSequence);
@@ -183,7 +171,6 @@ otError otMacFrameGetSequence(const otRadioFrame *aFrame, uint8_t *aSequence);
* @param[in] aFrame A pointer to the MAC frame buffer that is going to be sent.
* @param[in] aExtAddress A pointer to the extended address, which will be used to generate nonce
* for AES CCM computation.
*
*/
void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *aExtAddress);
@@ -194,7 +181,6 @@ void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *a
*
* @retval true It is a version 2015 frame.
* @retval false It is not a version 2015 frame.
*
*/
bool otMacFrameIsVersion2015(const otRadioFrame *aFrame);
@@ -204,7 +190,6 @@ bool otMacFrameIsVersion2015(const otRadioFrame *aFrame);
* @param[in] aFrame A pointer to the frame.
* @param[in] aIsFramePending Value of the ACK's frame pending bit.
* @param[out] aAckFrame A pointer to the ack frame to be generated.
*
*/
void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending, otRadioFrame *aAckFrame);
@@ -219,7 +204,6 @@ void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending,
*
* @retval OT_ERROR_NONE Successfully generated Enh Ack in @p aAckFrame.
* @retval OT_ERROR_PARSE @p aFrame has incorrect format.
*
*/
otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
bool aIsFramePending,
@@ -233,7 +217,6 @@ otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
* @param[in,out] aFrame A pointer to the frame to be modified.
* @param[in] aCslPeriod CSL Period in CSL IE.
* @param[in] aCslPhase CSL Phase in CSL IE.
*
*/
void otMacFrameSetCslIe(otRadioFrame *aFrame, uint16_t aCslPeriod, uint16_t aCslPhase);
@@ -244,7 +227,6 @@ void otMacFrameSetCslIe(otRadioFrame *aFrame, uint16_t aCslPeriod, uint16_t aCsl
*
* @retval true The frame has security enabled.
* @retval false The frame does not have security enabled.
*
*/
bool otMacFrameIsSecurityEnabled(otRadioFrame *aFrame);
@@ -255,7 +237,6 @@ bool otMacFrameIsSecurityEnabled(otRadioFrame *aFrame);
*
* @retval true The frame key ID mode is 1.
* @retval false The frame security is not enabled or key ID mode is not 1.
*
*/
bool otMacFrameIsKeyIdMode1(otRadioFrame *aFrame);
@@ -265,7 +246,6 @@ bool otMacFrameIsKeyIdMode1(otRadioFrame *aFrame);
* @param[in] aFrame A pointer to the frame.
*
* @returns The key ID of the frame with key ID mode 1. Returns 0 if failed.
*
*/
uint8_t otMacFrameGetKeyId(otRadioFrame *aFrame);
@@ -274,7 +254,6 @@ uint8_t otMacFrameGetKeyId(otRadioFrame *aFrame);
*
* @param[in,out] aFrame A pointer to the frame to be modified.
* @param[in] aKeyId Key ID to be set to the frame.
*
*/
void otMacFrameSetKeyId(otRadioFrame *aFrame, uint8_t aKeyId);
@@ -284,7 +263,6 @@ void otMacFrameSetKeyId(otRadioFrame *aFrame, uint8_t aKeyId);
* @param[in] aFrame A pointer to the frame.
*
* @returns The frame counter of the frame. Returns UINT32_MAX if failed.
*
*/
uint32_t otMacFrameGetFrameCounter(otRadioFrame *aFrame);
@@ -293,7 +271,6 @@ uint32_t otMacFrameGetFrameCounter(otRadioFrame *aFrame);
*
* @param[in,out] aFrame A pointer to the frame to be modified.
* @param[in] aFrameCounter Frame counter to be set to the frame.
*
*/
void otMacFrameSetFrameCounter(otRadioFrame *aFrame, uint32_t aFrameCounter);
@@ -303,7 +280,6 @@ void otMacFrameSetFrameCounter(otRadioFrame *aFrame, uint32_t aFrameCounter);
* @param[out] aDest A pointer to the output buffer.
*
* @returns The total count of bytes (total length of CSL IE) written to the buffer.
*
*/
uint8_t otMacFrameGenerateCslIeTemplate(uint8_t *aDest);
@@ -318,7 +294,6 @@ uint8_t otMacFrameGenerateCslIeTemplate(uint8_t *aDest);
* @param[in] aIeDataLength The length of Link Metrics data value. Should be `1` or `2`. (Per spec 4.11.3.4.4.6)
*
* @returns The total count of bytes (total length of the Vendor IE) written to the buffer.
*
*/
uint8_t otMacFrameGenerateEnhAckProbingIe(uint8_t *aDest, const uint8_t *aIeData, uint8_t aIeDataLength);
@@ -330,7 +305,6 @@ uint8_t otMacFrameGenerateEnhAckProbingIe(uint8_t *aDest, const uint8_t *aIeData
* @param[in] aFrame The target frame that contains the IE. MUST NOT be `NULL`.
* @param[in] aData A pointer to the data value. MUST NOT be `NULL`.
* @param[in] aDataLen The length of @p aData.
*
*/
void otMacFrameSetEnhAckProbingIe(otRadioFrame *aFrame, const uint8_t *aData, uint8_t aDataLen);
@@ -366,7 +340,6 @@ typedef struct otRadioContext
* @param[in,out] aRadioContext The radio context accessible in ISR.
*
* @returns the error processing the callback. The caller should abort transmission on failures.
*
*/
otError otMacFrameProcessTxSfd(otRadioFrame *aFrame, uint64_t aRadioTime, otRadioContext *aRadioContext);
@@ -379,7 +352,6 @@ otError otMacFrameProcessTxSfd(otRadioFrame *aFrame, uint64_t aRadioTime, otRadi
* @retval OT_ERROR_NONE Successfully processed security.
* @retval OT_ERROR_FAILED Failed to processed security.
* @retval OT_ERROR_SECURITY Failed to processed security for missing key.
*
*/
otError otMacFrameProcessTransmitSecurity(otRadioFrame *aFrame, otRadioContext *aRadioContext);
-2
View File
@@ -29,7 +29,6 @@
/**
* @file
* This file defines the configuration options for platform abstraction of non-volatile storage of settings.
*
*/
#ifndef UTILS_SETTINGS_H_
@@ -41,7 +40,6 @@
* @def OPENTHREAD_SETTINGS_RAM
*
* Define as 1 to enable saving the settings in RAM instead of flash.
*
*/
#ifndef OPENTHREAD_SETTINGS_RAM
#define OPENTHREAD_SETTINGS_RAM 0
-1
View File
@@ -29,7 +29,6 @@
/**
* @file
* This file implements OpenThread platform abstraction for storage of settings in RAM.
*
*/
#include "settings.h"
@@ -31,7 +31,6 @@
* This file implements a software Source Match table, for radios that don't have
* such hardware acceleration. It supports only the single-instance build of
* OpenThread.
*
*/
#include "utils/soft_source_match_table.h"
-7
View File
@@ -50,7 +50,6 @@ extern "C" {
* This module includes the platform abstraction for UART communication.
*
* @{
*
*/
/**
@@ -58,7 +57,6 @@ extern "C" {
*
* @retval OT_ERROR_NONE Successfully enabled the UART.
* @retval OT_ERROR_FAILED Failed to enabled the UART.
*
*/
otError otPlatUartEnable(void);
@@ -67,7 +65,6 @@ otError otPlatUartEnable(void);
*
* @retval OT_ERROR_NONE Successfully disabled the UART.
* @retval OT_ERROR_FAILED Failed to disable the UART.
*
*/
otError otPlatUartDisable(void);
@@ -79,7 +76,6 @@ otError otPlatUartDisable(void);
*
* @retval OT_ERROR_NONE Successfully started transmission.
* @retval OT_ERROR_FAILED Failed to start the transmission.
*
*/
otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength);
@@ -98,7 +94,6 @@ otError otPlatUartFlush(void);
/**
* The UART driver calls this method to notify OpenThread that the requested bytes have been sent.
*
*/
extern void otPlatUartSendDone(void);
@@ -107,13 +102,11 @@ extern void otPlatUartSendDone(void);
*
* @param[in] aBuf A pointer to the received bytes.
* @param[in] aBufLength The number of bytes received.
*
*/
extern void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength);
/**
* @}
*
*/
#ifdef __cplusplus
-1
View File
@@ -29,7 +29,6 @@
/**
* @file
* This file implements the RTT implementation of the uart API.
*
*/
#include <stdint.h>
-7
View File
@@ -29,7 +29,6 @@
/**
* @file
* This file defines the RTT implementation of the uart API and default constants used by uart_rtt.c.
*
*/
#ifndef UTILS_UART_RTT_H
@@ -48,7 +47,6 @@ extern "C" {
* @def UART_RTT_BUFFER_INDEX
*
* RTT buffer index used for the uart.
*
*/
#ifndef UART_RTT_BUFFER_INDEX
#define UART_RTT_BUFFER_INDEX 1
@@ -64,7 +62,6 @@ extern "C" {
*
* RTT name used for the uart. Only used if UART_RTT_BUFFER_INDEX is not 0.
* Otherwise, the buffer name is fixed to "Terminal".
*
*/
#ifndef UART_RTT_BUFFER_NAME
#define UART_RTT_BUFFER_NAME "Terminal"
@@ -76,7 +73,6 @@ extern "C" {
* RTT up buffer size used for the uart. Only used if UART_RTT_BUFFER_INDEX
* is not 0. To configure buffer #0 size, check the BUFFER_SIZE_UP definition
* in SEGGER_RTT_Conf.h
*
*/
#ifndef UART_RTT_UP_BUFFER_SIZE
#define UART_RTT_UP_BUFFER_SIZE 256
@@ -88,7 +84,6 @@ extern "C" {
* RTT down buffer size used for the uart. Only used if UART_RTT_BUFFER_INDEX
* is not 0. To configure buffer #0 size, check the BUFFER_SIZE_DOWN definition
* in SEGGER_RTT_Conf.h
*
*/
#ifndef UART_RTT_DOWN_BUFFER_SIZE
#define UART_RTT_DOWN_BUFFER_SIZE 16
@@ -99,7 +94,6 @@ extern "C" {
*
* Size of the temporary buffer used when reading from the RTT channel. It will be
* locally allocated on the stack.
*
*/
#ifndef UART_RTT_READ_BUFFER_SIZE
#define UART_RTT_READ_BUFFER_SIZE 16
@@ -107,7 +101,6 @@ extern "C" {
/**
* Updates the rtt uart. Must be called frequently to process receive and send done.
*
*/
void utilsUartRttProcess(void);
-4
View File
@@ -48,12 +48,10 @@ extern "C" {
* This module includes functions for the OpenThread Backbone Router Service.
*
* @{
*
*/
/**
* Represents Backbone Router configuration.
*
*/
typedef struct otBackboneRouterConfig
{
@@ -71,13 +69,11 @@ typedef struct otBackboneRouterConfig
*
* @retval OT_ERROR_NONE Successfully got Primary Backbone Router information.
* @retval OT_ERROR_NOT_FOUND No Primary Backbone Router exists.
*
*/
otError otBackboneRouterGetPrimary(otInstance *aInstance, otBackboneRouterConfig *aConfig);
/**
* @}
*
*/
#ifdef __cplusplus
-30
View File
@@ -31,7 +31,6 @@
* @brief
* This file defines the OpenThread Backbone Router API (for Thread 1.2 FTD with
* `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`).
*
*/
#ifndef OPENTHREAD_BACKBONE_ROUTER_FTD_H_
@@ -49,12 +48,10 @@ extern "C" {
* @addtogroup api-backbone-router
*
* @{
*
*/
/**
* Represents the Backbone Router Status.
*
*/
typedef enum
{
@@ -80,7 +77,6 @@ typedef enum
* @sa otBackboneRouterGetConfig
* @sa otBackboneRouterSetConfig
* @sa otBackboneRouterRegister
*
*/
void otBackboneRouterSetEnabled(otInstance *aInstance, bool aEnable);
@@ -97,7 +93,6 @@ void otBackboneRouterSetEnabled(otInstance *aInstance, bool aEnable);
* @sa otBackboneRouterGetConfig
* @sa otBackboneRouterSetConfig
* @sa otBackboneRouterRegister
*
*/
otBackboneRouterState otBackboneRouterGetState(otInstance *aInstance);
@@ -114,7 +109,6 @@ otBackboneRouterState otBackboneRouterGetState(otInstance *aInstance);
* @sa otBackboneRouterGetState
* @sa otBackboneRouterSetConfig
* @sa otBackboneRouterRegister
*
*/
void otBackboneRouterGetConfig(otInstance *aInstance, otBackboneRouterConfig *aConfig);
@@ -136,7 +130,6 @@ void otBackboneRouterGetConfig(otInstance *aInstance, otBackboneRouterConfig *aC
* @sa otBackboneRouterGetState
* @sa otBackboneRouterGetConfig
* @sa otBackboneRouterRegister
*
*/
otError otBackboneRouterSetConfig(otInstance *aInstance, const otBackboneRouterConfig *aConfig);
@@ -156,7 +149,6 @@ otError otBackboneRouterSetConfig(otInstance *aInstance, const otBackboneRouterC
* @sa otBackboneRouterGetState
* @sa otBackboneRouterGetConfig
* @sa otBackboneRouterSetConfig
*
*/
otError otBackboneRouterRegister(otInstance *aInstance);
@@ -166,7 +158,6 @@ otError otBackboneRouterRegister(otInstance *aInstance);
* @returns The Backbone Router registration jitter value.
*
* @sa otBackboneRouterSetRegistrationJitter
*
*/
uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance);
@@ -176,7 +167,6 @@ uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance);
* @param[in] aJitter the Backbone Router registration jitter value to set.
*
* @sa otBackboneRouterGetRegistrationJitter
*
*/
void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitter);
@@ -188,7 +178,6 @@ void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitte
*
* @retval OT_ERROR_NONE Successfully got the Domain Prefix configuration.
* @retval OT_ERROR_NOT_FOUND No Domain Prefix was configured.
*
*/
otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterConfig *aConfig);
@@ -204,8 +193,6 @@ otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterCon
* @param[in] aMlIid A pointer to the Mesh Local IID. If NULL, respond with @p aStatus for any
* coming DUA.req, otherwise only respond the one with matching @p aMlIid.
* @param[in] aStatus The status to respond.
*
*
*/
void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance *aInstance,
const otIp6InterfaceIdentifier *aMlIid,
@@ -220,13 +207,11 @@ void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aStatus The status to respond.
*
*/
void otBackboneRouterConfigNextMulticastListenerRegistrationResponse(otInstance *aInstance, uint8_t aStatus);
/**
* Represents the Multicast Listener events.
*
*/
typedef enum
{
@@ -240,7 +225,6 @@ typedef enum
* @param[in] aContext The user context pointer.
* @param[in] aEvent The Multicast Listener event.
* @param[in] aAddress The IPv6 multicast address of the Multicast Listener.
*
*/
typedef void (*otBackboneRouterMulticastListenerCallback)(void *aContext,
otBackboneRouterMulticastListenerEvent aEvent,
@@ -252,7 +236,6 @@ typedef void (*otBackboneRouterMulticastListenerCallback)(void
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback A pointer to the Multicast Listener callback.
* @param[in] aContext A user context pointer.
*
*/
void otBackboneRouterSetMulticastListenerCallback(otInstance *aInstance,
otBackboneRouterMulticastListenerCallback aCallback,
@@ -269,7 +252,6 @@ void otBackboneRouterSetMulticastListenerCallback(otInstance
*
* @sa otBackboneRouterMulticastListenerAdd
* @sa otBackboneRouterMulticastListenerGetNext
*
*/
void otBackboneRouterMulticastListenerClear(otInstance *aInstance);
@@ -292,7 +274,6 @@ void otBackboneRouterMulticastListenerClear(otInstance *aInstance);
*
* @sa otBackboneRouterMulticastListenerClear
* @sa otBackboneRouterMulticastListenerGetNext
*
*/
otError otBackboneRouterMulticastListenerAdd(otInstance *aInstance, const otIp6Address *aAddress, uint32_t aTimeout);
@@ -303,7 +284,6 @@ typedef uint16_t otBackboneRouterMulticastListenerIterator; ///< Used to iterate
/**
* Represents a Backbone Router Multicast Listener info.
*
*/
typedef struct otBackboneRouterMulticastListenerInfo
{
@@ -327,7 +307,6 @@ typedef struct otBackboneRouterMulticastListenerInfo
*
* @sa otBackboneRouterMulticastListenerClear
* @sa otBackboneRouterMulticastListenerAdd
*
*/
otError otBackboneRouterMulticastListenerGetNext(otInstance *aInstance,
otBackboneRouterMulticastListenerIterator *aIterator,
@@ -335,7 +314,6 @@ otError otBackboneRouterMulticastListenerGetNext(otInstance
/**
* Represents the ND Proxy events.
*
*/
typedef enum
{
@@ -352,7 +330,6 @@ typedef enum
* @param[in] aEvent The ND Proxy event.
* @param[in] aDua The Domain Unicast Address of the ND Proxy, or `nullptr` if @p aEvent is
* `OT_BACKBONE_ROUTER_NDPROXY_CLEARED`.
*
*/
typedef void (*otBackboneRouterNdProxyCallback)(void *aContext,
otBackboneRouterNdProxyEvent aEvent,
@@ -364,7 +341,6 @@ typedef void (*otBackboneRouterNdProxyCallback)(void *aCo
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback A pointer to the ND Proxy callback.
* @param[in] aContext A user context pointer.
*
*/
void otBackboneRouterSetNdProxyCallback(otInstance *aInstance,
otBackboneRouterNdProxyCallback aCallback,
@@ -372,7 +348,6 @@ void otBackboneRouterSetNdProxyCallback(otInstance *aInstanc
/**
* Represents the Backbone Router ND Proxy info.
*
*/
typedef struct otBackboneRouterNdProxyInfo
{
@@ -390,7 +365,6 @@ typedef struct otBackboneRouterNdProxyInfo
*
* @retval OT_ERROR_NONE Successfully got the ND Proxy info.
* @retval OT_ERROR_NOT_FOUND Failed to find the Domain Unicast Address in the ND Proxy table.
*
*/
otError otBackboneRouterGetNdProxyInfo(otInstance *aInstance,
const otIp6Address *aDua,
@@ -398,7 +372,6 @@ otError otBackboneRouterGetNdProxyInfo(otInstance *aInstance,
/**
* Represents the Domain Prefix events.
*
*/
typedef enum
{
@@ -413,7 +386,6 @@ typedef enum
* @param[in] aContext The user context pointer.
* @param[in] aEvent The Domain Prefix event.
* @param[in] aDomainPrefix The new Domain Prefix if added or changed, nullptr otherwise.
*
*/
typedef void (*otBackboneRouterDomainPrefixCallback)(void *aContext,
otBackboneRouterDomainPrefixEvent aEvent,
@@ -424,7 +396,6 @@ typedef void (*otBackboneRouterDomainPrefixCallback)(void
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback A pointer to the Domain Prefix callback.
* @param[in] aContext A user context pointer.
*
*/
void otBackboneRouterSetDomainPrefixCallback(otInstance *aInstance,
otBackboneRouterDomainPrefixCallback aCallback,
@@ -432,7 +403,6 @@ void otBackboneRouterSetDomainPrefixCallback(otInstance
/**
* @}
*
*/
#ifdef __cplusplus
-25
View File
@@ -62,7 +62,6 @@ extern "C" {
* (`OPENTHREAD_CONFIG_BLE_TCAT_ENABLE`) is enabled.
*
* @{
*
*/
/**
@@ -73,7 +72,6 @@ extern "C" {
* @param[in] aBleConnectionOpen TRUE if a BLE connection was established to carry a TLS data stream, FALSE
* otherwise.
* @param[in] aContext A pointer to arbitrary context information.
*
*/
typedef void (*otHandleBleSecureConnect)(otInstance *aInstance,
bool aConnected,
@@ -82,7 +80,6 @@ typedef void (*otHandleBleSecureConnect)(otInstance *aInstance,
/**
* Pointer to call when data was received over a BLE Secure TLS connection.
*
*/
typedef otHandleTcatApplicationDataReceive otHandleBleSecureReceive;
@@ -101,7 +98,6 @@ typedef otHandleTcatApplicationDataReceive otHandleBleSecureReceive;
*
* @retval OT_ERROR_NONE Successfully started the BLE Secure server.
* @retval OT_ERROR_ALREADY The service was stated already.
*
*/
otError otBleSecureStart(otInstance *aInstance,
otHandleBleSecureConnect aConnectHandler,
@@ -129,7 +125,6 @@ otError otBleSecureSetTcatVendorInfo(otInstance *aInstance, const otTcatVendorIn
* @retval OT_ERROR_NONE Successfully started the BLE Secure Joiner role.
* @retval OT_ERROR_INVALID_ARGS @p aElevationPsk or @p aVendorInfo is invalid.
* @retval OT_ERROR_INVALID_STATE The BLE function has not been started or line mode is not selected.
*
*/
otError otBleSecureTcatStart(otInstance *aInstance, otHandleTcatJoin aHandler);
@@ -137,7 +132,6 @@ otError otBleSecureTcatStart(otInstance *aInstance, otHandleTcatJoin aHandler);
* Stops the BLE Secure server.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otBleSecureStop(otInstance *aInstance);
@@ -152,7 +146,6 @@ void otBleSecureStop(otInstance *aInstance);
* @param[in] aPskLength The PSK length.
* @param[in] aPskIdentity The Identity Name for the PSK.
* @param[in] aPskIdLength The PSK Identity Length.
*
*/
void otBleSecureSetPsk(otInstance *aInstance,
const uint8_t *aPsk,
@@ -175,7 +168,6 @@ void otBleSecureSetPsk(otInstance *aInstance,
* @retval OT_ERROR_INVALID_ARGS @p aInstance or @p aCertLength is invalid.
* @retval OT_ERROR_INVALID_STATE Not connected yet.
* @retval OT_ERROR_NO_BUFS Can't allocate memory for certificate.
*
*/
otError otBleSecureGetPeerCertificateBase64(otInstance *aInstance, unsigned char *aPeerCert, size_t *aCertLength);
@@ -201,7 +193,6 @@ otError otBleSecureGetPeerCertificateBase64(otInstance *aInstance, unsigned char
* @retval OT_ERROR_INVALID_ARGS Invalid attribute length.
* @retval OT_ERROR_NONE Successfully read attribute.
* @retval OT_ERROR_NO_BUFS Insufficient memory for storing the attribute value.
*
*/
otError otBleSecureGetPeerSubjectAttributeByOid(otInstance *aInstance,
const char *aOid,
@@ -232,7 +223,6 @@ otError otBleSecureGetPeerSubjectAttributeByOid(otInstance *aInstance,
* @retval OT_ERROR_INVALID_STATE Not connected yet.
* @retval OT_ERROR_NOT_IMPLEMENTED The value of aThreadOidDescriptor is >127.
* @retval OT_ERROR_PARSE The certificate extensions could not be parsed.
*
*/
otError otBleSecureGetThreadAttributeFromPeerCertificate(otInstance *aInstance,
int aThreadOidDescriptor,
@@ -258,7 +248,6 @@ otError otBleSecureGetThreadAttributeFromPeerCertificate(otInstance *aInstance,
* @retval OT_ERROR_INVALID_STATE Not connected yet.
* @retval OT_ERROR_NOT_IMPLEMENTED The value of aThreadOidDescriptor is >127.
* @retval OT_ERROR_PARSE The certificate extensions could not be parsed.
*
*/
otError otBleSecureGetThreadAttributeFromOwnCertificate(otInstance *aInstance,
int aThreadOidDescriptor,
@@ -273,7 +262,6 @@ otError otBleSecureGetThreadAttributeFromOwnCertificate(otInstance *aInstance,
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aVerifyPeerCertificate true, to verify the peer certificate.
*
*/
void otBleSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificate);
@@ -288,7 +276,6 @@ void otBleSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificat
* @param[in] aX509Length The length of certificate.
* @param[in] aPrivateKey A pointer to the PEM formatted private key.
* @param[in] aPrivateKeyLength The length of the private key.
*
*/
void otBleSecureSetCertificate(otInstance *aInstance,
const uint8_t *aX509Cert,
@@ -307,7 +294,6 @@ void otBleSecureSetCertificate(otInstance *aInstance,
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aX509CaCertificateChain A pointer to the PEM formatted X509 CA chain.
* @param[in] aX509CaCertChainLength The length of chain.
*
*/
void otBleSecureSetCaCertificateChain(otInstance *aInstance,
const uint8_t *aX509CaCertificateChain,
@@ -319,7 +305,6 @@ void otBleSecureSetCaCertificateChain(otInstance *aInstance,
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @retval OT_ERROR_NONE Successfully started TLS connection.
*
*/
otError otBleSecureConnect(otInstance *aInstance);
@@ -327,7 +312,6 @@ otError otBleSecureConnect(otInstance *aInstance);
* Stops the BLE and TLS connection.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otBleSecureDisconnect(otInstance *aInstance);
@@ -338,7 +322,6 @@ void otBleSecureDisconnect(otInstance *aInstance);
*
* @retval TRUE If TLS session is active.
* @retval FALSE If TLS session is not active.
*
*/
bool otBleSecureIsConnectionActive(otInstance *aInstance);
@@ -349,7 +332,6 @@ bool otBleSecureIsConnectionActive(otInstance *aInstance);
*
* @retval TRUE The TLS session is connected.
* @retval FALSE The TLS session is not connected.
*
*/
bool otBleSecureIsConnected(otInstance *aInstance);
@@ -358,7 +340,6 @@ bool otBleSecureIsConnected(otInstance *aInstance);
*
* @retval TRUE The TCAT agent is enabled.
* @retval FALSE The TCAT agent is not enabled.
*
*/
bool otBleSecureIsTcatEnabled(otInstance *aInstance);
@@ -370,7 +351,6 @@ bool otBleSecureIsTcatEnabled(otInstance *aInstance);
*
* @retval TRUE The command class is authorized.
* @retval FALSE The command class is not authorized.
*
*/
bool otBleSecureIsCommandClassAuthorized(otInstance *aInstance, otTcatCommandClass aCommandClass);
@@ -387,7 +367,6 @@ bool otBleSecureIsCommandClassAuthorized(otInstance *aInstance, otTcatCommandCla
* @retval OT_ERROR_NONE Successfully sent message.
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory.
* @retval OT_ERROR_INVALID_STATE TLS connection was not initialized.
*
*/
otError otBleSecureSendMessage(otInstance *aInstance, otMessage *aMessage);
@@ -401,7 +380,6 @@ otError otBleSecureSendMessage(otInstance *aInstance, otMessage *aMessage);
* @retval OT_ERROR_NONE Successfully sent data.
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory.
* @retval OT_ERROR_INVALID_STATE TLS connection was not initialized.
*
*/
otError otBleSecureSend(otInstance *aInstance, uint8_t *aBuf, uint16_t aLength);
@@ -415,7 +393,6 @@ otError otBleSecureSend(otInstance *aInstance, uint8_t *aBuf, uint16_t aLength);
* @retval OT_ERROR_NONE Successfully sent data.
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory.
* @retval OT_ERROR_INVALID_STATE TLS connection was not initialized.
*
*/
otError otBleSecureSendApplicationTlv(otInstance *aInstance, uint8_t *aBuf, uint16_t aLength);
@@ -427,13 +404,11 @@ otError otBleSecureSendApplicationTlv(otInstance *aInstance, uint8_t *aBuf, uint
* @retval OT_ERROR_NONE Successfully flushed output buffer.
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory.
* @retval OT_ERROR_INVALID_STATE TLS connection was not initialized.
*
*/
otError otBleSecureFlush(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-19
View File
@@ -48,42 +48,35 @@ extern "C" {
* This module includes functions for the Thread Border Agent role.
*
* @{
*
*/
/**
* The length of Border Agent/Router ID in bytes.
*
*/
#define OT_BORDER_AGENT_ID_LENGTH (16)
/**
* Minimum length of the ephemeral key string.
*
*/
#define OT_BORDER_AGENT_MIN_EPHEMERAL_KEY_LENGTH (6)
/**
* Maximum length of the ephemeral key string.
*
*/
#define OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_LENGTH (32)
/**
* Default ephemeral key timeout interval in milliseconds.
*
*/
#define OT_BORDER_AGENT_DEFAULT_EPHEMERAL_KEY_TIMEOUT (2 * 60 * 1000u)
/**
* Maximum ephemeral key timeout interval in milliseconds.
*
*/
#define OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_TIMEOUT (10 * 60 * 1000u)
/**
* Represents a Border Agent Identifier.
*
*/
typedef struct otBorderAgentId
{
@@ -92,7 +85,6 @@ typedef struct otBorderAgentId
/**
* Defines the Border Agent state.
*
*/
typedef enum otBorderAgentState
{
@@ -129,7 +121,6 @@ typedef struct otBorderAgentCounters
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the Border Agent counters.
*
*/
const otBorderAgentCounters *otBorderAgentGetCounters(otInstance *aInstance);
@@ -139,7 +130,6 @@ const otBorderAgentCounters *otBorderAgentGetCounters(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current #otBorderAgentState of the Border Agent.
*
*/
otBorderAgentState otBorderAgentGetState(otInstance *aInstance);
@@ -149,7 +139,6 @@ otBorderAgentState otBorderAgentGetState(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns UDP port of the Border Agent.
*
*/
uint16_t otBorderAgentGetUdpPort(otInstance *aInstance);
@@ -169,7 +158,6 @@ uint16_t otBorderAgentGetUdpPort(otInstance *aInstance);
* @retval ... If failed to retrieve the Border Agent ID.
*
* @sa otBorderAgentSetId
*
*/
otError otBorderAgentGetId(otInstance *aInstance, otBorderAgentId *aId);
@@ -189,7 +177,6 @@ otError otBorderAgentGetId(otInstance *aInstance, otBorderAgentId *aId);
* @retval ... If failed to set the Border Agent ID.
*
* @sa otBorderAgentGetId
*
*/
otError otBorderAgentSetId(otInstance *aInstance, const otBorderAgentId *aId);
@@ -226,7 +213,6 @@ otError otBorderAgentSetId(otInstance *aInstance, const otBorderAgentId *aId);
* @retval OT_ERROR_INVALID_ARGS The given @p aKeyString is not valid (too short or too long).
* @retval OT_ERROR_FAILED Failed to set the key (e.g., could not bind to UDP port).
*
*/
otError otBorderAgentSetEphemeralKey(otInstance *aInstance,
const char *aKeyString,
@@ -246,7 +232,6 @@ otError otBorderAgentSetEphemeralKey(otInstance *aInstance,
* commissioner disconnects.
*
* @param[in] aInstance The OpenThread instance.
*
*/
void otBorderAgentClearEphemeralKey(otInstance *aInstance);
@@ -259,7 +244,6 @@ void otBorderAgentClearEphemeralKey(otInstance *aInstance);
*
* @retval TRUE An ephemeral key is active.
* @retval FALSE No ephemeral key is active.
*
*/
bool otBorderAgentIsEphemeralKeyActive(otInstance *aInstance);
@@ -279,7 +263,6 @@ bool otBorderAgentIsEphemeralKeyActive(otInstance *aInstance);
* Any OpenThread API, including `otBorderAgent` APIs, can be safely called from this callback.
*
* @param[in] aContext A pointer to an arbitrary context (provided when callback is set).
*
*/
typedef void (*otBorderAgentEphemeralKeyCallback)(void *aContext);
@@ -293,7 +276,6 @@ typedef void (*otBorderAgentEphemeralKeyCallback)(void *aContext);
* @param[in] aInstance The OpenThread instance.
* @param[in] aCallback The callback function pointer.
* @param[in] aContext The arbitrary context to use with callback.
*
*/
void otBorderAgentSetEphemeralKeyCallback(otInstance *aInstance,
otBorderAgentEphemeralKeyCallback aCallback,
@@ -301,7 +283,6 @@ void otBorderAgentSetEphemeralKeyCallback(otInstance *aIns
/**
* @}
*
*/
#ifdef __cplusplus
-6
View File
@@ -50,7 +50,6 @@ extern "C" {
* This module includes functions to manage local network data with the OpenThread Border Router.
*
* @{
*
*/
/**
@@ -103,7 +102,6 @@ otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefi
*
* @retval OT_ERROR_NONE Successfully found the next On Mesh prefix.
* @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data.
*
*/
otError otBorderRouterGetNextOnMeshPrefix(otInstance *aInstance,
otNetworkDataIterator *aIterator,
@@ -148,7 +146,6 @@ otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPre
*
* @retval OT_ERROR_NONE Successfully found the next External Route.
* @retval OT_ERROR_NOT_FOUND No subsequent external route entry exists in the Thread Network Data.
*
*/
otError otBorderRouterGetNextRoute(otInstance *aInstance,
otNetworkDataIterator *aIterator,
@@ -172,7 +169,6 @@ otError otBorderRouterRegister(otInstance *aInstance);
* Function pointer callback which is invoked when Network Data (local or leader) gets full.
*
* @param[in] aContext A pointer to arbitrary context information.
*
*/
typedef void (*otBorderRouterNetDataFullCallback)(void *aContext);
@@ -191,7 +187,6 @@ typedef void (*otBorderRouterNetDataFullCallback)(void *aContext);
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback The callback.
* @param[in] aContext A pointer to arbitrary context information used with @p aCallback.
*
*/
void otBorderRouterSetNetDataFullCallback(otInstance *aInstance,
otBorderRouterNetDataFullCallback aCallback,
@@ -199,7 +194,6 @@ void otBorderRouterSetNetDataFullCallback(otInstance *aIns
/**
* @}
*
*/
#ifdef __cplusplus
-38
View File
@@ -69,7 +69,6 @@ extern "C" {
* self-configure their own routable unicast IPv6 address, this address can be used by Thread devices to reach AIL. If
* Border Router finds no such RA message on AIL, it generates a ULA on-link prefix which it then advertises on AIL in
* the emitted RA messages.
*
*/
/**
@@ -79,7 +78,6 @@ extern "C" {
* accessed or used by caller.
*
* Before using an iterator, it MUST be initialized using `otBorderRoutingPrefixTableInitIterator()`.
*
*/
typedef struct otBorderRoutingPrefixTableIterator
{
@@ -98,7 +96,6 @@ typedef struct otBorderRoutingPrefixTableIterator
* determines whether the router is a peer BR (connected to the same Thread mesh network) by comparing its advertised
* PIO/RIO prefixes with the entries in the Thread Network Data. While this method is generally effective, it may not
* be 100% accurate in all scenarios, so the `mIsPeerBr` flag should be used with caution.
*
*/
typedef struct otBorderRoutingRouterEntry
{
@@ -118,7 +115,6 @@ typedef struct otBorderRoutingRouterEntry
*
* The entries in the discovered table track the Prefix/Route Info Options in the received Router Advertisement messages
* from other routers on the infrastructure link.
*
*/
typedef struct otBorderRoutingPrefixTableEntry
{
@@ -133,7 +129,6 @@ typedef struct otBorderRoutingPrefixTableEntry
/**
* Represents information about a peer Border Router found in the Network Data.
*
*/
typedef struct otBorderRoutingPeerBorderRouterEntry
{
@@ -143,7 +138,6 @@ typedef struct otBorderRoutingPeerBorderRouterEntry
/**
* Represents a group of data of platform-generated RA messages processed.
*
*/
typedef struct otPdProcessedRaInfo
{
@@ -154,7 +148,6 @@ typedef struct otPdProcessedRaInfo
/**
* Represents the state of Border Routing Manager.
*
*/
typedef enum
{
@@ -166,7 +159,6 @@ typedef enum
/**
* This enumeration represents the state of DHCPv6 Prefix Delegation State.
*
*/
typedef enum
{
@@ -194,7 +186,6 @@ typedef enum
*
* @sa otPlatInfraIfStateChanged.
* @sa otBorderRoutingSetEnabled.
*
*/
otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool aInfraIfIsRunning);
@@ -208,7 +199,6 @@ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully enabled/disabled the Border Routing Manager.
*
*/
otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled);
@@ -218,7 +208,6 @@ otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current state of Border Routing Manager.
*
*/
otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance);
@@ -234,7 +223,6 @@ otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance);
* low preference when in child role.
*
* @returns The current Route Info Option preference.
*
*/
otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInstance);
@@ -247,7 +235,6 @@ otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInsta
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPreference The route preference to use.
*
*/
void otBorderRoutingSetRouteInfoOptionPreference(otInstance *aInstance, otRoutePreference aPreference);
@@ -258,7 +245,6 @@ void otBorderRoutingSetRouteInfoOptionPreference(otInstance *aInstance, otRouteP
* in router/leader role and low preference when in child role.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otBorderRoutingClearRouteInfoOptionPreference(otInstance *aInstance);
@@ -274,7 +260,6 @@ void otBorderRoutingClearRouteInfoOptionPreference(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the extra option bytes.
* @retval OT_ERROR_NO_BUFS Could not allocate buffer to save the buffer.
*
*/
otError otBorderRoutingSetExtraRouterAdvertOptions(otInstance *aInstance, const uint8_t *aOptions, uint16_t aLength);
@@ -289,7 +274,6 @@ otError otBorderRoutingSetExtraRouterAdvertOptions(otInstance *aInstance, const
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current published route preference.
*
*/
otRoutePreference otBorderRoutingGetRoutePreference(otInstance *aInstance);
@@ -301,7 +285,6 @@ otRoutePreference otBorderRoutingGetRoutePreference(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPreference The route preference to use.
*
*/
void otBorderRoutingSetRoutePreference(otInstance *aInstance, otRoutePreference aPreference);
@@ -312,7 +295,6 @@ void otBorderRoutingSetRoutePreference(otInstance *aInstance, otRoutePreference
* link quality (to the parent when acting as end-device).
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otBorderRoutingClearRoutePreference(otInstance *aInstance);
@@ -333,7 +315,6 @@ void otBorderRoutingClearRoutePreference(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully retrieved the OMR prefix.
*
* @sa otBorderRoutingGetPdOmrPrefix
*
*/
otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
@@ -353,7 +334,6 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
*
* @sa otBorderRoutingGetOmrPrefix
* @sa otPlatBorderRoutingProcessIcmp6Ra
*
*/
otError otBorderRoutingGetPdOmrPrefix(otInstance *aInstance, otBorderRoutingPrefixTableEntry *aPrefixInfo);
@@ -368,7 +348,6 @@ otError otBorderRoutingGetPdOmrPrefix(otInstance *aInstance, otBorderRoutingPref
* @retval OT_ERROR_NONE Successfully retrieved the Info.
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NOT_FOUND There are no valid Info on this BR.
*
*/
otError otBorderRoutingGetPdProcessedRaInfo(otInstance *aInstance, otPdProcessedRaInfo *aPdProcessedRaInfo);
@@ -383,7 +362,6 @@ otError otBorderRoutingGetPdProcessedRaInfo(otInstance *aInstance, otPdProcessed
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not running yet.
* @retval OT_ERROR_NONE Successfully retrieved the favored OMR prefix.
*
*/
otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix, otRoutePreference *aPreference);
@@ -398,7 +376,6 @@ otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *a
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully retrieved the local on-link prefix.
*
*/
otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
@@ -412,7 +389,6 @@ otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPref
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully retrieved the favored on-link prefix.
*
*/
otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix);
@@ -428,7 +404,6 @@ otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully retrieved the NAT64 prefix.
*
*/
otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix);
@@ -443,7 +418,6 @@ otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefi
*
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
* @retval OT_ERROR_NONE Successfully retrieved the favored NAT64 prefix.
*
*/
otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance,
otIp6Prefix *aPrefix,
@@ -461,7 +435,6 @@ otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance,
*
* @param[in] aInstance The OpenThread instance.
* @param[out] aIterator A pointer to the iterator to initialize.
*
*/
void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRoutingPrefixTableIterator *aIterator);
@@ -477,7 +450,6 @@ void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRouti
*
* @retval OT_ERROR_NONE Iterated to the next entry, @p aEntry and @p aIterator are updated.
* @retval OT_ERROR_NOT_FOUND No more entries in the table.
*
*/
otError otBorderRoutingGetNextPrefixTableEntry(otInstance *aInstance,
otBorderRoutingPrefixTableIterator *aIterator,
@@ -492,7 +464,6 @@ otError otBorderRoutingGetNextPrefixTableEntry(otInstance
*
* @retval OT_ERROR_NONE Iterated to the next router, @p aEntry and @p aIterator are updated.
* @retval OT_ERROR_NOT_FOUND No more router entries.
*
*/
otError otBorderRoutingGetNextRouterEntry(otInstance *aInstance,
otBorderRoutingPrefixTableIterator *aIterator,
@@ -519,7 +490,6 @@ otError otBorderRoutingGetNextRouterEntry(otInstance *aI
*
* @retval OT_ERROR_NONE Iterated to the next entry, @p aEntry and @p aIterator are updated.
* @retval OT_ERROR_NOT_FOUND No more entries.
*
*/
otError otBorderRoutingGetNextPeerBrEntry(otInstance *aInstance,
otBorderRoutingPrefixTableIterator *aIterator,
@@ -546,7 +516,6 @@ otError otBorderRoutingGetNextPeerBrEntry(otInstance *
* Age is represented as seconds since appearance of the BR entry in the Network Data.
*
* @returns The number of peer BRs.
*
*/
uint16_t otBorderRoutingCountPeerBrs(otInstance *aInstance, uint32_t *aMinAge);
@@ -557,7 +526,6 @@ uint16_t otBorderRoutingCountPeerBrs(otInstance *aInstance, uint32_t *aMinAge);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aEnabled Whether to accept platform generated RA messages.
*
*/
void otBorderRoutingDhcp6PdSetEnabled(otInstance *aInstance, bool aEnabled);
@@ -569,7 +537,6 @@ void otBorderRoutingDhcp6PdSetEnabled(otInstance *aInstance, bool aEnabled);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current state of DHCPv6 Prefix Delegation.
*
*/
otBorderRoutingDhcp6PdState otBorderRoutingDhcp6PdGetState(otInstance *aInstance);
@@ -579,7 +546,6 @@ otBorderRoutingDhcp6PdState otBorderRoutingDhcp6PdGetState(otInstance *aInstance
*
* @param[in] aState The state of DHCPv6 Prefix Delegation State.
* @param[in] aContext A pointer to arbitrary context information.
*
*/
typedef void (*otBorderRoutingRequestDhcp6PdCallback)(otBorderRoutingDhcp6PdState aState, void *aContext);
@@ -591,8 +557,6 @@ typedef void (*otBorderRoutingRequestDhcp6PdCallback)(otBorderRoutingDhcp6PdStat
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback A pointer to a function that is called whenever the DHCPv6 PD state changes.
* @param[in] aContext A pointer to arbitrary context information.
*
*
*/
void otBorderRoutingDhcp6PdSetRequestCallback(otInstance *aInstance,
otBorderRoutingRequestDhcp6PdCallback aCallback,
@@ -606,13 +570,11 @@ void otBorderRoutingDhcp6PdSetRequestCallback(otInstance
* This is intended for testing only and using it will make the BR non-compliant with the Thread Specification.
*
* @param[in] aPrefix The on-link prefix to use.
*
*/
void otBorderRoutingSetOnLinkPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix);
/**
* @}
*
*/
#ifdef __cplusplus
-20
View File
@@ -57,7 +57,6 @@ extern "C" {
* the CSL channel.
*
* @{
*
*/
/**
@@ -70,7 +69,6 @@ extern "C" {
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aChannel The new channel for the Thread network.
*
*/
void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChannel);
@@ -78,7 +76,6 @@ void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChanne
* Gets the channel from the last successful call to `otChannelManagerRequestChannelChange()`
*
* @returns The last requested channel or zero if there has been no channel change request yet.
*
*/
uint8_t otChannelManagerGetRequestedChannel(otInstance *aInstance);
@@ -90,7 +87,6 @@ uint8_t otChannelManagerGetRequestedChannel(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The delay (in seconds) for channel change.
*
*/
uint16_t otChannelManagerGetDelay(otInstance *aInstance);
@@ -105,7 +101,6 @@ uint16_t otChannelManagerGetDelay(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Delay was updated successfully.
* @retval OT_ERROR_INVALID_ARGS The given delay @p aDelay is too short.
*
*/
otError otChannelManagerSetDelay(otInstance *aInstance, uint16_t aDelay);
@@ -135,7 +130,6 @@ otError otChannelManagerSetDelay(otInstance *aInstance, uint16_t aDelay);
*
* @retval OT_ERROR_NONE Channel selection finished successfully.
* @retval OT_ERROR_NOT_FOUND Supported channel mask is empty, therefore could not select a channel.
*
*/
otError otChannelManagerRequestChannelSelect(otInstance *aInstance, bool aSkipQualityCheck);
@@ -166,7 +160,6 @@ otError otChannelManagerRequestChannelSelect(otInstance *aInstance, bool aSkipQu
*
* @retval OT_ERROR_NONE Channel selection finished successfully.
* @retval OT_ERROR_NOT_FOUND Supported channel mask is empty, therefore could not select a channel.
*
*/
otError otChannelManagerRequestCslChannelSelect(otInstance *aInstance, bool aSkipQualityCheck);
@@ -178,7 +171,6 @@ otError otChannelManagerRequestCslChannelSelect(otInstance *aInstance, bool aSki
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aEnabled Indicates whether to enable or disable this functionality.
*
*/
void otChannelManagerSetAutoChannelSelectionEnabled(otInstance *aInstance, bool aEnabled);
@@ -188,7 +180,6 @@ void otChannelManagerSetAutoChannelSelectionEnabled(otInstance *aInstance, bool
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns TRUE if enabled, FALSE if disabled.
*
*/
bool otChannelManagerGetAutoChannelSelectionEnabled(otInstance *aInstance);
@@ -202,7 +193,6 @@ bool otChannelManagerGetAutoChannelSelectionEnabled(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aEnabled Indicates whether to enable or disable this functionality.
*
*/
void otChannelManagerSetAutoCslChannelSelectionEnabled(otInstance *aInstance, bool aEnabled);
@@ -215,7 +205,6 @@ void otChannelManagerSetAutoCslChannelSelectionEnabled(otInstance *aInstance, bo
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns TRUE if enabled, FALSE if disabled.
*
*/
bool otChannelManagerGetAutoCslChannelSelectionEnabled(otInstance *aInstance);
@@ -227,7 +216,6 @@ bool otChannelManagerGetAutoCslChannelSelectionEnabled(otInstance *aInstance);
*
* @retval OT_ERROR_NONE The interval was set successfully.
* @retval OT_ERROR_INVALID_ARGS The @p aInterval is not valid (zero).
*
*/
otError otChannelManagerSetAutoChannelSelectionInterval(otInstance *aInstance, uint32_t aInterval);
@@ -237,7 +225,6 @@ otError otChannelManagerSetAutoChannelSelectionInterval(otInstance *aInstance, u
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The interval in seconds.
*
*/
uint32_t otChannelManagerGetAutoChannelSelectionInterval(otInstance *aInstance);
@@ -247,7 +234,6 @@ uint32_t otChannelManagerGetAutoChannelSelectionInterval(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The supported channels as a bit-mask.
*
*/
uint32_t otChannelManagerGetSupportedChannels(otInstance *aInstance);
@@ -256,7 +242,6 @@ uint32_t otChannelManagerGetSupportedChannels(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aChannelMask A channel mask.
*
*/
void otChannelManagerSetSupportedChannels(otInstance *aInstance, uint32_t aChannelMask);
@@ -266,7 +251,6 @@ void otChannelManagerSetSupportedChannels(otInstance *aInstance, uint32_t aChann
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The favored channels as a bit-mask.
*
*/
uint32_t otChannelManagerGetFavoredChannels(otInstance *aInstance);
@@ -275,7 +259,6 @@ uint32_t otChannelManagerGetFavoredChannels(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aChannelMask A channel mask.
*
*/
void otChannelManagerSetFavoredChannels(otInstance *aInstance, uint32_t aChannelMask);
@@ -285,7 +268,6 @@ void otChannelManagerSetFavoredChannels(otInstance *aInstance, uint32_t aChannel
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The CCA failure rate threshold. Value 0 maps to 0% and 0xffff maps to 100%.
*
*/
uint16_t otChannelManagerGetCcaFailureRateThreshold(otInstance *aInstance);
@@ -294,13 +276,11 @@ uint16_t otChannelManagerGetCcaFailureRateThreshold(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aThreshold A CCA failure rate threshold. Value 0 maps to 0% and 0xffff maps to 100%.
*
*/
void otChannelManagerSetCcaFailureRateThreshold(otInstance *aInstance, uint16_t aThreshold);
/**
* @}
*
*/
#ifdef __cplusplus
-9
View File
@@ -60,7 +60,6 @@ extern "C" {
* occupancy).
*
* @{
*
*/
/**
@@ -77,7 +76,6 @@ extern "C" {
*
* @retval OT_ERROR_NONE Channel Monitoring state changed successfully
* @retval OT_ERROR_ALREADY Channel Monitoring is already in the same state.
*
*/
otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled);
@@ -87,7 +85,6 @@ otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns TRUE if the Channel Monitoring operation is enabled, FALSE otherwise.
*
*/
bool otChannelMonitorIsEnabled(otInstance *aInstance);
@@ -97,7 +94,6 @@ bool otChannelMonitorIsEnabled(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The channel monitor sample interval in milliseconds.
*
*/
uint32_t otChannelMonitorGetSampleInterval(otInstance *aInstance);
@@ -107,7 +103,6 @@ uint32_t otChannelMonitorGetSampleInterval(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The RSSI threshold in dBm.
*
*/
int8_t otChannelMonitorGetRssiThreshold(otInstance *aInstance);
@@ -117,7 +112,6 @@ int8_t otChannelMonitorGetRssiThreshold(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The averaging sample window.
*
*/
uint32_t otChannelMonitorGetSampleWindow(otInstance *aInstance);
@@ -130,7 +124,6 @@ uint32_t otChannelMonitorGetSampleWindow(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns Total number of RSSI samples (per channel) taken so far.
*
*/
uint32_t otChannelMonitorGetSampleCount(otInstance *aInstance);
@@ -151,13 +144,11 @@ uint32_t otChannelMonitorGetSampleCount(otInstance *aInstance);
* @param[in] aChannel The channel for which to get the link occupancy.
*
* @returns The current channel occupancy for the given channel.
*
*/
uint16_t otChannelMonitorGetChannelOccupancy(otInstance *aInstance, uint8_t aChannel);
/**
* @}
*
*/
#ifdef __cplusplus
-8
View File
@@ -48,7 +48,6 @@ extern "C" {
* This module includes functions for Child Supervision feature.
*
* @{
*
*/
/**
@@ -61,7 +60,6 @@ extern "C" {
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The child supervision interval. Zero indicates that supervision is disabled.
*
*/
uint16_t otChildSupervisionGetInterval(otInstance *aInstance);
@@ -70,7 +68,6 @@ uint16_t otChildSupervisionGetInterval(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aInterval The supervision interval (in seconds). Zero to disable supervision.
*
*/
void otChildSupervisionSetInterval(otInstance *aInstance, uint16_t aInterval);
@@ -83,7 +80,6 @@ void otChildSupervisionSetInterval(otInstance *aInstance, uint16_t aInterval);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The supervision check timeout. Zero indicates that supervision check on the child is disabled.
*
*/
uint16_t otChildSupervisionGetCheckTimeout(otInstance *aInstance);
@@ -92,7 +88,6 @@ uint16_t otChildSupervisionGetCheckTimeout(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aTimeout The check timeout (in seconds). Zero to disable supervision check on the child.
*
*/
void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout);
@@ -101,19 +96,16 @@ void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout)
*
* The counter tracks the number of supervision check failures on the child. It is incremented when the child does
* not hear from its parent within the specified check timeout interval.
*
*/
uint16_t otChildSupervisionGetCheckFailureCounter(otInstance *aInstance);
/**
* Reset the supervision check timeout failure counter to zero.
*
*/
void otChildSupervisionResetCheckFailureCounter(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-11
View File
@@ -47,7 +47,6 @@ extern "C" {
/**
* Represents a CLI command.
*
*/
typedef struct otCliCommand
{
@@ -64,7 +63,6 @@ typedef struct otCliCommand
* This module includes functions that control the Thread stack's execution.
*
* @{
*
*/
/**
@@ -75,7 +73,6 @@ typedef struct otCliCommand
* @param[in] aArguments The format string arguments.
*
* @returns Number of bytes written by the callback.
*
*/
typedef int (*otCliOutputCallback)(void *aContext, const char *aFormat, va_list aArguments);
@@ -85,7 +82,6 @@ typedef int (*otCliOutputCallback)(void *aContext, const char *aFormat, va_list
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aCallback A callback method called to process CLI output.
* @param[in] aContext A user context pointer.
*
*/
void otCliInit(otInstance *aInstance, otCliOutputCallback aCallback, void *aContext);
@@ -93,7 +89,6 @@ void otCliInit(otInstance *aInstance, otCliOutputCallback aCallback, void *aCont
* Is called to feed in a console input line.
*
* @param[in] aBuf A pointer to a null-terminated string.
*
*/
void otCliInputLine(char *aBuf);
@@ -114,7 +109,6 @@ otError otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength,
*
* @param[in] aBytes A pointer to data which should be printed.
* @param[in] aLength @p aBytes length.
*
*/
void otCliOutputBytes(const uint8_t *aBytes, uint8_t aLength);
@@ -123,7 +117,6 @@ void otCliOutputBytes(const uint8_t *aBytes, uint8_t aLength);
*
* @param[in] aFmt A pointer to the format string.
* @param[in] ... A matching list of arguments.
*
*/
void otCliOutputFormat(const char *aFmt, ...);
@@ -133,7 +126,6 @@ void otCliOutputFormat(const char *aFmt, ...);
* If the @p aError is `OT_ERROR_PENDING` nothing will be outputted.
*
* @param[in] aError Error code value.
*
*/
void otCliAppendResult(otError aError);
@@ -144,7 +136,6 @@ void otCliAppendResult(otError aError);
* @param[in] aLogRegion The log region.
* @param[in] aFormat A pointer to the format string.
* @param[in] aArgs va_list matching aFormat.
*
*/
void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs);
@@ -153,13 +144,11 @@ void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFo
*
* Available when `OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE` is enabled and
* `OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES` is greater than 1.
*
*/
extern void otCliVendorSetUserCommands(void);
/**
* @}
*
*/
#ifdef __cplusplus
-62
View File
@@ -53,7 +53,6 @@ extern "C" {
* The functions in this module are available when CoAP API feature (`OPENTHREAD_CONFIG_COAP_API_ENABLE`) is enabled.
*
* @{
*
*/
#define OT_DEFAULT_COAP_PORT 5683 ///< Default CoAP port, as specified in RFC 7252
@@ -68,7 +67,6 @@ extern "C" {
/**
* CoAP Type values (2 bit unsigned integer).
*
*/
typedef enum otCoapType
{
@@ -80,13 +78,11 @@ typedef enum otCoapType
/**
* Helper macro to define CoAP Code values.
*
*/
#define OT_COAP_CODE(c, d) ((((c)&0x7) << 5) | ((d)&0x1f))
/**
* CoAP Code values.
*
*/
typedef enum otCoapCode
{
@@ -152,7 +148,6 @@ typedef enum otCoapOptionType
/**
* Represents a CoAP option.
*
*/
typedef struct otCoapOption
{
@@ -162,7 +157,6 @@ typedef struct otCoapOption
/**
* Acts as an iterator for CoAP options
*
*/
typedef struct otCoapOptionIterator
{
@@ -339,7 +333,6 @@ typedef enum otCoapBlockSzx
* @retval OT_ERROR_NONE A response was received successfully.
* @retval OT_ERROR_ABORT A CoAP transaction was reset by peer.
* @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period.
*
*/
typedef void (*otCoapResponseHandler)(void *aContext,
otMessage *aMessage,
@@ -352,7 +345,6 @@ typedef void (*otCoapResponseHandler)(void *aContext,
* @param[in] aContext A pointer to arbitrary context information.
* @param[in] aMessage A pointer to the message.
* @param[in] aMessageInfo A pointer to the message info for @p aMessage.
*
*/
typedef void (*otCoapRequestHandler)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo);
@@ -373,7 +365,6 @@ typedef void (*otCoapRequestHandler)(void *aContext, otMessage *aMessage, const
* @retval OT_ERROR_NONE Block segment was stored successfully.
* @retval OT_ERROR_NO_BUFS No more memory to store blocks.
* @retval OT_ERROR_NO_FRAME_RECEIVED Block segment missing.
*
*/
typedef otError (*otCoapBlockwiseReceiveHook)(void *aContext,
const uint8_t *aBlock,
@@ -400,7 +391,6 @@ typedef otError (*otCoapBlockwiseReceiveHook)(void *aContext,
*
* @retval OT_ERROR_NONE No error occurred.
* @retval OT_ERROR_INVALID_ARGS Block at @p aPosition does not exist.
*
*/
typedef otError (*otCoapBlockwiseTransmitHook)(void *aContext,
uint8_t *aBlock,
@@ -410,7 +400,6 @@ typedef otError (*otCoapBlockwiseTransmitHook)(void *aContext,
/**
* Represents a CoAP resource.
*
*/
typedef struct otCoapResource
{
@@ -422,7 +411,6 @@ typedef struct otCoapResource
/**
* Represents a CoAP resource with block-wise transfer.
*
*/
typedef struct otCoapBlockwiseResource
{
@@ -450,34 +438,29 @@ typedef struct otCoapBlockwiseResource
* @note mAckTimeout * ((2 ** (mMaxRetransmit + 1)) - 1) * (mAckRandomFactorNumerator / mAckRandomFactorDenominator)
* must not exceed what can be represented by a uint32_t (0xffffffff). This limitation allows OpenThread to
* avoid 64-bit arithmetic.
*
*/
typedef struct otCoapTxParameters
{
/**
* Minimum spacing before first retransmission when ACK is not received, in milliseconds (RFC7252 default value is
* 2000ms).
*
*/
uint32_t mAckTimeout;
/**
* Numerator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not
* received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1).
*
*/
uint8_t mAckRandomFactorNumerator;
/**
* Denominator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not
* received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1).
*
*/
uint8_t mAckRandomFactorDenominator;
/**
* Maximum number of retransmissions for CoAP Confirmable messages (RFC7252 default value is 4).
*
*/
uint8_t mMaxRetransmit;
} otCoapTxParameters;
@@ -488,7 +471,6 @@ typedef struct otCoapTxParameters
* @param[in,out] aMessage A pointer to the CoAP message to initialize.
* @param[in] aType CoAP message type.
* @param[in] aCode CoAP message code.
*
*/
void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode);
@@ -504,7 +486,6 @@ void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode);
*
* @retval OT_ERROR_NONE Successfully initialized the response message.
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to initialize the response message.
*
*/
otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aRequest, otCoapType aType, otCoapCode aCode);
@@ -517,7 +498,6 @@ otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aReques
*
* @retval OT_ERROR_NONE Successfully set the Token value.
* @retval OT_ERROR_NO_BUFS Insufficient buffers to set the Token value.
*
*/
otError otCoapMessageSetToken(otMessage *aMessage, const uint8_t *aToken, uint8_t aTokenLength);
@@ -526,7 +506,6 @@ otError otCoapMessageSetToken(otMessage *aMessage, const uint8_t *aToken, uint8_
*
* @param[in,out] aMessage A pointer to the CoAP message.
* @param[in] aTokenLength The Length of a Token to set.
*
*/
void otCoapMessageGenerateToken(otMessage *aMessage, uint8_t aTokenLength);
@@ -547,7 +526,6 @@ void otCoapMessageGenerateToken(otMessage *aMessage, uint8_t aTokenLength);
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendContentFormatOption(otMessage *aMessage, otCoapOptionContentFormat aContentFormat);
@@ -562,7 +540,6 @@ otError otCoapMessageAppendContentFormatOption(otMessage *aMessage, otCoapOption
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendOption(otMessage *aMessage, uint16_t aNumber, uint16_t aLength, const void *aValue);
@@ -591,7 +568,6 @@ otError otCoapMessageAppendUintOption(otMessage *aMessage, uint16_t aNumber, uin
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendObserveOption(otMessage *aMessage, uint32_t aObserve);
@@ -604,7 +580,6 @@ otError otCoapMessageAppendObserveOption(otMessage *aMessage, uint32_t aObserve)
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriPath);
@@ -617,7 +592,6 @@ otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriP
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendUriQueryOptions(otMessage *aMessage, const char *aUriQuery);
@@ -627,7 +601,6 @@ otError otCoapMessageAppendUriQueryOptions(otMessage *aMessage, const char *aUri
* @param[in] aSize Block size exponent.
*
* @returns The actual size exponent value.
*
*/
uint16_t otCoapBlockSizeFromExponent(otCoapBlockSzx aSize);
@@ -642,7 +615,6 @@ uint16_t otCoapBlockSizeFromExponent(otCoapBlockSzx aSize);
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSzx aSize);
@@ -657,7 +629,6 @@ otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendBlock1Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSzx aSize);
@@ -670,7 +641,6 @@ otError otCoapMessageAppendBlock1Option(otMessage *aMessage, uint32_t aNum, bool
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendProxyUriOption(otMessage *aMessage, const char *aUriPath);
@@ -683,7 +653,6 @@ otError otCoapMessageAppendProxyUriOption(otMessage *aMessage, const char *aUriP
* @retval OT_ERROR_NONE Successfully appended the option.
* @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type.
* @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size.
*
*/
otError otCoapMessageAppendMaxAgeOption(otMessage *aMessage, uint32_t aMaxAge);
@@ -706,7 +675,6 @@ otError otCoapMessageAppendUriQueryOption(otMessage *aMessage, const char *aUriQ
*
* @retval OT_ERROR_NONE Payload Marker successfully added.
* @retval OT_ERROR_NO_BUFS Header Payload Marker exceeds the buffer size.
*
*/
otError otCoapMessageSetPayloadMarker(otMessage *aMessage);
@@ -716,7 +684,6 @@ otError otCoapMessageSetPayloadMarker(otMessage *aMessage);
* @param[in] aMessage A pointer to the CoAP message.
*
* @returns The Type value.
*
*/
otCoapType otCoapMessageGetType(const otMessage *aMessage);
@@ -726,7 +693,6 @@ otCoapType otCoapMessageGetType(const otMessage *aMessage);
* @param[in] aMessage A pointer to the CoAP message.
*
* @returns The Code value.
*
*/
otCoapCode otCoapMessageGetCode(const otMessage *aMessage);
@@ -735,7 +701,6 @@ otCoapCode otCoapMessageGetCode(const otMessage *aMessage);
*
* @param[in,out] aMessage A pointer to the CoAP message to initialize.
* @param[in] aCode CoAP message code.
*
*/
void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode);
@@ -745,7 +710,6 @@ void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode);
* @param[in] aMessage A pointer to the CoAP message.
*
* @ returns The CoAP Code as string.
*
*/
const char *otCoapMessageCodeToString(const otMessage *aMessage);
@@ -755,7 +719,6 @@ const char *otCoapMessageCodeToString(const otMessage *aMessage);
* @param[in] aMessage A pointer to the CoAP message.
*
* @returns The Message ID value.
*
*/
uint16_t otCoapMessageGetMessageId(const otMessage *aMessage);
@@ -765,7 +728,6 @@ uint16_t otCoapMessageGetMessageId(const otMessage *aMessage);
* @param[in] aMessage A pointer to the CoAP message.
*
* @returns The Token length.
*
*/
uint8_t otCoapMessageGetTokenLength(const otMessage *aMessage);
@@ -775,7 +737,6 @@ uint8_t otCoapMessageGetTokenLength(const otMessage *aMessage);
* @param[in] aMessage A pointer to the CoAP message.
*
* @returns A pointer to the Token value.
*
*/
const uint8_t *otCoapMessageGetToken(const otMessage *aMessage);
@@ -787,7 +748,6 @@ const uint8_t *otCoapMessageGetToken(const otMessage *aMessage);
*
* @retval OT_ERROR_NONE Successfully initialised.
* @retval OT_ERROR_PARSE Message state is inconsistent.
*
*/
otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessage *aMessage);
@@ -798,7 +758,6 @@ otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessag
* @param[in] aOption The option number sought.
*
* @returns A pointer to the first matching option. If no matching option is present NULL pointer is returned.
*
*/
const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption);
@@ -808,7 +767,6 @@ const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionItera
* @param[in,out] aIterator A pointer to the CoAP message option iterator.
*
* @returns A pointer to the first option. If no option is present NULL pointer is returned.
*
*/
const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIterator);
@@ -819,7 +777,6 @@ const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIt
* @param[in] aOption The option number sought.
*
* @returns A pointer to the next matching option. If no further matching option is present NULL pointer is returned.
*
*/
const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption);
@@ -829,7 +786,6 @@ const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterat
* @param[in,out] aIterator A pointer to the CoAP message option iterator.
*
* @returns A pointer to the next option. If no more options are present NULL pointer is returned.
*
*/
const otCoapOption *otCoapOptionIteratorGetNextOption(otCoapOptionIterator *aIterator);
@@ -856,7 +812,6 @@ otError otCoapOptionIteratorGetOptionUintValue(otCoapOptionIterator *aIterator,
*
* @retval OT_ERROR_NONE Successfully filled value.
* @retval OT_ERROR_NOT_FOUND No current option.
*
*/
otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void *aValue);
@@ -870,7 +825,6 @@ otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void
* @param[in] aSettings A pointer to the message settings or NULL to set default settings.
*
* @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid.
*
*/
otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSettings);
@@ -894,7 +848,6 @@ otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSet
* @retval OT_ERROR_NONE Successfully sent CoAP message.
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
* @retval OT_ERROR_INVALID_ARGS Invalid arguments are given.
*
*/
otError otCoapSendRequestWithParameters(otInstance *aInstance,
otMessage *aMessage,
@@ -925,7 +878,6 @@ otError otCoapSendRequestWithParameters(otInstance *aInstance,
* @retval OT_ERROR_NONE Successfully sent CoAP message.
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
* @retval OT_ERROR_INVALID_ARGS Invalid arguments are given.
*
*/
otError otCoapSendRequestBlockWiseWithParameters(otInstance *aInstance,
otMessage *aMessage,
@@ -956,7 +908,6 @@ otError otCoapSendRequestBlockWiseWithParameters(otInstance *aIn
*
* @retval OT_ERROR_NONE Successfully sent CoAP message.
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
*
*/
static inline otError otCoapSendRequestBlockWise(otInstance *aInstance,
otMessage *aMessage,
@@ -985,7 +936,6 @@ static inline otError otCoapSendRequestBlockWise(otInstance *aIn
*
* @retval OT_ERROR_NONE Successfully sent CoAP message.
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
*
*/
static inline otError otCoapSendRequest(otInstance *aInstance,
otMessage *aMessage,
@@ -1005,7 +955,6 @@ static inline otError otCoapSendRequest(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully started the CoAP server.
* @retval OT_ERROR_FAILED Failed to start the CoAP server.
*
*/
otError otCoapStart(otInstance *aInstance, uint16_t aPort);
@@ -1015,7 +964,6 @@ otError otCoapStart(otInstance *aInstance, uint16_t aPort);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @retval OT_ERROR_NONE Successfully stopped the CoAP server.
*
*/
otError otCoapStop(otInstance *aInstance);
@@ -1024,7 +972,6 @@ otError otCoapStop(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapAddResource(otInstance *aInstance, otCoapResource *aResource);
@@ -1033,7 +980,6 @@ void otCoapAddResource(otInstance *aInstance, otCoapResource *aResource);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource);
@@ -1042,7 +988,6 @@ void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource);
@@ -1051,7 +996,6 @@ void otCoapAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource);
@@ -1061,7 +1005,6 @@ void otCoapRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResourc
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aHandler A function pointer that shall be called when an unhandled request arrives.
* @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
*
*/
void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext);
@@ -1076,7 +1019,6 @@ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandle
* @retval OT_ERROR_NONE Successfully enqueued the CoAP response message.
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
* @retval OT_ERROR_INVALID_ARGS Invalid arguments are given.
*
*/
otError otCoapSendResponseWithParameters(otInstance *aInstance,
otMessage *aMessage,
@@ -1099,7 +1041,6 @@ otError otCoapSendResponseWithParameters(otInstance *aInstance,
* @retval OT_ERROR_NONE Successfully enqueued the CoAP response message.
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
* @retval OT_ERROR_INVALID_ARGS Invalid arguments are given.
*
*/
otError otCoapSendResponseBlockWiseWithParameters(otInstance *aInstance,
otMessage *aMessage,
@@ -1122,7 +1063,6 @@ otError otCoapSendResponseBlockWiseWithParameters(otInstance *aI
*
* @retval OT_ERROR_NONE Successfully enqueued the CoAP response message.
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
*
*/
static inline otError otCoapSendResponseBlockWise(otInstance *aInstance,
otMessage *aMessage,
@@ -1143,7 +1083,6 @@ static inline otError otCoapSendResponseBlockWise(otInstance *aI
*
* @retval OT_ERROR_NONE Successfully enqueued the CoAP response message.
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
*
*/
static inline otError otCoapSendResponse(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo)
{
@@ -1153,7 +1092,6 @@ static inline otError otCoapSendResponse(otInstance *aInstance, otMessage *aMess
/**
* @}
*
*/
#ifdef __cplusplus
-28
View File
@@ -62,14 +62,12 @@ extern "C" {
* (`OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE`) is enabled.
*
* @{
*
*/
#define OT_DEFAULT_COAP_SECURE_PORT 5684 ///< Default CoAP Secure port, as specified in RFC 7252
/**
* CoAP secure connection event types.
*
*/
typedef enum otCoapSecureConnectEvent
{
@@ -85,7 +83,6 @@ typedef enum otCoapSecureConnectEvent
*
* @param[in] aEvent The connection event.
* @param[in] aContext A pointer to arbitrary context information.
*
*/
typedef void (*otHandleCoapSecureClientConnect)(otCoapSecureConnectEvent aEvent, void *aContext);
@@ -94,7 +91,6 @@ typedef void (*otHandleCoapSecureClientConnect)(otCoapSecureConnectEvent aEvent,
* number of connection attempts.
*
* @param[in] aContext A pointer to arbitrary context information.
*
*/
typedef void (*otCoapSecureAutoStopCallback)(void *aContext);
@@ -105,7 +101,6 @@ typedef void (*otCoapSecureAutoStopCallback)(void *aContext);
* @param[in] aPort The local UDP port to bind to.
*
* @retval OT_ERROR_NONE Successfully started the CoAP Secure server.
*
*/
otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort);
@@ -121,7 +116,6 @@ otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort);
*
* @retval OT_ERROR_NONE Successfully started the CoAP agent.
* @retval OT_ERROR_ALREADY Already started.
*
*/
otError otCoapSecureStartWithMaxConnAttempts(otInstance *aInstance,
uint16_t aPort,
@@ -133,7 +127,6 @@ otError otCoapSecureStartWithMaxConnAttempts(otInstance *aInsta
* Stops the CoAP Secure server.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otCoapSecureStop(otInstance *aInstance);
@@ -148,7 +141,6 @@ void otCoapSecureStop(otInstance *aInstance);
* @param[in] aPskLength The PSK length.
* @param[in] aPskIdentity The Identity Name for the PSK.
* @param[in] aPskIdLength The PSK Identity Length.
*
*/
void otCoapSecureSetPsk(otInstance *aInstance,
const uint8_t *aPsk,
@@ -170,7 +162,6 @@ void otCoapSecureSetPsk(otInstance *aInstance,
* @retval OT_ERROR_INVALID_STATE Not connected yet.
* @retval OT_ERROR_NONE Successfully get the peer certificate.
* @retval OT_ERROR_NO_BUFS Can't allocate memory for certificate.
*
*/
otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance,
unsigned char *aPeerCert,
@@ -185,7 +176,6 @@ otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance,
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aVerifyPeerCertificate true, to verify the peer certificate.
*
*/
void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificate);
@@ -200,7 +190,6 @@ void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertifica
* @param[in] aX509Length The length of certificate.
* @param[in] aPrivateKey A pointer to the PEM formatted private key.
* @param[in] aPrivateKeyLength The length of the private key.
*
*/
void otCoapSecureSetCertificate(otInstance *aInstance,
const uint8_t *aX509Cert,
@@ -219,7 +208,6 @@ void otCoapSecureSetCertificate(otInstance *aInstance,
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aX509CaCertificateChain A pointer to the PEM formatted X509 CA chain.
* @param[in] aX509CaCertChainLength The length of chain.
*
*/
void otCoapSecureSetCaCertificateChain(otInstance *aInstance,
const uint8_t *aX509CaCertificateChain,
@@ -235,7 +223,6 @@ void otCoapSecureSetCaCertificateChain(otInstance *aInstance,
* @param[in] aContext A pointer to arbitrary context information.
*
* @retval OT_ERROR_NONE Successfully started DTLS connection.
*
*/
otError otCoapSecureConnect(otInstance *aInstance,
const otSockAddr *aSockAddr,
@@ -246,7 +233,6 @@ otError otCoapSecureConnect(otInstance *aInstance,
* Stops the DTLS connection.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otCoapSecureDisconnect(otInstance *aInstance);
@@ -257,7 +243,6 @@ void otCoapSecureDisconnect(otInstance *aInstance);
*
* @retval TRUE The DTLS session is connected.
* @retval FALSE The DTLS session is not connected.
*
*/
bool otCoapSecureIsConnected(otInstance *aInstance);
@@ -268,7 +253,6 @@ bool otCoapSecureIsConnected(otInstance *aInstance);
*
* @retval TRUE If DTLS session is active.
* @retval FALSE If DTLS session is not active.
*
*/
bool otCoapSecureIsConnectionActive(otInstance *aInstance);
@@ -279,7 +263,6 @@ bool otCoapSecureIsConnectionActive(otInstance *aInstance);
*
* @retval TRUE The DTLS session is closed.
* @retval FALSE The DTLS session is not closed.
*
*/
bool otCoapSecureIsClosed(otInstance *aInstance);
@@ -303,7 +286,6 @@ bool otCoapSecureIsClosed(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully sent CoAP message.
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
* @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.
*
*/
otError otCoapSecureSendRequestBlockWise(otInstance *aInstance,
otMessage *aMessage,
@@ -327,7 +309,6 @@ otError otCoapSecureSendRequestBlockWise(otInstance *aInstance,
* @retval OT_ERROR_NONE Successfully sent CoAP message.
* @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.
* @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.
*
*/
otError otCoapSecureSendRequest(otInstance *aInstance,
otMessage *aMessage,
@@ -339,7 +320,6 @@ otError otCoapSecureSendRequest(otInstance *aInstance,
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapSecureAddResource(otInstance *aInstance, otCoapResource *aResource);
@@ -348,7 +328,6 @@ void otCoapSecureAddResource(otInstance *aInstance, otCoapResource *aResource);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource);
@@ -357,7 +336,6 @@ void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapSecureAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource);
@@ -366,7 +344,6 @@ void otCoapSecureAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseReso
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aResource A pointer to the resource.
*
*/
void otCoapSecureRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource);
@@ -376,7 +353,6 @@ void otCoapSecureRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseR
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aHandler A function pointer that shall be called when an unhandled request arrives.
* @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
*
*/
void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext);
@@ -387,7 +363,6 @@ void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler a
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aHandler A pointer to a function that will be called once DTLS connection has changed.
* @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
*
*/
void otCoapSecureSetClientConnectEventCallback(otInstance *aInstance,
otHandleCoapSecureClientConnect aHandler,
@@ -407,7 +382,6 @@ void otCoapSecureSetClientConnectEventCallback(otInstance *a
*
* @retval OT_ERROR_NONE Successfully enqueued the CoAP response message.
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
*
*/
otError otCoapSecureSendResponseBlockWise(otInstance *aInstance,
otMessage *aMessage,
@@ -424,13 +398,11 @@ otError otCoapSecureSendResponseBlockWise(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully enqueued the CoAP response message.
* @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response.
*
*/
otError otCoapSecureSendResponse(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo);
/**
* @}
*
*/
#ifdef __cplusplus
-31
View File
@@ -52,12 +52,10 @@ extern "C" {
* This module includes functions for the Thread Commissioner role.
*
* @{
*
*/
/**
* Defines the Commissioner State.
*
*/
typedef enum otCommissionerState
{
@@ -68,7 +66,6 @@ typedef enum otCommissionerState
/**
* Defines a Joiner Event on the Commissioner.
*
*/
typedef enum otCommissionerJoinerEvent
{
@@ -88,7 +85,6 @@ typedef enum otCommissionerJoinerEvent
/**
* Represents the steering data.
*
*/
typedef struct otSteeringData
{
@@ -98,7 +94,6 @@ typedef struct otSteeringData
/**
* Represents a Commissioning Dataset.
*
*/
typedef struct otCommissioningDataset
{
@@ -118,7 +113,6 @@ typedef struct otCommissioningDataset
/**
* Represents a Joiner PSKd.
*
*/
typedef struct otJoinerPskd
{
@@ -127,7 +121,6 @@ typedef struct otJoinerPskd
/**
* Defines a Joiner Info Type.
*
*/
typedef enum otJoinerInfoType
{
@@ -138,7 +131,6 @@ typedef enum otJoinerInfoType
/**
* Represents a Joiner Info.
*
*/
typedef struct otJoinerInfo
{
@@ -157,7 +149,6 @@ typedef struct otJoinerInfo
*
* @param[in] aState The Commissioner state.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otCommissionerStateCallback)(otCommissionerState aState, void *aContext);
@@ -168,7 +159,6 @@ typedef void (*otCommissionerStateCallback)(otCommissionerState aState, void *aC
* @param[in] aJoinerInfo A pointer to the Joiner Info.
* @param[in] aJoinerId A pointer to the Joiner ID (if not known, it will be NULL).
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent,
const otJoinerInfo *aJoinerInfo,
@@ -186,7 +176,6 @@ typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent,
* @retval OT_ERROR_NONE Successfully started the Commissioner service.
* @retval OT_ERROR_ALREADY Commissioner is already started.
* @retval OT_ERROR_INVALID_STATE Device is not currently attached to a network.
*
*/
otError otCommissionerStart(otInstance *aInstance,
otCommissionerStateCallback aStateCallback,
@@ -200,7 +189,6 @@ otError otCommissionerStart(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully stopped the Commissioner service.
* @retval OT_ERROR_ALREADY Commissioner is already stopped.
*
*/
otError otCommissionerStop(otInstance *aInstance);
@@ -210,7 +198,6 @@ otError otCommissionerStop(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Commissioner Id.
*
*/
const char *otCommissionerGetId(otInstance *aInstance);
@@ -223,7 +210,6 @@ const char *otCommissionerGetId(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully set the Commissioner Id.
* @retval OT_ERROR_INVALID_ARGS Given name is too long.
* @retval OT_ERROR_INVALID_STATE The commissioner is active and id cannot be changed.
*
*/
otError otCommissionerSetId(otInstance *aInstance, const char *aId);
@@ -241,7 +227,6 @@ otError otCommissionerSetId(otInstance *aInstance, const char *aId);
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerAddJoiner(otInstance *aInstance,
const otExtAddress *aEui64,
@@ -262,7 +247,6 @@ otError otCommissionerAddJoiner(otInstance *aInstance,
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance,
const otJoinerDiscerner *aDiscerner,
@@ -278,7 +262,6 @@ otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully get the Joiner info.
* @retval OT_ERROR_NOT_FOUND Not found next Joiner.
*
*/
otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner);
@@ -294,7 +277,6 @@ otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterat
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aEui64);
@@ -310,7 +292,6 @@ otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aE
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner);
@@ -320,7 +301,6 @@ otError otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJ
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the URL string.
*
*/
const char *otCommissionerGetProvisioningUrl(otInstance *aInstance);
@@ -332,7 +312,6 @@ const char *otCommissionerGetProvisioningUrl(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the Provisioning URL.
* @retval OT_ERROR_INVALID_ARGS @p aProvisioningUrl is invalid (too long).
*
*/
otError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aProvisioningUrl);
@@ -350,7 +329,6 @@ otError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aPro
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerAnnounceBegin(otInstance *aInstance,
uint32_t aChannelMask,
@@ -365,7 +343,6 @@ otError otCommissionerAnnounceBegin(otInstance *aInstance,
* @param[in] aEnergyList A pointer to the energy measurement list.
* @param[in] aEnergyListLength Number of entries in @p aEnergyListLength.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask,
const uint8_t *aEnergyList,
@@ -389,7 +366,6 @@ typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask,
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerEnergyScan(otInstance *aInstance,
uint32_t aChannelMask,
@@ -406,7 +382,6 @@ otError otCommissionerEnergyScan(otInstance *aInstance,
* @param[in] aPanId The PAN ID value.
* @param[in] aChannelMask The channel mask value.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext);
@@ -425,7 +400,6 @@ typedef void (*otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aC
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
* @note Only use this after successfully starting the Commissioner role with otCommissionerStart().
*
*/
otError otCommissionerPanIdQuery(otInstance *aInstance,
uint16_t aPanId,
@@ -444,7 +418,6 @@ otError otCommissionerPanIdQuery(otInstance *aInstance,
* @retval OT_ERROR_NONE Successfully send the meshcop dataset command.
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
*/
otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength);
@@ -459,7 +432,6 @@ otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, u
* @retval OT_ERROR_NONE Successfully send the meshcop dataset command.
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
* @retval OT_ERROR_INVALID_STATE The commissioner is not active.
*
*/
otError otCommissionerSendMgmtSet(otInstance *aInstance,
const otCommissioningDataset *aDataset,
@@ -472,7 +444,6 @@ otError otCommissionerSendMgmtSet(otInstance *aInstance,
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current commissioner session id.
*
*/
uint16_t otCommissionerGetSessionId(otInstance *aInstance);
@@ -484,13 +455,11 @@ uint16_t otCommissionerGetSessionId(otInstance *aInstance);
* @retval OT_COMMISSIONER_STATE_DISABLED Commissioner disabled.
* @retval OT_COMMISSIONER_STATE_PETITION Becoming the commissioner.
* @retval OT_COMMISSIONER_STATE_ACTIVE Commissioner enabled.
*
*/
otCommissionerState otCommissionerGetState(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-1
View File
@@ -39,7 +39,6 @@
* @def OPENTHREAD_CONFIG_FILE
*
* The OpenThread feature configuration file.
*
*/
#if defined(OPENTHREAD_CONFIG_FILE)
#include OPENTHREAD_CONFIG_FILE
-5
View File
@@ -52,12 +52,10 @@ extern "C" {
* This module includes cryptographic functions.
*
* @{
*
*/
/**
* Represents a SHA-256 hash.
*
*/
typedef otPlatCryptoSha256Hash otCryptoSha256Hash;
@@ -68,7 +66,6 @@ typedef otPlatCryptoSha256Hash otCryptoSha256Hash;
* @param[in] aBuf A pointer to the input buffer.
* @param[in] aBufLength The length of @p aBuf in bytes.
* @param[out] aHash A pointer to a `otCryptoSha256Hash` structure to output the hash value.
*
*/
void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash);
@@ -89,7 +86,6 @@ void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t a
* @param[in] aEncrypt `true` on encrypt and `false` on decrypt.
*
* @param[out] aTag A pointer to the tag.
*
*/
void otCryptoAesCcm(const otCryptoKey *aKey,
uint8_t aTagLength,
@@ -105,7 +101,6 @@ void otCryptoAesCcm(const otCryptoKey *aKey,
/**
* @}
*
*/
#ifdef __cplusplus
-38
View File
@@ -59,7 +59,6 @@ extern "C" {
* @struct otNetworkKey
*
* Represents a Thread Network Key.
*
*/
OT_TOOL_PACKED_BEGIN
struct otNetworkKey
@@ -69,13 +68,11 @@ struct otNetworkKey
/**
* Represents a Thread Network Key.
*
*/
typedef struct otNetworkKey otNetworkKey;
/**
* This datatype represents KeyRef to NetworkKey.
*
*/
typedef otCryptoKeyRef otNetworkKeyRef; ///< Reference to Key
@@ -85,7 +82,6 @@ typedef otCryptoKeyRef otNetworkKeyRef; ///< Reference to Key
* Represents a Network Name.
*
* The `otNetworkName` is a null terminated C string (i.e., `m8` char array MUST end with null char `\0`).
*
*/
typedef struct otNetworkName
{
@@ -96,7 +92,6 @@ typedef struct otNetworkName
/**
* Represents an Extended PAN ID.
*
*/
OT_TOOL_PACKED_BEGIN
struct otExtendedPanId
@@ -106,7 +101,6 @@ struct otExtendedPanId
/**
* Represents an Extended PAN ID.
*
*/
typedef struct otExtendedPanId otExtendedPanId;
@@ -114,7 +108,6 @@ typedef struct otExtendedPanId otExtendedPanId;
/**
* Represents a Mesh Local Prefix.
*
*/
typedef otIp6NetworkPrefix otMeshLocalPrefix;
@@ -122,7 +115,6 @@ typedef otIp6NetworkPrefix otMeshLocalPrefix;
/**
* Represents PSKc.
*
*/
OT_TOOL_PACKED_BEGIN
struct otPskc
@@ -132,19 +124,16 @@ struct otPskc
/**
* Represents a PSKc.
*
*/
typedef struct otPskc otPskc;
/**
* This datatype represents KeyRef to PSKc.
*
*/
typedef otCryptoKeyRef otPskcRef; ///< Reference to Key
/**
* Represent Security Policy.
*
*/
typedef struct otSecurityPolicy
{
@@ -164,7 +153,6 @@ typedef struct otSecurityPolicy
/**
* Represents Channel Mask.
*
*/
typedef uint32_t otChannelMask;
@@ -197,7 +185,6 @@ typedef uint32_t otChannelMask;
/**
* Represents presence of different components in Active or Pending Operational Dataset.
*
*/
typedef struct otOperationalDatasetComponents
{
@@ -217,7 +204,6 @@ typedef struct otOperationalDatasetComponents
/**
* Represents a Thread Dataset timestamp component.
*
*/
typedef struct otTimestamp
{
@@ -230,7 +216,6 @@ typedef struct otTimestamp
* Represents an Active or Pending Operational Dataset.
*
* Components in Dataset are optional. `mComponents` structure specifies which components are present in the Dataset.
*
*/
typedef struct otOperationalDataset
{
@@ -251,7 +236,6 @@ typedef struct otOperationalDataset
/**
* Maximum length of Operational Dataset in bytes.
*
*/
#define OT_OPERATIONAL_DATASET_MAX_LENGTH 254
@@ -259,7 +243,6 @@ typedef struct otOperationalDataset
* Represents an Active or Pending Operational Dataset.
*
* The Operational Dataset is TLV encoded as specified by Thread.
*
*/
typedef struct otOperationalDatasetTlvs
{
@@ -269,7 +252,6 @@ typedef struct otOperationalDatasetTlvs
/**
* Represents meshcop TLV types.
*
*/
typedef enum otMeshcopTlvType
{
@@ -326,7 +308,6 @@ typedef enum otMeshcopTlvType
* @retval OT_ERROR_PARSE An error occurred during parsing the response.
* @retval OT_ERROR_ABORT The request was reset by peer.
* @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period.
*
*/
typedef void (*otDatasetMgmtSetCallback)(otError aResult, void *aContext);
@@ -336,7 +317,6 @@ typedef void (*otDatasetMgmtSetCallback)(otError aResult, void *aContext);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.
*
*/
bool otDatasetIsCommissioned(otInstance *aInstance);
@@ -348,7 +328,6 @@ bool otDatasetIsCommissioned(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully retrieved the Active Operational Dataset.
* @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store.
*
*/
otError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset);
@@ -360,7 +339,6 @@ otError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset
*
* @retval OT_ERROR_NONE Successfully retrieved the Active Operational Dataset.
* @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store.
*
*/
otError otDatasetGetActiveTlvs(otInstance *aInstance, otOperationalDatasetTlvs *aDataset);
@@ -389,7 +367,6 @@ otError otDatasetGetActiveTlvs(otInstance *aInstance, otOperationalDatasetTlvs *
* @param[in] aDataset A pointer to the Active Operational Dataset.
*
* @retval OT_ERROR_NONE Successfully set the Active Operational Dataset.
*
*/
otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset);
@@ -414,7 +391,6 @@ otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aD
*
* @retval OT_ERROR_NONE Successfully set the Active Operational Dataset.
* @retval OT_ERROR_INVALID_ARGS The @p aDataset is invalid. It is too long or contains incorrect TLV formatting.
*
*/
otError otDatasetSetActiveTlvs(otInstance *aInstance, const otOperationalDatasetTlvs *aDataset);
@@ -426,7 +402,6 @@ otError otDatasetSetActiveTlvs(otInstance *aInstance, const otOperationalDataset
*
* @retval OT_ERROR_NONE Successfully retrieved the Pending Operational Dataset.
* @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store.
*
*/
otError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset);
@@ -438,7 +413,6 @@ otError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDatase
*
* @retval OT_ERROR_NONE Successfully retrieved the Pending Operational Dataset.
* @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store.
*
*/
otError otDatasetGetPendingTlvs(otInstance *aInstance, otOperationalDatasetTlvs *aDataset);
@@ -454,7 +428,6 @@ otError otDatasetGetPendingTlvs(otInstance *aInstance, otOperationalDatasetTlvs
* @param[in] aDataset A pointer to the Pending Operational Dataset.
*
* @retval OT_ERROR_NONE Successfully set the Pending Operational Dataset.
*
*/
otError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset);
@@ -466,7 +439,6 @@ otError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *a
*
* @retval OT_ERROR_NONE Successfully set the Pending Operational Dataset.
* @retval OT_ERROR_INVALID_ARGS The @p aDataset is invalid. It is too long or contains incorrect TLV formatting.
*
*/
otError otDatasetSetPendingTlvs(otInstance *aInstance, const otOperationalDatasetTlvs *aDataset);
@@ -481,7 +453,6 @@ otError otDatasetSetPendingTlvs(otInstance *aInstance, const otOperationalDatase
*
* @retval OT_ERROR_NONE Successfully send the meshcop dataset command.
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
*
*/
otError otDatasetSendMgmtActiveGet(otInstance *aInstance,
const otOperationalDatasetComponents *aDatasetComponents,
@@ -502,7 +473,6 @@ otError otDatasetSendMgmtActiveGet(otInstance *aInstan
* @retval OT_ERROR_NONE Successfully send the meshcop dataset command.
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
* @retval OT_ERROR_BUSY A previous request is ongoing.
*
*/
otError otDatasetSendMgmtActiveSet(otInstance *aInstance,
const otOperationalDataset *aDataset,
@@ -522,7 +492,6 @@ otError otDatasetSendMgmtActiveSet(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully send the meshcop dataset command.
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
*
*/
otError otDatasetSendMgmtPendingGet(otInstance *aInstance,
const otOperationalDatasetComponents *aDatasetComponents,
@@ -543,7 +512,6 @@ otError otDatasetSendMgmtPendingGet(otInstance *aInsta
* @retval OT_ERROR_NONE Successfully send the meshcop dataset command.
* @retval OT_ERROR_NO_BUFS Insufficient buffer space to send.
* @retval OT_ERROR_BUSY A previous request is ongoing.
*
*/
otError otDatasetSendMgmtPendingSet(otInstance *aInstance,
const otOperationalDataset *aDataset,
@@ -564,7 +532,6 @@ otError otDatasetSendMgmtPendingSet(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully generate PSKc.
* @retval OT_ERROR_INVALID_ARGS If any of the input arguments is invalid.
*
*/
otError otDatasetGeneratePskc(const char *aPassPhrase,
const otNetworkName *aNetworkName,
@@ -582,7 +549,6 @@ otError otDatasetGeneratePskc(const char *aPassPhrase,
*
* @retval OT_ERROR_NONE Successfully set @p aNetworkName from @p aNameString.
* @retval OT_ERROR_INVALID_ARGS @p aNameStrng is invalid (too long or does not follow UTF-8 encoding).
*
*/
otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameString);
@@ -594,7 +560,6 @@ otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameSt
*
* @retval OT_ERROR_NONE Successfully set @p aDataset from @p aDatasetTlvs.
* @retval OT_ERROR_INVALID_ARGS @p aDatasetTlvs's length is longer than `OT_OPERATIONAL_DATASET_MAX_LENGTH`.
*
*/
otError otDatasetParseTlvs(const otOperationalDatasetTlvs *aDatasetTlvs, otOperationalDataset *aDataset);
@@ -603,7 +568,6 @@ otError otDatasetParseTlvs(const otOperationalDatasetTlvs *aDatasetTlvs, otOpera
*
* @param[in] aDataset An Operational dataset to convert to TLVs.
* @param[out] aDatasetTlvs A pointer to dataset TLVs to return the result.
*
*/
void otDatasetConvertToTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs);
@@ -618,13 +582,11 @@ void otDatasetConvertToTlvs(const otOperationalDataset *aDataset, otOperationalD
* @retval OT_ERROR_NONE Successfully updated @p aDatasetTlvs.
* @retval OT_ERROR_INVALID_ARGS @p aDataset contains invalid values.
* @retval OT_ERROR_NO_BUFS Not enough space space in @p aDatasetTlvs to apply the update.
*
*/
otError otDatasetUpdateTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs);
/**
* @}
*
*/
#ifdef __cplusplus
-5
View File
@@ -46,7 +46,6 @@ extern "C" {
* @addtogroup api-operational-dataset
*
* @{
*
*/
/**
@@ -57,7 +56,6 @@ extern "C" {
*
* @retval OT_ERROR_NONE Successfully created a new Operational Dataset.
* @retval OT_ERROR_FAILED Failed to generate random values for new parameters.
*
*/
otError otDatasetCreateNewNetwork(otInstance *aInstance, otOperationalDataset *aDataset);
@@ -67,7 +65,6 @@ otError otDatasetCreateNewNetwork(otInstance *aInstance, otOperationalDataset *a
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @retval the value of minimal delay timer (in ms).
*
*/
uint32_t otDatasetGetDelayTimerMinimal(otInstance *aInstance);
@@ -82,13 +79,11 @@ uint32_t otDatasetGetDelayTimerMinimal(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set minimal delay timer.
* @retval OT_ERROR_INVALID_ARGS If @p aDelayTimerMinimal is not valid.
*
*/
otError otDatasetSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal);
/**
* @}
*
*/
#ifdef __cplusplus
-6
View File
@@ -48,7 +48,6 @@ extern "C" {
* @{
*
* For FTD builds only, Dataset Updater includes functions to manage dataset updates.
*
*/
/**
@@ -64,7 +63,6 @@ extern "C" {
* a conflicting Dataset update.
*
* @param[in] aContext A pointer to the arbitrary context (provided by user in `otDatasetUpdaterRequestUpdate()`).
*
*/
typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext);
@@ -87,7 +85,6 @@ typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext);
* @retval OT_ERROR_INVALID_ARGS The @p aDataset is not valid (contains Active or Pending Timestamp).
* @retval OT_ERROR_BUSY Cannot start update, a previous one is ongoing.
* @retval OT_ERROR_NO_BUFS Could not allocated buffer to save Dataset.
*
*/
otError otDatasetUpdaterRequestUpdate(otInstance *aInstance,
const otOperationalDataset *aDataset,
@@ -100,7 +97,6 @@ otError otDatasetUpdaterRequestUpdate(otInstance *aInstance,
* Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otDatasetUpdaterCancelUpdate(otInstance *aInstance);
@@ -113,13 +109,11 @@ void otDatasetUpdaterCancelUpdate(otInstance *aInstance);
*
* @retval TRUE There is an ongoing update.
* @retval FALSE There is no ongoing update.
*
*/
bool otDatasetUpdaterIsUpdateOngoing(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-6
View File
@@ -49,7 +49,6 @@ extern "C" {
* This module includes functions that control the Thread stack's execution.
*
* @{
*
*/
/* Represents the pointer to callback to output diag messages. */
@@ -61,7 +60,6 @@ typedef otPlatDiagOutputCallback otDiagOutputCallback;
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aCallback A pointer to a function that is called on outputting diag messages.
* @param[in] aContext A pointer to the user context.
*
*/
void otDiagSetOutputCallback(otInstance *aInstance, otDiagOutputCallback aCallback, void *aContext);
@@ -75,7 +73,6 @@ void otDiagSetOutputCallback(otInstance *aInstance, otDiagOutputCallback aCallba
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
* @retval OT_ERROR_NONE The command is successfully process.
* @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported.
*
*/
otError otDiagProcessCmd(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[]);
@@ -89,7 +86,6 @@ otError otDiagProcessCmd(otInstance *aInstance, uint8_t aArgsLength, char *aArgs
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
* @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported.
* @retval OT_ERROR_NO_BUFS The command string is too long.
*
*/
otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString);
@@ -100,13 +96,11 @@ otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString);
*
* @retval TRUE if factory diagnostics mode is enabled
* @retval FALSE if factory diagnostics mode is disabled.
*
*/
bool otDiagIsEnabled(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-10
View File
@@ -51,7 +51,6 @@ extern "C" {
* This module includes functions that control DNS communication.
*
* @{
*
*/
#define OT_DNS_MAX_NAME_SIZE 255 ///< Maximum name string size (includes null char at the end of string).
@@ -72,7 +71,6 @@ extern "C" {
*
* An array of `otDnsTxtEntry` entries are used in `otSrpClientService` to specify the full TXT record (a list of
* entries).
*
*/
typedef struct otDnsTxtEntry
{
@@ -89,7 +87,6 @@ typedef struct otDnsTxtEntry
*
* If `mKey` is NULL, then `mValue` buffer is treated as an already encoded TXT-DATA and is appended as is in the
* DNS message.
*
*/
const char *mKey;
const uint8_t *mValue; ///< The TXT record value or already encoded TXT-DATA (depending on `mKey`).
@@ -100,7 +97,6 @@ typedef struct otDnsTxtEntry
* Represents an iterator for TXT record entries (key/value pairs).
*
* The data fields in this structure are intended for use by OpenThread core and caller should not read or change them.
*
*/
typedef struct otDnsTxtEntryIterator
{
@@ -118,7 +114,6 @@ typedef struct otDnsTxtEntryIterator
* @param[in] aIterator A pointer to the iterator to initialize (MUST NOT be NULL).
* @param[in] aTxtData A pointer to buffer containing the encoded TXT data.
* @param[in] aTxtDataLength The length (number of bytes) of @p aTxtData.
*
*/
void otDnsInitTxtEntryIterator(otDnsTxtEntryIterator *aIterator, const uint8_t *aTxtData, uint16_t aTxtDataLength);
@@ -139,7 +134,6 @@ void otDnsInitTxtEntryIterator(otDnsTxtEntryIterator *aIterator, const uint8_t *
* @retval OT_ERROR_NONE The next entry was parsed successfully. @p aEntry is updated.
* @retval OT_ERROR_NOT_FOUND No more entries in the TXT data.
* @retval OT_ERROR_PARSE The TXT data from @p aIterator is not well-formed.
*
*/
otError otDnsGetNextTxtEntry(otDnsTxtEntryIterator *aIterator, otDnsTxtEntry *aEntry);
@@ -154,7 +148,6 @@ otError otDnsGetNextTxtEntry(otDnsTxtEntryIterator *aIterator, otDnsTxtEntry *aE
* @retval OT_ERROR_NONE Encoded TXT data successfully, @p aTxtData and @p aTxtDataLength are updated.
* @retval OT_ERROR_INVALID_ARGS The @p aTxtEntries is not valid.
* @retval OT_ERROR_NO_BUS Could not fit the encoded data in @p aTxtData buffer with its @p aTxtDataLength.
*
*/
otError otDnsEncodeTxtData(const otDnsTxtEntry *aTxtEntries,
uint16_t aNumTxtEntries,
@@ -173,7 +166,6 @@ otError otDnsEncodeTxtData(const otDnsTxtEntry *aTxtEntries,
* instances (i.e., calling this function enables/disables the compression mode on all OpenThread instances).
*
* @param[in] aEnabled TRUE to enable the "DNS name compression" mode, FALSE to disable.
*
*/
void otDnsSetNameCompressionEnabled(bool aEnabled);
@@ -183,13 +175,11 @@ void otDnsSetNameCompressionEnabled(bool aEnabled);
* This is intended for testing only and available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` config is enabled.
*
* @returns TRUE if the "DNS name compression" mode is enabled, FALSE otherwise.
*
*/
bool otDnsIsNameCompressionEnabled(void);
/**
* @}
*
*/
#ifdef __cplusplus
-30
View File
@@ -52,12 +52,10 @@ extern "C" {
* The functions in this module are available only if feature `OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE` is enabled.
*
* @{
*
*/
/**
* Type represents the "Recursion Desired" (RD) flag in an `otDnsQueryConfig`.
*
*/
typedef enum
{
@@ -71,7 +69,6 @@ typedef enum
*
* The NAT64 mode indicates whether to allow or disallow NAT64 address translation during DNS client address resolution.
* This mode is only used when `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE` is enabled.
*
*/
typedef enum
{
@@ -85,7 +82,6 @@ typedef enum
*
* This is only used during DNS client service resolution `otDnsClientResolveService()`. It determines which
* record types to query.
*
*/
typedef enum
{
@@ -101,7 +97,6 @@ typedef enum
* Type represents the DNS transport protocol in an `otDnsQueryConfig`.
*
* This `OT_DNS_TRANSPORT_TCP` is only supported when `OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE` is enabled.
*
*/
typedef enum
{
@@ -115,7 +110,6 @@ typedef enum
*
* Any of the fields in this structure can be set to zero to indicate that it is not specified. How the unspecified
* fields are treated is determined by the function which uses the instance of `otDnsQueryConfig`.
*
*/
typedef struct otDnsQueryConfig
{
@@ -138,7 +132,6 @@ typedef struct otDnsQueryConfig
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the current default config being used by DNS client.
*
*/
const otDnsQueryConfig *otDnsClientGetDefaultConfig(otInstance *aInstance);
@@ -164,7 +157,6 @@ const otDnsQueryConfig *otDnsClientGetDefaultConfig(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aConfig A pointer to the new query config to use as default.
*
*/
void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig *aConfig);
@@ -172,7 +164,6 @@ void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig *
* An opaque representation of a response to an address resolution DNS query.
*
* Pointers to instance of this type are provided from callback `otDnsAddressCallback`.
*
*/
typedef struct otDnsAddressResponse otDnsAddressResponse;
@@ -212,7 +203,6 @@ typedef struct otDnsAddressResponse otDnsAddressResponse;
* - (21) BADALG Bad algorithm -> OT_ERROR_SECURITY
* - (22) BADTRUN Bad truncation -> OT_ERROR_PARSE
* - Other response codes -> OT_ERROR_FAILED
*
*/
typedef void (*otDnsAddressCallback)(otError aError, const otDnsAddressResponse *aResponse, void *aContext);
@@ -233,7 +223,6 @@ typedef void (*otDnsAddressCallback)(otError aError, const otDnsAddressResponse
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
* @retval OT_ERROR_INVALID_ARGS The host name is not valid format.
* @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.
*
*/
otError otDnsClientResolveAddress(otInstance *aInstance,
const char *aHostName,
@@ -263,7 +252,6 @@ otError otDnsClientResolveAddress(otInstance *aInstance,
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
* @retval OT_ERROR_INVALID_ARGS The host name is not valid format or NAT64 is not enabled in config.
* @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.
*
*/
otError otDnsClientResolveIp4Address(otInstance *aInstance,
const char *aHostName,
@@ -282,7 +270,6 @@ otError otDnsClientResolveIp4Address(otInstance *aInstance,
*
* @retval OT_ERROR_NONE The full host name was read successfully.
* @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer.
*
*/
otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
char *aNameBuffer,
@@ -307,7 +294,6 @@ otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse,
* @retval OT_ERROR_NOT_FOUND No address record in @p aResponse at @p aIndex.
* @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.
* @retval OT_ERROR_INVALID_STATE No NAT64 prefix (applicable only when NAT64 is allowed).
*
*/
otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
uint16_t aIndex,
@@ -318,7 +304,6 @@ otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse,
* An opaque representation of a response to a browse (service instance enumeration) DNS query.
*
* Pointers to instance of this type are provided from callback `otDnsBrowseCallback`.
*
*/
typedef struct otDnsBrowseResponse otDnsBrowseResponse;
@@ -336,13 +321,11 @@ typedef struct otDnsBrowseResponse otDnsBrowseResponse;
* @param[in] aContext A pointer to application-specific context.
*
* For the full list of possible values for @p aError, please see `otDnsAddressCallback()`.
*
*/
typedef void (*otDnsBrowseCallback)(otError aError, const otDnsBrowseResponse *aResponse, void *aContext);
/**
* Provides info for a DNS service instance.
*
*/
typedef struct otDnsServiceInfo
{
@@ -377,7 +360,6 @@ typedef struct otDnsServiceInfo
*
* @retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status.
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
*
*/
otError otDnsClientBrowse(otInstance *aInstance,
const char *aServiceName,
@@ -396,7 +378,6 @@ otError otDnsClientBrowse(otInstance *aInstance,
*
* @retval OT_ERROR_NONE The service name was read successfully.
* @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer.
*
*/
otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
char *aNameBuffer,
@@ -422,7 +403,6 @@ otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse,
* @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer.
* @retval OT_ERROR_NOT_FOUND No service instance record in @p aResponse at @p aIndex.
* @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.
*
*/
otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aResponse,
uint16_t aIndex,
@@ -455,7 +435,6 @@ otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aRespon
* @retval OT_ERROR_NOT_FOUND Could not find a matching SRV record for @p aInstanceLabel.
* @retval OT_ERROR_NO_BUFS The host name and/or TXT data could not fit in the given buffers.
* @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.
*
*/
otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
const char *aInstanceLabel,
@@ -480,7 +459,6 @@ otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse,
* @retval OT_ERROR_NONE The address was read successfully.
* @retval OT_ERROR_NOT_FOUND No address record for @p aHostname in @p aResponse at @p aIndex.
* @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.
*
*/
otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
const char *aHostName,
@@ -492,7 +470,6 @@ otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse,
* An opaque representation of a response to a service instance resolution DNS query.
*
* Pointers to instance of this type are provided from callback `otDnsAddressCallback`.
*
*/
typedef struct otDnsServiceResponse otDnsServiceResponse;
@@ -510,7 +487,6 @@ typedef struct otDnsServiceResponse otDnsServiceResponse;
* @param[in] aContext A pointer to application-specific context.
*
* For the full list of possible values for @p aError, please see `otDnsAddressCallback()`.
*
*/
typedef void (*otDnsServiceCallback)(otError aError, const otDnsServiceResponse *aResponse, void *aContext);
@@ -545,7 +521,6 @@ typedef void (*otDnsServiceCallback)(otError aError, const otDnsServiceResponse
* @retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status.
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
* @retval OT_ERROR_INVALID_ARGS @p aInstanceLabel is NULL.
*
*/
otError otDnsClientResolveService(otInstance *aInstance,
const char *aInstanceLabel,
@@ -582,7 +557,6 @@ otError otDnsClientResolveService(otInstance *aInstance,
* @retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status.
* @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.
* @retval OT_ERROR_INVALID_ARGS @p aInstanceLabel is NULL, or @p aConfig is invalid.
*
*/
otError otDnsClientResolveServiceAndHostAddress(otInstance *aInstance,
const char *aInstanceLabel,
@@ -605,7 +579,6 @@ otError otDnsClientResolveServiceAndHostAddress(otInstance *aInstanc
*
* @retval OT_ERROR_NONE The service name was read successfully.
* @retval OT_ERROR_NO_BUFS Either the label or name does not fit in the given buffers.
*
*/
otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse,
char *aLabelBuffer,
@@ -644,7 +617,6 @@ otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse
* @retval OT_ERROR_NOT_FOUND Could not find a required record in @p aResponse.
* @retval OT_ERROR_NO_BUFS The host name and/or TXT data could not fit in the given buffers.
* @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.
*
*/
otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse, otDnsServiceInfo *aServiceInfo);
@@ -667,7 +639,6 @@ otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse
* @retval OT_ERROR_NONE The address was read successfully.
* @retval OT_ERROR_NOT_FOUND No address record for @p aHostname in @p aResponse at @p aIndex.
* @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.
*
*/
otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse,
const char *aHostName,
@@ -677,7 +648,6 @@ otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse
/**
* @}
*
*/
#ifdef __cplusplus
-17
View File
@@ -52,7 +52,6 @@ extern "C" {
* This module includes APIs for DNS-SD server.
*
* @{
*
*/
/**
@@ -78,7 +77,6 @@ extern "C" {
*
* @sa otDnssdQueryHandleDiscoveredServiceInstance
* @sa otDnssdQueryHandleDiscoveredHost
*
*/
typedef void (*otDnssdQuerySubscribeCallback)(void *aContext, const char *aFullName);
@@ -96,19 +94,16 @@ typedef void (*otDnssdQuerySubscribeCallback)(void *aContext, const char *aFullN
* @param[in] aContext A pointer to the application-specific context.
* @param[in] aFullName The null-terminated full service name (e.g. "_ipps._tcp.default.service.arpa."), or
* full service instance name (e.g. "OpenThread._ipps._tcp.default.service.arpa.").
*
*/
typedef void (*otDnssdQueryUnsubscribeCallback)(void *aContext, const char *aFullName);
/**
* This opaque type represents a DNS-SD query.
*
*/
typedef void otDnssdQuery;
/**
* Represents information of a discovered service instance for a DNS-SD query.
*
*/
typedef struct otDnssdServiceInstanceInfo
{
@@ -126,7 +121,6 @@ typedef struct otDnssdServiceInstanceInfo
/**
* Represents information of a discovered host for a DNS-SD query.
*
*/
typedef struct otDnssdHostInfo
{
@@ -137,7 +131,6 @@ typedef struct otDnssdHostInfo
/**
* Specifies a DNS-SD query type.
*
*/
typedef enum
{
@@ -161,7 +154,6 @@ typedef struct otUpstreamDnsCounters
/**
* Contains the counters of DNS-SD server.
*
*/
typedef struct otDnssdCounters
{
@@ -188,7 +180,6 @@ typedef struct otDnssdCounters
* @param[in] aSubscribe A pointer to the callback function to subscribe a service or service instance.
* @param[in] aUnsubscribe A pointer to the callback function to unsubscribe a service or service instance.
* @param[in] aContext A pointer to the application-specific context.
*
*/
void otDnssdQuerySetCallbacks(otInstance *aInstance,
otDnssdQuerySubscribeCallback aSubscribe,
@@ -206,7 +197,6 @@ void otDnssdQuerySetCallbacks(otInstance *aInstance,
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aServiceFullName The null-terminated full service name.
* @param[in] aInstanceInfo A pointer to the discovered service instance information.
*
*/
void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aInstance,
const char *aServiceFullName,
@@ -222,7 +212,6 @@ void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aIn
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aHostFullName The null-terminated full host name.
* @param[in] aHostInfo A pointer to the discovered service instance information.
*
*/
void otDnssdQueryHandleDiscoveredHost(otInstance *aInstance, const char *aHostFullName, otDnssdHostInfo *aHostInfo);
@@ -233,7 +222,6 @@ void otDnssdQueryHandleDiscoveredHost(otInstance *aInstance, const char *aHostFu
* @param[in] aQuery The query pointer. Pass NULL to get the first query.
*
* @returns A pointer to the query or NULL if no more queries.
*
*/
const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuery *aQuery);
@@ -244,7 +232,6 @@ const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuer
* @param[out] aNameOutput The name output buffer, which should be `OT_DNS_MAX_NAME_SIZE` bytes long.
*
* @returns The DNS-SD query type.
*
*/
otDnssdQueryType otDnssdGetQueryTypeAndName(const otDnssdQuery *aQuery, char (*aNameOutput)[OT_DNS_MAX_NAME_SIZE]);
@@ -254,7 +241,6 @@ otDnssdQueryType otDnssdGetQueryTypeAndName(const otDnssdQuery *aQuery, char (*a
* @param[in] aInstance The OpenThread instance structure.
*
* @returns A pointer to the counters of the DNS-SD server.
*
*/
const otDnssdCounters *otDnssdGetCounters(otInstance *aInstance);
@@ -269,7 +255,6 @@ const otDnssdCounters *otDnssdGetCounters(otInstance *aInstance);
* @sa otPlatDnsStartUpstreamQuery
* @sa otPlatDnsCancelUpstreamQuery
* @sa otPlatDnsUpstreamQueryDone
*
*/
void otDnssdUpstreamQuerySetEnabled(otInstance *aInstance, bool aEnabled);
@@ -283,13 +268,11 @@ void otDnssdUpstreamQuerySetEnabled(otInstance *aInstance, bool aEnabled);
* @retval FALSE If the DNSSD server will not forward DNS queries.
*
* @sa otDnssdUpstreamQuerySetEnabled
*
*/
bool otDnssdUpstreamQueryIsEnabled(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-5
View File
@@ -48,12 +48,10 @@ extern "C" {
* This module includes error definitions used in OpenThread.
*
* @{
*
*/
/**
* Represents error codes used throughout OpenThread.
*
*/
typedef enum OT_MUST_USE_RESULT otError
{
@@ -230,7 +228,6 @@ typedef enum OT_MUST_USE_RESULT otError
/**
* Special error code used to indicate success/error status is pending and not yet known.
*
*/
OT_ERROR_PENDING = 36,
@@ -256,13 +253,11 @@ typedef enum OT_MUST_USE_RESULT otError
* @param[in] aError An otError enum.
*
* @returns A string representation of an otError.
*
*/
const char *otThreadErrorToString(otError aError);
/**
* @}
*
*/
#ifdef __cplusplus
-4
View File
@@ -48,14 +48,12 @@ extern "C" {
* This module includes functions that set the external OpenThread heap.
*
* @{
*
*/
// This is a temporary API and would be removed after moving heap to platform.
// TODO: Remove after moving heap to platform.
/**
* @note This API is deprecated and use of it is discouraged.
*
*/
void *otHeapCAlloc(size_t aCount, size_t aSize);
@@ -63,13 +61,11 @@ void *otHeapCAlloc(size_t aCount, size_t aSize);
// TODO: Remove after moving heap to platform.
/**
* @note This API is deprecated and use of it is discouraged.
*
*/
void otHeapFree(void *aPointer);
/**
* @}
*
*/
#ifdef __cplusplus
-28
View File
@@ -46,14 +46,12 @@ extern "C" {
* The functions in this module are available when `OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE` is enabled.
*
* @{
*
*/
/**
* This constant specifies the maximum age of entries which is 49 days (in msec).
*
* Entries older than the max age will give this value as their age.
*
*/
#define OT_HISTORY_TRACKER_MAX_AGE (49 * 24 * 60 * 60 * 1000u)
@@ -66,7 +64,6 @@ extern "C" {
* by caller.
*
* Before using an iterator, it MUST be initialized using `otHistoryTrackerInitIterator()`,
*
*/
typedef struct otHistoryTrackerIterator
{
@@ -76,7 +73,6 @@ typedef struct otHistoryTrackerIterator
/**
* Represents Thread network info.
*
*/
typedef struct otHistoryTrackerNetworkInfo
{
@@ -89,7 +85,6 @@ typedef struct otHistoryTrackerNetworkInfo
/**
* Defines the events for an IPv6 (unicast or multicast) address info (i.e., whether address is added
* or removed).
*
*/
typedef enum
{
@@ -99,7 +94,6 @@ typedef enum
/**
* Represent a unicast IPv6 address info.
*
*/
typedef struct otHistoryTrackerUnicastAddressInfo
{
@@ -115,7 +109,6 @@ typedef struct otHistoryTrackerUnicastAddressInfo
/**
* Represent an IPv6 multicast address info.
*
*/
typedef struct otHistoryTrackerMulticastAddressInfo
{
@@ -126,7 +119,6 @@ typedef struct otHistoryTrackerMulticastAddressInfo
/**
* Constants representing message priority used in `otHistoryTrackerMessageInfo` struct.
*
*/
enum
{
@@ -141,7 +133,6 @@ enum
*
* Some of the fields in this struct are applicable to a RX message or a TX message only, e.g., `mAveRxRss` is the
* average RSS of all fragment frames that form a received message and is only applicable for a RX message.
*
*/
typedef struct otHistoryTrackerMessageInfo
{
@@ -166,7 +157,6 @@ typedef struct otHistoryTrackerMessageInfo
* Event `OT_HISTORY_TRACKER_NEIGHBOR_EVENT_RESTORING` is applicable to child neighbors only. It is triggered after
* the device (re)starts and when the previous children list is retrieved from non-volatile settings and the device
* tries to restore connection to them.
*
*/
typedef enum
{
@@ -178,7 +168,6 @@ typedef enum
/**
* Represents a neighbor info.
*
*/
typedef struct otHistoryTrackerNeighborInfo
{
@@ -194,7 +183,6 @@ typedef struct otHistoryTrackerNeighborInfo
/**
* Defines the events in a router info (i.e. whether router is added, removed, or changed).
*
*/
typedef enum
{
@@ -210,7 +198,6 @@ typedef enum
/**
* Represents a router table entry event.
*
*/
typedef struct otHistoryTrackerRouterInfo
{
@@ -223,7 +210,6 @@ typedef struct otHistoryTrackerRouterInfo
/**
* Defines the events for a Network Data entry (i.e., whether an entry is added or removed).
*
*/
typedef enum
{
@@ -233,7 +219,6 @@ typedef enum
/**
* Represent a Network Data on mesh prefix info.
*
*/
typedef struct otHistoryTrackerOnMeshPrefixInfo
{
@@ -243,7 +228,6 @@ typedef struct otHistoryTrackerOnMeshPrefixInfo
/**
* Represent a Network Data extern route info.
*
*/
typedef struct otHistoryTrackerExternalRouteInfo
{
@@ -263,7 +247,6 @@ typedef struct otHistoryTrackerExternalRouteInfo
* (when entry was recorded) to the iterator initialization time.
*
* @param[in] aIterator A pointer to the iterator to initialize (MUST NOT be NULL).
*
*/
void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator);
@@ -278,7 +261,6 @@ void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator);
* older than max age.
*
* @returns A pointer to `otHistoryTrackerNetworkInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInstance *aInstance,
otHistoryTrackerIterator *aIterator,
@@ -295,7 +277,6 @@ const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInsta
* older than max age.
*
* @returns A pointer to `otHistoryTrackerUnicastAddressInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressHistory(
otInstance *aInstance,
@@ -313,7 +294,6 @@ const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressH
* older than max age.
*
* @returns A pointer to `otHistoryTrackerMulticastAddressInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddressHistory(
otInstance *aInstance,
@@ -331,7 +311,6 @@ const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddr
* older than max age.
*
* @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance *aInstance,
otHistoryTrackerIterator *aIterator,
@@ -348,7 +327,6 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance
* older than max age.
*
* @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance *aInstance,
otHistoryTrackerIterator *aIterator,
@@ -365,7 +343,6 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance
* older than max age.
*
* @returns The `otHistoryTrackerNeighborInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otInstance *aInstance,
otHistoryTrackerIterator *aIterator,
@@ -382,7 +359,6 @@ const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otIns
* older than max age.
*
* @returns The `otHistoryTrackerRouterInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerRouterInfo *otHistoryTrackerIterateRouterHistory(otInstance *aInstance,
otHistoryTrackerIterator *aIterator,
@@ -399,7 +375,6 @@ const otHistoryTrackerRouterInfo *otHistoryTrackerIterateRouterHistory(otInstanc
* older than max age.
*
* @returns The `otHistoryTrackerOnMeshPrefixInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHistory(otInstance *aInstance,
otHistoryTrackerIterator *aIterator,
@@ -416,7 +391,6 @@ const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHisto
* older than max age.
*
* @returns The `otHistoryTrackerExternalRouteInfo` entry or `NULL` if no more entries in the list.
*
*/
const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHistory(
otInstance *aInstance,
@@ -435,13 +409,11 @@ const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHis
* @param[in] aEntryAge The entry age (duration in msec).
* @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL).
* @param[in] aSize The size of @p aBuffer. Recommended to use `OT_HISTORY_TRACKER_ENTRY_AGE_STRING_SIZE`.
*
*/
void otHistoryTrackerEntryAgeToString(uint32_t aEntryAge, char *aBuffer, uint16_t aSize);
/**
* @}
*
*/
#ifdef __cplusplus
-13
View File
@@ -49,12 +49,10 @@ extern "C" {
* This module includes functions that control ICMPv6 communication.
*
* @{
*
*/
/**
* ICMPv6 Message Types
*
*/
typedef enum otIcmp6Type
{
@@ -72,7 +70,6 @@ typedef enum otIcmp6Type
/**
* ICMPv6 Message Codes
*
*/
typedef enum otIcmp6Code
{
@@ -88,7 +85,6 @@ typedef enum otIcmp6Code
* @struct otIcmp6Header
*
* Represents an ICMPv6 header.
*
*/
OT_TOOL_PACKED_BEGIN
struct otIcmp6Header
@@ -106,7 +102,6 @@ struct otIcmp6Header
/**
* Represents an ICMPv6 header.
*
*/
typedef struct otIcmp6Header otIcmp6Header;
@@ -117,7 +112,6 @@ typedef struct otIcmp6Header otIcmp6Header;
* @param[in] aMessage A pointer to the received message.
* @param[in] aMessageInfo A pointer to message information associated with @p aMessage.
* @param[in] aIcmpHeader A pointer to the received ICMPv6 header.
*
*/
typedef void (*otIcmp6ReceiveCallback)(void *aContext,
otMessage *aMessage,
@@ -126,7 +120,6 @@ typedef void (*otIcmp6ReceiveCallback)(void *aContext,
/**
* Implements ICMPv6 message handler.
*
*/
typedef struct otIcmp6Handler
{
@@ -137,7 +130,6 @@ typedef struct otIcmp6Handler
/**
* ICMPv6 Echo Reply Modes
*
*/
typedef enum otIcmp6EchoMode
{
@@ -157,7 +149,6 @@ typedef enum otIcmp6EchoMode
* @retval OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY ICMPv6 Echo processing enabled for unicast requests only
* @retval OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY ICMPv6 Echo processing enabled for multicast requests only
* @retval OT_ICMP6_ECHO_HANDLER_ALL ICMPv6 Echo processing enabled for unicast and multicast requests
*
*/
otIcmp6EchoMode otIcmp6GetEchoMode(otInstance *aInstance);
@@ -166,7 +157,6 @@ otIcmp6EchoMode otIcmp6GetEchoMode(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMode The ICMPv6 Echo processing mode.
*
*/
void otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode);
@@ -179,7 +169,6 @@ void otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode);
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aHandler A pointer to a handler containing callback that is called when
* an ICMPv6 message is received.
*
*/
otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler);
@@ -191,7 +180,6 @@ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler);
* @param[in] aMessageInfo A reference to message information associated with @p aMessage.
* @param[in] aIdentifier An identifier to aid in matching Echo Replies to this Echo Request.
* May be zero.
*
*/
otError otIcmp6SendEchoRequest(otInstance *aInstance,
otMessage *aMessage,
@@ -200,7 +188,6 @@ otError otIcmp6SendEchoRequest(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
+1 -23
View File
@@ -51,9 +51,8 @@ extern "C" {
* This number MUST increase by one each time the contents of public OpenThread API include headers change.
*
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (446)
#define OPENTHREAD_API_VERSION (447)
/**
* @addtogroup api-instance
@@ -62,7 +61,6 @@ extern "C" {
* This module includes functions that control the OpenThread Instance.
*
* @{
*
*/
/**
@@ -85,7 +83,6 @@ typedef struct otInstance otInstance;
* @returns A pointer to the new OpenThread instance.
*
* @sa otInstanceFinalize
*
*/
otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize);
@@ -98,7 +95,6 @@ otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize);
* Is available and can only be used when support for multiple OpenThread instances is disabled.
*
* @returns A pointer to the single OpenThread instance.
*
*/
otInstance *otInstanceInitSingle(void);
@@ -115,7 +111,6 @@ otInstance *otInstanceInitSingle(void);
* @param[in] aIdx The index of the OpenThread instance to initialize.
*
* @returns A pointer to the new OpenThread instance.
*
*/
otInstance *otInstanceInitMultiple(uint8_t aIdx);
@@ -126,7 +121,6 @@ otInstance *otInstanceInitMultiple(uint8_t aIdx);
* change after initialization.
*
* @returns The instance identifier.
*
*/
uint32_t otInstanceGetId(otInstance *aInstance);
@@ -140,7 +134,6 @@ uint32_t otInstanceGetId(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns TRUE if the given instance is valid/initialized, FALSE otherwise.
*
*/
bool otInstanceIsInitialized(otInstance *aInstance);
@@ -150,7 +143,6 @@ bool otInstanceIsInitialized(otInstance *aInstance);
* Call this function when OpenThread is no longer in use.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otInstanceFinalize(otInstance *aInstance);
@@ -164,7 +156,6 @@ void otInstanceFinalize(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The uptime (number of milliseconds).
*
*/
uint64_t otInstanceGetUptime(otInstance *aInstance);
@@ -184,7 +175,6 @@ uint64_t otInstanceGetUptime(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aBuffer A pointer to a char array to output the string.
* @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_UPTIME_STRING_SIZE`.
*
*/
void otInstanceGetUptimeAsString(otInstance *aInstance, char *aBuffer, uint16_t aSize);
@@ -224,7 +214,6 @@ void otInstanceGetUptimeAsString(otInstance *aInstance, char *aBuffer, uint16_t
/**
* Represents a bit-field indicating specific state/configuration that has changed. See `OT_CHANGED_*`
* definitions.
*
*/
typedef uint32_t otChangedFlags;
@@ -233,7 +222,6 @@ typedef uint32_t otChangedFlags;
*
* @param[in] aFlags A bit-field indicating specific state that has changed. See `OT_CHANGED_*` definitions.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otStateChangedCallback)(otChangedFlags aFlags, void *aContext);
@@ -247,7 +235,6 @@ typedef void (*otStateChangedCallback)(otChangedFlags aFlags, void *aContext);
* @retval OT_ERROR_NONE Added the callback to the list of callbacks.
* @retval OT_ERROR_ALREADY The callback was already registered.
* @retval OT_ERROR_NO_BUFS Could not add the callback due to resource constraints.
*
*/
otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aContext);
@@ -257,7 +244,6 @@ otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback A pointer to a function that is called with certain configuration or state changes.
* @param[in] aContext A pointer to application-specific context.
*
*/
void otRemoveStateChangeCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aContext);
@@ -268,7 +254,6 @@ void otRemoveStateChangeCallback(otInstance *aInstance, otStateChangedCallback a
* `otPlatformReset` does not erase any persistent state/info saved in non-volatile memory.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otInstanceReset(otInstance *aInstance);
@@ -282,7 +267,6 @@ void otInstanceReset(otInstance *aInstance);
* @retval OT_ERROR_NONE Reset to bootloader successfully.
* @retval OT_ERROR_BUSY Failed due to another operation is ongoing.
* @retval OT_ERROR_NOT_CAPABLE Not capable of resetting to bootloader.
*
*/
otError otInstanceResetToBootloader(otInstance *aInstance);
@@ -290,7 +274,6 @@ otError otInstanceResetToBootloader(otInstance *aInstance);
* Deletes all the settings stored on non-volatile memory, and then triggers a platform reset.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otInstanceFactoryReset(otInstance *aInstance);
@@ -302,7 +285,6 @@ void otInstanceFactoryReset(otInstance *aInstance);
* This API is only available under radio builds (`OPENTHREAD_RADIO = 1`).
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otInstanceResetRadioStack(otInstance *aInstance);
@@ -314,7 +296,6 @@ void otInstanceResetRadioStack(otInstance *aInstance);
*
* @retval OT_ERROR_NONE All persistent info/state was erased successfully.
* @retval OT_ERROR_INVALID_STATE Device is not in `disabled` state/role.
*
*/
otError otInstanceErasePersistentInfo(otInstance *aInstance);
@@ -322,7 +303,6 @@ otError otInstanceErasePersistentInfo(otInstance *aInstance);
* Gets the OpenThread version string.
*
* @returns A pointer to the OpenThread version.
*
*/
const char *otGetVersionString(void);
@@ -332,13 +312,11 @@ const char *otGetVersionString(void);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the OpenThread radio version.
*
*/
const char *otGetRadioVersionString(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-65
View File
@@ -49,7 +49,6 @@ extern "C" {
* This module includes functions that control IPv6 communication.
*
* @{
*
*/
#define OT_IP6_PREFIX_SIZE 8 ///< Size of an IPv6 prefix (bytes)
@@ -64,7 +63,6 @@ extern "C" {
* @struct otIp6InterfaceIdentifier
*
* Represents the Interface Identifier of an IPv6 address.
*
*/
OT_TOOL_PACKED_BEGIN
struct otIp6InterfaceIdentifier
@@ -79,7 +77,6 @@ struct otIp6InterfaceIdentifier
/**
* Represents the Interface Identifier of an IPv6 address.
*
*/
typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier;
@@ -87,7 +84,6 @@ typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier;
* @struct otIp6NetworkPrefix
*
* Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address).
*
*/
OT_TOOL_PACKED_BEGIN
struct otIp6NetworkPrefix
@@ -97,7 +93,6 @@ struct otIp6NetworkPrefix
/**
* Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address).
*
*/
typedef struct otIp6NetworkPrefix otIp6NetworkPrefix;
@@ -105,7 +100,6 @@ typedef struct otIp6NetworkPrefix otIp6NetworkPrefix;
* @struct otIp6AddressComponents
*
* Represents the components of an IPv6 address.
*
*/
OT_TOOL_PACKED_BEGIN
struct otIp6AddressComponents
@@ -116,7 +110,6 @@ struct otIp6AddressComponents
/**
* Represents the components of an IPv6 address.
*
*/
typedef struct otIp6AddressComponents otIp6AddressComponents;
@@ -124,7 +117,6 @@ typedef struct otIp6AddressComponents otIp6AddressComponents;
* @struct otIp6Address
*
* Represents an IPv6 address.
*
*/
OT_TOOL_PACKED_BEGIN
struct otIp6Address
@@ -140,7 +132,6 @@ struct otIp6Address
/**
* Represents an IPv6 address.
*
*/
typedef struct otIp6Address otIp6Address;
@@ -148,7 +139,6 @@ typedef struct otIp6Address otIp6Address;
* @struct otIp6Prefix
*
* Represents an IPv6 prefix.
*
*/
OT_TOOL_PACKED_BEGIN
struct otIp6Prefix
@@ -159,13 +149,11 @@ struct otIp6Prefix
/**
* Represents an IPv6 prefix.
*
*/
typedef struct otIp6Prefix otIp6Prefix;
/**
* IPv6 Address origins
*
*/
enum
{
@@ -177,7 +165,6 @@ enum
/**
* Represents an IPv6 network interface unicast address.
*
*/
typedef struct otNetifAddress
{
@@ -196,7 +183,6 @@ typedef struct otNetifAddress
/**
* Represents an IPv6 network interface multicast address.
*
*/
typedef struct otNetifMulticastAddress
{
@@ -206,7 +192,6 @@ typedef struct otNetifMulticastAddress
/**
* Represents an IPv6 socket address.
*
*/
typedef struct otSockAddr
{
@@ -216,7 +201,6 @@ typedef struct otSockAddr
/**
* ECN statuses, represented as in the IP header.
*
*/
enum
{
@@ -228,7 +212,6 @@ enum
/**
* Represents the local and peer IPv6 socket addresses.
*
*/
typedef struct otMessageInfo
{
@@ -247,7 +230,6 @@ typedef struct otMessageInfo
/**
* Internet Protocol Numbers.
*
*/
enum
{
@@ -273,7 +255,6 @@ enum
* @retval OT_ERROR_NONE Successfully brought the IPv6 interface up/down.
* @retval OT_ERROR_INVALID_STATE IPv6 interface is not available since device is operating in raw-link mode
* (applicable only when `OPENTHREAD_CONFIG_LINK_RAW_ENABLE` feature is enabled).
*
*/
otError otIp6SetEnabled(otInstance *aInstance, bool aEnabled);
@@ -284,7 +265,6 @@ otError otIp6SetEnabled(otInstance *aInstance, bool aEnabled);
*
* @retval TRUE The IPv6 interface is enabled.
* @retval FALSE The IPv6 interface is disabled.
*
*/
bool otIp6IsEnabled(otInstance *aInstance);
@@ -300,7 +280,6 @@ bool otIp6IsEnabled(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully added (or updated) the Network Interface Address.
* @retval OT_ERROR_INVALID_ARGS The IP Address indicated by @p aAddress is an internal address.
* @retval OT_ERROR_NO_BUFS The Network Interface is already storing the maximum allowed external addresses.
*
*/
otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *aAddress);
@@ -313,7 +292,6 @@ otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *aAdd
* @retval OT_ERROR_NONE Successfully removed the Network Interface Address.
* @retval OT_ERROR_INVALID_ARGS The IP Address indicated by @p aAddress is an internal address.
* @retval OT_ERROR_NOT_FOUND The IP Address indicated by @p aAddress was not found.
*
*/
otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress);
@@ -323,7 +301,6 @@ otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAd
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the first Network Interface Address.
*
*/
const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance);
@@ -335,7 +312,6 @@ const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance);
*
* @retval TRUE If @p aAddress is assigned to the Thread interface.
* @retval FALSE If @p aAddress is not assigned to the Thread interface.
*
*/
bool otIp6HasUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress);
@@ -354,7 +330,6 @@ bool otIp6HasUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress)
* @retval OT_ERROR_REJECTED The IP Address indicated by @p aAddress is an internal multicast address.
* @retval OT_ERROR_NO_BUFS The Network Interface is already storing the maximum allowed external multicast
* addresses.
*
*/
otError otIp6SubscribeMulticastAddress(otInstance *aInstance, const otIp6Address *aAddress);
@@ -367,7 +342,6 @@ otError otIp6SubscribeMulticastAddress(otInstance *aInstance, const otIp6Address
* @retval OT_ERROR_NONE Successfully unsubscribed to the Network Interface Multicast Address.
* @retval OT_ERROR_REJECTED The IP Address indicated by @p aAddress is an internal address.
* @retval OT_ERROR_NOT_FOUND The IP Address indicated by @p aAddress was not found.
*
*/
otError otIp6UnsubscribeMulticastAddress(otInstance *aInstance, const otIp6Address *aAddress);
@@ -377,7 +351,6 @@ otError otIp6UnsubscribeMulticastAddress(otInstance *aInstance, const otIp6Addre
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the first Network Interface Multicast Address.
*
*/
const otNetifMulticastAddress *otIp6GetMulticastAddresses(otInstance *aInstance);
@@ -393,7 +366,6 @@ const otNetifMulticastAddress *otIp6GetMulticastAddresses(otInstance *aInstance)
* @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid.
*
* @sa otMessageFree
*
*/
otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSettings);
@@ -412,7 +384,6 @@ otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSett
* @returns A pointer to the message or NULL if malformed IPv6 header or insufficient message buffers are available.
*
* @sa otMessageFree
*
*/
otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance,
const uint8_t *aData,
@@ -426,7 +397,6 @@ otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance,
* the ownership of the @p aMessage to the receiver of the callback. The message should be
* freed by the receiver of the callback after it is processed (see otMessageFree()).
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otIp6ReceiveCallback)(otMessage *aMessage, void *aContext);
@@ -443,13 +413,11 @@ typedef void (*otIp6ReceiveCallback)(otMessage *aMessage, void *aContext);
*
* @sa otIp6IsReceiveFilterEnabled
* @sa otIp6SetReceiveFilterEnabled
*
*/
void otIp6SetReceiveCallback(otInstance *aInstance, otIp6ReceiveCallback aCallback, void *aCallbackContext);
/**
* Represents IPv6 address information.
*
*/
typedef struct otIp6AddressInfo
{
@@ -466,7 +434,6 @@ typedef struct otIp6AddressInfo
* @param[in] aAddressInfo A pointer to the IPv6 address information.
* @param[in] aIsAdded TRUE if the @p aAddress was added, FALSE if @p aAddress was removed.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otIp6AddressCallback)(const otIp6AddressInfo *aAddressInfo, bool aIsAdded, void *aContext);
@@ -477,7 +444,6 @@ typedef void (*otIp6AddressCallback)(const otIp6AddressInfo *aAddressInfo, bool
* @param[in] aCallback A pointer to a function that is called when an internal IPv6 address is added or
* removed. NULL to disable the callback.
* @param[in] aCallbackContext A pointer to application-specific context.
*
*/
void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallback, void *aCallbackContext);
@@ -491,7 +457,6 @@ void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallba
*
* @sa otIp6SetReceiveCallback
* @sa otIp6SetReceiveFilterEnabled
*
*/
bool otIp6IsReceiveFilterEnabled(otInstance *aInstance);
@@ -504,7 +469,6 @@ bool otIp6IsReceiveFilterEnabled(otInstance *aInstance);
*
* @sa otIp6SetReceiveCallback
* @sa otIsReceiveIp6FilterEnabled
*
*/
void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled);
@@ -526,7 +490,6 @@ void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled);
* @retval OT_ERROR_PARSE Encountered a malformed header when processing the message.
* @retval OT_ERROR_INVALID_ARGS The message's metadata is invalid, e.g. the message uses
* `OT_MESSAGE_ORIGIN_THREAD_NETIF` as the origin.
*
*/
otError otIp6Send(otInstance *aInstance, otMessage *aMessage);
@@ -539,7 +502,6 @@ otError otIp6Send(otInstance *aInstance, otMessage *aMessage);
* @retval OT_ERROR_NONE The port was successfully added to the allowed unsecure port list.
* @retval OT_ERROR_INVALID_ARGS The port is invalid (value 0 is reserved for internal use).
* @retval OT_ERROR_NO_BUFS The unsecure port list is full.
*
*/
otError otIp6AddUnsecurePort(otInstance *aInstance, uint16_t aPort);
@@ -556,7 +518,6 @@ otError otIp6AddUnsecurePort(otInstance *aInstance, uint16_t aPort);
* @retval OT_ERROR_NONE The port was successfully removed from the allowed unsecure port list.
* @retval OT_ERROR_INVALID_ARGS The port is invalid (value 0 is reserved for internal use).
* @retval OT_ERROR_NOT_FOUND The port was not found in the unsecure port list.
*
*/
otError otIp6RemoveUnsecurePort(otInstance *aInstance, uint16_t aPort);
@@ -564,7 +525,6 @@ otError otIp6RemoveUnsecurePort(otInstance *aInstance, uint16_t aPort);
* Removes all ports from the allowed unsecure port list.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otIp6RemoveAllUnsecurePorts(otInstance *aInstance);
@@ -577,7 +537,6 @@ void otIp6RemoveAllUnsecurePorts(otInstance *aInstance);
* @param[out] aNumEntries The number of entries in the list.
*
* @returns A pointer to the unsecure port list.
*
*/
const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntries);
@@ -589,7 +548,6 @@ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntrie
*
* @retval TRUE The two IPv6 addresses are the same.
* @retval FALSE The two IPv6 addresses are not the same.
*
*/
bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond);
@@ -601,7 +559,6 @@ bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond
*
* @retval TRUE The two IPv6 prefixes are the same.
* @retval FALSE The two IPv6 prefixes are not the same.
*
*/
bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond);
@@ -613,7 +570,6 @@ bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond
*
* @retval OT_ERROR_NONE Successfully parsed @p aString and updated @p aAddress.
* @retval OT_ERROR_PARSE Failed to parse @p aString as an IPv6 address.
*
*/
otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress);
@@ -628,7 +584,6 @@ otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress);
*
* @retval OT_ERROR_NONE Successfully parsed the string as an IPv6 prefix and updated @p aPrefix.
* @retval OT_ERROR_PARSE Failed to parse @p aString as an IPv6 prefix.
*
*/
otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix);
@@ -645,7 +600,6 @@ otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix);
* @param[in] aAddress A pointer to an IPv6 address (MUST NOT be NULL).
* @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL).
* @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_IP6_ADDRESS_STRING_SIZE`.
*
*/
void otIp6AddressToString(const otIp6Address *aAddress, char *aBuffer, uint16_t aSize);
@@ -664,7 +618,6 @@ void otIp6AddressToString(const otIp6Address *aAddress, char *aBuffer, uint16_t
* @param[in] aSockAddr A pointer to an IPv6 socket address (MUST NOT be NULL).
* @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL).
* @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_IP6_SOCK_ADDR_STRING_SIZE`.
*
*/
void otIp6SockAddrToString(const otSockAddr *aSockAddr, char *aBuffer, uint16_t aSize);
@@ -681,7 +634,6 @@ void otIp6SockAddrToString(const otSockAddr *aSockAddr, char *aBuffer, uint16_t
* @param[in] aPrefix A pointer to an IPv6 prefix (MUST NOT be NULL).
* @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL).
* @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_IP6_PREFIX_STRING_SIZE`.
*
*/
void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSize);
@@ -692,7 +644,6 @@ void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSi
* @param[in] aSecond A pointer to the second IPv6 address.
*
* @returns The prefix match length in bits.
*
*/
uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond);
@@ -702,7 +653,6 @@ uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond
* @param[in] aAddress A pointer to an IPv6 address.
* @param[in] aLength The length of prefix in bits.
* @param[out] aPrefix A pointer to output the IPv6 prefix.
*
*/
void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix *aPrefix);
@@ -713,7 +663,6 @@ void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix *
*
* @retval TRUE If the IPv6 address is the Unspecified Address.
* @retval FALSE If the IPv6 address is not the Unspecified Address.
*
*/
bool otIp6IsAddressUnspecified(const otIp6Address *aAddress);
@@ -725,7 +674,6 @@ bool otIp6IsAddressUnspecified(const otIp6Address *aAddress);
*
* @retval OT_ERROR_NONE Found a source address and is filled into mSockAddr of @p aMessageInfo.
* @retval OT_ERROR_NOT_FOUND No source address was found and @p aMessageInfo is unchanged.
*
*/
otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageInfo);
@@ -736,7 +684,6 @@ otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageI
*
* @retval TRUE SLAAC module is enabled.
* @retval FALSE SLAAC module is disabled.
*
*/
bool otIp6IsSlaacEnabled(otInstance *aInstance);
@@ -750,7 +697,6 @@ bool otIp6IsSlaacEnabled(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aEnabled TRUE to enable, FALSE to disable.
*
*/
void otIp6SetSlaacEnabled(otInstance *aInstance, bool aEnabled);
@@ -766,7 +712,6 @@ void otIp6SetSlaacEnabled(otInstance *aInstance, bool aEnabled);
*
* @retval TRUE Indicates that the SLAAC address based on the prefix should be filtered and NOT added.
* @retval FALSE Indicates that the SLAAC address based on the prefix should be added.
*
*/
typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix *aPrefix);
@@ -784,7 +729,6 @@ typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aFilter A pointer to SLAAC prefix filter handler, or NULL to disable filtering.
*
*/
void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFilter);
@@ -800,7 +744,6 @@ void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFi
* @param[in] aFailedAddressNum The number of failed IPv6 addresses when @p aError is OT_ERROR_NONE.
*
* @sa otIp6RegisterMulticastListeners
*
*/
typedef void (*otIp6RegisterMulticastListenersCallback)(void *aContext,
otError aError,
@@ -834,7 +777,6 @@ typedef void (*otIp6RegisterMulticastListenersCallback)(void *aCon
* @retval OT_ERROR_NO_BUFS If insufficient message buffers available.
*
* @sa otIp6RegisterMulticastListenersCallback
*
*/
otError otIp6RegisterMulticastListeners(otInstance *aInstance,
const otIp6Address *aAddresses,
@@ -853,7 +795,6 @@ otError otIp6RegisterMulticastListeners(otInstance *
*
* @retval OT_ERROR_NONE Successfully set the Mesh Local IID.
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
*/
otError otIp6SetMeshLocalIid(otInstance *aInstance, const otIp6InterfaceIdentifier *aIid);
@@ -863,13 +804,11 @@ otError otIp6SetMeshLocalIid(otInstance *aInstance, const otIp6InterfaceIdentifi
* @param[in] aIpProto An IP protocol number (`OT_IP6_PROTO_*` enumeration).
*
* @returns A string representing @p aIpProto.
*
*/
const char *otIp6ProtoToString(uint8_t aIpProto);
/**
* Represents the counters for packets and bytes.
*
*/
typedef struct otPacketsAndBytes
{
@@ -879,7 +818,6 @@ typedef struct otPacketsAndBytes
/**
* Represents the counters of packets forwarded via Border Routing.
*
*/
typedef struct otBorderRoutingCounters
{
@@ -905,7 +843,6 @@ typedef struct otBorderRoutingCounters
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the Border Routing counters.
*
*/
const otBorderRoutingCounters *otIp6GetBorderRoutingCounters(otInstance *aInstance);
@@ -913,13 +850,11 @@ const otBorderRoutingCounters *otIp6GetBorderRoutingCounters(otInstance *aInstan
* Resets the Border Routing counters.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otIp6ResetBorderRoutingCounters(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-13
View File
@@ -51,7 +51,6 @@ extern "C" {
* is enabled.
*
* @{
*
*/
/**
@@ -59,7 +58,6 @@ extern "C" {
*
* @param[in] aJamState Current jam state (`true` if jam is detected, `false` otherwise).
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otJamDetectionCallback)(bool aJamState, void *aContext);
@@ -70,7 +68,6 @@ typedef void (*otJamDetectionCallback)(bool aJamState, void *aContext);
* @param[in] aRssiThreshold The RSSI threshold.
*
* @retval OT_ERROR_NONE Successfully set the threshold.
*
*/
otError otJamDetectionSetRssiThreshold(otInstance *aInstance, int8_t aRssiThreshold);
@@ -91,7 +88,6 @@ int8_t otJamDetectionGetRssiThreshold(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the window.
* @retval OT_ERROR_INVALID_ARGS The given input parameter not within valid range (1-63)
*
*/
otError otJamDetectionSetWindow(otInstance *aInstance, uint8_t aWindow);
@@ -101,7 +97,6 @@ otError otJamDetectionSetWindow(otInstance *aInstance, uint8_t aWindow);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Jam Detection Window.
*
*/
uint8_t otJamDetectionGetWindow(otInstance *aInstance);
@@ -117,7 +112,6 @@ uint8_t otJamDetectionGetWindow(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the window.
* @retval OT_ERROR_INVALID_ARGS The given input is not within the valid range.
*
*/
otError otJamDetectionSetBusyPeriod(otInstance *aInstance, uint8_t aBusyPeriod);
@@ -127,7 +121,6 @@ otError otJamDetectionSetBusyPeriod(otInstance *aInstance, uint8_t aBusyPeriod);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Jam Detection Busy Period.
*
*/
uint8_t otJamDetectionGetBusyPeriod(otInstance *aInstance);
@@ -140,7 +133,6 @@ uint8_t otJamDetectionGetBusyPeriod(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully started the jamming detection.
* @retval OT_ERROR_ALREADY Jam detection has been started before.
*
*/
otError otJamDetectionStart(otInstance *aInstance, otJamDetectionCallback aCallback, void *aContext);
@@ -151,7 +143,6 @@ otError otJamDetectionStart(otInstance *aInstance, otJamDetectionCallback aCallb
*
* @retval OT_ERROR_NONE Successfully stopped the jamming detection.
* @retval OT_ERROR_ALREADY Jam detection is already stopped.
*
*/
otError otJamDetectionStop(otInstance *aInstance);
@@ -161,7 +152,6 @@ otError otJamDetectionStop(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Jam Detection status (true if enabled, false otherwise).
*
*/
bool otJamDetectionIsEnabled(otInstance *aInstance);
@@ -171,7 +161,6 @@ bool otJamDetectionIsEnabled(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Jam Detection state (`true` jam is detected, `false' otherwise).
*
*/
bool otJamDetectionGetState(otInstance *aInstance);
@@ -188,13 +177,11 @@ bool otJamDetectionGetState(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current history bitmap.
*
*/
uint64_t otJamDetectionGetHistoryBitmap(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-12
View File
@@ -52,12 +52,10 @@ extern "C" {
* The functions in this module require `OPENTHREAD_CONFIG_JOINER_ENABLE=1`.
*
* @{
*
*/
/**
* Defines the Joiner State.
*
*/
typedef enum otJoinerState
{
@@ -73,7 +71,6 @@ typedef enum otJoinerState
/**
* Represents a Joiner Discerner.
*
*/
typedef struct otJoinerDiscerner
{
@@ -89,7 +86,6 @@ typedef struct otJoinerDiscerner
* OT_ERROR_NOT_FOUND if no joinable network was discovered.
* OT_ERROR_RESPONSE_TIMEOUT if a response timed out.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otJoinerCallback)(otError aError, void *aContext);
@@ -110,7 +106,6 @@ typedef void (*otJoinerCallback)(otError aError, void *aContext);
* @retval OT_ERROR_BUSY The previous attempt is still on-going.
* @retval OT_ERROR_INVALID_ARGS @p aPskd or @p aProvisioningUrl is invalid.
* @retval OT_ERROR_INVALID_STATE The IPv6 stack is not enabled or Thread stack is fully enabled.
*
*/
otError otJoinerStart(otInstance *aInstance,
const char *aPskd,
@@ -126,7 +121,6 @@ otError otJoinerStart(otInstance *aInstance,
* Disables the Thread Joiner role.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otJoinerStop(otInstance *aInstance);
@@ -136,7 +130,6 @@ void otJoinerStop(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The joiner state.
*
*/
otJoinerState otJoinerGetState(otInstance *aInstance);
@@ -151,7 +144,6 @@ otJoinerState otJoinerGetState(otInstance *aInstance);
* @param[in] aInstance A pointer to the OpenThread instance.
*
* @returns A pointer to the Joiner ID.
*
*/
const otExtAddress *otJoinerGetId(otInstance *aInstance);
@@ -168,7 +160,6 @@ const otExtAddress *otJoinerGetId(otInstance *aInstance);
* @retval OT_ERROR_NONE The Joiner Discerner updated successfully.
* @retval OT_ERROR_INVALID_ARGS @p aDiscerner is not valid (specified length is not within valid range).
* @retval OT_ERROR_INVALID_STATE There is an ongoing Joining process so Joiner Discerner could not be changed.
*
*/
otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerner);
@@ -178,7 +169,6 @@ otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerne
* @param[in] aInstance A pointer to the OpenThread instance.
*
* @returns A pointer to Joiner Discerner or NULL if none is set.
*
*/
const otJoinerDiscerner *otJoinerGetDiscerner(otInstance *aInstance);
@@ -188,13 +178,11 @@ const otJoinerDiscerner *otJoinerGetDiscerner(otInstance *aInstance);
* @param[in] aState The joiner state.
*
* @returns A human-readable string representation of @p aState.
*
*/
const char *otJoinerStateToString(otJoinerState aState);
/**
* @}
*
*/
#ifdef __cplusplus
-105
View File
@@ -50,13 +50,11 @@ extern "C" {
* This module includes functions that control link-layer configuration.
*
* @{
*
*/
#define OT_US_PER_TEN_SYMBOLS OT_RADIO_TEN_SYMBOLS_TIME ///< Time for 10 symbols in units of microseconds
/**
* Used to indicate no fixed received signal strength was set
*
*/
#define OT_MAC_FILTER_FIXED_RSS_DISABLED 127
@@ -66,7 +64,6 @@ typedef uint8_t otMacFilterIterator; ///< Used to iterate through mac filter ent
/**
* Defines address mode of the mac filter.
*
*/
typedef enum otMacFilterAddressMode
{
@@ -77,7 +74,6 @@ typedef enum otMacFilterAddressMode
/**
* Represents a Mac Filter entry.
*
*/
typedef struct otMacFilterEntry
{
@@ -87,7 +83,6 @@ typedef struct otMacFilterEntry
/**
* Represents the MAC layer counters.
*
*/
typedef struct otMacCounters
{
@@ -114,61 +109,51 @@ typedef struct otMacCounters
* - @p mTxTotal = @p mTxUnicast + @p mTxBroadcast
* - @p mTxTotal = @p mTxAckRequested + @p mTxNoAckRequested
* - @p mTxTotal = @p mTxData + @p mTxDataPoll + @p mTxBeacon + @p mTxBeaconRequest + @p mTxOther
*
*/
uint32_t mTxTotal;
/**
* The total number of unique unicast MAC frame transmission requests.
*
*/
uint32_t mTxUnicast;
/**
* The total number of unique broadcast MAC frame transmission requests.
*
*/
uint32_t mTxBroadcast;
/**
* The total number of unique MAC frame transmission requests with requested acknowledgment.
*
*/
uint32_t mTxAckRequested;
/**
* The total number of unique MAC frame transmission requests that were acked.
*
*/
uint32_t mTxAcked;
/**
* The total number of unique MAC frame transmission requests without requested acknowledgment.
*
*/
uint32_t mTxNoAckRequested;
/**
* The total number of unique MAC Data frame transmission requests.
*
*/
uint32_t mTxData;
/**
* The total number of unique MAC Data Poll frame transmission requests.
*
*/
uint32_t mTxDataPoll;
/**
* The total number of unique MAC Beacon frame transmission requests.
*
*/
uint32_t mTxBeacon;
/**
* The total number of unique MAC Beacon Request frame transmission requests.
*
*/
uint32_t mTxBeaconRequest;
@@ -176,7 +161,6 @@ typedef struct otMacCounters
* The total number of unique other MAC frame transmission requests.
*
* This counter is currently used for counting out-of-band frames.
*
*/
uint32_t mTxOther;
@@ -197,19 +181,16 @@ typedef struct otMacCounters
*
* Currently, this counter is invalid if the platform's radio driver capability includes
* @ref OT_RADIO_CAPS_TRANSMIT_RETRIES.
*
*/
uint32_t mTxRetry;
/**
* The total number of unique MAC transmission packets that meet maximal retry limit for direct packets.
*
*/
uint32_t mTxDirectMaxRetryExpiry;
/**
* The total number of unique MAC transmission packets that meet maximal retry limit for indirect packets.
*
*/
uint32_t mTxIndirectMaxRetryExpiry;
@@ -224,19 +205,16 @@ typedef struct otMacCounters
* If @ref OT_RADIO_CAPS_TRANSMIT_RETRIES is enabled, this counter represents the total number of full CSMA/CA
* failed attempts and it is incremented by one for each individual data frame request (regardless of the
* amount of retransmissions).
*
*/
uint32_t mTxErrCca;
/**
* The total number of unique MAC transmission request failures cause by an abort error.
*
*/
uint32_t mTxErrAbort;
/**
* The total number of unique MAC transmission requests failures caused by a busy channel (a CSMA/CA fail).
*
*/
uint32_t mTxErrBusyChannel;
@@ -245,61 +223,51 @@ typedef struct otMacCounters
*
* This counter counts all frames reported by the platform's radio driver, including frames
* that were dropped, for example because of an FCS error.
*
*/
uint32_t mRxTotal;
/**
* The total number of unicast frames received.
*
*/
uint32_t mRxUnicast;
/**
* The total number of broadcast frames received.
*
*/
uint32_t mRxBroadcast;
/**
* The total number of MAC Data frames received.
*
*/
uint32_t mRxData;
/**
* The total number of MAC Data Poll frames received.
*
*/
uint32_t mRxDataPoll;
/**
* The total number of MAC Beacon frames received.
*
*/
uint32_t mRxBeacon;
/**
* The total number of MAC Beacon Request frames received.
*
*/
uint32_t mRxBeaconRequest;
/**
* The total number of other types of frames received.
*
*/
uint32_t mRxOther;
/**
* The total number of frames dropped by MAC Filter module, for example received from denylisted node.
*
*/
uint32_t mRxAddressFiltered;
/**
* The total number of frames dropped by destination address check, for example received frame for other node.
*
*/
uint32_t mRxDestAddrFiltered;
@@ -308,25 +276,21 @@ typedef struct otMacCounters
*
* This counter may be incremented, for example when ACK frame generated by the receiver hasn't reached
* transmitter node which performed retransmission.
*
*/
uint32_t mRxDuplicated;
/**
* The total number of frames dropped because of missing or malformed content.
*
*/
uint32_t mRxErrNoFrame;
/**
* The total number of frames dropped due to unknown neighbor.
*
*/
uint32_t mRxErrUnknownNeighbor;
/**
* The total number of frames dropped due to invalid source address.
*
*/
uint32_t mRxErrInvalidSrcAddr;
@@ -335,26 +299,22 @@ typedef struct otMacCounters
*
* This counter may be incremented, for example when lower than expected Frame Counter is used
* to encrypt the frame.
*
*/
uint32_t mRxErrSec;
/**
* The total number of frames dropped due to invalid FCS.
*
*/
uint32_t mRxErrFcs;
/**
* The total number of frames dropped due to other error.
*
*/
uint32_t mRxErrOther;
} otMacCounters;
/**
* Represents a received IEEE 802.15.4 Beacon.
*
*/
typedef struct otActiveScanResult
{
@@ -378,7 +338,6 @@ typedef struct otActiveScanResult
/**
* Represents an energy scan result.
*
*/
typedef struct otEnergyScanResult
{
@@ -392,7 +351,6 @@ typedef struct otEnergyScanResult
*
* @param[in] aResult A valid pointer to the beacon information or NULL when the active scan completes.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext);
@@ -407,7 +365,6 @@ typedef void (*otHandleActiveScanResult)(otActiveScanResult *aResult, void *aCon
*
* @retval OT_ERROR_NONE Accepted the Active Scan request.
* @retval OT_ERROR_BUSY Already performing an Active Scan.
*
*/
otError otLinkActiveScan(otInstance *aInstance,
uint32_t aScanChannels,
@@ -430,7 +387,6 @@ bool otLinkIsActiveScanInProgress(otInstance *aInstance);
*
* @param[in] aResult A valid pointer to the energy scan result information or NULL when the energy scan completes.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext);
@@ -445,7 +401,6 @@ typedef void (*otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aCon
*
* @retval OT_ERROR_NONE Accepted the Energy Scan request.
* @retval OT_ERROR_BUSY Could not start the energy scan.
*
*/
otError otLinkEnergyScan(otInstance *aInstance,
uint32_t aScanChannels,
@@ -459,7 +414,6 @@ otError otLinkEnergyScan(otInstance *aInstance,
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns true if an IEEE 802.15.4 Energy Scan is in progress, false otherwise.
*
*/
bool otLinkIsEnergyScanInProgress(otInstance *aInstance);
@@ -471,7 +425,6 @@ bool otLinkIsEnergyScanInProgress(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully enqueued an IEEE 802.15.4 Data Request message.
* @retval OT_ERROR_INVALID_STATE Device is not in rx-off-when-idle mode.
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available.
*
*/
otError otLinkSendDataRequest(otInstance *aInstance);
@@ -485,7 +438,6 @@ otError otLinkSendDataRequest(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns true if an IEEE 802.15.4 MAC is in the transmit state, false otherwise.
*
*/
bool otLinkIsInTransmitState(otInstance *aInstance);
@@ -497,7 +449,6 @@ bool otLinkIsInTransmitState(otInstance *aInstance);
* @returns The IEEE 802.15.4 channel.
*
* @sa otLinkSetChannel
*
*/
uint8_t otLinkGetChannel(otInstance *aInstance);
@@ -515,7 +466,6 @@ uint8_t otLinkGetChannel(otInstance *aInstance);
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
* @sa otLinkGetChannel
*
*/
otError otLinkSetChannel(otInstance *aInstance, uint8_t aChannel);
@@ -525,7 +475,6 @@ otError otLinkSetChannel(otInstance *aInstance, uint8_t aChannel);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The supported channel mask as `uint32_t` with bit 0 (lsb) mapping to channel 0, bit 1 to channel 1, so on.
*
*/
uint32_t otLinkGetSupportedChannelMask(otInstance *aInstance);
@@ -539,7 +488,6 @@ uint32_t otLinkGetSupportedChannelMask(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the supported channel mask.
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
*/
otError otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMask);
@@ -549,7 +497,6 @@ otError otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMa
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the IEEE 802.15.4 Extended Address.
*
*/
const otExtAddress *otLinkGetExtendedAddress(otInstance *aInstance);
@@ -564,7 +511,6 @@ const otExtAddress *otLinkGetExtendedAddress(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully set the IEEE 802.15.4 Extended Address.
* @retval OT_ERROR_INVALID_ARGS @p aExtAddress was NULL.
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
*/
otError otLinkSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -573,7 +519,6 @@ otError otLinkSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExt
*
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[out] aEui64 A pointer to where the factory-assigned IEEE EUI-64 is placed.
*
*/
void otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64);
@@ -585,7 +530,6 @@ void otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui
* @returns The IEEE 802.15.4 PAN ID.
*
* @sa otLinkSetPanId
*
*/
otPanId otLinkGetPanId(otInstance *aInstance);
@@ -603,7 +547,6 @@ otPanId otLinkGetPanId(otInstance *aInstance);
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
* @sa otLinkGetPanId
*
*/
otError otLinkSetPanId(otInstance *aInstance, otPanId aPanId);
@@ -615,7 +558,6 @@ otError otLinkSetPanId(otInstance *aInstance, otPanId aPanId);
* @returns The data poll period of sleepy end device in milliseconds.
*
* @sa otLinkSetPollPeriod
*
*/
uint32_t otLinkGetPollPeriod(otInstance *aInstance);
@@ -638,7 +580,6 @@ uint32_t otLinkGetPollPeriod(otInstance *aInstance);
* @retval OT_ERROR_INVALID_ARGS If aPollPeriod is invalid.
*
* @sa otLinkGetPollPeriod
*
*/
otError otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod);
@@ -648,7 +589,6 @@ otError otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the IEEE 802.15.4 Short Address.
*
*/
otShortAddress otLinkGetShortAddress(otInstance *aInstance);
@@ -658,7 +598,6 @@ otShortAddress otLinkGetShortAddress(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The maximum number of retries during direct transmission.
*
*/
uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance);
@@ -667,7 +606,6 @@ uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMaxFrameRetriesDirect The maximum number of retries during direct transmission.
*
*/
void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect);
@@ -677,7 +615,6 @@ void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetr
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The maximum number of retries during indirect transmission.
*
*/
uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance);
@@ -686,7 +623,6 @@ uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMaxFrameRetriesIndirect The maximum number of retries during indirect transmission.
*
*/
void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect);
@@ -696,7 +632,6 @@ void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRe
* @param[in] aInstance A pointer to the OpenThread instance.
*
* @returns The current MAC frame counter value.
*
*/
uint32_t otLinkGetFrameCounter(otInstance *aInstance);
@@ -708,7 +643,6 @@ uint32_t otLinkGetFrameCounter(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns the address mode.
*
*/
otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance);
@@ -719,7 +653,6 @@ otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMode The address mode to set.
*
*/
void otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aMode);
@@ -733,7 +666,6 @@ void otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aM
*
* @retval OT_ERROR_NONE Successfully added @p aExtAddress to MAC filter.
* @retval OT_ERROR_NO_BUFS No available entry exists.
*
*/
otError otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -746,7 +678,6 @@ otError otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAd
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aExtAddress A pointer to the Extended Address (MUST NOT be NULL).
*
*/
void otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -756,7 +687,6 @@ void otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAd
* Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otLinkFilterClearAddresses(otInstance *aInstance);
@@ -772,7 +702,6 @@ void otLinkFilterClearAddresses(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully retrieved an in-use address filter entry.
* @retval OT_ERROR_NOT_FOUND No subsequent entry exists.
*
*/
otError otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry);
@@ -792,7 +721,6 @@ otError otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *a
*
* @retval OT_ERROR_NONE Successfully added an entry for @p aExtAddress and @p aRss.
* @retval OT_ERROR_NO_BUFS No available entry exists.
*
*/
otError otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddress, int8_t aRss);
@@ -808,7 +736,6 @@ otError otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddr
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aExtAddress A pointer to the IEEE 802.15.4 Extended Address. MUST NOT be NULL.
*
*/
void otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -822,7 +749,6 @@ void otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddr
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aRss The default received signal strength (in dBm) to set.
*
*/
void otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss);
@@ -832,7 +758,6 @@ void otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss);
* Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otLinkFilterClearDefaultRssIn(otInstance *aInstance);
@@ -844,7 +769,6 @@ void otLinkFilterClearDefaultRssIn(otInstance *aInstance);
* Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otLinkFilterClearAllRssIn(otInstance *aInstance);
@@ -862,7 +786,6 @@ void otLinkFilterClearAllRssIn(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully retrieved the next entry.
* @retval OT_ERROR_NOT_FOUND No subsequent entry exists.
*
*/
otError otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry);
@@ -878,7 +801,6 @@ otError otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIt
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aFilterEnabled TRUE to enable radio filter, FALSE to disable
*
*/
void otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled);
@@ -889,7 +811,6 @@ void otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled);
*
* @retval TRUE If the radio filter is enabled.
* @retval FALSE If the radio filter is disabled.
*
*/
bool otLinkIsRadioFilterEnabled(otInstance *aInstance);
@@ -900,7 +821,6 @@ bool otLinkIsRadioFilterEnabled(otInstance *aInstance);
* @param[in] aRss The received signal strength value to be converted.
*
* @return Link quality value mapping to @p aRss.
*
*/
uint8_t otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss);
@@ -911,7 +831,6 @@ uint8_t otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss);
* @param[in] aLinkQuality LinkQuality value, should be in range [0,3].
*
* @return Typical platform received signal strength mapping to @p aLinkQuality.
*
*/
int8_t otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality);
@@ -938,7 +857,6 @@ const uint32_t *otLinkGetTxDirectRetrySuccessHistogram(otInstance *aInstance, ui
*
* @returns A pointer to the histogram of retries (in a form of an array).
* The n-th element indicates that the packet has been sent with n-th retry.
*
*/
const uint32_t *otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries);
@@ -948,7 +866,6 @@ const uint32_t *otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance,
* Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otLinkResetTxRetrySuccessHistogram(otInstance *aInstance);
@@ -958,7 +875,6 @@ void otLinkResetTxRetrySuccessHistogram(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the MAC layer counters.
*
*/
const otMacCounters *otLinkGetCounters(otInstance *aInstance);
@@ -966,7 +882,6 @@ const otMacCounters *otLinkGetCounters(otInstance *aInstance);
* Resets the MAC layer counters.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otLinkResetCounters(otInstance *aInstance);
@@ -980,7 +895,6 @@ void otLinkResetCounters(otInstance *aInstance);
* @param[in] aFrame A pointer to the received IEEE 802.15.4 frame.
* @param[in] aIsTx Whether this frame is transmitted, not received.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void *aContext);
@@ -991,7 +905,6 @@ typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void
* @param[in] aPcapCallback A pointer to a function that is called when receiving an IEEE 802.15.4 link frame or
* NULL to disable the callback.
* @param[in] aCallbackContext A pointer to application-specific context.
*
*/
void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext);
@@ -1002,7 +915,6 @@ void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallba
*
* @retval TRUE Promiscuous mode is enabled.
* @retval FALSE Promiscuous mode is not enabled.
*
*/
bool otLinkIsPromiscuous(otInstance *aInstance);
@@ -1017,7 +929,6 @@ bool otLinkIsPromiscuous(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully enabled promiscuous mode.
* @retval OT_ERROR_INVALID_STATE Could not enable promiscuous mode because
* the Thread interface is enabled.
*
*/
otError otLinkSetPromiscuous(otInstance *aInstance, bool aPromiscuous);
@@ -1027,7 +938,6 @@ otError otLinkSetPromiscuous(otInstance *aInstance, bool aPromiscuous);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The CSL channel.
*
*/
uint8_t otLinkGetCslChannel(otInstance *aInstance);
@@ -1040,7 +950,6 @@ uint8_t otLinkGetCslChannel(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the CSL parameters.
* @retval OT_ERROR_INVALID_ARGS Invalid @p aChannel.
*
*/
otError otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel);
@@ -1048,7 +957,6 @@ otError otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel);
* Represents CSL period ten symbols unit in microseconds.
*
* The CSL period (in micro seconds) MUST be a multiple of this value.
*
*/
#define OT_LINK_CSL_PERIOD_TEN_SYMBOLS_UNIT_IN_USEC (160)
@@ -1058,7 +966,6 @@ otError otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The CSL period in microseconds.
*
*/
uint32_t otLinkGetCslPeriod(otInstance *aInstance);
@@ -1073,7 +980,6 @@ uint32_t otLinkGetCslPeriod(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the CSL period.
* @retval OT_ERROR_INVALID_ARGS Invalid CSL period
*
*/
otError otLinkSetCslPeriod(otInstance *aInstance, uint32_t aPeriod);
@@ -1083,7 +989,6 @@ otError otLinkSetCslPeriod(otInstance *aInstance, uint32_t aPeriod);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The CSL timeout in seconds.
*
*/
uint32_t otLinkGetCslTimeout(otInstance *aInstance);
@@ -1095,7 +1000,6 @@ uint32_t otLinkGetCslTimeout(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the CSL timeout.
* @retval OT_ERROR_INVALID_ARGS Invalid CSL timeout.
*
*/
otError otLinkSetCslTimeout(otInstance *aInstance, uint32_t aTimeout);
@@ -1106,7 +1010,6 @@ otError otLinkSetCslTimeout(otInstance *aInstance, uint32_t aTimeout);
* frame transmissions.
*
* @returns The CCA failure rate with maximum value `0xffff` corresponding to 100% failure rate.
*
*/
uint16_t otLinkGetCcaFailureRate(otInstance *aInstance);
@@ -1121,7 +1024,6 @@ uint16_t otLinkGetCcaFailureRate(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully enabled / disabled the link layer.
* @retval OT_ERROR_INVALID_STATE Could not disable the link layer because
* the Thread interface is enabled.
*
*/
otError otLinkSetEnabled(otInstance *aInstance, bool aEnable);
@@ -1132,7 +1034,6 @@ otError otLinkSetEnabled(otInstance *aInstance, bool aEnable);
*
* @retval TRUE Link layer is enabled.
* @retval FALSE Link layer is not enabled.
*
*/
bool otLinkIsEnabled(otInstance *aInstance);
@@ -1143,7 +1044,6 @@ bool otLinkIsEnabled(otInstance *aInstance);
*
* @retval TRUE Link layer is CSL enabled.
* @retval FALSE Link layer is not CSL enabled.
*
*/
bool otLinkIsCslEnabled(otInstance *aInstance);
@@ -1152,7 +1052,6 @@ bool otLinkIsCslEnabled(otInstance *aInstance);
*
* @retval TRUE If parent supports CSL.
* @retval FALSE If parent does not support CSL.
*
*/
bool otLinkIsCslSupported(otInstance *aInstance);
@@ -1167,7 +1066,6 @@ bool otLinkIsCslSupported(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully enqueued an empty message.
* @retval OT_ERROR_INVALID_STATE Device is not in Rx-Off-When-Idle mode.
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available.
*
*/
otError otLinkSendEmptyData(otInstance *aInstance);
@@ -1183,7 +1081,6 @@ otError otLinkSendEmptyData(otInstance *aInstance);
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully set region code.
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
*
*/
otError otLinkSetRegion(otInstance *aInstance, uint16_t aRegionCode);
@@ -1200,13 +1097,11 @@ otError otLinkSetRegion(otInstance *aInstance, uint16_t aRegionCode);
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully got region code.
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
*
*/
otError otLinkGetRegion(otInstance *aInstance, uint16_t *aRegionCode);
/**
* @}
*
*/
#ifdef __cplusplus
-16
View File
@@ -50,12 +50,10 @@ extern "C" {
* This module includes functions that control the Link Metrics protocol.
*
* @{
*
*/
/**
* Represents the result (value) for a Link Metrics query.
*
*/
typedef struct otLinkMetricsValues
{
@@ -69,7 +67,6 @@ typedef struct otLinkMetricsValues
/**
* Represents which frames are accounted in a Forward Tracking Series.
*
*/
typedef struct otLinkMetricsSeriesFlags
{
@@ -83,7 +80,6 @@ typedef struct otLinkMetricsSeriesFlags
* Enhanced-ACK Flags.
*
* These are used in Enhanced-ACK Based Probing to indicate whether to register or clear the probing.
*
*/
typedef enum otLinkMetricsEnhAckFlags
{
@@ -93,7 +89,6 @@ typedef enum otLinkMetricsEnhAckFlags
/**
* Link Metrics Status values.
*
*/
typedef enum otLinkMetricsStatus
{
@@ -112,7 +107,6 @@ typedef enum otLinkMetricsStatus
* @param[in] aMetricsValues A pointer to the Link Metrics values (the query result).
* @param[in] aStatus The status code in the report (only useful when @p aMetricsValues is NULL).
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource,
const otLinkMetricsValues *aMetricsValues,
@@ -124,7 +118,6 @@ typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource,
* @param[in] aSource A pointer to the source address.
* @param[in] aStatus The status code in the response.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otLinkMetricsMgmtResponseCallback)(const otIp6Address *aSource,
otLinkMetricsStatus aStatus,
@@ -137,7 +130,6 @@ typedef void (*otLinkMetricsMgmtResponseCallback)(const otIp6Address *aSource,
* @param[in] aExtAddress A pointer to the Mac extended address of the Probing Subject.
* @param[in] aMetricsValues A pointer to the Link Metrics values obtained from the IE.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress aShortAddress,
const otExtAddress *aExtAddress,
@@ -160,7 +152,6 @@ typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress
* @retval OT_ERROR_NO_BUFS Insufficient buffers to generate the MLE Data Request message.
* @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found.
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
*
*/
otError otLinkMetricsQuery(otInstance *aInstance,
const otIp6Address *aDestination,
@@ -187,7 +178,6 @@ otError otLinkMetricsQuery(otInstance *aInstance,
* @retval OT_ERROR_INVALID_ARGS @p aSeriesId is not within the valid range.
* @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found.
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
*
*/
otError otLinkMetricsConfigForwardTrackingSeries(otInstance *aInstance,
const otIp6Address *aDestination,
@@ -216,7 +206,6 @@ otError otLinkMetricsConfigForwardTrackingSeries(otInstance
* @retval OT_ERROR_INVALID_ARGS @p aEnhAckFlags is not a valid value or @p aLinkMetricsFlags isn't correct.
* @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found.
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
*
*/
otError otLinkMetricsConfigEnhAckProbing(otInstance *aInstance,
const otIp6Address *aDestination,
@@ -240,7 +229,6 @@ otError otLinkMetricsConfigEnhAckProbing(otInstance
* @retval OT_ERROR_INVALID_ARGS @p aSeriesId or @p aLength is not within the valid range.
* @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found.
* @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics.
*
*/
otError otLinkMetricsSendLinkProbe(otInstance *aInstance,
const otIp6Address *aDestination,
@@ -254,7 +242,6 @@ otError otLinkMetricsSendLinkProbe(otInstance *aInstance,
*
* @retval TRUE Link Metrics Manager is enabled.
* @retval FALSE Link Metrics Manager is not enabled.
*
*/
bool otLinkMetricsManagerIsEnabled(otInstance *aInstance);
@@ -263,7 +250,6 @@ bool otLinkMetricsManagerIsEnabled(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aEnable A boolean indicating to enable or disable.
*
*/
void otLinkMetricsManagerSetEnabled(otInstance *aInstance, bool aEnable);
@@ -277,7 +263,6 @@ void otLinkMetricsManagerSetEnabled(otInstance *aInstance, bool aEnable);
* @retval OT_ERROR_NONE Successfully got the Link Metrics data.
* @retval OT_ERROR_INVALID_ARGS The arguments are invalid.
* @retval OT_ERROR_NOT_FOUND No neighbor with the given extended address is found.
*
*/
otError otLinkMetricsManagerGetMetricsValueByExtAddr(otInstance *aInstance,
const otExtAddress *aExtAddress,
@@ -285,7 +270,6 @@ otError otLinkMetricsManagerGetMetricsValueByExtAddr(otInstance *aInsta
/**
* @}
*
*/
#ifdef __cplusplus
-28
View File
@@ -48,7 +48,6 @@ extern "C" {
* This module includes functions that control the raw link-layer configuration.
*
* @{
*
*/
/**
@@ -58,7 +57,6 @@ extern "C" {
* @param[in] aFrame A pointer to the received frame or NULL if the receive operation was aborted.
* @param[in] aError OT_ERROR_NONE when successfully received a frame.
* OT_ERROR_ABORT when reception was aborted and a frame was not received.
*
*/
typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError);
@@ -72,7 +70,6 @@ typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame
* @retval OT_ERROR_FAILED The radio could not be enabled/disabled.
* @retval OT_ERROR_INVALID_STATE If the OpenThread IPv6 interface is already enabled.
* @retval OT_ERROR_NONE If the enable state was successfully set.
*
*/
otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCallback);
@@ -83,7 +80,6 @@ otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCal
*
* @retval true The raw link-layer is enabled.
* @retval false The raw link-layer is disabled.
*
*/
bool otLinkRawIsEnabled(otInstance *aInstance);
@@ -94,7 +90,6 @@ bool otLinkRawIsEnabled(otInstance *aInstance);
*
* @retval true Promiscuous mode is enabled.
* @retval false Promiscuous mode is disabled.
*
*/
bool otLinkRawGetPromiscuous(otInstance *aInstance);
@@ -106,7 +101,6 @@ bool otLinkRawGetPromiscuous(otInstance *aInstance);
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSetPromiscuous(otInstance *aInstance, bool aEnable);
@@ -118,7 +112,6 @@ otError otLinkRawSetPromiscuous(otInstance *aInstance, bool aEnable);
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress);
@@ -131,7 +124,6 @@ otError otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress);
* @retval OT_ERROR_NONE Successfully transitioned to Sleep.
* @retval OT_ERROR_BUSY The radio was transmitting
* @retval OT_ERROR_INVALID_STATE The radio was disabled
*
*/
otError otLinkRawSleep(otInstance *aInstance);
@@ -143,7 +135,6 @@ otError otLinkRawSleep(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully transitioned to Receive.
* @retval OT_ERROR_INVALID_STATE The radio was disabled or transmitting.
*
*/
otError otLinkRawReceive(otInstance *aInstance);
@@ -157,7 +148,6 @@ otError otLinkRawReceive(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to the transmit buffer or NULL if the raw link-layer isn't enabled.
*
*/
otRadioFrame *otLinkRawGetTransmitBuffer(otInstance *aInstance);
@@ -172,7 +162,6 @@ otRadioFrame *otLinkRawGetTransmitBuffer(otInstance *aInstance);
* OT_ERROR_CHANNEL_ACCESS_FAILURE when the transmission could not take place
due to activity on the channel.
* OT_ERROR_ABORT when transmission was aborted for other reasons.
*
*/
typedef void (*otLinkRawTransmitDone)(otInstance *aInstance,
otRadioFrame *aFrame,
@@ -194,7 +183,6 @@ typedef void (*otLinkRawTransmitDone)(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully transitioned to Transmit.
* @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state.
*
*/
otError otLinkRawTransmit(otInstance *aInstance, otLinkRawTransmitDone aCallback);
@@ -204,7 +192,6 @@ otError otLinkRawTransmit(otInstance *aInstance, otLinkRawTransmitDone aCallback
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid.
*
*/
int8_t otLinkRawGetRssi(otInstance *aInstance);
@@ -214,7 +201,6 @@ int8_t otLinkRawGetRssi(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The radio capability bit vector. The stack enables or disables some functions based on this value.
*
*/
otRadioCaps otLinkRawGetCaps(otInstance *aInstance);
@@ -223,7 +209,6 @@ otRadioCaps otLinkRawGetCaps(otInstance *aInstance);
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel.
*
*/
typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi);
@@ -239,7 +224,6 @@ typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergySca
* @retval OT_ERROR_BUSY The radio is performing energy scanning.
* @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn't support energy scanning.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawEnergyScan(otInstance *aInstance,
uint8_t aScanChannel,
@@ -254,7 +238,6 @@ otError otLinkRawEnergyScan(otInstance *aInstance,
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchEnable(otInstance *aInstance, bool aEnable);
@@ -267,7 +250,6 @@ otError otLinkRawSrcMatchEnable(otInstance *aInstance, bool aEnable);
* @retval OT_ERROR_NONE Successfully added short address to the source match table.
* @retval OT_ERROR_NO_BUFS No available entry in the source match table.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchAddShortEntry(otInstance *aInstance, uint16_t aShortAddress);
@@ -280,7 +262,6 @@ otError otLinkRawSrcMatchAddShortEntry(otInstance *aInstance, uint16_t aShortAdd
* @retval OT_ERROR_NONE Successfully added extended address to the source match table.
* @retval OT_ERROR_NO_BUFS No available entry in the source match table.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchAddExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -293,7 +274,6 @@ otError otLinkRawSrcMatchAddExtEntry(otInstance *aInstance, const otExtAddress *
* @retval OT_ERROR_NONE Successfully removed short address from the source match table.
* @retval OT_ERROR_NO_ADDRESS The short address is not in source match table.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchClearShortEntry(otInstance *aInstance, uint16_t aShortAddress);
@@ -306,7 +286,6 @@ otError otLinkRawSrcMatchClearShortEntry(otInstance *aInstance, uint16_t aShortA
* @retval OT_ERROR_NONE Successfully removed the extended address from the source match table.
* @retval OT_ERROR_NO_ADDRESS The extended address is not in source match table.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchClearExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -317,7 +296,6 @@ otError otLinkRawSrcMatchClearExtEntry(otInstance *aInstance, const otExtAddress
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchClearShortEntries(otInstance *aInstance);
@@ -328,7 +306,6 @@ otError otLinkRawSrcMatchClearShortEntries(otInstance *aInstance);
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSrcMatchClearExtEntries(otInstance *aInstance);
@@ -344,7 +321,6 @@ otError otLinkRawSrcMatchClearExtEntries(otInstance *aInstance);
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSetMacKey(otInstance *aInstance,
uint8_t aKeyIdMode,
@@ -364,7 +340,6 @@ otError otLinkRawSetMacKey(otInstance *aInstance,
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter);
@@ -376,7 +351,6 @@ otError otLinkRawSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCou
*
* @retval OT_ERROR_NONE If successful.
* @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled.
*
*/
otError otLinkRawSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacFrameCounter);
@@ -386,13 +360,11 @@ otError otLinkRawSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMac
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current radio time in microseconds.
*
*/
uint64_t otLinkRawGetRadioTime(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-19
View File
@@ -49,7 +49,6 @@ extern "C" {
* This module includes OpenThread logging related definitions.
*
* @{
*
*/
/**
@@ -59,7 +58,6 @@ extern "C" {
* currently set dynamic log level. Otherwise, this function returns the build-time configured log level.
*
* @returns The log level.
*
*/
otLogLevel otLoggingGetLevel(void);
@@ -72,7 +70,6 @@ otLogLevel otLoggingGetLevel(void);
*
* @retval OT_ERROR_NONE Successfully updated log level.
* @retval OT_ERROR_INVALID_ARGS Log level value is invalid.
*
*/
otError otLoggingSetLevel(otLogLevel aLogLevel);
@@ -84,7 +81,6 @@ otError otLoggingSetLevel(otLogLevel aLogLevel);
*
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogCritPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2);
@@ -96,7 +92,6 @@ void otLogCritPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE
*
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogWarnPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2);
@@ -108,7 +103,6 @@ void otLogWarnPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE
*
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogNotePlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2);
@@ -120,7 +114,6 @@ void otLogNotePlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE
*
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogInfoPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2);
@@ -132,7 +125,6 @@ void otLogInfoPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE
*
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogDebgPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2);
@@ -145,7 +137,6 @@ void otLogDebgPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE
* @param[in] aText A string that is printed before the bytes.
* @param[in] aData A pointer to the data buffer.
* @param[in] aDataLength Number of bytes in @p aData.
*
*/
void otDumpCritPlat(const char *aText, const void *aData, uint16_t aDataLength);
@@ -158,7 +149,6 @@ void otDumpCritPlat(const char *aText, const void *aData, uint16_t aDataLength);
* @param[in] aText A string that is printed before the bytes.
* @param[in] aData A pointer to the data buffer.
* @param[in] aDataLength Number of bytes in @p aData.
*
*/
void otDumpWarnPlat(const char *aText, const void *aData, uint16_t aDataLength);
@@ -171,7 +161,6 @@ void otDumpWarnPlat(const char *aText, const void *aData, uint16_t aDataLength);
* @param[in] aText A string that is printed before the bytes.
* @param[in] aData A pointer to the data buffer.
* @param[in] aDataLength Number of bytes in @p aData.
*
*/
void otDumpNotePlat(const char *aText, const void *aData, uint16_t aDataLength);
@@ -184,7 +173,6 @@ void otDumpNotePlat(const char *aText, const void *aData, uint16_t aDataLength);
* @param[in] aText A string that is printed before the bytes.
* @param[in] aData A pointer to the data buffer.
* @param[in] aDataLength Number of bytes in @p aData.
*
*/
void otDumpInfoPlat(const char *aText, const void *aData, uint16_t aDataLength);
@@ -197,7 +185,6 @@ void otDumpInfoPlat(const char *aText, const void *aData, uint16_t aDataLength);
* @param[in] aText A string that is printed before the bytes.
* @param[in] aData A pointer to the data buffer.
* @param[in] aDataLength Number of bytes in @p aData.
*
*/
void otDumpDebgPlat(const char *aText, const void *aData, uint16_t aDataLength);
@@ -216,7 +203,6 @@ void otDumpDebgPlat(const char *aText, const void *aData, uint16_t aDataLength);
* @param[in] aPlatModuleName The platform sub-module name.
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogPlat(otLogLevel aLogLevel, const char *aPlatModuleName, const char *aFormat, ...)
OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4);
@@ -236,7 +222,6 @@ void otLogPlat(otLogLevel aLogLevel, const char *aPlatModuleName, const char *aF
* @param[in] aPlatModuleName The platform sub-module name.
* @param[in] aFormat The format string.
* @param[in] aArgs Arguments for the format specification.
*
*/
void otLogPlatArgs(otLogLevel aLogLevel, const char *aPlatModuleName, const char *aFormat, va_list aArgs);
@@ -249,7 +234,6 @@ void otLogPlatArgs(otLogLevel aLogLevel, const char *aPlatModuleName, const char
* @param[in] aLogLevel The log level.
* @param[in] aFormat The format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otLogCli(otLogLevel aLogLevel, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3);
@@ -257,7 +241,6 @@ void otLogCli(otLogLevel aLogLevel, const char *aFormat, ...) OT_TOOL_PRINTF_STY
/**
* Represents information used for generating hex dump output.
*
*/
typedef struct
{
@@ -288,13 +271,11 @@ typedef struct
*
* @retval OT_ERROR_NONE Successfully generated the next line, `mLine` field in @p aInfo is updated.
* @retval OT_ERROR_NOT_FOUND Reached the end and no more line to generate.
*
*/
otError otLogGenerateNextHexDumpLine(otLogHexDumpInfo *aInfo);
/**
* @}
*
*/
#ifdef __cplusplus
-56
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file includes the mDNS related APIs.
*
*/
#ifndef OPENTHREAD_MULTICAST_DNS_H_
@@ -57,12 +56,10 @@ extern "C" {
*
* The mDNS APIs are available when the mDNS support `OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE` is enabled and the
* `OPENTHREAD_CONFIG_MULTICAST_DNS_PUBLIC_API_ENABLE` is also enabled.
*
*/
/**
* Represents a request ID (`uint32_t` value) for registering a host, a service, or a key service.
*
*/
typedef otPlatDnssdRequestId otMdnsRequestId;
@@ -81,7 +78,6 @@ typedef otPlatDnssdRequestId otMdnsRequestId;
* @param[in] aInstance The OpenThread instance.
* @param[in] aRequestId The request ID.
* @param[in] aError Error indicating the outcome of request.
*
*/
typedef otPlatDnssdRegisterCallback otMdnsRegisterCallback;
@@ -101,7 +97,6 @@ typedef otPlatDnssdRegisterCallback otMdnsRegisterCallback;
* @param[in] aInstance The OpenThread instance.
* @param[in] aName The host name or the service instance label.
* @param[in] aServiceType The service type (e.g., `_tst._udp`).
*
*/
typedef void (*otMdnsConflictCallback)(otInstance *aInstance, const char *aName, const char *aServiceType);
@@ -111,7 +106,6 @@ typedef void (*otMdnsConflictCallback)(otInstance *aInstance, const char *aName,
* This type is used to register or unregister a host (`otMdnsRegisterHost()` and `otMdnsUnregisterHost()`).
*
* See the description of each function for more details on how different fields are used in each case.
*
*/
typedef otPlatDnssdHost otMdnsHost;
@@ -121,7 +115,6 @@ typedef otPlatDnssdHost otMdnsHost;
* This type is used to register or unregister a service (`otMdnsRegisterService()` and `otMdnsUnregisterService()`).
*
* See the description of each function for more details on how different fields are used in each case.
*
*/
typedef otPlatDnssdService otMdnsService;
@@ -129,19 +122,16 @@ typedef otPlatDnssdService otMdnsService;
* Represents an mDNS key record.
*
* See `otMdnsRegisterKey()`, `otMdnsUnregisterKey()` for more details about fields in each case.
*
*/
typedef otPlatDnssdKey otMdnsKey;
/**
* Represents an mDNS entry iterator.
*
*/
typedef struct otMdnsIterator otMdnsIterator;
/**
* Represents a host/service/key entry state.
*
*/
typedef enum otMdnsEntryState
{
@@ -165,7 +155,6 @@ typedef enum otMdnsEntryState
*
* @retval OT_ERROR_NONE Enabled or disabled the mDNS module successfully.
* @retval OT_ERROR_ALREADY mDNS is already enabled on an enable request or is already disabled on a disable request.
*
*/
otError otMdnsSetEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfIndex);
@@ -176,7 +165,6 @@ otError otMdnsSetEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfI
*
* @retval TRUE The mDNS module is enabled
* @retval FALSE The mDNS module is disabled.
*
*/
bool otMdnsIsEnabled(otInstance *aInstance);
@@ -190,7 +178,6 @@ bool otMdnsIsEnabled(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aAllow Indicates whether or not to allow "QU" questions.
*
*/
void otMdnsSetQuestionUnicastAllowed(otInstance *aInstance, bool aAllow);
@@ -199,7 +186,6 @@ void otMdnsSetQuestionUnicastAllowed(otInstance *aInstance, bool aAllow);
*
* @retval TRUE The mDNS module is allowed to send "QU" questions.
* @retval FALSE The mDNS module is not allowed to send "QU" questions.
*
*/
bool otMdnsIsQuestionUnicastAllowed(otInstance *aInstance);
@@ -214,7 +200,6 @@ bool otMdnsIsQuestionUnicastAllowed(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aCallback The conflict callback.
*
*/
void otMdnsSetConflictCallback(otInstance *aInstance, otMdnsConflictCallback aCallback);
@@ -252,7 +237,6 @@ void otMdnsSetConflictCallback(otInstance *aInstance, otMdnsConflictCallback aCa
*
* @retval OT_ERROR_NONE Successfully started registration. @p aCallback will report the outcome.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsRegisterHost(otInstance *aInstance,
const otMdnsHost *aHost,
@@ -277,7 +261,6 @@ otError otMdnsRegisterHost(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully unregistered host.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsUnregisterHost(otInstance *aInstance, const otMdnsHost *aHost);
@@ -316,7 +299,6 @@ otError otMdnsUnregisterHost(otInstance *aInstance, const otMdnsHost *aHost);
*
* @retval OT_ERROR_NONE Successfully started registration. @p aCallback will report the outcome.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsRegisterService(otInstance *aInstance,
const otMdnsService *aService,
@@ -344,7 +326,6 @@ otError otMdnsRegisterService(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully unregistered service.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsUnregisterService(otInstance *aInstance, const otMdnsService *aService);
@@ -375,7 +356,6 @@ otError otMdnsUnregisterService(otInstance *aInstance, const otMdnsService *aSer
*
* @retval OT_ERROR_NONE Successfully started registration. @p aCallback will report the outcome.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsRegisterKey(otInstance *aInstance,
const otMdnsKey *aKey,
@@ -404,7 +384,6 @@ otError otMdnsRegisterKey(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully unregistered key
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsUnregisterKey(otInstance *aInstance, const otMdnsKey *aKey);
@@ -418,7 +397,6 @@ otError otMdnsUnregisterKey(otInstance *aInstance, const otMdnsKey *aKey);
* @param[in] aInstance The OpenThread instance.
*
* @returns A pointer to the allocated iterator, or `NULL` if it fails to allocate.
*
*/
otMdnsIterator *otMdnsAllocateIterator(otInstance *aInstance);
@@ -429,7 +407,6 @@ otMdnsIterator *otMdnsAllocateIterator(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aIterator The iterator to free.
*
*/
void otMdnsFreeIterator(otInstance *aInstance, otMdnsIterator *aIterator);
@@ -449,7 +426,6 @@ void otMdnsFreeIterator(otInstance *aInstance, otMdnsIterator *aIterator);
* @retval OT_ERROR_NONE @p aHost, @p aState, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextHost(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -473,7 +449,6 @@ otError otMdnsGetNextHost(otInstance *aInstance,
* @retval OT_ERROR_NONE @p aService, @p aState, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextService(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -496,7 +471,6 @@ otError otMdnsGetNextService(otInstance *aInstance,
* @retval OT_ERROR_NONE @p aKey, @p aState, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG Iterator is not valid.
*
*/
otError otMdnsGetNextKey(otInstance *aInstance, otMdnsIterator *aIterator, otMdnsKey *aKey, otMdnsEntryState *aState);
@@ -504,19 +478,16 @@ otError otMdnsGetNextKey(otInstance *aInstance, otMdnsIterator *aIterator, otMdn
* Represents a service browser.
*
* Refer to `otPlatDnssdBrowser` for documentation of member fields and `otMdnsStartBrowser()` for how they are used.
*
*/
typedef otPlatDnssdBrowser otMdnsBrowser;
/**
* Represents the callback function pointer type used to report a browse result.
*
*/
typedef otPlatDnssdBrowseCallback otMdnsBrowseCallback;
/**
* Represents a browse result.
*
*/
typedef otPlatDnssdBrowseResult otMdnsBrowseResult;
@@ -525,19 +496,16 @@ typedef otPlatDnssdBrowseResult otMdnsBrowseResult;
*
* Refer to `otPlatDnssdSrvResolver` for documentation of member fields and `otMdnsStartSrvResolver()` for how they are
* used.
*
*/
typedef otPlatDnssdSrvResolver otMdnsSrvResolver;
/**
* Represents the callback function pointer type used to report an SRV resolve result.
*
*/
typedef otPlatDnssdSrvCallback otMdnsSrvCallback;
/**
* Represents an SRV resolver result.
*
*/
typedef otPlatDnssdSrvResult otMdnsSrvResult;
@@ -546,19 +514,16 @@ typedef otPlatDnssdSrvResult otMdnsSrvResult;
*
* Refer to `otPlatDnssdTxtResolver` for documentation of member fields and `otMdnsStartTxtResolver()` for how they are
* used.
*
*/
typedef otPlatDnssdTxtResolver otMdnsTxtResolver;
/**
* Represents the callback function pointer type used to report a TXT resolve result.
*
*/
typedef otPlatDnssdTxtCallback otMdnsTxtCallback;
/**
* Represents a TXT resolver result.
*
*/
typedef otPlatDnssdTxtResult otMdnsTxtResult;
@@ -567,25 +532,21 @@ typedef otPlatDnssdTxtResult otMdnsTxtResult;
*
* Refer to `otPlatDnssdAddressResolver` for documentation of member fields and `otMdnsStartIp6AddressResolver()` or
* `otMdnsStartIp4AddressResolver()` for how they are used.
*
*/
typedef otPlatDnssdAddressResolver otMdnsAddressResolver;
/**
* Represents the callback function pointer type use to report an IPv6/IPv4 address resolve result.
*
*/
typedef otPlatDnssdAddressCallback otMdnsAddressCallback;
/**
* Represents a discovered host address and its TTL.
*
*/
typedef otPlatDnssdAddressAndTtl otMdnsAddressAndTtl;
/**
* Represents address resolver result.
*
*/
typedef otPlatDnssdAddressResult otMdnsAddressResult;
@@ -608,7 +569,6 @@ typedef otPlatDnssdAddressResult otMdnsAddressResult;
* @retval OT_ERROR_NONE Browser started successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
* @retval OT_ERROR_ALREADY An identical browser (same service and callback) is already active.
*
*/
otError otMdnsStartBrowser(otInstance *aInstance, const otMdnsBrowser *aBrowser);
@@ -622,7 +582,6 @@ otError otMdnsStartBrowser(otInstance *aInstance, const otMdnsBrowser *aBrowser)
*
* @retval OT_ERROR_NONE Browser stopped successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsStopBrowser(otInstance *aInstance, const otMdnsBrowser *aBroswer);
@@ -647,7 +606,6 @@ otError otMdnsStopBrowser(otInstance *aInstance, const otMdnsBrowser *aBroswer);
* @retval OT_ERROR_NONE Resolver started successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
* @retval OT_ERROR_ALREADY An identical resolver (same service and callback) is already active.
*
*/
otError otMdnsStartSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *aResolver);
@@ -661,7 +619,6 @@ otError otMdnsStartSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *a
*
* @retval OT_ERROR_NONE Resolver stopped successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsStopSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *aResolver);
@@ -686,7 +643,6 @@ otError otMdnsStopSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *aR
* @retval OT_ERROR_NONE Resolver started successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
* @retval OT_ERROR_ALREADY An identical resolver (same service and callback) is already active.
*
*/
otError otMdnsStartTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *aResolver);
@@ -700,7 +656,6 @@ otError otMdnsStartTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *a
*
* @retval OT_ERROR_NONE Resolver stopped successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsStopTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *aResolver);
@@ -725,7 +680,6 @@ otError otMdnsStopTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *aR
* @retval OT_ERROR_NONE Resolver started successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
* @retval OT_ERROR_ALREADY An identical resolver (same host and callback) is already active.
*
*/
otError otMdnsStartIp6AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver);
@@ -739,7 +693,6 @@ otError otMdnsStartIp6AddressResolver(otInstance *aInstance, const otMdnsAddress
*
* @retval OT_ERROR_NONE Resolver stopped successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsStopIp6AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver);
@@ -765,7 +718,6 @@ otError otMdnsStopIp6AddressResolver(otInstance *aInstance, const otMdnsAddressR
* @retval OT_ERROR_NONE Resolver started successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
* @retval OT_ERROR_ALREADY An identical resolver (same host and callback) is already active.
*
*/
otError otMdnsStartIp4AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver);
@@ -779,13 +731,11 @@ otError otMdnsStartIp4AddressResolver(otInstance *aInstance, const otMdnsAddress
*
* @retval OT_ERROR_NONE Resolver stopped successfully.
* @retval OT_ERROR_INVALID_STATE mDNS module is not enabled.
*
*/
otError otMdnsStopIp4AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver);
/**
* Represents additional information about a browser/resolver and its cached results.
*
*/
typedef struct otMdnsCacheInfo
{
@@ -810,7 +760,6 @@ typedef struct otMdnsCacheInfo
* @retval OT_ERROR_NONE @p aBrowser, @p aInfo, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextBrowser(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -835,7 +784,6 @@ otError otMdnsGetNextBrowser(otInstance *aInstance,
* @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextSrvResolver(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -860,7 +808,6 @@ otError otMdnsGetNextSrvResolver(otInstance *aInstance,
* @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextTxtResolver(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -885,7 +832,6 @@ otError otMdnsGetNextTxtResolver(otInstance *aInstance,
* @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextIp6AddressResolver(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -910,7 +856,6 @@ otError otMdnsGetNextIp6AddressResolver(otInstance *aInstance,
* @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully.
* @retval OT_ERROR_NOT_FOUND Reached the end of the list.
* @retval OT_ERROR_INVALID_ARG @p aIterator is not valid.
*
*/
otError otMdnsGetNextIp4AddressResolver(otInstance *aInstance,
otMdnsIterator *aIterator,
@@ -919,7 +864,6 @@ otError otMdnsGetNextIp4AddressResolver(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
-24
View File
@@ -51,13 +51,11 @@ extern "C" {
* The Mesh Diagnostics APIs require `OPENTHREAD_CONFIG_MESH_DIAG_ENABLE` and `OPENTHREAD_FTD`.
*
* @{
*
*/
/**
* Represents the set of configurations used when discovering mesh topology indicating which items to
* discover.
*
*/
typedef struct otMeshDiagDiscoverConfig
{
@@ -69,7 +67,6 @@ typedef struct otMeshDiagDiscoverConfig
* An opaque iterator to iterate over list of IPv6 addresses of a router.
*
* Pointers to instance of this type are provided in `otMeshDiagRouterInfo`.
*
*/
typedef struct otMeshDiagIp6AddrIterator otMeshDiagIp6AddrIterator;
@@ -77,7 +74,6 @@ typedef struct otMeshDiagIp6AddrIterator otMeshDiagIp6AddrIterator;
* An opaque iterator to iterate over list of children of a router.
*
* Pointers to instance of this type are provided in `otMeshDiagRouterInfo`.
*
*/
typedef struct otMeshDiagChildIterator otMeshDiagChildIterator;
@@ -86,13 +82,11 @@ typedef struct otMeshDiagChildIterator otMeshDiagChildIterator;
*
* This is used in `otMeshDiagRouterInfo` for `mVersion` property when device does not provide its version. This
* indicates that device is likely running 1.3.0 (version value 4) or earlier.
*
*/
#define OT_MESH_DIAG_VERSION_UNKNOWN 0xffff
/**
* Represents information about a router in Thread mesh discovered using `otMeshDiagDiscoverTopology()`.
*
*/
typedef struct otMeshDiagRouterInfo
{
@@ -112,7 +106,6 @@ typedef struct otMeshDiagRouterInfo
* The array is indexed based on Router ID. `mLinkQualities[routerId]` indicates the incoming link quality, the
* router sees to the router with `routerId`. Link quality is a value in [0, 3]. Value zero indicates no link.
* Larger value indicate better link quality (as defined by Thread specification).
*
*/
uint8_t mLinkQualities[OT_NETWORK_MAX_ROUTER_ID + 1];
@@ -124,7 +117,6 @@ typedef struct otMeshDiagRouterInfo
*
* The pointer can be NULL when there was no request to discover IPv6 addresses (in `otMeshDiagDiscoverConfig`) or
* if the router did not provide the list.
*
*/
otMeshDiagIp6AddrIterator *mIp6AddrIterator;
@@ -136,14 +128,12 @@ typedef struct otMeshDiagRouterInfo
*
* The pointer can be NULL when there was no request to discover children (in `otMeshDiagDiscoverConfig`) or
* if the router did not provide the list.
*
*/
otMeshDiagChildIterator *mChildIterator;
} otMeshDiagRouterInfo;
/**
* Represents information about a discovered child in Thread mesh using `otMeshDiagDiscoverTopology()`.
*
*/
typedef struct otMeshDiagChildInfo
{
@@ -166,7 +156,6 @@ typedef struct otMeshDiagChildInfo
* OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response from one or more routers.
* @param[in] aRouterInfo The discovered router info (can be null if `aError` is OT_ERROR_RESPONSE_TIMEOUT).
* @param[in] aContext Application-specific context.
*
*/
typedef void (*otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext);
@@ -182,7 +171,6 @@ typedef void (*otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo
* @retval OT_ERROR_BUSY A previous discovery request is still ongoing.
* @retval OT_ERROR_INVALID_STATE Device is not attached.
* @retval OT_ERROR_NO_BUFS Could not allocate buffer to send discovery messages.
*
*/
otError otMeshDiagDiscoverTopology(otInstance *aInstance,
const otMeshDiagDiscoverConfig *aConfig,
@@ -193,7 +181,6 @@ otError otMeshDiagDiscoverTopology(otInstance *aInstance,
* Cancels an ongoing topology discovery if there is one, otherwise no action.
*
* When ongoing discovery is cancelled, the callback from `otMeshDiagDiscoverTopology()` will not be called anymore.
*
*/
void otMeshDiagCancel(otInstance *aInstance);
@@ -210,7 +197,6 @@ void otMeshDiagCancel(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully retrieved the next address. @p aIp6Address and @p aIterator are updated.
* @retval OT_ERROR_NOT_FOUND No more address. Reached the end of the list.
*
*/
otError otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6Address *aIp6Address);
@@ -225,7 +211,6 @@ otError otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6A
*
* @retval OT_ERROR_NONE Successfully retrieved the next child. @p aChildInfo and @p aIterator are updated.
* @retval OT_ERROR_NOT_FOUND No more child. Reached the end of the list.
*
*/
otError otMeshDiagGetNextChildInfo(otMeshDiagChildIterator *aIterator, otMeshDiagChildInfo *aChildInfo);
@@ -237,7 +222,6 @@ otError otMeshDiagGetNextChildInfo(otMeshDiagChildIterator *aIterator, otMeshDia
* layer, while `mMessageErrorRate` tracks the IPv6 message error rate (above MAC layer and after MAC retries) when
* an IPv6 message is dropped. For example, if the message is large and requires 6LoWPAN fragmentation, message tx is
* considered as failed if one of its fragment frame tx fails (for example, never acked).
*
*/
typedef struct otMeshDiagChildEntry
{
@@ -275,7 +259,6 @@ typedef struct otMeshDiagChildEntry
* OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response.
* @param[in] aChildEntry The child entry (can be null if `aError` is OT_ERROR_RESPONSE_TIMEOUT or OT_ERROR_NONE).
* @param[in] aContext Application-specific context.
*
*/
typedef void (*otMeshDiagQueryChildTableCallback)(otError aError,
const otMeshDiagChildEntry *aChildEntry,
@@ -294,7 +277,6 @@ typedef void (*otMeshDiagQueryChildTableCallback)(otError aE
* @retval OT_ERROR_INVALID_ARGS The @p aRloc16 is not a valid router RLOC16.
* @retval OT_ERROR_INVALID_STATE Device is not attached.
* @retval OT_ERROR_NO_BUFS Could not allocate buffer to send query messages.
*
*/
otError otMeshDiagQueryChildTable(otInstance *aInstance,
uint16_t aRloc16,
@@ -315,7 +297,6 @@ otError otMeshDiagQueryChildTable(otInstance *aInstance,
* @param[in] aIp6AddrIterator An iterator to go through the IPv6 addresses of the child with @p aRloc using
* `otMeshDiagGetNextIp6Address()`. Set to NULL on `OT_ERROR_RESPONSE_TIMEOUT`.
* @param[in] aContext Application-specific context.
*
*/
typedef void (*otMeshDiagChildIp6AddrsCallback)(otError aError,
uint16_t aChildRloc16,
@@ -335,7 +316,6 @@ typedef void (*otMeshDiagChildIp6AddrsCallback)(otError aErro
* @retval OT_ERROR_INVALID_ARGS The @p aRloc16 is not a valid RLOC16.
* @retval OT_ERROR_INVALID_STATE Device is not attached.
* @retval OT_ERROR_NO_BUFS Could not allocate buffer to send query messages.
*
*/
otError otMeshDiagQueryChildrenIp6Addrs(otInstance *aInstance,
uint16_t aRloc16,
@@ -350,7 +330,6 @@ otError otMeshDiagQueryChildrenIp6Addrs(otInstance *aInstanc
* layer, while `mMessageErrorRate` tracks the IPv6 message error rate (above MAC layer and after MAC retries) when
* an IPv6 message is dropped. For example, if the message is large and requires 6LoWPAN fragmentation, message tx is
* considered as failed if one of its fragment frame tx fails (for example, never acked).
*
*/
typedef struct otMeshDiagRouterNeighborEntry
{
@@ -378,7 +357,6 @@ typedef struct otMeshDiagRouterNeighborEntry
* OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response.
* @param[in] aNeighborEntry The neighbor entry (can be null if `aError` is RESPONSE_TIMEOUT or NONE).
* @param[in] aContext Application-specific context.
*
*/
typedef void (*otMeshDiagQueryRouterNeighborTableCallback)(otError aError,
const otMeshDiagRouterNeighborEntry *aNeighborEntry,
@@ -397,7 +375,6 @@ typedef void (*otMeshDiagQueryRouterNeighborTableCallback)(otError
* @retval OT_ERROR_INVALID_ARGS The @p aRloc16 is not a valid router RLOC16.
* @retval OT_ERROR_INVALID_STATE Device is not attached.
* @retval OT_ERROR_NO_BUFS Could not allocate buffer to send query messages.
*
*/
otError otMeshDiagQueryRouterNeighborTable(otInstance *aInstance,
uint16_t aRloc16,
@@ -406,7 +383,6 @@ otError otMeshDiagQueryRouterNeighborTable(otInstance
/**
* @}
*
*/
#ifdef __cplusplus
-36
View File
@@ -49,18 +49,15 @@ extern "C" {
* This module includes functions that manipulate OpenThread message buffers.
*
* @{
*
*/
/**
* An opaque representation of an OpenThread message buffer.
*
*/
typedef struct otMessage otMessage;
/**
* Defines the OpenThread message priority levels.
*
*/
typedef enum otMessagePriority
{
@@ -71,7 +68,6 @@ typedef enum otMessagePriority
/**
* Defines the OpenThread message origins.
*
*/
typedef enum otMessageOrigin
{
@@ -82,7 +78,6 @@ typedef enum otMessageOrigin
/**
* Represents a message settings.
*
*/
typedef struct otMessageSettings
{
@@ -92,7 +87,6 @@ typedef struct otMessageSettings
/**
* Represents link-specific information for messages received from the Thread radio.
*
*/
typedef struct otThreadLinkInfo
{
@@ -123,7 +117,6 @@ typedef struct otThreadLinkInfo
* @sa otMessageSetOffset
* @sa otMessageRead
* @sa otMessageWrite
*
*/
void otMessageFree(otMessage *aMessage);
@@ -142,7 +135,6 @@ void otMessageFree(otMessage *aMessage);
* @sa otMessageRead
* @sa otMessageWrite
* @sa otMessageSetLength
*
*/
uint16_t otMessageGetLength(const otMessage *aMessage);
@@ -162,7 +154,6 @@ uint16_t otMessageGetLength(const otMessage *aMessage);
* @sa otMessageSetOffset
* @sa otMessageRead
* @sa otMessageWrite
*
*/
otError otMessageSetLength(otMessage *aMessage, uint16_t aLength);
@@ -180,7 +171,6 @@ otError otMessageSetLength(otMessage *aMessage, uint16_t aLength);
* @sa otMessageSetOffset
* @sa otMessageRead
* @sa otMessageWrite
*
*/
uint16_t otMessageGetOffset(const otMessage *aMessage);
@@ -197,7 +187,6 @@ uint16_t otMessageGetOffset(const otMessage *aMessage);
* @sa otMessageGetOffset
* @sa otMessageRead
* @sa otMessageWrite
*
*/
void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset);
@@ -208,7 +197,6 @@ void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset);
*
* @retval TRUE If link security is enabled.
* @retval FALSE If link security is not enabled.
*
*/
bool otMessageIsLinkSecurityEnabled(const otMessage *aMessage);
@@ -219,7 +207,6 @@ bool otMessageIsLinkSecurityEnabled(const otMessage *aMessage);
*
* @retval TRUE If the message is allowed to be looped back to host.
* @retval FALSE If the message is not allowed to be looped back to host.
*
*/
bool otMessageIsLoopbackToHostAllowed(const otMessage *aMessage);
@@ -228,7 +215,6 @@ bool otMessageIsLoopbackToHostAllowed(const otMessage *aMessage);
*
* @param[in] aMessage A pointer to a message buffer.
* @param[in] aAllowLoopbackToHost Whether to allow the message to be looped back to host.
*
*/
void otMessageSetLoopbackToHostAllowed(otMessage *aMessage, bool aAllowLoopbackToHost);
@@ -241,7 +227,6 @@ void otMessageSetLoopbackToHostAllowed(otMessage *aMessage, bool aAllowLoopbackT
* This API is mainly intended for use along with `otIp6Send()` which expects an already prepared IPv6 message.
*
* @param[in] aMessage A pointer to the message.
*
*/
bool otMessageIsMulticastLoopEnabled(otMessage *aMessage);
@@ -250,7 +235,6 @@ bool otMessageIsMulticastLoopEnabled(otMessage *aMessage);
*
* @param[in] aMessage A pointer to the message.
* @param[in] aEnabled The configuration value.
*
*/
void otMessageSetMulticastLoopEnabled(otMessage *aMessage, bool aEnabled);
@@ -260,7 +244,6 @@ void otMessageSetMulticastLoopEnabled(otMessage *aMessage, bool aEnabled);
* @param[in] aMessage A pointer to a message buffer.
*
* @returns The message origin.
*
*/
otMessageOrigin otMessageGetOrigin(const otMessage *aMessage);
@@ -269,7 +252,6 @@ otMessageOrigin otMessageGetOrigin(const otMessage *aMessage);
*
* @param[in] aMessage A pointer to a message buffer.
* @param[in] aOrigin The message origin.
*
*/
void otMessageSetOrigin(otMessage *aMessage, otMessageOrigin aOrigin);
@@ -280,7 +262,6 @@ void otMessageSetOrigin(otMessage *aMessage, otMessageOrigin aOrigin);
* @param[in] aMessage A pointer to a message buffer.
* @param[in] aEnabled If `true`, the message is forced to use direct transmission. If `false`, the message follows
* the normal procedure.
*
*/
void otMessageSetDirectTransmission(otMessage *aMessage, bool aEnabled);
@@ -290,7 +271,6 @@ void otMessageSetDirectTransmission(otMessage *aMessage, bool aEnabled);
* @param[in] aMessage A pointer to a message buffer.
*
* @returns The average RSS value (in dBm) or OT_RADIO_RSSI_INVALID if no average RSS is available.
*
*/
int8_t otMessageGetRss(const otMessage *aMessage);
@@ -302,7 +282,6 @@ int8_t otMessageGetRss(const otMessage *aMessage);
*
* @retval OT_ERROR_NONE Successfully retrieved the link info, @p `aLinkInfo` is updated.
* @retval OT_ERROR_NOT_FOUND Message origin is not `OT_MESSAGE_ORIGIN_THREAD_NETIF`.
*
*/
otError otMessageGetThreadLinkInfo(const otMessage *aMessage, otThreadLinkInfo *aLinkInfo);
@@ -323,7 +302,6 @@ otError otMessageGetThreadLinkInfo(const otMessage *aMessage, otThreadLinkInfo *
* @sa otMessageSetOffset
* @sa otMessageRead
* @sa otMessageWrite
*
*/
otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength);
@@ -344,7 +322,6 @@ otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength)
* @sa otMessageGetOffset
* @sa otMessageSetOffset
* @sa otMessageWrite
*
*/
uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength);
@@ -365,7 +342,6 @@ uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf,
* @sa otMessageGetOffset
* @sa otMessageSetOffset
* @sa otMessageRead
*
*/
int otMessageWrite(otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength);
@@ -379,7 +355,6 @@ typedef struct
/**
* Represents information about a message queue.
*
*/
typedef struct otMessageQueueInfo
{
@@ -390,7 +365,6 @@ typedef struct otMessageQueueInfo
/**
* Represents the message buffer information for different queues used by OpenThread stack.
*
*/
typedef struct otBufferInfo
{
@@ -400,7 +374,6 @@ typedef struct otBufferInfo
/**
* The maximum number of used buffers at the same time since OT stack initialization or last call to
* `otMessageResetBufferInfo()`.
*
*/
uint16_t mMaxUsedBuffers;
@@ -422,7 +395,6 @@ typedef struct otBufferInfo
* initialized or if it is initialized more than once.
*
* @param[in] aQueue A pointer to a message queue.
*
*/
void otMessageQueueInit(otMessageQueue *aQueue);
@@ -431,7 +403,6 @@ void otMessageQueueInit(otMessageQueue *aQueue);
*
* @param[in] aQueue A pointer to the message queue.
* @param[in] aMessage The message to add.
*
*/
void otMessageQueueEnqueue(otMessageQueue *aQueue, otMessage *aMessage);
@@ -440,7 +411,6 @@ void otMessageQueueEnqueue(otMessageQueue *aQueue, otMessage *aMessage);
*
* @param[in] aQueue A pointer to the message queue.
* @param[in] aMessage The message to add.
*
*/
void otMessageQueueEnqueueAtHead(otMessageQueue *aQueue, otMessage *aMessage);
@@ -449,7 +419,6 @@ void otMessageQueueEnqueueAtHead(otMessageQueue *aQueue, otMessage *aMessage);
*
* @param[in] aQueue A pointer to the message queue.
* @param[in] aMessage The message to remove.
*
*/
void otMessageQueueDequeue(otMessageQueue *aQueue, otMessage *aMessage);
@@ -459,7 +428,6 @@ void otMessageQueueDequeue(otMessageQueue *aQueue, otMessage *aMessage);
* @param[in] aQueue A pointer to a message queue.
*
* @returns A pointer to the message at the head of queue or NULL if queue is empty.
*
*/
otMessage *otMessageQueueGetHead(otMessageQueue *aQueue);
@@ -471,7 +439,6 @@ otMessage *otMessageQueueGetHead(otMessageQueue *aQueue);
*
* @returns A pointer to the next message in the queue after `aMessage` or NULL if `aMessage is the tail of queue.
* NULL is returned if `aMessage` is not in the queue `aQueue`.
*
*/
otMessage *otMessageQueueGetNext(otMessageQueue *aQueue, const otMessage *aMessage);
@@ -480,7 +447,6 @@ otMessage *otMessageQueueGetNext(otMessageQueue *aQueue, const otMessage *aMessa
*
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[out] aBufferInfo A pointer where the message buffer information is written.
*
*/
void otMessageGetBufferInfo(otInstance *aInstance, otBufferInfo *aBufferInfo);
@@ -490,13 +456,11 @@ void otMessageGetBufferInfo(otInstance *aInstance, otBufferInfo *aBufferInfo);
* This resets `mMaxUsedBuffers` in `otBufferInfo`.
*
* @param[in] aInstance A pointer to the OpenThread instance.
*
*/
void otMessageResetBufferInfo(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-5
View File
@@ -48,12 +48,10 @@ extern "C" {
* This module includes definitions and functions for multi radio link.
*
* @{
*
*/
/**
* Represents information associated with a radio link.
*
*/
typedef struct otRadioLinkInfo
{
@@ -62,7 +60,6 @@ typedef struct otRadioLinkInfo
/**
* Represents multi radio link information associated with a neighbor.
*
*/
typedef struct otMultiRadioNeighborInfo
{
@@ -83,7 +80,6 @@ typedef struct otMultiRadioNeighborInfo
*
* @retval OT_ERROR_NONE Neighbor was found and @p aNeighborInfo was updated successfully.
* @retval OT_ERROR_NOT_FOUND Could not find a neighbor with @p aExtAddress.
*
*/
otError otMultiRadioGetNeighborInfo(otInstance *aInstance,
const otExtAddress *aExtAddress,
@@ -91,7 +87,6 @@ otError otMultiRadioGetNeighborInfo(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
-34
View File
@@ -49,7 +49,6 @@ extern "C" {
* only available when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled.
*
* @{
*
*/
#define OT_IP4_ADDRESS_SIZE 4 ///< Size of an IPv4 address (bytes)
@@ -58,7 +57,6 @@ extern "C" {
* @struct otIp4Address
*
* Represents an IPv4 address.
*
*/
OT_TOOL_PACKED_BEGIN
struct otIp4Address
@@ -72,7 +70,6 @@ struct otIp4Address
/**
* Represents an IPv4 address.
*
*/
typedef struct otIp4Address otIp4Address;
@@ -80,7 +77,6 @@ typedef struct otIp4Address otIp4Address;
* @struct otIp4Cidr
*
* Represents an IPv4 CIDR block.
*
*/
typedef struct otIp4Cidr
{
@@ -90,7 +86,6 @@ typedef struct otIp4Cidr
/**
* Represents the counters for NAT64.
*
*/
typedef struct otNat64Counters
{
@@ -102,7 +97,6 @@ typedef struct otNat64Counters
/**
* Represents the counters for the protocols supported by NAT64.
*
*/
typedef struct otNat64ProtocolCounters
{
@@ -114,7 +108,6 @@ typedef struct otNat64ProtocolCounters
/**
* Packet drop reasons.
*
*/
typedef enum otNat64DropReason
{
@@ -128,7 +121,6 @@ typedef enum otNat64DropReason
/**
* Represents the counters of dropped packets due to errors when handling NAT64 packets.
*
*/
typedef struct otNat64ErrorCounters
{
@@ -145,7 +137,6 @@ typedef struct otNat64ErrorCounters
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aCounters A pointer to an `otNat64Counters` where the counters of NAT64 translator will be placed.
*
*/
void otNat64GetCounters(otInstance *aInstance, otNat64ProtocolCounters *aCounters);
@@ -156,7 +147,6 @@ void otNat64GetCounters(otInstance *aInstance, otNat64ProtocolCounters *aCounter
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aCounters A pointer to an `otNat64Counters` where the counters of NAT64 translator will be placed.
*
*/
void otNat64GetErrorCounters(otInstance *aInstance, otNat64ErrorCounters *aCounters);
@@ -165,7 +155,6 @@ void otNat64GetErrorCounters(otInstance *aInstance, otNat64ErrorCounters *aCount
*
* @note The counters will be reset for each mapping session even for the same address pair. Applications can use `mId`
* to identify different sessions to calculate the packets correctly.
*
*/
typedef struct otNat64AddressMapping
{
@@ -185,7 +174,6 @@ typedef struct otNat64AddressMapping
* accessed or used by caller.
*
* Before using an iterator, it MUST be initialized using `otNat64AddressMappingIteratorInit()`.
*
*/
typedef struct otNat64AddressMappingIterator
{
@@ -201,7 +189,6 @@ typedef struct otNat64AddressMappingIterator
*
* @param[in] aInstance The OpenThread instance.
* @param[out] aIterator A pointer to the iterator to initialize.
*
*/
void otNat64InitAddressMappingIterator(otInstance *aInstance, otNat64AddressMappingIterator *aIterator);
@@ -220,7 +207,6 @@ void otNat64InitAddressMappingIterator(otInstance *aInstance, otNat64AddressMapp
* @retval OT_ERROR_NONE Successfully found the next NAT64 address mapping info (@p aMapping was successfully
* updated).
* @retval OT_ERROR_NOT_FOUND No subsequent NAT64 address mapping info was found.
*
*/
otError otNat64GetNextAddressMapping(otInstance *aInstance,
otNat64AddressMappingIterator *aIterator,
@@ -228,7 +214,6 @@ otError otNat64GetNextAddressMapping(otInstance *aInstance,
/**
* States of NAT64.
*
*/
typedef enum
{
@@ -249,7 +234,6 @@ typedef enum
* @retval OT_NAT64_STATE_NOT_RUNNING NAT64 translator is enabled, but the translator is not configured with a valid
* NAT64 prefix and a CIDR.
* @retval OT_NAT64_STATE_ACTIVE NAT64 translator is enabled, and is translating packets.
*
*/
otNat64State otNat64GetTranslatorState(otInstance *aInstance);
@@ -268,7 +252,6 @@ otNat64State otNat64GetTranslatorState(otInstance *aInstance);
* priority.
* @retval OT_NAT64_STATE_ACTIVE NAT64 prefix manager is enabled, and is publishing NAT64 prefix to the Thread
* network.
*
*/
otNat64State otNat64GetPrefixManagerState(otInstance *aInstance);
@@ -289,7 +272,6 @@ otNat64State otNat64GetPrefixManagerState(otInstance *aInstance);
*
* @sa otNat64GetTranslatorState
* @sa otNat64GetPrefixManagerState
*
*/
void otNat64SetEnabled(otInstance *aInstance, bool aEnabled);
@@ -310,7 +292,6 @@ void otNat64SetEnabled(otInstance *aInstance, bool aEnabled);
* @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid.
*
* @sa otNat64Send
*
*/
otMessage *otIp4NewMessage(otInstance *aInstance, const otMessageSettings *aSettings);
@@ -333,7 +314,6 @@ otMessage *otIp4NewMessage(otInstance *aInstance, const otMessageSettings *aSett
*
* @sa otBorderRouterSend
* @sa otBorderRouterSetReceiveCallback
*
*/
otError otNat64SetIp4Cidr(otInstance *aInstance, const otIp4Cidr *aCidr);
@@ -353,7 +333,6 @@ otError otNat64SetIp4Cidr(otInstance *aInstance, const otIp4Cidr *aCidr);
* @retval OT_ERROR_NO_ROUTE No route to host.
* @retval OT_ERROR_INVALID_SOURCE_ADDRESS Source address is invalid, e.g. an anycast address or a multicast address.
* @retval OT_ERROR_PARSE Encountered a malformed header when processing the message.
*
*/
otError otNat64Send(otInstance *aInstance, otMessage *aMessage);
@@ -364,7 +343,6 @@ otError otNat64Send(otInstance *aInstance, otMessage *aMessage);
* the ownership of the @p aMessage to the receiver of the callback. The message should be
* freed by the receiver of the callback after it is processed.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otNat64ReceiveIp4Callback)(otMessage *aMessage, void *aContext);
@@ -375,7 +353,6 @@ typedef void (*otNat64ReceiveIp4Callback)(otMessage *aMessage, void *aContext);
* @param[in] aCallback A pointer to a function that is called when an IPv4 datagram is received or
* NULL to disable the callback.
* @param[in] aContext A pointer to application-specific context.
*
*/
void otNat64SetReceiveIp4Callback(otInstance *aInstance, otNat64ReceiveIp4Callback aCallback, void *aContext);
@@ -386,7 +363,6 @@ void otNat64SetReceiveIp4Callback(otInstance *aInstance, otNat64ReceiveIp4Callba
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[out] aCidr A pointer to an otIp4Cidr. Where the CIDR will be filled.
*
*/
otError otNat64GetCidr(otInstance *aInstance, otIp4Cidr *aCidr);
@@ -398,7 +374,6 @@ otError otNat64GetCidr(otInstance *aInstance, otIp4Cidr *aCidr);
*
* @retval TRUE The two IPv4 addresses are the same.
* @retval FALSE The two IPv4 addresses are not the same.
*
*/
bool otIp4IsAddressEqual(const otIp4Address *aFirst, const otIp4Address *aSecond);
@@ -412,7 +387,6 @@ bool otIp4IsAddressEqual(const otIp4Address *aFirst, const otIp4Address *aSecond
* @param[in] aPrefixLength The prefix length to use for IPv4/IPv6 translation.
* @param[in] aIp6Address A pointer to an IPv6 address.
* @param[out] aIp4Address A pointer to output the IPv4 address.
*
*/
void otIp4ExtractFromIp6Address(uint8_t aPrefixLength, const otIp6Address *aIp6Address, otIp4Address *aIp4Address);
@@ -427,7 +401,6 @@ void otIp4ExtractFromIp6Address(uint8_t aPrefixLength, const otIp6Address *aIp6A
*
* @retval OT_ERROR_NONE Extracted the IPv4 address successfully. @p aIp4Address is updated.
* @retval OT_ERROR_PARSE The @p aIp6Address does not follow the IPv4-mapped IPv6 address format.
*
*/
otError otIp4FromIp4MappedIp6Address(const otIp6Address *aIp6Address, otIp4Address *aIp4Address);
@@ -436,7 +409,6 @@ otError otIp4FromIp4MappedIp6Address(const otIp6Address *aIp6Address, otIp4Addre
*
* @param[in] aIp4Address An IPv4 address to convert.
* @param[out] aIp6Address An IPv6 address to set.
*
*/
void otIp4ToIp4MappedIp6Address(const otIp4Address *aIp4Address, otIp6Address *aIp6Address);
@@ -453,7 +425,6 @@ void otIp4ToIp4MappedIp6Address(const otIp4Address *aIp4Address, otIp6Address *a
* @param[in] aAddress A pointer to an IPv4 address (MUST NOT be NULL).
* @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be `nullptr`).
* @param[in] aSize The size of @p aBuffer (in bytes).
*
*/
void otIp4AddressToString(const otIp4Address *aAddress, char *aBuffer, uint16_t aSize);
@@ -467,7 +438,6 @@ void otIp4AddressToString(const otIp4Address *aAddress, char *aBuffer, uint16_t
*
* @retval OT_ERROR_NONE Successfully parsed the string.
* @retval OT_ERROR_INVALID_ARGS Failed to parse the string.
*
*/
otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr);
@@ -483,7 +453,6 @@ otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr);
* @param[in] aCidr A pointer to an IPv4 CIDR (MUST NOT be NULL).
* @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be `nullptr`).
* @param[in] aSize The size of @p aBuffer (in bytes).
*
*/
void otIp4CidrToString(const otIp4Cidr *aCidr, char *aBuffer, uint16_t aSize);
@@ -495,7 +464,6 @@ void otIp4CidrToString(const otIp4Cidr *aCidr, char *aBuffer, uint16_t aSize);
*
* @retval OT_ERROR_NONE Successfully parsed the string.
* @retval OT_ERROR_INVALID_ARGS Failed to parse the string.
*
*/
otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress);
@@ -509,13 +477,11 @@ otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress);
*
* @returns OT_ERROR_NONE Successfully synthesized the IPv6 address from NAT64 prefix and IPv4 address.
* @returns OT_ERROR_INVALID_STATE No valid NAT64 prefix in the network data.
*
*/
otError otNat64SynthesizeIp6Address(otInstance *aInstance, const otIp4Address *aIp4Address, otIp6Address *aIp6Address);
/**
* @}
*
*/
#ifdef __cplusplus
-10
View File
@@ -51,7 +51,6 @@ extern "C" {
* This module includes functions that control the Thread stack's execution.
*
* @{
*
*/
/**
@@ -61,13 +60,11 @@ extern "C" {
* @param[in] aBufLength A length of the output data stored in the buffer.
*
* @returns Number of bytes processed by the callback.
*
*/
typedef int (*otNcpHdlcSendCallback)(const uint8_t *aBuf, uint16_t aBufLength);
/**
* Is called after NCP send finished.
*
*/
void otNcpHdlcSendDone(void);
@@ -76,7 +73,6 @@ void otNcpHdlcSendDone(void);
*
* @param[in] aBuf A pointer to a buffer.
* @param[in] aBufLength The length of the data stored in the buffer.
*
*/
void otNcpHdlcReceive(const uint8_t *aBuf, uint16_t aBufLength);
@@ -85,7 +81,6 @@ void otNcpHdlcReceive(const uint8_t *aBuf, uint16_t aBufLength);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aSendCallback The function pointer used to send NCP data.
*
*/
void otNcpHdlcInit(otInstance *aInstance, otNcpHdlcSendCallback aSendCallback);
@@ -95,7 +90,6 @@ void otNcpHdlcInit(otInstance *aInstance, otNcpHdlcSendCallback aSendCallback);
* @param[in] aInstances The OpenThread instance pointers array.
* @param[in] aCount Number of elements in the array.
* @param[in] aSendCallback The function pointer used to send NCP data.
*
*/
void otNcpHdlcInitMulti(otInstance **aInstance, uint8_t aCount, otNcpHdlcSendCallback aSendCallback);
@@ -103,7 +97,6 @@ void otNcpHdlcInitMulti(otInstance **aInstance, uint8_t aCount, otNcpHdlcSendCal
* Initialize the NCP based on SPI framing.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otNcpSpiInit(otInstance *aInstance);
@@ -154,7 +147,6 @@ void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFo
* @param[in] aCount Number of bytes to peek or poke.
*
* @returns TRUE to allow peek/poke of the given memory region, FALSE otherwise.
*
*/
typedef bool (*otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount);
@@ -166,14 +158,12 @@ typedef bool (*otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount);
*
* @param[in] aAllowPeekDelegate Delegate function pointer for peek operation.
* @param[in] aAllowPokeDelegate Delegate function pointer for poke operation.
*
*/
void otNcpRegisterPeekPokeDelegates(otNcpDelegateAllowPeekPoke aAllowPeekDelegate,
otNcpDelegateAllowPeekPoke aAllowPokeDelegate);
/**
* @}
*
*/
#ifdef __cplusplus
-21
View File
@@ -46,7 +46,6 @@ extern "C" {
* @addtogroup api-thread-general
*
* @{
*
*/
#define OT_NETWORK_DATA_ITERATOR_INIT 0 ///< Value to initialize `otNetworkDataIterator`.
@@ -74,7 +73,6 @@ typedef struct otBorderRouterConfig
/**
* Represents 6LoWPAN Context ID information associated with a prefix in Network Data.
*
*/
typedef struct otLowpanContextInfo
{
@@ -85,7 +83,6 @@ typedef struct otLowpanContextInfo
/**
* Represents an External Route configuration.
*
*/
typedef struct otExternalRouteConfig
{
@@ -100,7 +97,6 @@ typedef struct otExternalRouteConfig
/**
* Defines valid values for `mPreference` in `otExternalRouteConfig` and `otBorderRouterConfig`.
*
*/
typedef enum otRoutePreference
{
@@ -114,7 +110,6 @@ typedef enum otRoutePreference
/**
* Represents a Server configuration.
*
*/
typedef struct otServerConfig
{
@@ -126,7 +121,6 @@ typedef struct otServerConfig
/**
* Represents a Service configuration.
*
*/
typedef struct otServiceConfig
{
@@ -148,7 +142,6 @@ typedef struct otServiceConfig
*
* @retval OT_ERROR_NONE Successfully copied the Thread Network Data into @p aData and updated @p aDataLength.
* @retval OT_ERROR_NO_BUFS Not enough space in @p aData to fully copy the Thread Network Data.
*
*/
otError otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength);
@@ -158,7 +151,6 @@ otError otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @return The length of the Network Data.
*
*/
uint8_t otNetDataGetLength(otInstance *aInstance);
@@ -169,7 +161,6 @@ uint8_t otNetDataGetLength(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @return The maximum length of the Network Data (high water mark for Network Data length).
*
*/
uint8_t otNetDataGetMaxLength(otInstance *aInstance);
@@ -179,7 +170,6 @@ uint8_t otNetDataGetMaxLength(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @sa otNetDataGetMaxLength
*
*/
void otNetDataResetMaxLength(otInstance *aInstance);
@@ -193,7 +183,6 @@ void otNetDataResetMaxLength(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully found the next On Mesh prefix.
* @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data.
*
*/
otError otNetDataGetNextOnMeshPrefix(otInstance *aInstance,
otNetworkDataIterator *aIterator,
@@ -209,7 +198,6 @@ otError otNetDataGetNextOnMeshPrefix(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully found the next External Route.
* @retval OT_ERROR_NOT_FOUND No subsequent external route entry exists in the Thread Network Data.
*
*/
otError otNetDataGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig);
@@ -223,7 +211,6 @@ otError otNetDataGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIte
*
* @retval OT_ERROR_NONE Successfully found the next service.
* @retval OT_ERROR_NOT_FOUND No subsequent service exists in the partition's Network Data.
*
*/
otError otNetDataGetNextService(otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig);
@@ -237,7 +224,6 @@ otError otNetDataGetNextService(otInstance *aInstance, otNetworkDataIterator *aI
*
* @retval OT_ERROR_NONE Successfully found the next 6LoWPAN Context ID info.
* @retval OT_ERROR_NOT_FOUND No subsequent 6LoWPAN Context info exists in the partition's Network Data.
*
*/
otError otNetDataGetNextLowpanContextInfo(otInstance *aInstance,
otNetworkDataIterator *aIterator,
@@ -248,7 +234,6 @@ otError otNetDataGetNextLowpanContextInfo(otInstance *aInstance,
*
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[out] aDataset A pointer to a `otCommissioningDataset` to populate.
*
*/
void otNetDataGetCommissioningDataset(otInstance *aInstance, otCommissioningDataset *aDataset);
@@ -258,7 +243,6 @@ void otNetDataGetCommissioningDataset(otInstance *aInstance, otCommissioningData
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Network Data Version.
*
*/
uint8_t otNetDataGetVersion(otInstance *aInstance);
@@ -268,7 +252,6 @@ uint8_t otNetDataGetVersion(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Stable Network Data Version.
*
*/
uint8_t otNetDataGetStableVersion(otInstance *aInstance);
@@ -281,7 +264,6 @@ uint8_t otNetDataGetStableVersion(otInstance *aInstance);
* @retval OT_ERROR_NONE @p aEui64 is included in the steering data.
* @retval OT_ERROR_INVALID_STATE No steering data present.
* @retval OT_ERROR_NOT_FOUND @p aEui64 is not included in the steering data.
*
*/
otError otNetDataSteeringDataCheckJoiner(otInstance *aInstance, const otExtAddress *aEui64);
@@ -297,7 +279,6 @@ struct otJoinerDiscerner;
* @retval OT_ERROR_NONE @p aDiscerner is included in the steering data.
* @retval OT_ERROR_INVALID_STATE No steering data present.
* @retval OT_ERROR_NOT_FOUND @p aDiscerner is not included in the steering data.
*
*/
otError otNetDataSteeringDataCheckJoinerWithDiscerner(otInstance *aInstance,
const struct otJoinerDiscerner *aDiscerner);
@@ -311,13 +292,11 @@ otError otNetDataSteeringDataCheckJoinerWithDiscerner(otInstance
* @returns Whether @p aPrefix is a valid OMR prefix and Leader's Network Data contains the OMR prefix @p aPrefix.
*
* @note This API is only available when `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` is used.
*
*/
bool otNetDataContainsOmrPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix);
/**
* @}
*
*/
#ifdef __cplusplus
-17
View File
@@ -51,12 +51,10 @@ extern "C" {
* or remove entries.
*
* All the functions in this module require `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE` to be enabled.
*
*/
/**
* Represents the events reported from the Publisher callbacks.
*
*/
typedef enum otNetDataPublisherEvent
{
@@ -74,7 +72,6 @@ typedef enum otNetDataPublisherEvent
*
* @param[in] aEvent Indicates the event (whether the entry was added or removed).
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otNetDataDnsSrpServicePublisherCallback)(otNetDataPublisherEvent aEvent, void *aContext);
@@ -88,7 +85,6 @@ typedef void (*otNetDataDnsSrpServicePublisherCallback)(otNetDataPublisherEvent
* @param[in] aEvent Indicates the event (whether the entry was added or removed).
* @param[in] aPrefix A pointer to the prefix entry.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent,
const otIp6Prefix *aPrefix,
@@ -104,7 +100,6 @@ typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent,
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aSequenceNUmber The sequence number of DNS/SRP Anycast Service.
*
*/
void otNetDataPublishDnsSrpServiceAnycast(otInstance *aInstance, uint8_t aSequenceNUmber);
@@ -122,7 +117,6 @@ void otNetDataPublishDnsSrpServiceAnycast(otInstance *aInstance, uint8_t aSequen
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aAddress The DNS/SRP server address to publish (MUST NOT be NULL).
* @param[in] aPort The SRP server port number to publish.
*
*/
void otNetDataPublishDnsSrpServiceUnicast(otInstance *aInstance, const otIp6Address *aAddress, uint16_t aPort);
@@ -140,7 +134,6 @@ void otNetDataPublishDnsSrpServiceUnicast(otInstance *aInstance, const otIp6Addr
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPort The SRP server port number to publish.
*
*/
void otNetDataPublishDnsSrpServiceUnicastMeshLocalEid(otInstance *aInstance, uint16_t aPort);
@@ -153,7 +146,6 @@ void otNetDataPublishDnsSrpServiceUnicastMeshLocalEid(otInstance *aInstance, uin
*
* @retval TRUE The published DNS/SRP Service entry is added to the Thread Network Data.
* @retval FALSE The entry is not added to Thread Network Data or there is no entry to publish.
*
*/
bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance);
@@ -168,7 +160,6 @@ bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback The callback function pointer (can be NULL if not needed).
* @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked).
*
*/
void otNetDataSetDnsSrpServicePublisherCallback(otInstance *aInstance,
otNetDataDnsSrpServicePublisherCallback aCallback,
@@ -181,7 +172,6 @@ void otNetDataSetDnsSrpServicePublisherCallback(otInstance
* `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otNetDataUnpublishDnsSrpService(otInstance *aInstance);
@@ -207,8 +197,6 @@ void otNetDataUnpublishDnsSrpService(otInstance *aInstance);
* @retval OT_ERROR_NO_BUFS Could not allocate an entry for the new request. Publisher supports a limited number
* of entries (shared between on-mesh prefix and external route) determined by config
* `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_MAX_PREFIX_ENTRIES`.
*
*
*/
otError otNetDataPublishOnMeshPrefix(otInstance *aInstance, const otBorderRouterConfig *aConfig);
@@ -267,7 +255,6 @@ otError otNetDataPublishExternalRoute(otInstance *aInstance, const otExternalRou
* @retval OT_ERROR_NO_BUFS Could not allocate an entry for the new request. Publisher supports a limited number
* of entries (shared between on-mesh prefix and external route) determined by config
* `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_MAX_PREFIX_ENTRIES`.
*
*/
otError otNetDataReplacePublishedExternalRoute(otInstance *aInstance,
const otIp6Prefix *aPrefix,
@@ -284,7 +271,6 @@ otError otNetDataReplacePublishedExternalRoute(otInstance *aIns
*
* @retval TRUE The published prefix entry is added to the Thread Network Data.
* @retval FALSE The entry is not added to Thread Network Data or there is no entry to publish.
*
*/
bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix);
@@ -299,7 +285,6 @@ bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix);
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aCallback The callback function pointer (can be NULL if not needed).
* @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked).
*
*/
void otNetDataSetPrefixPublisherCallback(otInstance *aInstance,
otNetDataPrefixPublisherCallback aCallback,
@@ -315,13 +300,11 @@ void otNetDataSetPrefixPublisherCallback(otInstance *aInsta
*
* @retval OT_ERROR_NONE The prefix was unpublished successfully.
* @retval OT_ERROR_NOT_FOUND Could not find the prefix in the published list.
*
*/
otError otNetDataUnpublishPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix);
/**
* @}
*
*/
#ifdef __cplusplus
-21
View File
@@ -46,7 +46,6 @@ extern "C" {
* @addtogroup api-thread-general
*
* @{
*
*/
#define OT_NETWORK_DIAGNOSTIC_TLV_EXT_ADDRESS 0 ///< MAC Extended Address TLV
@@ -91,7 +90,6 @@ typedef uint16_t otNetworkDiagIterator; ///< Used to iterate through Network Dia
/**
* Represents a Network Diagnostic Connectivity value.
*
*/
typedef struct otNetworkDiagConnectivity
{
@@ -108,7 +106,6 @@ typedef struct otNetworkDiagConnectivity
/**
* Represents a Network Diagnostic Route data.
*
*/
typedef struct otNetworkDiagRouteData
{
@@ -120,7 +117,6 @@ typedef struct otNetworkDiagRouteData
/**
* Represents a Network Diagnostic Route64 TLV value.
*
*/
typedef struct otNetworkDiagRoute
{
@@ -136,7 +132,6 @@ typedef struct otNetworkDiagRoute
* Represents a Network Diagnostic Mac Counters value.
*
* See <a href="https://www.ietf.org/rfc/rfc2863">RFC 2863</a> for definitions of member fields.
*
*/
typedef struct otNetworkDiagMacCounters
{
@@ -153,7 +148,6 @@ typedef struct otNetworkDiagMacCounters
/**
* Represents a Network Diagnostics MLE Counters value.
*
*/
typedef struct otNetworkDiagMleCounters
{
@@ -176,7 +170,6 @@ typedef struct otNetworkDiagMleCounters
/**
* Represents a Network Diagnostic Child Table Entry.
*
*/
typedef struct otNetworkDiagChildEntry
{
@@ -188,7 +181,6 @@ typedef struct otNetworkDiagChildEntry
/**
* Represents a Network Diagnostic TLV.
*
*/
typedef struct otNetworkDiagTlv
{
@@ -253,7 +245,6 @@ typedef struct otNetworkDiagTlv
* @retval OT_ERROR_PARSE Parsing the next Network Diagnostic failed.
*
* @Note A subsequent call to this function is allowed only when current return value is OT_ERROR_NONE.
*
*/
otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage,
otNetworkDiagIterator *aIterator,
@@ -268,7 +259,6 @@ otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage,
* @param[in] aMessageInfo A pointer to the message info for @p aMessage. Available only when
* @p aError is `OT_ERROR_NONE`.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otReceiveDiagnosticGetCallback)(otError aError,
otMessage *aMessage,
@@ -290,7 +280,6 @@ typedef void (*otReceiveDiagnosticGetCallback)(otError aError,
*
* @retval OT_ERROR_NONE Successfully queued the DIAG_GET.req.
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_GET.req.
*
*/
otError otThreadSendDiagnosticGet(otInstance *aInstance,
const otIp6Address *aDestination,
@@ -311,7 +300,6 @@ otError otThreadSendDiagnosticGet(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully queued the DIAG_RST.ntf.
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_RST.ntf.
*
*/
otError otThreadSendDiagnosticReset(otInstance *aInstance,
const otIp6Address *aDestination,
@@ -324,7 +312,6 @@ otError otThreadSendDiagnosticReset(otInstance *aInstance,
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The vendor name string.
*
*/
const char *otThreadGetVendorName(otInstance *aInstance);
@@ -334,7 +321,6 @@ const char *otThreadGetVendorName(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The vendor model string.
*
*/
const char *otThreadGetVendorModel(otInstance *aInstance);
@@ -344,7 +330,6 @@ const char *otThreadGetVendorModel(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The vendor software version string.
*
*/
const char *otThreadGetVendorSwVersion(otInstance *aInstance);
@@ -354,7 +339,6 @@ const char *otThreadGetVendorSwVersion(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The vendor app URL string.
*
*/
const char *otThreadGetVendorAppUrl(otInstance *aInstance);
@@ -371,7 +355,6 @@ const char *otThreadGetVendorAppUrl(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the vendor name.
* @retval OT_ERROR_INVALID_ARGS @p aVendorName is not valid (too long or not UTF8).
*
*/
otError otThreadSetVendorName(otInstance *aInstance, const char *aVendorName);
@@ -388,7 +371,6 @@ otError otThreadSetVendorName(otInstance *aInstance, const char *aVendorName);
*
* @retval OT_ERROR_NONE Successfully set the vendor model.
* @retval OT_ERROR_INVALID_ARGS @p aVendorModel is not valid (too long or not UTF8).
*
*/
otError otThreadSetVendorModel(otInstance *aInstance, const char *aVendorModel);
@@ -405,7 +387,6 @@ otError otThreadSetVendorModel(otInstance *aInstance, const char *aVendorModel);
*
* @retval OT_ERROR_NONE Successfully set the vendor software version.
* @retval OT_ERROR_INVALID_ARGS @p aVendorSwVersion is not valid (too long or not UTF8).
*
*/
otError otThreadSetVendorSwVersion(otInstance *aInstance, const char *aVendorSwVersion);
@@ -422,13 +403,11 @@ otError otThreadSetVendorSwVersion(otInstance *aInstance, const char *aVendorSwV
*
* @retval OT_ERROR_NONE Successfully set the vendor app URL string.
* @retval OT_ERROR_INVALID_ARGS @p aVendorAppUrl is not valid (too long or not UTF8).
*
*/
otError otThreadSetVendorAppUrl(otInstance *aInstance, const char *aVendorAppUrl);
/**
* @}
*
*/
#ifdef __cplusplus
-11
View File
@@ -49,12 +49,10 @@ extern "C" {
* This module includes functions that control network time synchronization service.
*
* @{
*
*/
/**
* Represents OpenThread time synchronization status.
*
*/
typedef enum otNetworkTimeStatus
{
@@ -65,13 +63,11 @@ typedef enum otNetworkTimeStatus
/**
* Pointer is called when a network time sync or status change occurs.
*
*/
typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext);
/**
* zero is considered as invalid time synchronization sequence.
*
*/
#define OT_TIME_SYNC_INVALID_SEQ 0
@@ -82,7 +78,6 @@ typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext);
* @param[in,out] aNetworkTime The Thread network time in microseconds.
*
* @returns The time synchronization status.
*
*/
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTime);
@@ -96,7 +91,6 @@ otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTi
*
* @retval OT_ERROR_NONE Successfully set the time sync period.
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
*/
otError otNetworkTimeSetSyncPeriod(otInstance *aInstance, uint16_t aTimeSyncPeriod);
@@ -106,7 +100,6 @@ otError otNetworkTimeSetSyncPeriod(otInstance *aInstance, uint16_t aTimeSyncPeri
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The time synchronization period.
*
*/
uint16_t otNetworkTimeGetSyncPeriod(otInstance *aInstance);
@@ -120,7 +113,6 @@ uint16_t otNetworkTimeGetSyncPeriod(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully set the time sync period.
* @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
*
*/
otError otNetworkTimeSetXtalThreshold(otInstance *aInstance, uint16_t aXTALThreshold);
@@ -130,7 +122,6 @@ otError otNetworkTimeSetXtalThreshold(otInstance *aInstance, uint16_t aXTALThres
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The XTAL accuracy threshold for Router, in PPM.
*
*/
uint16_t otNetworkTimeGetXtalThreshold(otInstance *aInstance);
@@ -143,7 +134,6 @@ uint16_t otNetworkTimeGetXtalThreshold(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aCallbackFn The callback function to be called
* @param[in] aCallbackContext The context to be passed to the callback function upon invocation
*
*/
void otNetworkTimeSyncSetCallback(otInstance *aInstance,
otNetworkTimeSyncCallbackFn aCallbackFn,
@@ -151,7 +141,6 @@ void otNetworkTimeSyncSetCallback(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
-9
View File
@@ -52,12 +52,10 @@ extern "C" {
* This file includes the OpenThread API for the ping sender module.
*
* @{
*
*/
/**
* Represents a ping reply.
*
*/
typedef struct otPingSenderReply
{
@@ -70,7 +68,6 @@ typedef struct otPingSenderReply
/**
* Represents statistics of a ping request.
*
*/
typedef struct otPingSenderStatistics
{
@@ -87,7 +84,6 @@ typedef struct otPingSenderStatistics
*
* @param[in] aReply A pointer to a `otPingSenderReply` containing info about the received ping reply.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otPingSenderReplyCallback)(const otPingSenderReply *aReply, void *aContext);
@@ -97,13 +93,11 @@ typedef void (*otPingSenderReplyCallback)(const otPingSenderReply *aReply, void
* @param[in] aStatistics A pointer to a `otPingSenderStatistics` containing info about the received ping
* statistics.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otPingSenderStatisticsCallback)(const otPingSenderStatistics *aStatistics, void *aContext);
/**
* Represents a ping request configuration.
*
*/
typedef struct otPingSenderConfig
{
@@ -133,7 +127,6 @@ typedef struct otPingSenderConfig
* @retval OT_ERROR_BUSY Could not start since busy with a previous ongoing ping request.
* @retval OT_ERROR_INVALID_ARGS The @p aConfig contains invalid parameters (e.g., ping interval is too long).
*
*/
otError otPingSenderPing(otInstance *aInstance, const otPingSenderConfig *aConfig);
@@ -141,13 +134,11 @@ otError otPingSenderPing(otInstance *aInstance, const otPingSenderConfig *aConfi
* Stops an ongoing ping.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
*/
void otPingSenderStop(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
@@ -47,7 +47,6 @@ extern "C" {
* @addtogroup plat-alarm
*
* @{
*
*/
/**
@@ -59,7 +58,6 @@ extern "C" {
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aT0 The reference time.
* @param[in] aDt The time delay in microseconds from @p aT0.
*
*/
void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt);
@@ -67,7 +65,6 @@ void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt);
* Stop the alarm.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatAlarmMicroStop(otInstance *aInstance);
@@ -78,7 +75,6 @@ void otPlatAlarmMicroStop(otInstance *aInstance);
* entire range [0, 2^32-1] and MUST NOT wrap before 2^32.
*
* @returns The current time in microseconds.
*
*/
uint32_t otPlatAlarmMicroGetNow(void);
@@ -91,7 +87,6 @@ extern void otPlatAlarmMicroFired(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
@@ -50,7 +50,6 @@ extern "C" {
* This module includes the platform abstraction for the alarm service.
*
* @{
*
*/
/**
@@ -98,7 +97,6 @@ extern void otPlatDiagAlarmFired(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-25
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file defines a OpenThread BLE GATT peripheral interface driver.
*
*/
#ifndef OPENTHREAD_PLATFORM_BLE_H_
@@ -53,47 +52,40 @@ extern "C" {
* The platform needs to implement Bluetooth LE 4.2 or higher.
*
* @{
*
*/
/**
* Time slot duration on PHY layer in microseconds (0.625ms).
*
*/
#define OT_BLE_TIMESLOT_UNIT 625
/**
* Minimum allowed interval for advertising packet in OT_BLE_ADV_INTERVAL_UNIT units (20ms).
*
*/
#define OT_BLE_ADV_INTERVAL_MIN 0x0020
/**
* Maximum allowed interval for advertising packet in OT_BLE_ADV_INTERVAL_UNIT units (10.24s).
*
*/
#define OT_BLE_ADV_INTERVAL_MAX 0x4000
/**
* Default interval for advertising packet (ms).
*
*/
#define OT_BLE_ADV_INTERVAL_DEFAULT 100
/**
* Unit used to calculate interval duration (0.625ms).
*
*/
#define OT_BLE_ADV_INTERVAL_UNIT OT_BLE_TIMESLOT_UNIT
/**
* Maximum allowed ATT MTU size (must be >= 23).
*
*/
#define OT_BLE_ATT_MTU_MAX 67
@@ -112,7 +104,6 @@ extern "C" {
/**
* Represent BLE link capabilities
*
*/
typedef struct otBleLinkCapabilities
{
@@ -123,7 +114,6 @@ typedef struct otBleLinkCapabilities
/**
* Represents a BLE packet.
*
*/
typedef struct otBleRadioPacket
{
@@ -161,7 +151,6 @@ otError otPlatBleEnable(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully transitioned to disabled.
* @retval OT_ERROR_FAILED The BLE radio could not be disabled.
*
*/
otError otPlatBleDisable(otInstance *aInstance);
@@ -181,7 +170,6 @@ otError otPlatBleDisable(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Advertising procedure has been started.
* @retval OT_ERROR_NO_BUFS No bufferspace available.
*
*/
otError otPlatBleGetAdvertisementBuffer(otInstance *aInstance, uint8_t **aAdvertisementBuffer);
@@ -197,7 +185,6 @@ otError otPlatBleGetAdvertisementBuffer(otInstance *aInstance, uint8_t **aAdvert
* @retval OT_ERROR_NONE Advertising procedure has been started.
* @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state.
* @retval OT_ERROR_INVALID_ARGS Invalid value has been supplied.
*
*/
otError otPlatBleGapAdvSetData(otInstance *aInstance, uint8_t *aAdvertisementData, uint16_t aAdvertisementLen);
@@ -220,7 +207,6 @@ otError otPlatBleGapAdvSetData(otInstance *aInstance, uint8_t *aAdvertisementDat
* @retval OT_ERROR_NONE Advertising procedure has been started.
* @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state.
* @retval OT_ERROR_INVALID_ARGS Invalid interval value has been supplied.
*
*/
otError otPlatBleGapAdvStart(otInstance *aInstance, uint16_t aInterval);
@@ -233,7 +219,6 @@ otError otPlatBleGapAdvStart(otInstance *aInstance, uint16_t aInterval);
*
* @retval OT_ERROR_NONE Advertising procedure has been stopped.
* @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state.
*
*/
otError otPlatBleGapAdvStop(otInstance *aInstance);
@@ -243,7 +228,6 @@ otError otPlatBleGapAdvStop(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aConnectionId The identifier of the open connection.
*
*/
extern void otPlatBleGapOnConnected(otInstance *aInstance, uint16_t aConnectionId);
@@ -253,7 +237,6 @@ extern void otPlatBleGapOnConnected(otInstance *aInstance, uint16_t aConnectionI
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aConnectionId The identifier of the closed connection.
*
*/
extern void otPlatBleGapOnDisconnected(otInstance *aInstance, uint16_t aConnectionId);
@@ -267,7 +250,6 @@ extern void otPlatBleGapOnDisconnected(otInstance *aInstance, uint16_t aConnecti
*
* @retval OT_ERROR_NONE Disconnection procedure has been started.
* @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state.
*
*/
otError otPlatBleGapDisconnect(otInstance *aInstance);
@@ -283,7 +265,6 @@ otError otPlatBleGapDisconnect(otInstance *aInstance);
*
* @retval OT_ERROR_NONE ATT_MTU value has been placed in @p aMtu.
* @retval OT_ERROR_FAILED BLE Device cannot determine its ATT_MTU.
*
*/
otError otPlatBleGattMtuGet(otInstance *aInstance, uint16_t *aMtu);
@@ -292,7 +273,6 @@ otError otPlatBleGattMtuGet(otInstance *aInstance, uint16_t *aMtu);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aMtu The updated ATT_MTU value.
*
*/
extern void otPlatBleGattOnMtuUpdate(otInstance *aInstance, uint16_t aMtu);
@@ -313,7 +293,6 @@ extern void otPlatBleGattOnMtuUpdate(otInstance *aInstance, uint16_t aMtu);
* @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state.
* @retval OT_ERROR_INVALID_ARGS Invalid handle value, data or data length has been supplied.
* @retval OT_ERROR_NO_BUFS No available internal buffer found.
*
*/
otError otPlatBleGattServerIndicate(otInstance *aInstance, uint16_t aHandle, const otBleRadioPacket *aPacket);
@@ -326,7 +305,6 @@ otError otPlatBleGattServerIndicate(otInstance *aInstance, uint16_t aHandle, con
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aHandle The handle of the attribute to be written.
* @param[in] aPacket A pointer to the packet contains value to be written to the attribute.
*
*/
extern void otPlatBleGattServerOnWriteRequest(otInstance *aInstance, uint16_t aHandle, const otBleRadioPacket *aPacket);
@@ -335,7 +313,6 @@ extern void otPlatBleGattServerOnWriteRequest(otInstance *aInstance, uint16_t aH
*
* @param[in] aInstance The OpenThread instance structure.
* @param[out] aBleLinkCapabilities The pointer to retrieve the BLE ling capabilities.
*
*/
void otPlatBleGetLinkCapabilities(otInstance *aInstance, otBleLinkCapabilities *aBleLinkCapabilities);
@@ -343,12 +320,10 @@ void otPlatBleGetLinkCapabilities(otInstance *aInstance, otBleLinkCapabilities *
* Function to retrieve from platform multiradio support of BLE and IEEE.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
bool otPlatBleSupportsMultiRadio(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
@@ -61,7 +61,6 @@ extern "C" {
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMessage A pointer to an ICMPv6 RouterAdvertisement message.
* @param[in] aLength The length of ICMPv6 RouterAdvertisement message.
*
*/
extern void otPlatBorderRoutingProcessIcmp6Ra(otInstance *aInstance, const uint8_t *aMessage, uint16_t aLength);
@@ -79,7 +78,6 @@ extern void otPlatBorderRoutingProcessIcmp6Ra(otInstance *aInstance, const uint8
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPrefixInfo A pointer to the prefix information structure
*
*/
extern void otPlatBorderRoutingProcessDhcp6PdPrefix(otInstance *aInstance,
const otBorderRoutingPrefixTableEntry *aPrefixInfo);
-52
View File
@@ -51,12 +51,10 @@ extern "C" {
* This module includes the platform abstraction for Crypto.
*
* @{
*
*/
/**
* Defines the key types.
*
*/
typedef enum
{
@@ -68,7 +66,6 @@ typedef enum
/**
* Defines the key algorithms.
*
*/
typedef enum
{
@@ -80,7 +77,6 @@ typedef enum
/**
* Defines the key usage flags.
*
*/
enum
{
@@ -94,7 +90,6 @@ enum
/**
* Defines the key storage types.
*
*/
typedef enum
{
@@ -104,7 +99,6 @@ typedef enum
/**
* This datatype represents the key reference.
*
*/
typedef uint32_t otCryptoKeyRef;
@@ -112,7 +106,6 @@ typedef uint32_t otCryptoKeyRef;
* @struct otCryptoKey
*
* Represents the Key Material required for Crypto operations.
*
*/
typedef struct otCryptoKey
{
@@ -125,7 +118,6 @@ typedef struct otCryptoKey
* @struct otCryptoContext
*
* Stores the context object for platform APIs.
*
*/
typedef struct otCryptoContext
{
@@ -135,7 +127,6 @@ typedef struct otCryptoContext
/**
* Length of SHA256 hash (in bytes).
*
*/
#define OT_CRYPTO_SHA256_HASH_SIZE 32
@@ -143,7 +134,6 @@ typedef struct otCryptoContext
* @struct otPlatCryptoSha256Hash
*
* Represents a SHA-256 hash.
*
*/
OT_TOOL_PACKED_BEGIN
struct otPlatCryptoSha256Hash
@@ -153,13 +143,11 @@ struct otPlatCryptoSha256Hash
/**
* Represents a SHA-256 hash.
*
*/
typedef struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash;
/**
* Max buffer size (in bytes) for representing the EDCSA key-pair in DER format.
*
*/
#define OT_CRYPTO_ECDSA_MAX_DER_SIZE 125
@@ -169,7 +157,6 @@ typedef struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash;
* Represents an ECDSA key pair (public and private keys).
*
* The key pair is stored using Distinguished Encoding Rules (DER) format (per RFC 5915).
*
*/
typedef struct otPlatCryptoEcdsaKeyPair
{
@@ -179,7 +166,6 @@ typedef struct otPlatCryptoEcdsaKeyPair
/**
* Buffer size (in bytes) for representing the EDCSA public key.
*
*/
#define OT_CRYPTO_ECDSA_PUBLIC_KEY_SIZE 64
@@ -189,7 +175,6 @@ typedef struct otPlatCryptoEcdsaKeyPair
* Represents a ECDSA public key.
*
* The public key is stored as a byte sequence representation of an uncompressed curve point (RFC 6605 - sec 4).
*
*/
OT_TOOL_PACKED_BEGIN
struct otPlatCryptoEcdsaPublicKey
@@ -201,7 +186,6 @@ typedef struct otPlatCryptoEcdsaPublicKey otPlatCryptoEcdsaPublicKey;
/**
* Buffer size (in bytes) for representing the EDCSA signature.
*
*/
#define OT_CRYPTO_ECDSA_SIGNATURE_SIZE 64
@@ -212,7 +196,6 @@ typedef struct otPlatCryptoEcdsaPublicKey otPlatCryptoEcdsaPublicKey;
*
* The signature is encoded as the concatenated binary representation of two MPIs `r` and `s` which are calculated
* during signing (RFC 6605 - section 4).
*
*/
OT_TOOL_PACKED_BEGIN
struct otPlatCryptoEcdsaSignature
@@ -224,13 +207,11 @@ typedef struct otPlatCryptoEcdsaSignature otPlatCryptoEcdsaSignature;
/**
* Max PBKDF2 SALT length: salt prefix (6) + extended panid (8) + network name (16)
*
*/
#define OT_CRYPTO_PBDKF2_MAX_SALT_SIZE 30
/**
* Initialize the Crypto module.
*
*/
void otPlatCryptoInit(void);
@@ -256,7 +237,6 @@ void otPlatCryptoInit(void);
* value does not matter and platform API MUST update it to return the new key ref.
*
* This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef,
otCryptoKeyType aKeyType,
@@ -279,7 +259,6 @@ otError otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef,
* @retval OT_ERROR_INVALID_ARGS @p aBuffer was NULL
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t aBufferLen, size_t *aKeyLen);
@@ -292,7 +271,6 @@ otError otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t a
* @retval OT_ERROR_FAILED Failed to destroy the key.
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef);
@@ -305,7 +283,6 @@ otError otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef);
* @retval FALSE There is no associated key with @p aKeyRef.
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
bool otPlatCryptoHasKey(otCryptoKeyRef aKeyRef);
@@ -320,7 +297,6 @@ bool otPlatCryptoHasKey(otCryptoKeyRef aKeyRef);
*
* @note The platform driver shall point the context to the correct object such as psa_mac_operation_t or
* mbedtls_md_context_t.
*
*/
otError otPlatCryptoHmacSha256Init(otCryptoContext *aContext);
@@ -332,7 +308,6 @@ otError otPlatCryptoHmacSha256Init(otCryptoContext *aContext);
* @retval OT_ERROR_NONE Successfully uninitialized HMAC operation.
* @retval OT_ERROR_FAILED Failed to uninitialized HMAC operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext was NULL
*
*/
otError otPlatCryptoHmacSha256Deinit(otCryptoContext *aContext);
@@ -345,7 +320,6 @@ otError otPlatCryptoHmacSha256Deinit(otCryptoContext *aContext);
* @retval OT_ERROR_NONE Successfully started HMAC operation.
* @retval OT_ERROR_FAILED Failed to start HMAC operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aKey was NULL
*
*/
otError otPlatCryptoHmacSha256Start(otCryptoContext *aContext, const otCryptoKey *aKey);
@@ -359,7 +333,6 @@ otError otPlatCryptoHmacSha256Start(otCryptoContext *aContext, const otCryptoKey
* @retval OT_ERROR_NONE Successfully updated HMAC with new input operation.
* @retval OT_ERROR_FAILED Failed to update HMAC operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aBuf was NULL
*
*/
otError otPlatCryptoHmacSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength);
@@ -373,7 +346,6 @@ otError otPlatCryptoHmacSha256Update(otCryptoContext *aContext, const void *aBuf
* @retval OT_ERROR_NONE Successfully completed HMAC operation.
* @retval OT_ERROR_FAILED Failed to complete HMAC operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aBuf was NULL
*
*/
otError otPlatCryptoHmacSha256Finish(otCryptoContext *aContext, uint8_t *aBuf, size_t aBufLength);
@@ -389,7 +361,6 @@ otError otPlatCryptoHmacSha256Finish(otCryptoContext *aContext, uint8_t *aBuf, s
*
* @note The platform driver shall point the context to the correct object such as psa_key_id
* or mbedtls_aes_context_t.
*
*/
otError otPlatCryptoAesInit(otCryptoContext *aContext);
@@ -402,7 +373,6 @@ otError otPlatCryptoAesInit(otCryptoContext *aContext);
* @retval OT_ERROR_NONE Successfully set the key for AES operation.
* @retval OT_ERROR_FAILED Failed to set the key for AES operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aKey was NULL
*
*/
otError otPlatCryptoAesSetKey(otCryptoContext *aContext, const otCryptoKey *aKey);
@@ -416,7 +386,6 @@ otError otPlatCryptoAesSetKey(otCryptoContext *aContext, const otCryptoKey *aKey
* @retval OT_ERROR_NONE Successfully encrypted @p aInput.
* @retval OT_ERROR_FAILED Failed to encrypt @p aInput.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aKey or @p aOutput were NULL
*
*/
otError otPlatCryptoAesEncrypt(otCryptoContext *aContext, const uint8_t *aInput, uint8_t *aOutput);
@@ -428,7 +397,6 @@ otError otPlatCryptoAesEncrypt(otCryptoContext *aContext, const uint8_t *aInput,
* @retval OT_ERROR_NONE Successfully freed AES context.
* @retval OT_ERROR_FAILED Failed to free AES context.
* @retval OT_ERROR_INVALID_ARGS @p aContext was NULL
*
*/
otError otPlatCryptoAesFree(otCryptoContext *aContext);
@@ -443,7 +411,6 @@ otError otPlatCryptoAesFree(otCryptoContext *aContext);
*
* @note The platform driver shall point the context to the correct object such as psa_key_derivation_operation_t
* or HmacSha256::Hash
*
*/
otError otPlatCryptoHkdfInit(otCryptoContext *aContext);
@@ -459,7 +426,6 @@ otError otPlatCryptoHkdfInit(otCryptoContext *aContext);
* @retval OT_ERROR_NONE HKDF Expand was successful.
* @retval OT_ERROR_FAILED HKDF Expand failed.
* @retval OT_ERROR_INVALID_ARGS @p aContext was NULL
*
*/
otError otPlatCryptoHkdfExpand(otCryptoContext *aContext,
const uint8_t *aInfo,
@@ -477,7 +443,6 @@ otError otPlatCryptoHkdfExpand(otCryptoContext *aContext,
*
* @retval OT_ERROR_NONE HKDF Extract was successful.
* @retval OT_ERROR_FAILED HKDF Extract failed.
*
*/
otError otPlatCryptoHkdfExtract(otCryptoContext *aContext,
const uint8_t *aSalt,
@@ -492,7 +457,6 @@ otError otPlatCryptoHkdfExtract(otCryptoContext *aContext,
* @retval OT_ERROR_NONE Successfully un-initialised HKDF operation.
* @retval OT_ERROR_FAILED Failed to un-initialised HKDF operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext was NULL
*
*/
otError otPlatCryptoHkdfDeinit(otCryptoContext *aContext);
@@ -519,7 +483,6 @@ otError otPlatCryptoSha256Init(otCryptoContext *aContext);
* @retval OT_ERROR_NONE Successfully un-initialised SHA-256 operation.
* @retval OT_ERROR_FAILED Failed to un-initialised SHA-256 operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext was NULL
*
*/
otError otPlatCryptoSha256Deinit(otCryptoContext *aContext);
@@ -531,7 +494,6 @@ otError otPlatCryptoSha256Deinit(otCryptoContext *aContext);
* @retval OT_ERROR_NONE Successfully started SHA-256 operation.
* @retval OT_ERROR_FAILED Failed to start SHA-256 operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext was NULL
*
*/
otError otPlatCryptoSha256Start(otCryptoContext *aContext);
@@ -545,7 +507,6 @@ otError otPlatCryptoSha256Start(otCryptoContext *aContext);
* @retval OT_ERROR_NONE Successfully updated SHA-256 with new input operation.
* @retval OT_ERROR_FAILED Failed to update SHA-256 operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aBuf was NULL
*
*/
otError otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength);
@@ -559,19 +520,16 @@ otError otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, ui
* @retval OT_ERROR_NONE Successfully completed the SHA-256 operation.
* @retval OT_ERROR_FAILED Failed to complete SHA-256 operation.
* @retval OT_ERROR_INVALID_ARGS @p aContext or @p aHash was NULL
*
*/
otError otPlatCryptoSha256Finish(otCryptoContext *aContext, uint8_t *aHash, uint16_t aHashSize);
/**
* Initialize cryptographically-secure pseudorandom number generator (CSPRNG).
*
*/
void otPlatCryptoRandomInit(void);
/**
* Deinitialize cryptographically-secure pseudorandom number generator (CSPRNG).
*
*/
void otPlatCryptoRandomDeinit(void);
@@ -583,7 +541,6 @@ void otPlatCryptoRandomDeinit(void);
*
* @retval OT_ERROR_NONE Successfully filled buffer with random values.
* @retval OT_ERROR_FAILED Operation failed.
*
*/
otError otPlatCryptoRandomGet(uint8_t *aBuffer, uint16_t aSize);
@@ -596,7 +553,6 @@ otError otPlatCryptoRandomGet(uint8_t *aBuffer, uint16_t aSize);
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer for key generation.
* @retval OT_ERROR_NOT_CAPABLE Feature not supported.
* @retval OT_ERROR_FAILED Failed to generate key-pair.
*
*/
otError otPlatCryptoEcdsaGenerateKey(otPlatCryptoEcdsaKeyPair *aKeyPair);
@@ -609,7 +565,6 @@ otError otPlatCryptoEcdsaGenerateKey(otPlatCryptoEcdsaKeyPair *aKeyPair);
* @retval OT_ERROR_NONE Public key was retrieved successfully, and @p aBuffer is updated.
* @retval OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format).
* @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL.
*
*/
otError otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair, otPlatCryptoEcdsaPublicKey *aPublicKey);
@@ -627,7 +582,6 @@ otError otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair,
* @retval OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format).
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer for signature calculation.
* @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL.
*
*/
otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair,
const otPlatCryptoSha256Hash *aHash,
@@ -647,7 +601,6 @@ otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair,
* @retval OT_ERROR_SECURITY The signature is invalid.
* @retval OT_ERROR_INVALID_ARGS The key or hash is invalid.
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer for signature verification.
*
*/
otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey,
const otPlatCryptoSha256Hash *aHash,
@@ -669,7 +622,6 @@ otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey,
* @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL.
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoEcdsaSignUsingKeyRef(otCryptoKeyRef aKeyRef,
const otPlatCryptoSha256Hash *aHash,
@@ -692,7 +644,6 @@ otError otPlatCryptoEcdsaSignUsingKeyRef(otCryptoKeyRef aKeyRef,
* @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL.
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoEcdsaExportPublicKey(otCryptoKeyRef aKeyRef, otPlatCryptoEcdsaPublicKey *aPublicKey);
@@ -707,7 +658,6 @@ otError otPlatCryptoEcdsaExportPublicKey(otCryptoKeyRef aKeyRef, otPlatCryptoEcd
* @retval OT_ERROR_FAILED Failed to generate key-pair.
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoEcdsaGenerateAndImportKey(otCryptoKeyRef aKeyRef);
@@ -726,7 +676,6 @@ otError otPlatCryptoEcdsaGenerateAndImportKey(otCryptoKeyRef aKeyRef);
* @retval OT_ERROR_NO_BUFS Failed to allocate buffer for signature verification.
*
* @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled.
*
*/
otError otPlatCryptoEcdsaVerifyUsingKeyRef(otCryptoKeyRef aKeyRef,
const otPlatCryptoSha256Hash *aHash,
@@ -758,7 +707,6 @@ otError otPlatCryptoPbkdf2GenerateKey(const uint8_t *aPassword,
/**
* @}
*
*/
#ifdef __cplusplus
-3
View File
@@ -128,7 +128,6 @@ int otPlatDebugUart_kbhit(void);
*
* @retval (negative) no data available, see otPlatDebugUart_kbhit()
* @retval (0x00..0x0ff) data byte value
*
*/
int otPlatDebugUart_getc(void);
@@ -179,13 +178,11 @@ void otPlatDebugUart_puts_no_nl(const char *s);
* @returns OT_ERROR_FAILED
*
* Platforms that desire this MUST provide an implementation.
*
*/
otError otPlatDebugUart_logfile(const char *filename);
/**
* @}
*
*/
#ifdef __cplusplus
-23
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file defines the platform diag interface.
*
*/
#ifndef OPENTHREAD_PLATFORM_DIAG_H_
@@ -53,12 +52,10 @@ extern "C" {
* This module includes the platform abstraction for diagnostics features.
*
* @{
*
*/
/**
* Defines the gpio modes.
*
*/
typedef enum
{
@@ -72,7 +69,6 @@ typedef enum
* @param[in] aFormat The format string.
* @param[in] aArguments The format string arguments.
* @param[out] aContext A pointer to the user context.
*
*/
typedef void (*otPlatDiagOutputCallback)(const char *aFormat, va_list aArguments, void *aContext);
@@ -82,7 +78,6 @@ typedef void (*otPlatDiagOutputCallback)(const char *aFormat, va_list aArguments
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aCallback A pointer to a function that is called on outputting diag messages.
* @param[in] aContext A pointer to the user context.
*
*/
void otPlatDiagSetOutputCallback(otInstance *aInstance, otPlatDiagOutputCallback aCallback, void *aContext);
@@ -96,7 +91,6 @@ void otPlatDiagSetOutputCallback(otInstance *aInstance, otPlatDiagOutputCallback
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
* @retval OT_ERROR_NONE The command is successfully process.
* @retval OT_ERROR_INVALID_COMMAND The command is not valid or not supported.
*
*/
otError otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[]);
@@ -104,7 +98,6 @@ otError otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArg
* Enables/disables the factory diagnostics mode.
*
* @param[in] aMode TRUE to enable diagnostics mode, FALSE otherwise.
*
*/
void otPlatDiagModeSet(bool aMode);
@@ -112,7 +105,6 @@ void otPlatDiagModeSet(bool aMode);
* Indicates whether or not factory diagnostics mode is enabled.
*
* @returns TRUE if factory diagnostics mode is enabled, FALSE otherwise.
*
*/
bool otPlatDiagModeGet(void);
@@ -120,7 +112,6 @@ bool otPlatDiagModeGet(void);
* Sets the channel to use for factory diagnostics.
*
* @param[in] aChannel The channel value.
*
*/
void otPlatDiagChannelSet(uint8_t aChannel);
@@ -128,7 +119,6 @@ void otPlatDiagChannelSet(uint8_t aChannel);
* Sets the transmit power to use for factory diagnostics.
*
* @param[in] aTxPower The transmit power value.
*
*/
void otPlatDiagTxPowerSet(int8_t aTxPower);
@@ -138,7 +128,6 @@ void otPlatDiagTxPowerSet(int8_t aTxPower);
* @param[in] aInstance The OpenThread instance for current request.
* @param[in] aFrame The received radio frame.
* @param[in] aError The received radio frame status.
*
*/
void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError);
@@ -146,7 +135,6 @@ void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otErro
* Processes the alarm event.
*
* @param[in] aInstance The OpenThread instance for current request.
*
*/
void otPlatDiagAlarmCallback(otInstance *aInstance);
@@ -161,7 +149,6 @@ void otPlatDiagAlarmCallback(otInstance *aInstance);
* @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported.
* @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled or @p aGpio is not configured as output.
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform.
*
*/
otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue);
@@ -176,7 +163,6 @@ otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue);
* @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported or @p aValue is NULL.
* @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled or @p aGpio is not configured as input.
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform.
*
*/
otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue);
@@ -191,7 +177,6 @@ otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue);
* @retval OT_ERROR_INVALID_ARGS @p aGpio or @p aMode is not supported.
* @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled.
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform.
*
*/
otError otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode);
@@ -207,7 +192,6 @@ otError otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode);
* @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported or @p aMode is NULL.
* @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled.
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform.
*
*/
otError otPlatDiagGpioGetMode(uint32_t aGpio, otGpioMode *aMode);
@@ -221,7 +205,6 @@ otError otPlatDiagGpioGetMode(uint32_t aGpio, otGpioMode *aMode);
* @retval OT_ERROR_NONE Successfully set the raw power setting.
* @retval OT_ERROR_INVALID_ARGS The @p aRawPowerSetting is NULL or the @p aRawPowerSettingLength is too long.
* @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented.
*
*/
otError otPlatDiagRadioSetRawPowerSetting(otInstance *aInstance,
const uint8_t *aRawPowerSetting,
@@ -240,7 +223,6 @@ otError otPlatDiagRadioSetRawPowerSetting(otInstance *aInstance,
* @aRawPowerSettingLength is too short.
* @retval OT_ERROR_NOT_FOUND The raw power setting is not set.
* @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented.
*
*/
otError otPlatDiagRadioGetRawPowerSetting(otInstance *aInstance,
uint8_t *aRawPowerSetting,
@@ -254,7 +236,6 @@ otError otPlatDiagRadioGetRawPowerSetting(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully enabled/disabled the raw power setting.
* @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented.
*
*/
otError otPlatDiagRadioRawPowerSettingEnable(otInstance *aInstance, bool aEnable);
@@ -267,7 +248,6 @@ otError otPlatDiagRadioRawPowerSettingEnable(otInstance *aInstance, bool aEnable
* @retval OT_ERROR_NONE Successfully enabled/disabled .
* @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state.
* @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented.
*
*/
otError otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable);
@@ -280,7 +260,6 @@ otError otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable);
* @retval OT_ERROR_NONE Successfully enabled/disabled.
* @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state.
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented.
*
*/
otError otPlatDiagRadioTransmitStream(otInstance *aInstance, bool aEnable);
@@ -300,7 +279,6 @@ otError otPlatDiagRadioTransmitStream(otInstance *aInstance, bool aEnable);
* @p aRawPowerSettingLength is NULL or @aRawPowerSettingLength is too short.
* @retval OT_ERROR_NOT_FOUND The power settings for the @p aChannel was not found.
* @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented.
*
*/
otError otPlatDiagRadioGetPowerSettings(otInstance *aInstance,
uint8_t aChannel,
@@ -311,7 +289,6 @@ otError otPlatDiagRadioGetPowerSettings(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
-7
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file defines the platform DNS interface.
*
*/
#ifndef OPENTHREAD_PLATFORM_DNS_H_
@@ -50,12 +49,10 @@ extern "C" {
* This module includes the platform abstraction for sending recursive DNS query to upstream DNS servers.
*
* @{
*
*/
/**
* This opaque type represents an upstream DNS query transaction.
*
*/
typedef struct otPlatDnsUpstreamQuery otPlatDnsUpstreamQuery;
@@ -71,7 +68,6 @@ typedef struct otPlatDnsUpstreamQuery otPlatDnsUpstreamQuery;
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aTxn A pointer to the opaque DNS query transaction object.
* @param[in] aQuery A message buffer of the DNS payload that should be sent to upstream DNS server.
*
*/
void otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, const otMessage *aQuery);
@@ -82,7 +78,6 @@ void otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aTxn A pointer to the opaque DNS query transaction object.
*
*/
void otPlatDnsCancelUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn);
@@ -98,13 +93,11 @@ void otPlatDnsCancelUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery
* @param[in] aTxn A pointer to the opaque DNS query transaction object.
* @param[in] aResponse A message buffer of the DNS response payload or `nullptr` to close a transaction without a
* response.
*
*/
extern void otPlatDnsUpstreamQueryDone(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, otMessage *aResponse);
/**
* @}
*
*/
#ifdef __cplusplus
-40
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file includes the platform abstraction for DNS-SD (e.g., mDNS) on the infrastructure network.
*
*/
#ifndef OPENTHREAD_PLATFORM_DNSSD_H_
@@ -56,12 +55,10 @@ extern "C" {
* @{
*
* The DNS-SD platform APIs are used only when `OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE` is enabled.
*
*/
/**
* Represents the state of the DNS-SD platform.
*
*/
typedef enum otPlatDnssdState
{
@@ -71,7 +68,6 @@ typedef enum otPlatDnssdState
/**
* Represents a request ID for registering/unregistering a service or host.
*
*/
typedef uint32_t otPlatDnssdRequestId;
@@ -85,7 +81,6 @@ typedef uint32_t otPlatDnssdRequestId;
* @param[in] aInstance The OpenThread instance.
* @param[in] aRequestId The request ID.
* @param[in] aError Error indicating the outcome of request.
*
*/
typedef void (*otPlatDnssdRegisterCallback)(otInstance *aInstance, otPlatDnssdRequestId aRequestId, otError aError);
@@ -93,7 +88,6 @@ typedef void (*otPlatDnssdRegisterCallback)(otInstance *aInstance, otPlatDnssdRe
* Represents a DNS-SD service.
*
* See `otPlatDnssdRegisterService()`, `otPlatDnssdUnregisterService()` for more details about fields in each case.
*
*/
typedef struct otPlatDnssdService
{
@@ -115,7 +109,6 @@ typedef struct otPlatDnssdService
* Represents a DNS-SD host.
*
* See `otPlatDnssdRegisterHost()`, `otPlatDnssdUnregisterHost()` for more details about fields in each case.
*
*/
typedef struct otPlatDnssdHost
{
@@ -130,7 +123,6 @@ typedef struct otPlatDnssdHost
* Represents a DNS-SD key record.
*
* See `otPlatDnssdRegisterKey()`, `otPlatDnssdUnregisterKey()` for more details about fields in each case.
*
*/
typedef struct otPlatDnssdKey
{
@@ -153,7 +145,6 @@ typedef struct otPlatDnssdKey
* resolvers are considered to be stopped, and any previously registered host, service, key entries as removed.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
extern void otPlatDnssdStateHandleStateChange(otInstance *aInstance);
@@ -166,7 +157,6 @@ extern void otPlatDnssdStateHandleStateChange(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance.
*
* @returns The current state of the DNS-SD module.
*
*/
otPlatDnssdState otPlatDnssdGetState(otInstance *aInstance);
@@ -222,7 +212,6 @@ otPlatDnssdState otPlatDnssdGetState(otInstance *aInstance);
* @param[in] aService Information about the service to register.
* @param[in] aRequestId The ID associated with this request.
* @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed).
*
*/
void otPlatDnssdRegisterService(otInstance *aInstance,
const otPlatDnssdService *aService,
@@ -259,7 +248,6 @@ void otPlatDnssdRegisterService(otInstance *aInstance,
* @param[in] aService Information about the service to unregister.
* @param[in] aRequestId The ID associated with this request.
* @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed).
*
*/
void otPlatDnssdUnregisterService(otInstance *aInstance,
const otPlatDnssdService *aService,
@@ -300,7 +288,6 @@ void otPlatDnssdUnregisterService(otInstance *aInstance,
* @param[in] aHost Information about the host to register.
* @param[in] aRequestId The ID associated with this request.
* @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed).
*
*/
void otPlatDnssdRegisterHost(otInstance *aInstance,
const otPlatDnssdHost *aHost,
@@ -338,7 +325,6 @@ void otPlatDnssdRegisterHost(otInstance *aInstance,
* @param[in] aHost Information about the host to unregister.
* @param[in] aRequestId The ID associated with this request.
* @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed).
*
*/
void otPlatDnssdUnregisterHost(otInstance *aInstance,
const otPlatDnssdHost *aHost,
@@ -375,7 +361,6 @@ void otPlatDnssdUnregisterHost(otInstance *aInstance,
* @param[in] aKey Information about the key record to register.
* @param[in] aRequestId The ID associated with this request.
* @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed).
*
*/
void otPlatDnssdRegisterKey(otInstance *aInstance,
const otPlatDnssdKey *aKey,
@@ -411,7 +396,6 @@ void otPlatDnssdRegisterKey(otInstance *aInstance,
* @param[in] aKey Information about the key to unregister.
* @param[in] aRequestId The ID associated with this request.
* @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed).
*
*/
void otPlatDnssdUnregisterKey(otInstance *aInstance,
const otPlatDnssdKey *aKey,
@@ -422,7 +406,6 @@ void otPlatDnssdUnregisterKey(otInstance *aInstance,
/**
* Represents a browse result.
*
*/
typedef struct otPlatDnssdBrowseResult
{
@@ -438,13 +421,11 @@ typedef struct otPlatDnssdBrowseResult
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResult The browse result.
*
*/
typedef void (*otPlatDnssdBrowseCallback)(otInstance *aInstance, const otPlatDnssdBrowseResult *aResult);
/**
* Represents a service browser.
*
*/
typedef struct otPlatDnssdBrowser
{
@@ -456,7 +437,6 @@ typedef struct otPlatDnssdBrowser
/**
* Represents an SRV resolver result.
*
*/
typedef struct otPlatDnssdSrvResult
{
@@ -475,13 +455,11 @@ typedef struct otPlatDnssdSrvResult
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResult The SRV resolve result.
*
*/
typedef void (*otPlatDnssdSrvCallback)(otInstance *aInstance, const otPlatDnssdSrvResult *aResult);
/**
* Represents an SRV service resolver.
*
*/
typedef struct otPlatDnssdSrvResolver
{
@@ -493,7 +471,6 @@ typedef struct otPlatDnssdSrvResolver
/**
* Represents a TXT resolver result.
*
*/
typedef struct otPlatDnssdTxtResult
{
@@ -510,13 +487,11 @@ typedef struct otPlatDnssdTxtResult
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResult The TXT resolve result.
*
*/
typedef void (*otPlatDnssdTxtCallback)(otInstance *aInstance, const otPlatDnssdTxtResult *aResult);
/**
* Represents a TXT service resolver.
*
*/
typedef struct otPlatDnssdTxtResolver
{
@@ -528,7 +503,6 @@ typedef struct otPlatDnssdTxtResolver
/**
* Represents a discovered host address and its TTL.
*
*/
typedef struct otPlatDnssdAddressAndTtl
{
@@ -538,7 +512,6 @@ typedef struct otPlatDnssdAddressAndTtl
/**
* Represents address resolver result.
*
*/
typedef struct otPlatDnssdAddressResult
{
@@ -553,13 +526,11 @@ typedef struct otPlatDnssdAddressResult
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResult The address resolve result.
*
*/
typedef void (*otPlatDnssdAddressCallback)(otInstance *aInstance, const otPlatDnssdAddressResult *aResult);
/**
* Represents an address resolver.
*
*/
typedef struct otPlatDnssdAddressResolver
{
@@ -586,7 +557,6 @@ typedef struct otPlatDnssdAddressResolver
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aBrowser The browser to be started.
*
*/
void otPlatDnssdStartBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aBrowser);
@@ -600,7 +570,6 @@ void otPlatDnssdStartBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aB
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aBrowser The browser to stop.
*
*/
void otPlatDnssdStopBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aBrowser);
@@ -624,7 +593,6 @@ void otPlatDnssdStopBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aBr
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to be started.
*
*/
void otPlatDnssdStartSrvResolver(otInstance *aInstance, const otPlatDnssdSrvResolver *aResolver);
@@ -638,7 +606,6 @@ void otPlatDnssdStartSrvResolver(otInstance *aInstance, const otPlatDnssdSrvReso
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to stop.
*
*/
void otPlatDnssdStopSrvResolver(otInstance *aInstance, const otPlatDnssdSrvResolver *aResolver);
@@ -662,7 +629,6 @@ void otPlatDnssdStopSrvResolver(otInstance *aInstance, const otPlatDnssdSrvResol
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to be started.
*
*/
void otPlatDnssdStartTxtResolver(otInstance *aInstance, const otPlatDnssdTxtResolver *aResolver);
@@ -676,7 +642,6 @@ void otPlatDnssdStartTxtResolver(otInstance *aInstance, const otPlatDnssdTxtReso
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to stop.
*
*/
void otPlatDnssdStopTxtResolver(otInstance *aInstance, const otPlatDnssdTxtResolver *aResolver);
@@ -700,7 +665,6 @@ void otPlatDnssdStopTxtResolver(otInstance *aInstance, const otPlatDnssdTxtResol
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to be started.
*
*/
void otPlatDnssdStartIp6AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver);
@@ -714,7 +678,6 @@ void otPlatDnssdStartIp6AddressResolver(otInstance *aInstance, const otPlatDnssd
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to stop.
*
*/
void otPlatDnssdStopIp6AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver);
@@ -739,7 +702,6 @@ void otPlatDnssdStopIp6AddressResolver(otInstance *aInstance, const otPlatDnssdA
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to be started.
*
*/
void otPlatDnssdStartIp4AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver);
@@ -753,13 +715,11 @@ void otPlatDnssdStartIp4AddressResolver(otInstance *aInstance, const otPlatDnssd
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aResolver The resolver to stop.
*
*/
void otPlatDnssdStopIp4AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver);
/**
* @}
*
*/
#ifdef __cplusplus
@@ -50,7 +50,6 @@ extern "C" {
* Represents a DSO connection.
*
* It is an opaque struct (the platform implementation only deals with pointers to this struct).
*
*/
typedef struct otPlatDsoConnection otPlatDsoConnection;
@@ -61,7 +60,6 @@ typedef struct otPlatDsoConnection otPlatDsoConnection;
* @param[in] aConnection A pointer to the DSO connection.
*
* @returns A pointer to the `otInstance`.
*
*/
extern otInstance *otPlatDsoGetInstance(otPlatDsoConnection *aConnection);
@@ -74,7 +72,6 @@ extern otInstance *otPlatDsoGetInstance(otPlatDsoConnection *aConnection);
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aEnable TRUE to start listening, FALSE to stop listening.
*
*/
void otPlatDsoEnableListening(otInstance *aInstance, bool aEnable);
@@ -93,7 +90,6 @@ void otPlatDsoEnableListening(otInstance *aInstance, bool aEnable);
* @param[in] aPeerSockAddr The socket address (IPv6 address and port number) of the peer requesting connection.
*
* @returns A pointer to the `otPlatDsoConnection` to use if to accept, or `NULL` if to reject.
*
*/
extern otPlatDsoConnection *otPlatDsoAccept(otInstance *aInstance, const otSockAddr *aPeerSockAddr);
@@ -105,7 +101,6 @@ extern otPlatDsoConnection *otPlatDsoAccept(otInstance *aInstance, const otSockA
*
* @param[in] aConnection The connection.
* @param[in] aPeerSockAddr The socket address (IPv6 address and port number) of the peer to connect to.
*
*/
void otPlatDsoConnect(otPlatDsoConnection *aConnection, const otSockAddr *aPeerSockAddr);
@@ -118,7 +113,6 @@ void otPlatDsoConnect(otPlatDsoConnection *aConnection, const otSockAddr *aPeerS
* Only after this callback, the connection can be used to send and receive messages.
*
* @param[in] aConnection The connection.
*
*/
extern void otPlatDsoHandleConnected(otPlatDsoConnection *aConnection);
@@ -137,7 +131,6 @@ extern void otPlatDsoHandleConnected(otPlatDsoConnection *aConnection);
*
* @param[in] aConnection The connection to send on.
* @param[in] aMessage The message to send.
*
*/
void otPlatDsoSend(otPlatDsoConnection *aConnection, otMessage *aMessage);
@@ -155,13 +148,11 @@ void otPlatDsoSend(otPlatDsoConnection *aConnection, otMessage *aMessage);
*
* @param[in] aConnection The connection on which the message was received.
* @param[in] aMessage The received message.
*
*/
extern void otPlatDsoHandleReceive(otPlatDsoConnection *aConnection, otMessage *aMessage);
/**
* Defines disconnect modes.
*
*/
typedef enum
{
@@ -178,7 +169,6 @@ typedef enum
*
* @param[in] aConnection The connection to disconnect
* @param[in] aMode The disconnect mode (close gracefully or forcibly abort).
*
*/
void otPlatDsoDisconnect(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMode aMode);
@@ -191,7 +181,6 @@ void otPlatDsoDisconnect(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMo
*
* @param[in] aConnection The connection which disconnected.
* @param[in] aMode The disconnect mode (closed gracefully or forcibly aborted).
*
*/
extern void otPlatDsoHandleDisconnected(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMode aMode);
-3
View File
@@ -50,7 +50,6 @@ extern "C" {
* This module includes the platform abstraction for entropy generation.
*
* @{
*
*/
/**
@@ -64,13 +63,11 @@ extern "C" {
* @retval OT_ERROR_NONE Successfully filled @p aBuffer with true random values.
* @retval OT_ERROR_FAILED Failed to fill @p aBuffer with true random values.
* @retval OT_ERROR_INVALID_ARGS @p aBuffer was set to NULL.
*
*/
otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength);
/**
* @}
*
*/
#ifdef __cplusplus
-6
View File
@@ -41,7 +41,6 @@ extern "C" {
* Initializes the flash driver.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatFlashInit(otInstance *aInstance);
@@ -51,7 +50,6 @@ void otPlatFlashInit(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The size of the swap space in bytes.
*
*/
uint32_t otPlatFlashGetSwapSize(otInstance *aInstance);
@@ -60,7 +58,6 @@ uint32_t otPlatFlashGetSwapSize(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aSwapIndex A value in [0, 1] that indicates the swap space.
*
*/
void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex);
@@ -72,7 +69,6 @@ void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex);
* @param[in] aOffset A byte offset within the swap space.
* @param[out] aData A pointer to the data buffer for reading.
* @param[in] aSize Number of bytes to read.
*
*/
void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, void *aData, uint32_t aSize);
@@ -84,8 +80,6 @@ void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset
* @param[in] aOffset A byte offset within the swap space.
* @param[out] aData A pointer to the data to write.
* @param[in] aSize Number of bytes to write.
*
*
*/
void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aData, uint32_t aSize);
-9
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file includes the platform abstraction for the infrastructure network interface.
*
*/
#ifndef OPENTHREAD_PLATFORM_INFRA_IF_H_
@@ -53,7 +52,6 @@ extern "C" {
* This module includes the platform abstraction for the adjacent infrastructure network interface.
*
* @{
*
*/
/**
@@ -63,7 +61,6 @@ extern "C" {
* @param[in] aAddress The IPv6 address.
*
* @returns TRUE if the infra interface has given IPv6 address assigned, FALSE otherwise.
*
*/
bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddress);
@@ -83,7 +80,6 @@ bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddres
*
* @retval OT_ERROR_NONE Successfully sent the ICMPv6 message.
* @retval OT_ERROR_FAILED Failed to send the ICMPv6 message.
*
*/
otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
const otIp6Address *aDestAddress,
@@ -104,7 +100,6 @@ otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
*
* @note Per RFC 4861, the caller should enforce that the source address MUST be a IPv6 link-local
* address and the IP Hop Limit MUST be 255.
*
*/
extern void otPlatInfraIfRecvIcmp6Nd(otInstance *aInstance,
uint32_t aInfraIfIndex,
@@ -129,7 +124,6 @@ extern void otPlatInfraIfRecvIcmp6Nd(otInstance *aInstance,
* @retval OT_ERROR_INVALID_STATE The Routing Manager is not initialized.
* @retval OT_ERROR_INVALID_ARGS The @p aInfraIfIndex doesn't match the infra interface the
* Routing Manager are initialized with.
*
*/
extern otError otPlatInfraIfStateChanged(otInstance *aInstance, uint32_t aInfraIfIndex, bool aIsRunning);
@@ -142,7 +136,6 @@ extern otError otPlatInfraIfStateChanged(otInstance *aInstance, uint32_t aInfraI
*
* @retval OT_ERROR_NONE Successfully request NAT64 prefix discovery.
* @retval OT_ERROR_FAILED Failed to request NAT64 prefix discovery.
*
*/
otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex);
@@ -156,7 +149,6 @@ otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex);
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aInfraIfIndex The index of the infrastructure interface on which the NAT64 prefix is discovered.
* @param[in] aIp6Prefix A pointer to NAT64 prefix.
*
*/
extern void otPlatInfraIfDiscoverNat64PrefixDone(otInstance *aInstance,
uint32_t aInfraIfIndex,
@@ -164,7 +156,6 @@ extern void otPlatInfraIfDiscoverNat64PrefixDone(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
-12
View File
@@ -49,7 +49,6 @@ extern "C" {
* This module includes the platform abstraction for the debug log service.
*
* @{
*
*/
/**
@@ -57,7 +56,6 @@ extern "C" {
*
* @note Log Levels are defines so that embedded implementations can eliminate code at compile time via
* #if/#else/#endif.
*
*/
#define OT_LOG_LEVEL_NONE 0
@@ -66,7 +64,6 @@ extern "C" {
*
* @note Log Levels are defines so that embedded implementations can eliminate code at compile time via
* #if/#else/#endif.
*
*/
#define OT_LOG_LEVEL_CRIT 1
@@ -75,7 +72,6 @@ extern "C" {
*
* @note Log Levels are defines so that embedded implementations can eliminate code at compile time via
* #if/#else/#endif.
*
*/
#define OT_LOG_LEVEL_WARN 2
@@ -84,7 +80,6 @@ extern "C" {
*
* @note Log Levels are defines so that embedded implementations can eliminate code at compile time via
* #if/#else/#endif.
*
*/
#define OT_LOG_LEVEL_NOTE 3
@@ -93,7 +88,6 @@ extern "C" {
*
* @note Log Levels are defines so that embedded implementations can eliminate code at compile time via
* #if/#else/#endif.
*
*/
#define OT_LOG_LEVEL_INFO 4
@@ -102,13 +96,11 @@ extern "C" {
*
* @note Log Levels are defines so that embedded implementations can eliminate code at compile time via
* #if/#else/#endif.
*
*/
#define OT_LOG_LEVEL_DEBG 5
/**
* Represents the log level.
*
*/
typedef int otLogLevel;
@@ -118,7 +110,6 @@ typedef int otLogLevel;
* The support for log region is removed and instead each core module can define its own name to appended to the logs.
* However, the `otLogRegion` enumeration is still defined as before to help with platforms which we may be using it
* in their `otPlatLog()` implementation. The OT core will always emit all logs with `OT_LOG_REGION_CORE`.
*
*/
typedef enum otLogRegion
{
@@ -157,7 +148,6 @@ typedef enum otLogRegion
* @param[in] aLogRegion The log region.
* @param[in] aFormat A pointer to the format string.
* @param[in] ... Arguments for the format specification.
*
*/
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...);
@@ -170,13 +160,11 @@ void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat
* @note Only applicable when `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1`.
*
* @param[in] aLogLevel The new OpenThread log level.
*
*/
void otPlatLogHandleLevelChanged(otLogLevel aLogLevel);
/**
* @}
*
*/
#ifdef __cplusplus
@@ -30,7 +30,6 @@
* @file
* @brief
* This file includes the platform abstraction for mDNS socket.
*
*/
#ifndef OPENTHREAD_PLATFORM_MULTICAST_DNS_SOCKET_H_
@@ -53,12 +52,10 @@ extern "C" {
* This module defines platform APIs for Multicast DNS (mDNS) socket.
*
* @{
*
*/
/**
* Represents a socket address info.
*
*/
typedef struct otPlatMdnsAddressInfo
{
@@ -84,7 +81,6 @@ typedef struct otPlatMdnsAddressInfo
*
* @retval OT_ERROR_NONE Successfully enabled/disabled listening for mDNS messages.
* @retval OT_ERROR_FAILED Failed to enable/disable listening for mDNS messages.
*
*/
otError otPlatMdnsSetListeningEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfIndex);
@@ -107,7 +103,6 @@ otError otPlatMdnsSetListeningEnabled(otInstance *aInstance, bool aEnable, uint3
* @param[in] aInstance The OpenThread instance.
* @param[in] aMessage The mDNS message to multicast. Ownership is transferred to the platform layer.
* @param[in] aInfraIfIndex The infrastructure network interface index.
*
*/
void otPlatMdnsSendMulticast(otInstance *aInstance, otMessage *aMessage, uint32_t aInfraIfIndex);
@@ -133,7 +128,6 @@ void otPlatMdnsSendMulticast(otInstance *aInstance, otMessage *aMessage, uint32_
* @param[in] aInstance The OpenThread instance.
* @param[in] aMessage The mDNS message to multicast. Ownership is transferred to platform layer.
* @param[in] aAddress The destination address info.
*
*/
void otPlatMdnsSendUnicast(otInstance *aInstance, otMessage *aMessage, const otPlatMdnsAddressInfo *aAddress);
@@ -154,7 +148,6 @@ void otPlatMdnsSendUnicast(otInstance *aInstance, otMessage *aMessage, const otP
* @param[in] aMessage The received mDNS message. Ownership is transferred to the OpenThread stack.
* @param[in] aIsUnicast Indicates whether the received message is unicast or multicast.
* @param[in] aAddress The sender's address info.
*
*/
extern void otPlatMdnsHandleReceive(otInstance *aInstance,
otMessage *aMessage,
@@ -163,7 +156,6 @@ extern void otPlatMdnsHandleReceive(otInstance *aInstance,
/**
* @}
*
*/
#ifdef __cplusplus
-2
View File
@@ -48,7 +48,6 @@ extern "C" {
* This module includes the platform abstraction for dynamic memory allocation.
*
* @{
*
*/
/*
@@ -84,7 +83,6 @@ void otPlatFree(void *aPtr);
/**
* @}
*
*/
#ifdef __cplusplus
@@ -46,7 +46,6 @@
* This module includes the platform abstraction for the message pool.
*
* @{
*
*/
#ifdef __cplusplus
@@ -55,7 +54,6 @@ extern "C" {
/**
* Represents an OpenThread message buffer.
*
*/
typedef struct otMessageBuffer
{
@@ -70,7 +68,6 @@ typedef struct otMessageBuffer
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[in] aMinNumFreeBuffers An uint16 containing the minimum number of free buffers desired by OpenThread.
* @param[in] aBufferSize The size in bytes of a buffer object.
*
*/
void otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize);
@@ -84,7 +81,6 @@ void otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, s
* @param[in] aInstance A pointer to the OpenThread instance.
*
* @returns A pointer to the buffer or NULL if no buffers are available.
*
*/
otMessageBuffer *otPlatMessagePoolNew(otInstance *aInstance);
@@ -95,7 +91,6 @@ otMessageBuffer *otPlatMessagePoolNew(otInstance *aInstance);
*
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[in] aBuffer The buffer to free.
*
*/
void otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer);
@@ -107,7 +102,6 @@ void otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer);
* @param[in] aInstance A pointer to the OpenThread instance.
*
* @returns The number of buffers currently free and available to OpenThread.
*
*/
uint16_t otPlatMessagePoolNumFreeBuffers(otInstance *aInstance);
@@ -117,7 +111,6 @@ uint16_t otPlatMessagePoolNumFreeBuffers(otInstance *aInstance);
/**
* @}
*
*/
#endif // OPENTHREAD_PLATFORM_MESSAGEPOOL_H_
-14
View File
@@ -50,14 +50,12 @@ extern "C" {
* This module includes platform abstractions for miscellaneous behaviors.
*
* @{
*
*/
/**
* Performs a software reset on the platform, if supported.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatReset(otInstance *aInstance);
@@ -71,7 +69,6 @@ void otPlatReset(otInstance *aInstance);
* @retval OT_ERROR_NONE Reset to bootloader successfully.
* @retval OT_ERROR_BUSY Failed due to another operation is ongoing.
* @retval OT_ERROR_NOT_CAPABLE Not capable of resetting to bootloader.
*
*/
otError otPlatResetToBootloader(otInstance *aInstance);
@@ -79,7 +76,6 @@ otError otPlatResetToBootloader(otInstance *aInstance);
* Enumeration of possible reset reason codes.
*
* These are in the same order as the Spinel reset reason codes.
*
*/
typedef enum
{
@@ -100,7 +96,6 @@ typedef enum
* Returns the reason for the last platform reset.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
otPlatResetReason otPlatGetResetReason(otInstance *aInstance);
@@ -109,14 +104,12 @@ otPlatResetReason otPlatGetResetReason(otInstance *aInstance);
*
* @param[in] aFilename The name of the file where the assert occurred.
* @param[in] aLineNumber The line number in the file where the assert occurred.
*
*/
void otPlatAssertFail(const char *aFilename, int aLineNumber);
/**
* Performs a platform specific operation to wake the host MCU.
* This is used only for NCP configurations.
*
*/
void otPlatWakeHost(void);
@@ -133,7 +126,6 @@ void otPlatWakeHost(void);
* external trigger (a "poke") to NCP before it can communicate with the NCP or not.
*
* After a reset, the MCU power state MUST be `OT_PLAT_POWER_STATE_ON`.
*
*/
typedef enum
{
@@ -144,7 +136,6 @@ typedef enum
* external triggers.
*
* @note The `ON` power state only determines the MCU's power mode and is not related to radio's state.
*
*/
OT_PLAT_MCU_POWER_STATE_ON = 0,
@@ -162,7 +153,6 @@ typedef enum
*
* @note The `LOW_POWER` power state only determines the MCU's power mode and is not related to radio's state
* (radio is managed by OpenThread core and device role, e.g., device being sleepy or not.
*
*/
OT_PLAT_MCU_POWER_STATE_LOW_POWER = 1,
@@ -171,7 +161,6 @@ typedef enum
*
* An NCP hardware reset (via a RESET pin) is required to bring the NCP back to `SPINEL_MCU_POWER_STATE_ON`.
* RAM is not retained after reset.
*
*/
OT_PLAT_MCU_POWER_STATE_OFF = 2,
} otPlatMcuPowerState;
@@ -187,7 +176,6 @@ typedef enum
*
* @retval OT_ERROR_NONE The power state updated successfully.
* @retval OT_ERROR_FAILED The given MCU power state is not supported by the platform.
*
*/
otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState);
@@ -203,7 +191,6 @@ otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState
* @param[in] aInstance A pointer to OpenThread instance.
*
* @returns The current power state.
*
*/
otPlatMcuPowerState otPlatGetMcuPowerState(otInstance *aInstance);
@@ -219,7 +206,6 @@ otError otPlatLogCrashDump(void);
/**
* @}
*
*/
#ifdef __cplusplus
-6
View File
@@ -41,7 +41,6 @@
*
* Full multipan RCP and Automatic Switching RCP do not require any special care from the host side.
* Manual Switching RCP requires host to switch currently active network.
*
*/
#ifndef OPENTHREAD_PLATFORM_MULTIPAN_H_
@@ -63,7 +62,6 @@ extern "C" {
* This module includes the platform abstraction for multipan support.
*
* @{
*
*/
/**
@@ -77,7 +75,6 @@ extern "C" {
* @retval OT_ERROR_NONE Successfully retrieved the property.
* @retval OT_ERROR_NOT_IMPLEMENTED Failed due to lack of the support in radio.
* @retval OT_ERROR_INVALID_COMMAND Platform supports all interfaces simultaneously.
*
*/
otError otPlatMultipanGetActiveInstance(otInstance **aInstance);
@@ -99,7 +96,6 @@ otError otPlatMultipanGetActiveInstance(otInstance **aInstance);
* @retval OT_ERROR_NOT_IMPLEMENTED Failed due to unknown instance or more instances than interfaces available.
* @retval OT_ERROR_INVALID_COMMAND Platform supports all interfaces simultaneously.
* @retval OT_ERROR_ALREADY Given interface is already active.
*
*/
otError otPlatMultipanSetActiveInstance(otInstance *aInstance, bool aCompletePending);
@@ -111,7 +107,6 @@ otError otPlatMultipanSetActiveInstance(otInstance *aInstance, bool aCompletePen
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aSuccess True if successfully switched the interfaces, false if switching failed.
*
*/
extern void otPlatMultipanSwitchoverDone(otInstance *aInstance, bool aSuccess);
@@ -135,7 +130,6 @@ uint8_t otPlatMultipanInstanceToIid(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-3
View File
@@ -50,7 +50,6 @@ extern "C" {
* This module includes the platform abstraction for OTNS.
*
* @{
*
*/
/**
@@ -67,13 +66,11 @@ extern "C" {
* Currently, OTNS only supports virtual time simulation.
*
* @param[in] aStatus The status string.
*
*/
void otPlatOtnsStatus(const char *aStatus);
/**
* @}
*
*/
#ifdef __cplusplus
-91
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file defines the radio interface for OpenThread.
*
*/
#ifndef OPENTHREAD_PLATFORM_RADIO_H_
@@ -53,7 +52,6 @@ extern "C" {
* This module includes the platform abstraction for radio communication.
*
* @{
*
*/
/**
@@ -63,7 +61,6 @@ extern "C" {
* This module includes the platform abstraction for a radio frame.
*
* @{
*
*/
enum
@@ -89,7 +86,6 @@ enum
/**
* Defines the channel page.
*
*/
enum
{
@@ -101,7 +97,6 @@ enum
/**
* Defines the frequency band channel range.
*
*/
enum
{
@@ -117,13 +112,11 @@ enum
* Represents radio capabilities.
*
* The value is a bit-field indicating the capabilities supported by the radio. See `OT_RADIO_CAPS_*` definitions.
*
*/
typedef uint16_t otRadioCaps;
/**
* Defines constants that are used to indicate different radio capabilities. See `otRadioCaps`.
*
*/
enum
{
@@ -144,13 +137,11 @@ enum
/**
* Represents the IEEE 802.15.4 PAN ID.
*
*/
typedef uint16_t otPanId;
/**
* Represents the IEEE 802.15.4 Short Address.
*
*/
typedef uint16_t otShortAddress;
@@ -158,7 +149,6 @@ typedef uint16_t otShortAddress;
/**
* Defines constants about size of header IE in ACK.
*
*/
enum
{
@@ -175,7 +165,6 @@ enum
* @struct otExtAddress
*
* Represents the IEEE 802.15.4 Extended Address.
*
*/
OT_TOOL_PACKED_BEGIN
struct otExtAddress
@@ -185,7 +174,6 @@ struct otExtAddress
/**
* Represents the IEEE 802.15.4 Extended Address.
*
*/
typedef struct otExtAddress otExtAddress;
@@ -195,7 +183,6 @@ typedef struct otExtAddress otExtAddress;
* @struct otMacKey
*
* Represents a MAC Key.
*
*/
OT_TOOL_PACKED_BEGIN
struct otMacKey
@@ -205,13 +192,11 @@ struct otMacKey
/**
* Represents a MAC Key.
*
*/
typedef struct otMacKey otMacKey;
/**
* Represents a MAC Key Ref used by PSA.
*
*/
typedef otCryptoKeyRef otMacKeyRef;
@@ -219,7 +204,6 @@ typedef otCryptoKeyRef otMacKeyRef;
* @struct otMacKeyMaterial
*
* Represents a MAC Key.
*
*/
typedef struct otMacKeyMaterial
{
@@ -232,7 +216,6 @@ typedef struct otMacKeyMaterial
/**
* Defines constants about key types.
*
*/
typedef enum
{
@@ -312,7 +295,6 @@ typedef struct otRadioFrame
* The switch to the RX channel MUST happen after the frame TX is fully done, i.e., after all retries and
* when ack is received (when "Ack Request" flag is set on the TX frame) or ack timeout. Note that ack is
* expected on the same channel that frame is sent on.
*
*/
uint8_t mRxChannelAfterTxDone;
@@ -331,7 +313,6 @@ typedef struct otRadioFrame
* 2. The power limit set by otPlatRadioSetChannelTargetPower(),
* 3. The power limit set by otPlatRadioSetChannelMaxTransmitPower(),
* 4. The power limit set by otPlatRadioSetRegion().
*
*/
int8_t mTxPower;
@@ -354,7 +335,6 @@ typedef struct otRadioFrame
* however if the the transmission gets aborted and the frame is never sent over the air (e.g., channel
* access error) the platform may choose to not update the header. If the platform updates the header,
* it must also set this flag before passing the frame back from the `otPlatRadioTxDone()` callback.
*
*/
bool mIsHeaderUpdated : 1;
bool mIsARetx : 1; ///< Indicates whether the frame is a retransmission or not.
@@ -367,7 +347,6 @@ typedef struct otRadioFrame
* the SFD was present at the local antenna.
*
* The platform should update this field before otPlatRadioTxStarted() is fired for each transmit attempt.
*
*/
uint64_t mTimestamp;
} mTxInfo;
@@ -453,7 +432,6 @@ typedef struct otRadioCoexMetrics
/**
* Represents what metrics are specified to query.
*
*/
typedef struct otLinkMetrics
{
@@ -466,7 +444,6 @@ typedef struct otLinkMetrics
/**
* @}
*
*/
/**
@@ -476,7 +453,6 @@ typedef struct otLinkMetrics
* This module includes the platform abstraction for radio configuration.
*
* @{
*
*/
/**
@@ -485,7 +461,6 @@ typedef struct otLinkMetrics
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The radio capability bit vector (see `OT_RADIO_CAP_*` definitions).
*
*/
otRadioCaps otPlatRadioGetCaps(otInstance *aInstance);
@@ -498,7 +473,6 @@ otRadioCaps otPlatRadioGetCaps(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns A pointer to the OpenThread radio version.
*
*/
const char *otPlatRadioGetVersionString(otInstance *aInstance);
@@ -508,7 +482,6 @@ const char *otPlatRadioGetVersionString(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The radio receive sensitivity value in dBm.
*
*/
int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance);
@@ -517,7 +490,6 @@ int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[out] aIeeeEui64 A pointer to the factory-assigned IEEE EUI-64.
*
*/
void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64);
@@ -526,7 +498,6 @@ void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aPanId The IEEE 802.15.4 PAN ID.
*
*/
void otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanId);
@@ -535,8 +506,6 @@ void otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanId);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aExtAddress A pointer to the IEEE 802.15.4 Extended Address stored in little-endian byte order.
*
*
*/
void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -545,7 +514,6 @@ void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aE
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aShortAddress The IEEE 802.15.4 Short Address.
*
*/
void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddress);
@@ -561,7 +529,6 @@ void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddr
* @retval OT_ERROR_NONE Successfully retrieved the transmit power.
* @retval OT_ERROR_INVALID_ARGS @p aPower was NULL.
* @retval OT_ERROR_NOT_IMPLEMENTED Transmit power configuration via dBm is not implemented.
*
*/
otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower);
@@ -576,7 +543,6 @@ otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower);
*
* @retval OT_ERROR_NONE Successfully set the transmit power.
* @retval OT_ERROR_NOT_IMPLEMENTED Transmit power configuration via dBm is not implemented.
*
*/
otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower);
@@ -589,7 +555,6 @@ otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower);
* @retval OT_ERROR_NONE Successfully retrieved the CCA ED threshold.
* @retval OT_ERROR_INVALID_ARGS @p aThreshold was NULL.
* @retval OT_ERROR_NOT_IMPLEMENTED CCA ED threshold configuration via dBm is not implemented.
*
*/
otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aThreshold);
@@ -602,7 +567,6 @@ otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aT
* @retval OT_ERROR_NONE Successfully set the transmit power.
* @retval OT_ERROR_INVALID_ARGS Given threshold is out of range.
* @retval OT_ERROR_NOT_IMPLEMENTED CCA ED threshold configuration via dBm is not implemented.
*
*/
otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aThreshold);
@@ -615,7 +579,6 @@ otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aTh
* @retval OT_ERROR_NONE Successfully retrieved the external FEM's LNA gain.
* @retval OT_ERROR_INVALID_ARGS @p aGain was NULL.
* @retval OT_ERROR_NOT_IMPLEMENTED External FEM's LNA setting is not implemented.
*
*/
otError otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain);
@@ -627,7 +590,6 @@ otError otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain);
*
* @retval OT_ERROR_NONE Successfully set the external FEM's LNA gain.
* @retval OT_ERROR_NOT_IMPLEMENTED External FEM's LNA gain setting is not implemented.
*
*/
otError otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain);
@@ -638,7 +600,6 @@ otError otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain);
*
* @retval TRUE Promiscuous mode is enabled.
* @retval FALSE Promiscuous mode is disabled.
*
*/
bool otPlatRadioGetPromiscuous(otInstance *aInstance);
@@ -647,7 +608,6 @@ bool otPlatRadioGetPromiscuous(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aEnable TRUE to enable or FALSE to disable promiscuous mode.
*
*/
void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable);
@@ -683,7 +643,6 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aEnable TRUE to keep radio in Receive state, FALSE to put to Sleep state during idle periods.
*
*/
void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable);
@@ -699,7 +658,6 @@ void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable);
* @param[in] aCurrKey A pointer to the current MAC key.
* @param[in] aNextKey A pointer to the next MAC key.
* @param[in] aKeyType Key Type used.
*
*/
void otPlatRadioSetMacKey(otInstance *aInstance,
uint8_t aKeyIdMode,
@@ -716,7 +674,6 @@ void otPlatRadioSetMacKey(otInstance *aInstance,
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMacFrameCounter The MAC frame counter value.
*
*/
void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter);
@@ -727,7 +684,6 @@ void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCoun
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aMacFrameCounter The MAC frame counter value.
*
*/
void otPlatRadioSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacFrameCounter);
@@ -751,7 +707,6 @@ void otPlatRadioSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacF
*
* @returns The current time in microseconds. UINT64_MAX when platform does not
* support or radio time is not ready.
*
*/
uint64_t otPlatRadioGetNow(otInstance *aInstance);
@@ -762,7 +717,6 @@ uint64_t otPlatRadioGetNow(otInstance *aInstance);
*
* @returns The bus speed in bits/second between the host and the radio chip.
* Return 0 when the MAC and above layer and Radio layer resides on the same chip.
*
*/
uint32_t otPlatRadioGetBusSpeed(otInstance *aInstance);
@@ -773,13 +727,11 @@ uint32_t otPlatRadioGetBusSpeed(otInstance *aInstance);
*
* @returns The bus latency in microseconds between the host and the radio chip.
* Return 0 when the MAC and above layer and Radio layer resides on the same chip.
*
*/
uint32_t otPlatRadioGetBusLatency(otInstance *aInstance);
/**
* @}
*
*/
/**
@@ -789,7 +741,6 @@ uint32_t otPlatRadioGetBusLatency(otInstance *aInstance);
* This module includes the platform abstraction for radio operations.
*
* @{
*
*/
/**
@@ -802,7 +753,6 @@ uint32_t otPlatRadioGetBusLatency(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @return Current state of the radio.
*
*/
otRadioState otPlatRadioGetState(otInstance *aInstance);
@@ -813,7 +763,6 @@ otRadioState otPlatRadioGetState(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully enabled.
* @retval OT_ERROR_FAILED The radio could not be enabled.
*
*/
otError otPlatRadioEnable(otInstance *aInstance);
@@ -824,7 +773,6 @@ otError otPlatRadioEnable(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully transitioned to Disabled.
* @retval OT_ERROR_INVALID_STATE The radio was not in sleep state.
*
*/
otError otPlatRadioDisable(otInstance *aInstance);
@@ -834,7 +782,6 @@ otError otPlatRadioDisable(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns TRUE if the radio is enabled, FALSE otherwise.
*
*/
bool otPlatRadioIsEnabled(otInstance *aInstance);
@@ -846,7 +793,6 @@ bool otPlatRadioIsEnabled(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully transitioned to Sleep.
* @retval OT_ERROR_BUSY The radio was transmitting.
* @retval OT_ERROR_INVALID_STATE The radio was disabled.
*
*/
otError otPlatRadioSleep(otInstance *aInstance);
@@ -858,7 +804,6 @@ otError otPlatRadioSleep(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully transitioned to Receive.
* @retval OT_ERROR_INVALID_STATE The radio was disabled or transmitting.
*
*/
otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel);
@@ -891,7 +836,6 @@ otError otPlatRadioReceiveAt(otInstance *aInstance, uint8_t aChannel, uint32_t a
* @param[in] aError OT_ERROR_NONE when successfully received a frame,
* OT_ERROR_ABORT when reception was aborted and a frame was not received,
* OT_ERROR_NO_BUFS when a frame could not be received due to lack of rx buffer space.
*
*/
extern void otPlatRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError);
@@ -905,7 +849,6 @@ extern void otPlatRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame,
* @param[in] aError OT_ERROR_NONE when successfully received a frame,
* OT_ERROR_ABORT when reception was aborted and a frame was not received,
* OT_ERROR_NO_BUFS when a frame could not be received due to lack of rx buffer space.
*
*/
extern void otPlatDiagRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError);
@@ -917,7 +860,6 @@ extern void otPlatDiagRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFra
* @param[in] aInstance The OpenThread instance structure.
*
* @returns A pointer to the transmit frame buffer.
*
*/
otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance);
@@ -938,7 +880,6 @@ otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully transitioned to Transmit.
* @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state.
*
*/
otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame);
@@ -950,7 +891,6 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame);
*
* @param[in] aInstance A pointer to the OpenThread instance structure.
* @param[in] aFrame A pointer to the frame that is being transmitted.
*
*/
extern void otPlatRadioTxStarted(otInstance *aInstance, otRadioFrame *aFrame);
@@ -968,7 +908,6 @@ extern void otPlatRadioTxStarted(otInstance *aInstance, otRadioFrame *aFrame);
* OT_ERROR_NO_ACK when the frame was transmitted but no ACK was received,
* OT_ERROR_CHANNEL_ACCESS_FAILURE tx could not take place due to activity on the channel,
* OT_ERROR_ABORT when transmission was aborted for other reasons.
*
*/
extern void otPlatRadioTxDone(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError);
@@ -982,7 +921,6 @@ extern void otPlatRadioTxDone(otInstance *aInstance, otRadioFrame *aFrame, otRad
* @param[in] aError OT_ERROR_NONE when the frame was transmitted,
* OT_ERROR_CHANNEL_ACCESS_FAILURE tx could not take place due to activity on the channel,
* OT_ERROR_ABORT when transmission was aborted for other reasons.
*
*/
extern void otPlatDiagRadioTransmitDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError);
@@ -992,7 +930,6 @@ extern void otPlatDiagRadioTransmitDone(otInstance *aInstance, otRadioFrame *aFr
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid.
*
*/
int8_t otPlatRadioGetRssi(otInstance *aInstance);
@@ -1008,7 +945,6 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully started scanning the channel.
* @retval OT_ERROR_BUSY The radio is performing energy scanning.
* @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn't support energy scanning.
*
*/
otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration);
@@ -1019,7 +955,6 @@ otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint1
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel.
*
*/
extern void otPlatRadioEnergyScanDone(otInstance *aInstance, int8_t aEnergyScanMaxRssi);
@@ -1027,7 +962,6 @@ extern void otPlatRadioEnergyScanDone(otInstance *aInstance, int8_t aEnergyScanM
* The radio driver calls this method to notify OpenThread that the spinel bus latency has been changed.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
extern void otPlatRadioBusLatencyChanged(otInstance *aInstance);
@@ -1047,7 +981,6 @@ extern void otPlatRadioBusLatencyChanged(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aEnable Enable/disable source address match feature.
*
*/
void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable);
@@ -1059,7 +992,6 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable);
*
* @retval OT_ERROR_NONE Successfully added short address to the source match table.
* @retval OT_ERROR_NO_BUFS No available entry in the source match table.
*
*/
otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, otShortAddress aShortAddress);
@@ -1071,7 +1003,6 @@ otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, otShortAddress a
*
* @retval OT_ERROR_NONE Successfully added extended address to the source match table.
* @retval OT_ERROR_NO_BUFS No available entry in the source match table.
*
*/
otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -1083,7 +1014,6 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress
*
* @retval OT_ERROR_NONE Successfully removed short address from the source match table.
* @retval OT_ERROR_NO_ADDRESS The short address is not in source address match table.
*
*/
otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, otShortAddress aShortAddress);
@@ -1095,7 +1025,6 @@ otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, otShortAddress
*
* @retval OT_ERROR_NONE Successfully removed the extended address from the source match table.
* @retval OT_ERROR_NO_ADDRESS The extended address is not in source address match table.
*
*/
otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress);
@@ -1103,7 +1032,6 @@ otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddre
* Clear all short addresses from the source address match table.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance);
@@ -1111,7 +1039,6 @@ void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance);
* Clear all the extended/long addresses from source address match table.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance);
@@ -1121,7 +1048,6 @@ void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The radio supported channel mask.
*
*/
uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance);
@@ -1131,7 +1057,6 @@ uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns The radio preferred channel mask.
*
*/
uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance);
@@ -1145,7 +1070,6 @@ uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance);
*
* @retval OT_ERROR_NONE Successfully enabled.
* @retval OT_ERROR_FAILED The radio coex could not be enabled.
*
*/
otError otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled);
@@ -1157,7 +1081,6 @@ otError otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled);
* @param[in] aInstance The OpenThread instance structure.
*
* @returns TRUE if the radio coex is enabled, FALSE otherwise.
*
*/
bool otPlatRadioIsCoexEnabled(otInstance *aInstance);
@@ -1187,7 +1110,6 @@ otError otPlatRadioGetCoexMetrics(otInstance *aInstance, otRadioCoexMetrics *aCo
* @retval OT_ERROR_NOT_IMPLEMENTED Radio driver doesn't support CSL.
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully enabled or disabled CSL.
*
*/
otError otPlatRadioEnableCsl(otInstance *aInstance,
uint32_t aCslPeriod,
@@ -1204,7 +1126,6 @@ otError otPlatRadioEnableCsl(otInstance *aInstance,
* @retval OT_ERROR_NOT_IMPLEMENTED Radio driver doesn't support CSL.
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully disabled CSL.
*
*/
otError otPlatRadioResetCsl(otInstance *aInstance);
@@ -1240,7 +1161,6 @@ void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTi
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The current CSL rx/tx scheduling drift, in PPM.
*
*/
uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance);
@@ -1259,7 +1179,6 @@ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance);
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The CSL Uncertainty in units of 10 us.
*
*/
uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance);
@@ -1274,7 +1193,6 @@ uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance);
* @retval OT_ERROR_INVALID_ARGS The specified channel is not valid.
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully set max transmit power.
*
*/
otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aChannel, int8_t aMaxPower);
@@ -1291,7 +1209,6 @@ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aCh
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully set region code.
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
*
*/
otError otPlatRadioSetRegion(otInstance *aInstance, uint16_t aRegionCode);
@@ -1308,7 +1225,6 @@ otError otPlatRadioSetRegion(otInstance *aInstance, uint16_t aRegionCode);
* @retval OT_ERROR_FAILED Other platform specific errors.
* @retval OT_ERROR_NONE Successfully got region code.
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
*
*/
otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode);
@@ -1331,7 +1247,6 @@ otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode);
* @retval OT_ERROR_NOT_FOUND The Initiator indicated by @p aShortAddress is not found when trying to clear.
* @retval OT_ERROR_NO_BUFS No more Initiator can be supported.
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
*
*/
otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance,
otLinkMetrics aLinkMetrics,
@@ -1362,7 +1277,6 @@ otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance,
* @retval OT_ERROR_INVALID_ARGS The @p aChannel, @p aActualPower or @p aRawPowerSetting is invalid or the
* @p aActualPower already exists in the power calibration table.
* @retval OT_ERROR_NOT_IMPLEMENTED This feature is not implemented.
*
*/
otError otPlatRadioAddCalibratedPower(otInstance *aInstance,
uint8_t aChannel,
@@ -1379,7 +1293,6 @@ otError otPlatRadioAddCalibratedPower(otInstance *aInstance,
*
* @retval OT_ERROR_NONE Successfully cleared all calibrated powers from the power calibration table.
* @retval OT_ERROR_NOT_IMPLEMENTED This feature is not implemented.
*
*/
otError otPlatRadioClearCalibratedPowers(otInstance *aInstance);
@@ -1403,7 +1316,6 @@ otError otPlatRadioClearCalibratedPowers(otInstance *aInstance);
* @retval OT_ERROR_NONE Successfully set the target power.
* @retval OT_ERROR_INVALID_ARGS The @p aChannel is invalid.
* @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented.
*
*/
otError otPlatRadioSetChannelTargetPower(otInstance *aInstance, uint8_t aChannel, int16_t aTargetPower);
@@ -1428,7 +1340,6 @@ otError otPlatRadioSetChannelTargetPower(otInstance *aInstance, uint8_t aChannel
* @retval OT_ERROR_INVALID_ARGS The @p aChannel is invalid, @p aRawPowerSetting or @p aRawPowerSettingLength is NULL
* or @aRawPowerSettingLength is too short.
* @retval OT_ERROR_NOT_FOUND The raw power setting for the @p aChannel was not found.
*
*/
extern otError otPlatRadioGetRawPowerSetting(otInstance *aInstance,
uint8_t aChannel,
@@ -1437,12 +1348,10 @@ extern otError otPlatRadioGetRawPowerSetting(otInstance *aInstance,
/**
* @}
*
*/
/**
* @}
*
*/
#ifdef __cplusplus
-5
View File
@@ -48,7 +48,6 @@ extern "C" {
* This module includes the platform abstraction for non-volatile storage of settings.
*
* @{
*
*/
/**
@@ -57,7 +56,6 @@ extern "C" {
* Note: When adding a new settings key, if the settings corresponding to the key contains security sensitive
* information, the developer MUST add the key to the array `aSensitiveKeys` which is passed in
* `otPlatSettingsInit()`.
*
*/
enum
{
@@ -98,7 +96,6 @@ enum
* @param[in] aSensitiveKeys A pointer to an array containing the list of sensitive keys. May be NULL only if
* @p aSensitiveKeysLength is 0, which means that there is no sensitive keys.
* @param[in] aSensitiveKeysLength The number of entries in the @p aSensitiveKeys array.
*
*/
void otPlatSettingsInit(otInstance *aInstance, const uint16_t *aSensitiveKeys, uint16_t aSensitiveKeysLength);
@@ -106,7 +103,6 @@ void otPlatSettingsInit(otInstance *aInstance, const uint16_t *aSensitiveKeys, u
* Performs any de-initialization for the settings subsystem, if necessary.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatSettingsDeinit(otInstance *aInstance);
@@ -244,7 +240,6 @@ void otPlatSettingsWipe(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-5
View File
@@ -51,7 +51,6 @@ extern "C" {
* This module includes the platform abstraction for SPI slave communication.
*
* @{
*
*/
/**
@@ -92,7 +91,6 @@ typedef bool (*otPlatSpiSlaveTransactionCompleteCallback)(void *aContext,
* callback MUST be called from the same OS context as any other OpenThread API/callback.
*
* @param[in] aContext Context pointer passed into `otPlatSpiSlaveEnable()`.
*
*/
typedef void (*otPlatSpiSlaveTransactionProcessCallback)(void *aContext);
@@ -111,7 +109,6 @@ typedef void (*otPlatSpiSlaveTransactionProcessCallback)(void *aContext);
* @retval OT_ERROR_NONE Successfully enabled the SPI Slave interface.
* @retval OT_ERROR_ALREADY SPI Slave interface is already enabled.
* @retval OT_ERROR_FAILED Failed to enable the SPI Slave interface.
*
*/
otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
otPlatSpiSlaveTransactionProcessCallback aProcessCallback,
@@ -161,7 +158,6 @@ void otPlatSpiSlaveDisable(void);
* @retval OT_ERROR_NONE Transaction was successfully prepared.
* @retval OT_ERROR_BUSY A transaction is currently in progress.
* @retval OT_ERROR_INVALID_STATE otPlatSpiSlaveEnable() hasn't been called.
*
*/
otError otPlatSpiSlavePrepareTransaction(uint8_t *aOutputBuf,
uint16_t aOutputBufLen,
@@ -171,7 +167,6 @@ otError otPlatSpiSlavePrepareTransaction(uint8_t *aOutputBuf,
/**
* @}
*
*/
#ifdef __cplusplus
-4
View File
@@ -53,7 +53,6 @@ extern "C" {
* This module includes the platform abstraction for the time service.
*
* @{
*
*/
/**
@@ -73,7 +72,6 @@ extern "C" {
* accuracy limits announced by @ref otPlatTimeGetXtalAccuracy.
*
* @returns The current time in microseconds.
*
*/
uint64_t otPlatTimeGet(void);
@@ -90,13 +88,11 @@ uint64_t otPlatTimeGet(void);
* implementation.
*
* @returns The current platform clock accuracy, in PPM.
*
*/
uint16_t otPlatTimeGetXtalAccuracy(void);
/**
* @}
*
*/
#ifdef __cplusplus
-11
View File
@@ -51,7 +51,6 @@
* @endcode
*
* @{
*
*/
#ifndef OPENTHREAD_PLATFORM_TOOLCHAIN_H_
@@ -74,7 +73,6 @@ extern "C" {
* as attribute [[nodiscard]]).
* @note To suppress the 'unused-result' warning/error, please use the
* '-Wno-unused-result' compiler option.
*
*/
#if defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ >= 3 && __clang_minor__ >= 9))
#define OT_MUST_USE_RESULT __attribute__((warn_unused_result))
@@ -86,7 +84,6 @@ extern "C" {
* @def OT_TOOL_PACKED_BEGIN
*
* Compiler-specific indication that a class or struct must be byte packed.
*
*/
/**
@@ -94,21 +91,18 @@ extern "C" {
*
* Indicate to the compiler a nested struct or union to be packed
* within byte packed class or struct.
*
*/
/**
* @def OT_TOOL_PACKED_END
*
* Compiler-specific indication at the end of a byte packed class or struct.
*
*/
/**
* @def OT_TOOL_WEAK
*
* Compiler-specific weak symbol modifier.
*
*/
/**
@@ -126,7 +120,6 @@ extern "C" {
*
* @param[in] aFmtIndex The argument index of the format string.
* @param[in] aStartIndex The argument index of the first argument to check against the format string.
*
*/
// =========== TOOLCHAIN SELECTION : START ===========
@@ -189,14 +182,12 @@ extern "C" {
* @def OT_UNUSED_VARIABLE
*
* Suppress unused variable warning in specific toolchains.
*
*/
/**
* @def OT_UNREACHABLE_CODE
*
* Suppress Unreachable code warning in specific toolchains.
*
*/
#if defined(__ICCARM__)
@@ -289,7 +280,6 @@ extern "C" {
* @def OT_FALL_THROUGH
*
* Suppress fall through warning in specific compiler.
*
*/
#if defined(__cplusplus) && (__cplusplus >= 201703L)
#define OT_FALL_THROUGH [[fallthrough]]
@@ -306,7 +296,6 @@ extern "C" {
/**
* @}
*
*/
#ifdef __cplusplus
-17
View File
@@ -30,7 +30,6 @@
* @file
* @brief
* This file includes the platform abstraction for Thread Radio Encapsulation Link (TREL) using DNS-SD and UDP/IPv6.
*
*/
#ifndef OPENTHREAD_PLATFORM_TREL_H_
@@ -54,7 +53,6 @@ extern "C" {
* UDP/IPv6.
*
* @{
*
*/
/**
@@ -82,7 +80,6 @@ extern "C" {
*
* @param[in] aInstance The OpenThread instance.
* @param[out] aUdpPort A pointer to return the selected port number by platform layer.
*
*/
void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort);
@@ -93,13 +90,11 @@ void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort);
* TREL DNS-SD service (from `otPlatTrelRegisterService()`) and MUST close the UDP socket used to receive TREL messages.
*
* @pram[in] aInstance The OpenThread instance.
*
*/
void otPlatTrelDisable(otInstance *aInstance);
/**
* Represents a TREL peer info discovered using DNS-SD browse on the service name "_trel._udp".
*
*/
typedef struct otPlatTrelPeerInfo
{
@@ -108,14 +103,12 @@ typedef struct otPlatTrelPeerInfo
*
* - TRUE indicates that peer is removed.
* - FALSE indicates that it is a new entry or an update to an existing entry.
*
*/
bool mRemoved;
/**
* The TXT record data (encoded as specified by DNS-SD) from the SRV record of the discovered TREL peer service
* instance.
*
*/
const uint8_t *mTxtData;
@@ -127,7 +120,6 @@ typedef struct otPlatTrelPeerInfo
* The port number is determined from the SRV record of the discovered TREL peer service instance. The IPv6 address
* is determined from the DNS-SD query for AAAA records on the hostname indicated in the SRV record of the
* discovered service instance. If multiple host IPv6 addressees are discovered, one with highest scope is used.
*
*/
otSockAddr mSockAddr;
} otPlatTrelPeerInfo;
@@ -140,7 +132,6 @@ typedef struct otPlatTrelPeerInfo
*
* @param[in] aInstance The OpenThread instance.
* @param[in] aInfo A pointer to the TREL peer info.
*
*/
extern void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPlatTrelPeerInfo *aInfo);
@@ -164,8 +155,6 @@ extern void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPl
* @param[in] aPort The port number to include in the SRV record of the advertised service.
* @param[in] aTxtData A pointer to the TXT record data (encoded) to be include in the advertised service.
* @param[in] aTxtLength The length of @p aTxtData (number of bytes).
*
*
*/
void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint8_t *aTxtData, uint8_t aTxtLength);
@@ -176,7 +165,6 @@ void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint
* @param[in] aUdpPayload A pointer to UDP payload.
* @param[in] aUdpPayloadLen The payload length (number of bytes).
* @param[in] aDestSockAddr The destination socket address.
*
*/
void otPlatTrelSend(otInstance *aInstance,
const uint8_t *aUdpPayload,
@@ -193,13 +181,11 @@ void otPlatTrelSend(otInstance *aInstance,
* @param[in] aInstance The OpenThread instance structure.
* @param[in] aBuffer A buffer containing the received UDP payload.
* @param[in] aLength UDP payload length (number of bytes).
*
*/
extern void otPlatTrelHandleReceived(otInstance *aInstance, uint8_t *aBuffer, uint16_t aLength);
/**
* Represents a group of TREL related counters in the platform layer.
*
*/
typedef struct otPlatTrelCounters
{
@@ -214,7 +200,6 @@ typedef struct otPlatTrelCounters
* Gets the pointer to the TREL counters in the platform layer.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
const otPlatTrelCounters *otPlatTrelGetCounters(otInstance *aInstance);
@@ -222,13 +207,11 @@ const otPlatTrelCounters *otPlatTrelGetCounters(otInstance *aInstance);
* Resets the TREL counters in the platform layer.
*
* @param[in] aInstance The OpenThread instance structure.
*
*/
void otPlatTrelResetCounters(otInstance *aInstance);
/**
* @}
*
*/
#ifdef __cplusplus
-8
View File
@@ -48,7 +48,6 @@ extern "C" {
*
* @retval OT_ERROR_NONE Successfully initialized UDP socket by platform.
* @retval OT_ERROR_FAILED Failed to initialize UDP Socket.
*
*/
otError otPlatUdpSocket(otUdpSocket *aUdpSocket);
@@ -59,7 +58,6 @@ otError otPlatUdpSocket(otUdpSocket *aUdpSocket);
*
* @retval OT_ERROR_NONE Successfully closed UDP socket by platform.
* @retval OT_ERROR_FAILED Failed to close UDP Socket.
*
*/
otError otPlatUdpClose(otUdpSocket *aUdpSocket);
@@ -70,7 +68,6 @@ otError otPlatUdpClose(otUdpSocket *aUdpSocket);
*
* @retval OT_ERROR_NONE Successfully bound UDP socket by platform.
* @retval OT_ERROR_FAILED Failed to bind UDP socket.
*
*/
otError otPlatUdpBind(otUdpSocket *aUdpSocket);
@@ -84,7 +81,6 @@ otError otPlatUdpBind(otUdpSocket *aUdpSocket);
*
* @retval OT_ERROR_NONE Successfully bound UDP socket.
* @retval OT_ERROR_FAILED Failed to bind UDP.
*
*/
otError otPlatUdpBindToNetif(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifIdentifier);
@@ -95,7 +91,6 @@ otError otPlatUdpBindToNetif(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifId
*
* @retval OT_ERROR_NONE Successfully connected by platform.
* @retval OT_ERROR_FAILED Failed to connect UDP socket.
*
*/
otError otPlatUdpConnect(otUdpSocket *aUdpSocket);
@@ -108,7 +103,6 @@ otError otPlatUdpConnect(otUdpSocket *aUdpSocket);
*
* @retval OT_ERROR_NONE Successfully sent by platform, and @p aMessage is freed.
* @retval OT_ERROR_FAILED Failed to bind UDP socket.
*
*/
otError otPlatUdpSend(otUdpSocket *aUdpSocket, otMessage *aMessage, const otMessageInfo *aMessageInfo);
@@ -123,7 +117,6 @@ otError otPlatUdpSend(otUdpSocket *aUdpSocket, otMessage *aMessage, const otMess
*
* @retval OT_ERROR_NONE Successfully joined the multicast group.
* @retval OT_ERROR_FAILED Failed to join the multicast group.
*
*/
otError otPlatUdpJoinMulticastGroup(otUdpSocket *aUdpSocket,
otNetifIdentifier aNetifIdentifier,
@@ -140,7 +133,6 @@ otError otPlatUdpJoinMulticastGroup(otUdpSocket *aUdpSocket,
*
* @retval OT_ERROR_NONE Successfully left the multicast group.
* @retval OT_ERROR_FAILED Failed to leave the multicast group.
*
*/
otError otPlatUdpLeaveMulticastGroup(otUdpSocket *aUdpSocket,
otNetifIdentifier aNetifIdentifier,

Some files were not shown because too many files have changed in this diff Show More