|
PcapPlusPlus
Next
|
#include <IpAddress.h>
Public Types | |
| enum | AddressType : uint8_t { IPv4AddressType , IPv6AddressType } |
| An enum representing the address type: IPv4 or IPv6. More... | |
Public Member Functions | |
| IPAddress () | |
| A default constructor that creates an instance of the class with unspecified IPv4 address. | |
| IPAddress (const IPv4Address &addr) | |
| IPAddress (const IPv6Address &addr) | |
| IPAddress (const std::string &addrAsString) | |
| IPAddress & | operator= (const IPv4Address &addr) |
| IPAddress & | operator= (const IPv6Address &addr) |
| AddressType | getType () const |
| std::string | toString () const |
| bool | isIPv4 () const |
| bool | isIPv6 () const |
| bool | isMulticast () const |
| const IPv4Address & | getIPv4 () const |
| const IPv6Address & | getIPv6 () const |
| bool | isZero () const |
| bool | operator== (const IPAddress &rhs) const |
| bool | operator< (const IPAddress &rhs) const |
| bool | operator!= (const IPAddress &rhs) const |
The class is a version-independent representation for an IP address
| enum pcpp::IPAddress::AddressType : uint8_t |
|
inline |
A constructor that creates an instance of the class out of IPv4Address.
| [in] | addr | A const reference to instance of IPv4Address |
|
inline |
A constructor that creates an instance of the class out of IPv6Address.
| [in] | addr | A const reference to instance of IPv6Address |
| pcpp::IPAddress::IPAddress | ( | const std::string & | addrAsString | ) |
A constructor that creates an instance of the class out of std::string value
| [in] | addrAsString | The std::string representation of the address |
| std::invalid_argument | The provided string does not represent a valid IPv4 or IPv6 address. |
|
inline |
Get a reference to IPv4 address instance
|
inline |
Get a reference to IPv6 address instance
|
inline |
Gets the address type: IPv4 or IPv6
|
inline |
|
inline |
|
inline |
Determine whether the address is a multicast address
|
inline |
|
inline |
Overload of the not-equal-to operator
| [in] | rhs | The object to compare with |
|
inline |
Overload of the less-than operator
| [in] | rhs | The object to compare with |
|
inline |
Overload of an assignment operator.
| [in] | addr | A const reference to instance of IPv4Address |
|
inline |
Overload of an assignment operator.
| [in] | addr | A const reference to instance of IPv6Address |
|
inline |
Overload of the equal-to operator
| [in] | rhs | The object to compare with |
|
inline |
Returns a std::string representation of the address