#include <ipv6_address.h>
|
static const size_t | address_size = 16 |
|
|
TINS_API friend std::ostream & | operator<< (std::ostream &os, const IPv6Address &addr) |
| Writes this address in hex-notation to a std::ostream. More...
|
|
Tins::IPv6Address::IPv6Address |
( |
const char * |
addr | ) |
|
Constructor from a text representation char*.
- Parameters
-
addr | The text representation from which to construct this object. |
Tins::IPv6Address::IPv6Address |
( |
const std::string & |
addr | ) |
|
Constructor from a text representation std::string.
- Parameters
-
addr | The text representation from which to construct this object. |
Constructor from a buffer.
The ptr parameter must be at least address_size bytes long.
- Parameters
-
ptr | The buffer from which to construct this object. |
Returns an iterator to the beginning of this address.
Returns a const iterator to the beginning of this address.
template<typename OutputIterator >
OutputIterator Tins::IPv6Address::copy |
( |
OutputIterator |
iter | ) |
const |
|
inline |
Helper function which copies the address into an output iterator.
This is the same as:
std::copy(begin(), end(), iter);
But since some PDUs return a IPv6Address by value, this function can be used to avoid temporaries.
- Parameters
-
iter | The output iterator in which to store this address. |
- Returns
- OutputIterator pointing to one-past the last position written.
Returns an iterator to the one-past-the-end element of this address.
Returns a const iterator to the one-past-the-end element of this address.
IPv6Address Tins::IPv6Address::from_prefix_length |
( |
uint32_t |
prefix_length | ) |
|
|
static |
Constructs an IPv6 address from a prefix length.
- Parameters
-
prefix_length | The length of the prefix |
bool Tins::IPv6Address::is_loopback |
( |
| ) |
const |
Returns true if this is a loopback IPv6 address.
This method returns true if this address is the ::1/128 address, false otherwise.
bool Tins::IPv6Address::is_multicast |
( |
| ) |
const |
Returns true if this is a multicast IPv6 address.
This method returns true if this address is in the address range ff00::/8, false otherwise.
bool Tins::IPv6Address::operator!= |
( |
const IPv6Address & |
rhs | ) |
const |
|
inline |
Compares this address for inequality.
- Parameters
-
rhs | The address to be compared to. |
- Returns
- bool indicating whether addresses are distinct.
Applies a mask to an address
bool Tins::IPv6Address::operator< |
( |
const IPv6Address & |
rhs | ) |
const |
|
inline |
Compares this address for less-than inequality.
- Parameters
-
rhs | The address to be compared to. |
- Returns
- bool indicating whether this address is less-than rhs.
bool Tins::IPv6Address::operator<= |
( |
const IPv6Address & |
rhs | ) |
const |
|
inline |
Compares this address for less-than equality.
- Parameters
-
rhs | The address to be compared to. |
- Returns
- bool indicating whether this address is equal or less-than rhs.
bool Tins::IPv6Address::operator== |
( |
const IPv6Address & |
rhs | ) |
const |
|
inline |
Compares this address for equality.
- Parameters
-
rhs | The address to be compared to. |
- Returns
- bool indicating whether addresses are equal.
bool Tins::IPv6Address::operator> |
( |
const IPv6Address & |
rhs | ) |
const |
|
inline |
Compares this address for greater-than inequality.
- Parameters
-
rhs | The address to be compared to. |
- Returns
- bool indicating whether this address is greater-than rhs.
bool Tins::IPv6Address::operator>= |
( |
const IPv6Address & |
rhs | ) |
const |
|
inline |
Compares this address for greater-than equality.
- Parameters
-
rhs | The address to be compared to. |
- Returns
- bool indicating whether this address is equal or greater-than rhs.
size_t Tins::IPv6Address::size |
( |
| ) |
const |
|
inline |
Returns the size of an IPv6 Address.
This returns the value of IPv6Address::address_size
string Tins::IPv6Address::to_string |
( |
| ) |
const |
Retrieve the string representation of this address.
- Returns
- std::string containing the representation of this address.
TINS_API friend std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const IPv6Address & |
addr |
|
) |
| |
|
friend |
Writes this address in hex-notation to a std::ostream.
- Parameters
-
os | The stream in which to write the address. |
addr | The parameter to be written. |
- Returns
- std::ostream& pointing to the os parameter.
The documentation for this class was generated from the following files:
- /home/matias/Projects/libtins/code/include/tins/ipv6_address.h
- /home/matias/Projects/libtins/code/src/ipv6_address.cpp