Class IpAddress¶
Defined in File peafowl.hpp
Class Documentation¶
-
class
peafowl::IpAddress¶ IP Address.
Public Functions
-
IpAddress(pfwl_ip_addr addr, bool isIPv6 = false)¶ Builds the IP address.
- Parameters
addr: The IP address.isIPv6: True if the address is an IPv6 address, false otherwise.
-
bool
isIPv4() const¶ Checks if the address is an IPv4 address.
- Return
True if the address is an IPv4 address, false otherwise.
-
bool
isIPv6() const¶ Checks if the address is an IPv6 address.
- Return
True if the address is an IPv6 address, false otherwise.
-
uint32_t
getIPv4() const¶ Gets the address as an IPv4 address.
- Return
The IPv4 address.
-
struct in6_addr
getIPv6() const¶ Gets the address as an IPv6 address.
- Return
The IPv6 address.
-
std::string
toString() const¶ Returns a string representation of the IP address.
- Return
A string representation of the IP address.
-