PcapPlusPlus
23.09
|
#include <IpAddress.h>
Public Member Functions | |
IPv6Network (const IPv6Address &address, uint8_t prefixLen) | |
IPv6Network (const IPv6Address &address, const std::string &netmask) | |
IPv6Network (const std::string &addressAndNetmask) | |
uint8_t | getPrefixLen () const |
std::string | getNetmask () const |
IPv6Address | getNetworkPrefix () const |
IPv6Address | getLowestAddress () const |
IPv6Address | getHighestAddress () const |
uint64_t | getTotalAddressCount () const |
bool | includes (const IPv6Address &address) const |
bool | includes (const IPv6Network &network) const |
std::string | toString () const |
A class representing IPv6 network definition
pcpp::IPv6Network::IPv6Network | ( | const IPv6Address & | address, |
uint8_t | prefixLen | ||
) |
A constructor that creates an instance of the class out of an address representing the network prefix and a prefix length
address | An address representing the network prefix. If the address is invalid std::invalid_argument exception is thrown |
prefixLen | A number between 0 and 128 representing the prefix length. If another value is provided std::invalid_argument exception is thrown |
pcpp::IPv6Network::IPv6Network | ( | const IPv6Address & | address, |
const std::string & | netmask | ||
) |
A constructor that creates an instance of the class out of an address representing the network prefix and a netmask
address | An address representing the network prefix. If the address is invalid std::invalid_argument exception is thrown |
netmask | A string representing a netmask in valid IPv6 format, for example: ffff:ffff::. Please notice that netmasks that start with zeros are invalid, for example: 0:ffff::. The only netmask starting with zeros that is valid is all zeros (::). If the netmask is invalid std::invalid_argument exception is thrown |
pcpp::IPv6Network::IPv6Network | ( | const std::string & | addressAndNetmask | ) |
A constructor that creates an instance of the class out of a string representing the network prefix and a prefix length or a netmask
addressAndNetmask | A string in one of these formats:
|
IPv6Address pcpp::IPv6Network::getHighestAddress | ( | ) | const |
IPv6Address pcpp::IPv6Network::getLowestAddress | ( | ) | const |
|
inline |
|
inline |
uint8_t pcpp::IPv6Network::getPrefixLen | ( | ) | const |
uint64_t pcpp::IPv6Network::getTotalAddressCount | ( | ) | const |
bool pcpp::IPv6Network::includes | ( | const IPv6Address & | address | ) | const |
address | An IPv6 address |
bool pcpp::IPv6Network::includes | ( | const IPv6Network & | network | ) | const |
network | An IPv6 network |
std::string pcpp::IPv6Network::toString | ( | ) | const |