0.01.00
ot::AddressResolver Class Reference

This class implements the EID-to-RLOC mapping and caching. More...

#include <src/core/thread/address_resolver.hpp>

Inheritance diagram for ot::AddressResolver:
ot::InstanceLocator

Public Member Functions

 AddressResolver (otInstance &aInstance)
 This constructor initializes the object.
 
void Clear (void)
 This method clears the EID-to-RLOC cache.
 
otError GetEntry (uint8_t aIndex, otEidCacheEntry &aEntry) const
 This method gets an EID cache entry. More...
 
void Remove (uint8_t aRouterId)
 This method removes a Router ID from the EID-to-RLOC cache. More...
 
void UpdateCacheEntry (const Ip6::Address &aEid, Mac::ShortAddress aRloc16)
 This method updates an existing cache entry for the EID, if one exists. More...
 
otError Resolve (const Ip6::Address &aEid, Mac::ShortAddress &aRloc16)
 This method returns the RLOC16 for a given EID, or initiates an Address Query if the mapping is not known. More...
 
- Public Member Functions inherited from ot::InstanceLocator
otInstanceGetInstance (void) const
 This method returns a reference to the parent otInstance structure. More...
 
Ip6::Ip6GetIp6 (void) const
 This method returns a reference to the Ip6. More...
 
ThreadNetifGetNetif (void) const
 This method returns a reference to the thread network interface. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ot::InstanceLocator
 InstanceLocator (otInstance &aInstance)
 This constructor initializes the object. More...
 

Detailed Description

This class implements the EID-to-RLOC mapping and caching.

Member Function Documentation

§ GetEntry()

otError ot::AddressResolver::GetEntry ( uint8_t  aIndex,
otEidCacheEntry aEntry 
) const

This method gets an EID cache entry.

Parameters
[in]aIndexAn index into the EID cache table.
[out]aEntryA pointer to where the EID information is placed.
Return values
OT_ERROR_NONESuccessfully retrieved the EID cache entry.
OT_ERROR_INVALID_ARGSaIndex was out of bounds or aEntry was NULL.

§ Remove()

void ot::AddressResolver::Remove ( uint8_t  aRouterId)

This method removes a Router ID from the EID-to-RLOC cache.

Parameters
[in]aRouterIdThe Router ID.

§ Resolve()

otError ot::AddressResolver::Resolve ( const Ip6::Address aEid,
Mac::ShortAddress aRloc16 
)

This method returns the RLOC16 for a given EID, or initiates an Address Query if the mapping is not known.

Parameters
[in]aEidA reference to the EID.
[out]aRloc16The RLOC16 corresponding to aEid.
Return values
OT_ERROR_NONESuccessfully provided the RLOC16.
OT_ERROR_ADDRESS_QUERYInitiated an Address Query.
OT_ERROR_NO_BUFSInsufficient buffer space available to send Address Query.

§ UpdateCacheEntry()

void ot::AddressResolver::UpdateCacheEntry ( const Ip6::Address aEid,
Mac::ShortAddress  aRloc16 
)

This method updates an existing cache entry for the EID, if one exists.

Parameters
[in]aEidA reference to the EID.
[in]aRloc16The RLOC16 corresponding to aEid.

The documentation for this class was generated from the following file: