History Tracker#
Records the history of different events, for example RX and TX messages or network info changes.
All tracked entries are timestamped.
The functions in this module are available when OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE is enabled.
Modules#
otHistoryTrackerUnicastAddressInfo
otHistoryTrackerMulticastAddressInfo
otHistoryTrackerOnMeshPrefixInfo
otHistoryTrackerExternalRouteInfo
otHistoryTrackerDnsSrpAddrInfo
otHistoryTrackerFavoredOmrPrefix
otHistoryTrackerFavoredOnLinkPrefix
Enumerations#
Defines the events for an IPv6 (unicast or multicast) address info (i.e., whether address is added or removed).
Constants representing message priority used in otHistoryTrackerMessageInfo struct.
Defines the events in a neighbor info (i.e.
Defines the events in a router info (i.e.
Defines the events for a Network Data entry (i.e., whether an entry is added or removed).
Represents the DNS/SRP server address type parsed from Network Data service entries.
Represents events during the Border Agent's ePSKc journey.
Defines events for discovered routers on an Adjacent Infrastructure Link (AIL).
Typedefs#
Represents an iterator to iterate through a history list.
Represents Thread network info.
Represent a unicast IPv6 address info.
Represent an IPv6 multicast address info.
Represents a RX/TX IPv6 message info.
Represents a neighbor info.
Represents a router table entry event.
Represent a Network Data on mesh prefix info.
Represent a Network Data extern route info.
Represents DNS/SRP server address information parsed from a Network Data service entry.
Represents a favored OMR prefix tracked by a device acting as a Border Router (BR).
Represents a favored on-link prefix on AIL tracked by a device acting as a Border Router (BR).
Represents the DHCPv6-PD state and delegated prefix (if any) by a device acting as Border Router (BR).
Represents information about a discovered router on an Adjacent Infrastructure Link (AIL).
Functions#
Initializes an otHistoryTrackerIterator.
Iterates over the entries in the network info history list.
Iterates over the entries in the unicast address history list.
Iterates over the entries in the multicast address history list.
Iterates over the entries in the RX message history list.
Iterates over the entries in the TX message history list.
Iterates over the entries in the neighbor history list.
Iterates over the entries in the router history list.
Iterates over the entries in the Network Data on mesh prefix entry history list.
Iterates over the entries in the Network Data external route entry history list.
Iterates over the entries in the Network Data SRP/DNS address history list.
Iterates over the entries in the Border Agent ePSKc history list.
Iterates over the entries in the favored OMR prefix history list.
Iterates over the entries in the favored on-link prefix history list.
Iterates over the entries in the DHCPv6-PD history list.
Iterates over the entries in the BR AIL routers history list.
Converts a given entry age to a human-readable string.
Macros#
This constant specifies the maximum age of entries which is 49 days (in msec).
Recommended size for string representation of an entry age.
No next hop - For mNextHop in otHistoryTrackerRouterInfo.
Infinite path cost - used in otHistoryTrackerRouterInfo.
Enumeration Documentation#
otHistoryTrackerAddressEvent#
otHistoryTrackerAddressEvent
Defines the events for an IPv6 (unicast or multicast) address info (i.e., whether address is added or removed).
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_ADDRESS_EVENT_ADDED | Address is added. |
| OT_HISTORY_TRACKER_ADDRESS_EVENT_REMOVED | Address is removed. |
@1#
@1
Constants representing message priority used in otHistoryTrackerMessageInfo struct.
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_MSG_PRIORITY_LOW | Low priority level. |
| OT_HISTORY_TRACKER_MSG_PRIORITY_NORMAL | Normal priority level. |
| OT_HISTORY_TRACKER_MSG_PRIORITY_HIGH | High priority level. |
| OT_HISTORY_TRACKER_MSG_PRIORITY_NET | Network Control priority level. |
otHistoryTrackerNeighborEvent#
otHistoryTrackerNeighborEvent
Defines the events in a neighbor info (i.e.
whether neighbor is added, removed, or changed).
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.
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_NEIGHBOR_EVENT_ADDED | Neighbor is added. |
| OT_HISTORY_TRACKER_NEIGHBOR_EVENT_REMOVED | Neighbor is removed. |
| OT_HISTORY_TRACKER_NEIGHBOR_EVENT_CHANGED | Neighbor changed (e.g., device mode flags changed). |
| OT_HISTORY_TRACKER_NEIGHBOR_EVENT_RESTORING | Neighbor is being restored (applicable to child only). |
otHistoryTrackerRouterEvent#
otHistoryTrackerRouterEvent
Defines the events in a router info (i.e.
whether router is added, removed, or changed).
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_ROUTER_EVENT_ADDED | Router is added (router ID allocated). |
| OT_HISTORY_TRACKER_ROUTER_EVENT_REMOVED | Router entry is removed (router ID released). |
| OT_HISTORY_TRACKER_ROUTER_EVENT_NEXT_HOP_CHANGED | Router entry next hop and cost changed. |
| OT_HISTORY_TRACKER_ROUTER_EVENT_COST_CHANGED | Router entry path cost changed (next hop as before). |
otHistoryTrackerNetDataEvent#
otHistoryTrackerNetDataEvent
Defines the events for a Network Data entry (i.e., whether an entry is added or removed).
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_NET_DATA_ENTRY_ADDED | Network data entry is added. |
| OT_HISTORY_TRACKER_NET_DATA_ENTRY_REMOVED | Network data entry is removed. |
otHistoryTrackerDnsSrpAddrType#
otHistoryTrackerDnsSrpAddrType
Represents the DNS/SRP server address type parsed from Network Data service entries.
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_DNS_SRP_ADDR_TYPE_UNICAST_LOCAL | Unicast address type local (in server data). |
| OT_HISTORY_TRACKER_DNS_SRP_ADDR_TYPE_UNICAST_INFRA | Unicast address type infrastructure (in service data). |
| OT_HISTORY_TRACKER_DNS_SRP_ADDR_TYPE_ANYCAST | Anycast address type. |
otHistoryTrackerBorderAgentEpskcEvent#
otHistoryTrackerBorderAgentEpskcEvent
Represents events during the Border Agent's ePSKc journey.
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_ACTIVATED | ePSKc mode is activated. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_CONNECTED | Secure session is connected. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_PETITIONED | Commissioner petition is received. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_RETRIEVED_ACTIVE_DATASET | Active dataset is retrieved. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_RETRIEVED_PENDING_DATASET | Pending dataset is retrieved. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_KEEP_ALIVE | Keep alive message is received. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_LOCAL_CLOSE | Deactivated by a call to the API. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_REMOTE_CLOSE | Disconnected by the peer. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_SESSION_ERROR | Disconnected due to some error. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_SESSION_TIMEOUT | Disconnected due to timeout. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_MAX_ATTEMPTS | Max allowed attempts reached. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_EPSKC_TIMEOUT | ePSKc mode timed out. |
| OT_HISTORY_TRACKER_BORDER_AGENT_EPSKC_EVENT_DEACTIVATED_UNKNOWN | Deactivated for an unknown reason. |
otHistoryTrackerAilRouterEvent#
otHistoryTrackerAilRouterEvent
Defines events for discovered routers on an Adjacent Infrastructure Link (AIL).
This applies when a device is acting as a Border Router, processing received Router Advertisements and tracking AIL routers.
OT_HISTORY_TRACKER_AIL_ROUTER_EVENT_CHANGED is used if any of the properties in the otHistoryTrackerAilRouter structure associated with a specific router changes.
| Enumerator | |
|---|---|
| OT_HISTORY_TRACKER_AIL_ROUTER_EVENT_ADDED | A new AIL router is discovered. |
| OT_HISTORY_TRACKER_AIL_ROUTER_EVENT_CHANGED | A property in the router's information has changed. |
| OT_HISTORY_TRACKER_AIL_ROUTER_EVENT_REMOVED | The AIL router is removed and no longer tracked. |
Typedef Documentation#
otHistoryTrackerIterator#
typedef struct otHistoryTrackerIterator otHistoryTrackerIterator
Represents an iterator to iterate through a history list.
The fields in this type are opaque (intended for use by OpenThread core) and therefore should not be accessed/used by caller.
Before using an iterator, it MUST be initialized using otHistoryTrackerInitIterator(),
otHistoryTrackerNetworkInfo#
typedef struct otHistoryTrackerNetworkInfo otHistoryTrackerNetworkInfo
Represents Thread network info.
otHistoryTrackerUnicastAddressInfo#
typedef struct otHistoryTrackerUnicastAddressInfo otHistoryTrackerUnicastAddressInfo
Represent a unicast IPv6 address info.
otHistoryTrackerMulticastAddressInfo#
typedef struct otHistoryTrackerMulticastAddressInfo otHistoryTrackerMulticastAddressInfo
Represent an IPv6 multicast address info.
otHistoryTrackerMessageInfo#
typedef struct otHistoryTrackerMessageInfo otHistoryTrackerMessageInfo
Represents a RX/TX IPv6 message info.
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.
otHistoryTrackerNeighborInfo#
typedef struct otHistoryTrackerNeighborInfo otHistoryTrackerNeighborInfo
Represents a neighbor info.
otHistoryTrackerRouterInfo#
typedef struct otHistoryTrackerRouterInfo otHistoryTrackerRouterInfo
Represents a router table entry event.
otHistoryTrackerOnMeshPrefixInfo#
typedef struct otHistoryTrackerOnMeshPrefixInfo otHistoryTrackerOnMeshPrefixInfo
Represent a Network Data on mesh prefix info.
otHistoryTrackerExternalRouteInfo#
typedef struct otHistoryTrackerExternalRouteInfo otHistoryTrackerExternalRouteInfo
Represent a Network Data extern route info.
otHistoryTrackerDnsSrpAddrInfo#
typedef struct otHistoryTrackerDnsSrpAddrInfo otHistoryTrackerDnsSrpAddrInfo
Represents DNS/SRP server address information parsed from a Network Data service entry.
The mType field specifies the entry type. Some fields are only applicable to specific types.
The
mPortfield is only applicable forOT_HISTORY_TRACKER_DNS_SRP_ADDR_TYPE_UNICAST_*types.The
mSequenceNumberfield is only applicable for theOT_HISTORY_TRACKER_DNS_SRP_ADDR_TYPE_ANYCASTtype.Other fields are common and used for all address types.
otHistoryTrackerFavoredOmrPrefix#
typedef struct otHistoryTrackerFavoredOmrPrefix otHistoryTrackerFavoredOmrPrefix
Represents a favored OMR prefix tracked by a device acting as a Border Router (BR).
The mIsLocal field indicates whether the favored OMR prefix is the same as the local one maintained by this BR. The local OMR prefix can be either based on (random) ULA or a prefix delegated via DHCPv6-PD.
otHistoryTrackerFavoredOnLinkPrefix#
typedef struct otHistoryTrackerFavoredOnLinkPrefix otHistoryTrackerFavoredOnLinkPrefix
Represents a favored on-link prefix on AIL tracked by a device acting as a Border Router (BR).
The mIsLocal field indicates whether the favored on-link prefix is the same as the local one maintained by this BR.
otHistoryTrackerDhcp6PdInfo#
typedef struct otHistoryTrackerDhcp6PdInfo otHistoryTrackerDhcp6PdInfo
Represents the DHCPv6-PD state and delegated prefix (if any) by a device acting as Border Router (BR).
otHistoryTrackerAilRouter#
typedef struct otHistoryTrackerAilRouter otHistoryTrackerAilRouter
Represents information about a discovered router on an Adjacent Infrastructure Link (AIL).
This applies when a device is acting as a Border Router, processing received Router Advertisements and tracking information about discovered AIL routers.
mProvidesDefaultRoute indicates whether the router provides a default route. If it does, mDefRoutePreference specifies the route preference.
mFavoredOnLinkPrefix indicates the favored on-link prefix advertised by the router. If there is no on-link prefix, this will be an empty prefix (i.e., its length will be zero).
Function Documentation#
otHistoryTrackerInitIterator#
void otHistoryTrackerInitIterator (otHistoryTrackerIterator * aIterator)
Initializes an otHistoryTrackerIterator.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otHistoryTrackerIterator * | [in] | aIterator | A pointer to the iterator to initialize (MUST NOT be NULL). |
An iterator MUST be initialized before it is used.
An iterator can be initialized again to start from the beginning of the list.
When iterating over entries in a list, to ensure the entry ages are consistent, the age is given relative to the time the iterator was initialized, i.e., the entry age is provided as the duration (in milliseconds) from the event (when entry was recorded) to the iterator initialization time.
otHistoryTrackerIterateNetInfoHistory#
const otHistoryTrackerNetworkInfo * otHistoryTrackerIterateNetInfoHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the network info history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
A pointer to
otHistoryTrackerNetworkInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateUnicastAddressHistory#
const otHistoryTrackerUnicastAddressInfo * otHistoryTrackerIterateUnicastAddressHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the unicast address history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
A pointer to
otHistoryTrackerUnicastAddressInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateMulticastAddressHistory#
const otHistoryTrackerMulticastAddressInfo * otHistoryTrackerIterateMulticastAddressHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the multicast address history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
A pointer to
otHistoryTrackerMulticastAddressInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateRxHistory#
const otHistoryTrackerMessageInfo * otHistoryTrackerIterateRxHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the RX message history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerMessageInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateTxHistory#
const otHistoryTrackerMessageInfo * otHistoryTrackerIterateTxHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the TX message history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerMessageInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateNeighborHistory#
const otHistoryTrackerNeighborInfo * otHistoryTrackerIterateNeighborHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the neighbor history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerNeighborInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateRouterHistory#
const otHistoryTrackerRouterInfo * otHistoryTrackerIterateRouterHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the router history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerRouterInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateOnMeshPrefixHistory#
const otHistoryTrackerOnMeshPrefixInfo * otHistoryTrackerIterateOnMeshPrefixHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the Network Data on mesh prefix entry history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerOnMeshPrefixInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateExternalRouteHistory#
const otHistoryTrackerExternalRouteInfo * otHistoryTrackerIterateExternalRouteHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the Network Data external route entry history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerExternalRouteInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateDnsSrpAddrHistory#
const otHistoryTrackerDnsSrpAddrInfo * otHistoryTrackerIterateDnsSrpAddrHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the Network Data SRP/DNS address history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerDnsSrpAddrInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateBorderAgentEpskcEventHistory#
const otHistoryTrackerBorderAgentEpskcEvent * otHistoryTrackerIterateBorderAgentEpskcEventHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the Border Agent ePSKc history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Returns
The
otHistoryTrackerBorderAgentEpskcEvententry orNULLif no more entries in the list.
otHistoryTrackerIterateFavoredOmrPrefixHistory#
const otHistoryTrackerFavoredOmrPrefix * otHistoryTrackerIterateFavoredOmrPrefixHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the favored OMR prefix history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Requires OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE (device acting as Border Router).
Returns
The
otHistoryTrackerFavoredOmrPrefixentry orNULLif no more entries in the list.
otHistoryTrackerIterateFavoredOnLinkPrefixHistory#
const otHistoryTrackerFavoredOnLinkPrefix * otHistoryTrackerIterateFavoredOnLinkPrefixHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the favored on-link prefix history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when the entry was recorded to |
Requires OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE (device acting as Border Router).
Returns
The
otHistoryTrackerFavoredOnLinkPrefixentry orNULLif no more entries in the list.
otHistoryTrackerIterateDhcp6PdHistory#
const otHistoryTrackerDhcp6PdInfo * otHistoryTrackerIterateDhcp6PdHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the DHCPv6-PD history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when entry was recorded to |
Requires both OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE and OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE.
Returns
The
otHistoryTrackerDhcp6PdInfoentry orNULLif no more entries in the list.
otHistoryTrackerIterateAilRoutersHistory#
const otHistoryTrackerAilRouter * otHistoryTrackerIterateAilRoutersHistory (otInstance * aInstance, otHistoryTrackerIterator * aIterator, uint32_t * aEntryAge)
Iterates over the entries in the BR AIL routers history list.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otHistoryTrackerIterator * | [inout] | aIterator | A pointer to an iterator. MUST be initialized or the behavior is undefined. |
| uint32_t * | [out] | aEntryAge | A pointer to a variable to output the entry's age. MUST NOT be NULL. Age is provided as the duration (in milliseconds) from when the entry was recorded to |
Requires OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE (device acting as Border Router).
Returns
The
otHistoryTrackerAilRouterentry orNULLif no more entries in the list.
otHistoryTrackerEntryAgeToString#
void otHistoryTrackerEntryAgeToString (uint32_t aEntryAge, char * aBuffer, uint16_t aSize)
Converts a given entry age to a human-readable string.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t | [in] | aEntryAge | The entry age (duration in msec). |
| char * | [out] | aBuffer | A pointer to a char array to output the string (MUST NOT be NULL). |
| uint16_t | [in] | aSize | The size of |
The entry age string follows the format hours:minutes:seconds:milliseconds (if shorter than one day) or days:hours:minutes:seconds(if longer than one day).
If the resulting string does not fit in aBuffer (within its aSize characters), the string will be truncated but the outputted string is always null-terminated.