The Pedigree Project
0.1
|
#include <IpAddress.h>
Public Types | |
enum | IpType { IPv4 = 0x0800, IPv6 = 0x86DD } |
Public Member Functions | |
IpAddress () | |
IpAddress (IpType type) | |
IpAddress (uint32_t ipv4) | |
IpAddress (uint8_t *ipv6) | |
IpAddress (const IpAddress &other) | |
void | setIp (uint32_t ipv4) |
void | setIp (uint8_t *ipv6) |
uint32_t | getIp () const |
void | getIp (uint8_t *ipv6) const |
IpType | getType () const |
IpAddress | operator+ (const IpAddress &a) const |
IpAddress | operator& (const IpAddress &a) const |
IpAddress & | operator= (const IpAddress &a) |
bool | operator== (const IpAddress &a) const |
bool | operator!= (const IpAddress &a) const |
bool | operator== (uint32_t a) const |
bool | operator!= (uint32_t a) const |
String | toString () const |
String | prefixString (size_t override=256) const |
Prefix string. Not zero-compressed. For routing. | |
bool | isLinkLocal () const |
Whether the IP address is considered "link-local" or not. | |
bool | isMulticast () const |
Whether the IP address is a valid multicast address. | |
bool | isUnicast () const |
Whether the IP address is a valid unicast address. | |
size_t | getIpv6Prefix () const |
Obtains the IPv6 prefix for this address. | |
void | setIpv6Prefix (size_t prefix) |
Sets the IPv6 prefix for this address. | |
Private Attributes | |
IpType | m_Type |
uint32_t | m_Ipv4 |
uint8_t | m_Ipv6 [16] |
bool | m_bSet |
size_t | m_Ipv6Prefix |
An IPv4/IPv6 address
Definition at line 29 of file IpAddress.h.
enum IpAddress::IpType |
The type of an IP address
Definition at line 33 of file IpAddress.h.
|
inline |
Constructors
Definition at line 40 of file IpAddress.h.
References getIp(), getIpv6Prefix(), and getType().
|
inline |
IP getters
Definition at line 93 of file IpAddress.h.
Referenced by IpAddress(), and operator+().
|
inline |
Type getter
Definition at line 106 of file IpAddress.h.
Referenced by IpAddress(), and operator+().
Operators
Definition at line 113 of file IpAddress.h.
References getIp(), getIpv6Prefix(), getType(), operator!=(), and operator==().
|
inline |
IP setters - only one type is valid at any one point in time
Definition at line 75 of file IpAddress.h.