IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96))
More...
#include <netaddress.h>
IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96))
Definition at line 32 of file netaddress.h.
◆ CNetAddr() [1/3]
◆ CNetAddr() [2/3]
CNetAddr::CNetAddr |
( |
const struct in_addr & |
ipv4Addr | ) |
|
|
explicit |
◆ CNetAddr() [3/3]
CNetAddr::CNetAddr |
( |
const struct in6_addr & |
pipv6Addr, |
|
|
const uint32_t |
scope = 0 |
|
) |
| |
|
explicit |
◆ GetByte()
unsigned int CNetAddr::GetByte |
( |
int |
n | ) |
const |
◆ GetGroup()
std::vector< unsigned char > CNetAddr::GetGroup |
( |
| ) |
const |
◆ GetHash()
uint64_t CNetAddr::GetHash |
( |
| ) |
const |
◆ GetIn6Addr()
bool CNetAddr::GetIn6Addr |
( |
struct in6_addr * |
pipv6Addr | ) |
const |
◆ GetInAddr()
bool CNetAddr::GetInAddr |
( |
struct in_addr * |
pipv4Addr | ) |
const |
◆ GetNetwork()
enum Network CNetAddr::GetNetwork |
( |
| ) |
const |
◆ GetReachabilityFrom()
int CNetAddr::GetReachabilityFrom |
( |
const CNetAddr * |
paddrPartner = nullptr | ) |
const |
Calculates a metric for how reachable (*this) is from a given partner.
Definition at line 419 of file netaddress.cpp.
◆ Init()
◆ IsInternal()
bool CNetAddr::IsInternal |
( |
| ) |
const |
◆ IsIPv4()
bool CNetAddr::IsIPv4 |
( |
| ) |
const |
◆ IsIPv6()
bool CNetAddr::IsIPv6 |
( |
| ) |
const |
◆ IsLocal()
bool CNetAddr::IsLocal |
( |
| ) |
const |
◆ IsRFC1918()
bool CNetAddr::IsRFC1918 |
( |
| ) |
const |
◆ IsRFC2544()
bool CNetAddr::IsRFC2544 |
( |
| ) |
const |
◆ IsRFC3849()
bool CNetAddr::IsRFC3849 |
( |
| ) |
const |
◆ IsRFC3927()
bool CNetAddr::IsRFC3927 |
( |
| ) |
const |
◆ IsRFC3964()
bool CNetAddr::IsRFC3964 |
( |
| ) |
const |
◆ IsRFC4193()
bool CNetAddr::IsRFC4193 |
( |
| ) |
const |
◆ IsRFC4380()
bool CNetAddr::IsRFC4380 |
( |
| ) |
const |
◆ IsRFC4843()
bool CNetAddr::IsRFC4843 |
( |
| ) |
const |
◆ IsRFC4862()
bool CNetAddr::IsRFC4862 |
( |
| ) |
const |
◆ IsRFC5737()
bool CNetAddr::IsRFC5737 |
( |
| ) |
const |
◆ IsRFC6052()
bool CNetAddr::IsRFC6052 |
( |
| ) |
const |
◆ IsRFC6145()
bool CNetAddr::IsRFC6145 |
( |
| ) |
const |
◆ IsRFC6598()
bool CNetAddr::IsRFC6598 |
( |
| ) |
const |
◆ IsRoutable()
bool CNetAddr::IsRoutable |
( |
| ) |
const |
◆ IsTor()
bool CNetAddr::IsTor |
( |
| ) |
const |
◆ IsValid()
bool CNetAddr::IsValid |
( |
| ) |
const |
◆ SerializationOp()
template<typename Stream , typename Operation >
void CNetAddr::SerializationOp |
( |
Stream & |
s, |
|
|
Operation |
ser_action |
|
) |
| |
|
inline |
◆ SetInternal()
bool CNetAddr::SetInternal |
( |
const std::string & |
name | ) |
|
Transform an arbitrary string into a non-routable ipv6 address.
Useful for mapping resolved addresses back to their source.
Definition at line 49 of file netaddress.cpp.
◆ SetIP()
void CNetAddr::SetIP |
( |
const CNetAddr & |
ip | ) |
|
◆ SetRaw()
void CNetAddr::SetRaw |
( |
Network |
network, |
|
|
const uint8_t * |
data |
|
) |
| |
Set raw IPv4 or IPv6 address (in network byte order)
- Note
- Only NET_IPV4 and NET_IPV6 are allowed for network.
Definition at line 33 of file netaddress.cpp.
◆ SetSpecial()
bool CNetAddr::SetSpecial |
( |
const std::string & |
strName | ) |
|
◆ ToString()
std::string CNetAddr::ToString |
( |
| ) |
const |
◆ ToStringIP()
std::string CNetAddr::ToStringIP |
( |
| ) |
const |
◆ CSubNet
◆ operator!=
◆ operator<
◆ operator==
◆ ADD_SERIALIZE_METHODS
CNetAddr::ADD_SERIALIZE_METHODS |
◆ ip
unsigned char CNetAddr::ip[16] |
|
protected |
◆ scopeId
uint32_t CNetAddr::scopeId |
|
protected |
The documentation for this class was generated from the following files: