Dash Core  0.12.2.1
P2P Digital Currency
netaddress.cpp File Reference
#include "netaddress.h"
#include "hash.h"
#include "utilstrencodings.h"
#include "tinyformat.h"

Go to the source code of this file.

Functions

bool operator== (const CNetAddr &a, const CNetAddr &b)
 
bool operator!= (const CNetAddr &a, const CNetAddr &b)
 
bool operator< (const CNetAddr &a, const CNetAddr &b)
 
static int GetExtNetwork (const CNetAddr *addr)
 
bool operator== (const CService &a, const CService &b)
 
bool operator!= (const CService &a, const CService &b)
 
bool operator< (const CService &a, const CService &b)
 
static int NetmaskBits (uint8_t x)
 
bool operator== (const CSubNet &a, const CSubNet &b)
 
bool operator!= (const CSubNet &a, const CSubNet &b)
 
bool operator< (const CSubNet &a, const CSubNet &b)
 

Variables

static const unsigned char pchIPv4 [12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff }
 
static const unsigned char pchOnionCat [] = {0xFD,0x87,0xD8,0x7E,0xEB,0x43}
 
static const int NET_UNKNOWN = NET_MAX + 0
 
static const int NET_TEREDO = NET_MAX + 1
 

Function Documentation

◆ GetExtNetwork()

static int GetExtNetwork ( const CNetAddr addr)
static

Definition at line 381 of file netaddress.cpp.

Referenced by CNetAddr::GetReachabilityFrom().

◆ NetmaskBits()

static int NetmaskBits ( uint8_t  x)
inlinestatic

Definition at line 644 of file netaddress.cpp.

Referenced by CSubNet::ToString().

◆ operator!=() [1/3]

bool operator!= ( const CNetAddr a,
const CNetAddr b 
)

Definition at line 276 of file netaddress.cpp.

◆ operator!=() [2/3]

bool operator!= ( const CService a,
const CService b 
)

Definition at line 505 of file netaddress.cpp.

◆ operator!=() [3/3]

bool operator!= ( const CSubNet a,
const CSubNet b 
)

Definition at line 708 of file netaddress.cpp.

◆ operator<() [1/3]

bool operator< ( const CNetAddr a,
const CNetAddr b 
)

Definition at line 281 of file netaddress.cpp.

◆ operator<() [2/3]

bool operator< ( const CService a,
const CService b 
)

Definition at line 510 of file netaddress.cpp.

◆ operator<() [3/3]

bool operator< ( const CSubNet a,
const CSubNet b 
)

Definition at line 713 of file netaddress.cpp.

◆ operator==() [1/3]

bool operator== ( const CNetAddr a,
const CNetAddr b 
)

Definition at line 271 of file netaddress.cpp.

◆ operator==() [2/3]

bool operator== ( const CService a,
const CService b 
)

Definition at line 500 of file netaddress.cpp.

◆ operator==() [3/3]

bool operator== ( const CSubNet a,
const CSubNet b 
)

Definition at line 703 of file netaddress.cpp.

Variable Documentation

◆ NET_TEREDO

const int NET_TEREDO = NET_MAX + 1
static

Definition at line 380 of file netaddress.cpp.

Referenced by GetExtNetwork(), and CNetAddr::GetReachabilityFrom().

◆ NET_UNKNOWN

const int NET_UNKNOWN = NET_MAX + 0
static

Definition at line 379 of file netaddress.cpp.

Referenced by GetExtNetwork(), and CNetAddr::GetReachabilityFrom().

◆ pchIPv4

const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff }
static

Definition at line 15 of file netaddress.cpp.

Referenced by CNetAddr::IsIPv4(), CNetAddr::IsValid(), and CNetAddr::SetRaw().

◆ pchOnionCat

const unsigned char pchOnionCat[] = {0xFD,0x87,0xD8,0x7E,0xEB,0x43}
static

Definition at line 16 of file netaddress.cpp.

Referenced by CNetAddr::IsTor(), and CNetAddr::SetSpecial().