#include <src/common/types.hpp>
|
|
union { |
|
uint8_t m8 [16] |
| |
|
uint16_t m16 [8] |
| |
|
uint32_t m32 [4] |
| |
|
uint64_t m64 [2] |
| |
| }; | |
| |
This class implements the Ipv6 address functionality.
◆ Ip6Address() [1/3]
| otbr::Ip6Address::Ip6Address |
( |
void |
| ) |
|
|
inline |
◆ Ip6Address() [2/3]
| otbr::Ip6Address::Ip6Address |
( |
uint16_t |
aLocator | ) |
|
|
inline |
Constructor with an 16-bit Thread locator.
- Parameters
-
| [in] | aLocator | The 16-bit Thread locator, RLOC or ALOC. |
◆ Ip6Address() [3/3]
| otbr::Ip6Address::Ip6Address |
( |
const uint8_t(&) |
aAddress[16] | ) |
|
Constructor with an Ip6 address.
- Parameters
-
| [in] | aAddress | The Ip6 address. |
◆ CopyFrom() [1/2]
| void otbr::Ip6Address::CopyFrom |
( |
const struct in6_addr & |
aIn6Addr | ) |
|
This method copies the Ip6 address from a in6_addr structure.
- Parameters
-
| [in] | aIn6Addr | The in6_addr structure to copy the Ip6 address from. |
◆ CopyFrom() [2/2]
| void otbr::Ip6Address::CopyFrom |
( |
const struct sockaddr_in6 & |
aSockAddr | ) |
|
This method copies the Ip6 address from a sockaddr_in6 structure.
- Parameters
-
| [in] | aSockAddr | The sockaddr_in6 structure to copy the Ip6 address from. |
◆ CopyTo() [1/2]
| void otbr::Ip6Address::CopyTo |
( |
struct in6_addr & |
aIn6Addr | ) |
const |
This method copies the Ip6 address to a in6_addr structure.
- Parameters
-
| [out] | aIn6Addr | The in6_addr structure to copy the Ip6 address to. |
◆ CopyTo() [2/2]
| void otbr::Ip6Address::CopyTo |
( |
struct sockaddr_in6 & |
aSockAddr | ) |
const |
This method copies the Ip6 address to a sockaddr_in6 structure.
- Parameters
-
| [out] | aSockAddr | The sockaddr_in6 structure to copy the Ip6 address to. |
◆ FromString()
This function converts Ip6 addresses from text to Ip6Address.
- Parameters
-
| [in] | aStr | The Ip6 address text. |
| [out] | aAddr | A reference to Ip6Address to output the Ip6 address. |
- Return values
-
| OTBR_ERROR_NONE | If the Ip6 address was successfully converted. |
| OTBR_ERROR_INVALID_ARGS | If aStr is not a valid string representing of Ip6 address. |
◆ GetLinkLocalAllNodesMulticastAddress()
| static const Ip6Address& otbr::Ip6Address::GetLinkLocalAllNodesMulticastAddress |
( |
void |
| ) |
|
|
inlinestatic |
This function returns the wellknown Link Local All Nodes Multicast Address (ff02::1).
- Returns
- The Link Local All Nodes Multicast Address.
◆ GetSolicitedMulticastAddressPrefix()
| static const Ip6Address& otbr::Ip6Address::GetSolicitedMulticastAddressPrefix |
( |
void |
| ) |
|
|
inlinestatic |
This function returns the wellknown Solicited Node Multicast Address Prefix (ff02::01:ff00:0).
- Returns
- The Solicited Node Multicast Address Prefix.
◆ IsLinkLocal()
| bool otbr::Ip6Address::IsLinkLocal |
( |
void |
| ) |
const |
|
inline |
This method returns if the Ip6 address is a link-local address.
- Returns
- Whether the Ip6 address is a link-local address.
◆ IsLoopback()
| bool otbr::Ip6Address::IsLoopback |
( |
void |
| ) |
const |
|
inline |
This method returns whether or not the Ip6 address is the Loopback Address.
- Return values
-
| TRUE | If the Ip6 address is the Loopback Address. |
| FALSE | If the Ip6 address is not the Loopback Address. |
◆ IsMulticast()
| bool otbr::Ip6Address::IsMulticast |
( |
void |
| ) |
const |
|
inline |
This method returns if the Ip6 address is a multicast address.
- Returns
- Whether the Ip6 address is a multicast address.
◆ IsUnspecified()
| bool otbr::Ip6Address::IsUnspecified |
( |
void |
| ) |
const |
|
inline |
This method indicates whether or not the Ip6 address is the Unspecified Address.
- Return values
-
| TRUE | If the Ip6 address is the Unspecified Address. |
| FALSE | If the Ip6 address is not the Unspecified Address. |
◆ operator<()
| bool otbr::Ip6Address::operator< |
( |
const Ip6Address & |
aOther | ) |
const |
|
inline |
This method overloads < operator and compares if the Ip6 address is smaller than the other address.
- Parameters
-
| [in] | aOther | The other Ip6 address to compare with. |
- Returns
- Whether the Ip6 address is smaller than the other address.
◆ operator==()
| bool otbr::Ip6Address::operator== |
( |
const Ip6Address & |
aOther | ) |
const |
|
inline |
This method overloads == operator and compares if the Ip6 address is equal to the other address.
- Parameters
-
| [in] | aOther | The other Ip6 address to compare with. |
- Returns
- Whether the Ip6 address is equal to the other address.
◆ ToLocator()
| uint16_t otbr::Ip6Address::ToLocator |
( |
void |
| ) |
const |
|
inline |
Retrieve the 16-bit Thread locator.
- Returns
- RLOC16 or ALOC16.
◆ ToSolicitedNodeMulticastAddress()
| Ip6Address otbr::Ip6Address::ToSolicitedNodeMulticastAddress |
( |
void |
| ) |
const |
This method returns the solicited node multicast address.
- Returns
- The solicited node multicast address.
◆ ToString()
| std::string otbr::Ip6Address::ToString |
( |
void |
| ) |
const |
This method returns the string representation for the Ip6 address.
- Returns
- The string representation of the Ip6 address.
The documentation for this class was generated from the following files: