PcapPlusPlus
22.11
|
#include <IpAddress.h>
Public Types | |
enum | AddressType { IPv4AddressType, IPv6AddressType } |
Public Member Functions | |
IPAddress () | |
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 | isValid () const |
bool | isIPv4 () const |
bool | isIPv6 () const |
bool | isMulticast () const |
const IPv4Address & | getIPv4 () const |
const IPv6Address & | getIPv6 () 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
|
inline |
A default constructor that creates an instance of the class with unspecified IPv4 address
|
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 If the string doesn't represent a valid IPv4 or IPv6 address, an instance will store an unspecified address
[in] | addrAsString | The std::string representation of the 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