|
PcapPlusPlus
19.12
|
#include <IpAddress.h>
Public Member Functions | |
| IPv6Address (uint8_t *addressAsUintArr) | |
| IPv6Address (char *addressAsString) | |
| IPv6Address (std::string addressAsString) | |
| IPv6Address (const IPv6Address &other) | |
| AddressType | getType () const |
| IPAddress * | clone () const |
| in6_addr * | toIn6Addr () const |
| void | copyTo (uint8_t **arr, size_t &length) const |
| void | copyTo (uint8_t *arr) const |
| bool | operator== (const IPv6Address &other) const |
| bool | operator!= (const IPv6Address &other) const |
| IPv6Address & | operator= (const IPv6Address &other) |
Public Member Functions inherited from pcpp::IPAddress | |
| std::string | toString () const |
| bool | isValid () const |
| bool | equals (const IPAddress *other) const |
Static Public Attributes | |
| static IPv6Address | Zero |
Additional Inherited Members | |
Public Types inherited from pcpp::IPAddress | |
| enum | AddressType { IPv4AddressType, IPv6AddressType } |
Static Public Member Functions inherited from pcpp::IPAddress | |
| static Ptr_t | fromString (char *addressAsString) |
| static Ptr_t | fromString (std::string addressAsString) |
Represents an IPv6 address (of type xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx). An instance of this class can be constructed from string, 16-byte array or from the in6_addr struct. It can be converted or copied to each of these types
| pcpp::IPv6Address::IPv6Address | ( | uint8_t * | addressAsUintArr | ) |
A constructor that creates an instance of the class out of a 16-Byte long byte array. Array size must be 16 bytes, otherwise instance will be invalid, meaning isValid() will return false
| addressAsUintArr | A 16-byte array containing address value |
| pcpp::IPv6Address::IPv6Address | ( | char * | addressAsString | ) |
A constructor that creates an instance of the class out of string (char*) value. If the string doesn't represent a valid IPv6 address, instance will be invalid, meaning isValid() will return false
| [in] | addressAsString | The string (char*) representation of the address |
| pcpp::IPv6Address::IPv6Address | ( | std::string | addressAsString | ) |
A constructor that creates an instance of the class out of string std::string value If the string doesn't represent a valid IPv6 address, instance will be invalid, meaning isValid() will return false
| [in] | addressAsString | The string std::string representation of the address |
| pcpp::IPv6Address::IPv6Address | ( | const IPv6Address & | other | ) |
A copy constructor for this class
|
virtual |
Clone the object
Implements pcpp::IPAddress.
| void pcpp::IPv6Address::copyTo | ( | uint8_t ** | arr, |
| size_t & | length | ||
| ) | const |
Allocates a byte array and copies address value into it. Array deallocation is user responsibility
| [in] | arr | A pointer to where array will be allocated |
| [out] | length | Returns the length in bytes of the array that was allocated |
| void pcpp::IPv6Address::copyTo | ( | uint8_t * | arr | ) | const |
Gets a pointer to an already allocated byte array and copies the address value to it. This method assumes array allocated size is at least 16 (the size of an IPv6 address)
| [in] | arr | A pointer to the array which address will be copied to |
|
inlinevirtual |
Implements pcpp::IPAddress.
| bool pcpp::IPv6Address::operator!= | ( | const IPv6Address & | other | ) | const |
Overload of the non-equal operator
| IPv6Address& pcpp::IPv6Address::operator= | ( | const IPv6Address & | other | ) |
Overload of the assignment operator
| bool pcpp::IPv6Address::operator== | ( | const IPv6Address & | other | ) | const |
Overload of the comparison operator
|
inline |
Returns a in6_addr struct pointer representing the IPv6 address
|
static |
A static value representing a zero value of IPv6 address, meaning address of value "0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"