Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

netaddress.cpp File Reference
#include <netaddress.h>
#include <netbase.h>
#include <hash.h>
#include <utilstrencodings.h>
#include <tinyformat.h>
+ Include dependency graph for netaddress.cpp:

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)
 
static int GetExtNetwork (const CNetAddr *addr)
 
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)
 

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 unsigned char g_internal_prefix [] = { 0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24 }
 
bool fAllowPrivateNet = DEFAULT_ALLOWPRIVATENET
 
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

◆ NetmaskBits()

static int NetmaskBits ( uint8_t  x)
inlinestatic

Definition at line 657 of file netaddress.cpp.

Referenced by CSubNet::ToString().

◆ operator<() [1/3]

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

Definition at line 298 of file netaddress.cpp.

References CNetAddr::ip.

◆ operator<() [2/3]

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

Definition at line 522 of file netaddress.cpp.

References CService::port.

◆ operator<() [3/3]

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

Definition at line 721 of file netaddress.cpp.

References CSubNet::netmask, and CSubNet::network.

◆ operator==() [1/3]

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

Definition at line 293 of file netaddress.cpp.

References CNetAddr::ip.

◆ operator==() [2/3]

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

Definition at line 517 of file netaddress.cpp.

References CService::port.

◆ operator==() [3/3]

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

Definition at line 716 of file netaddress.cpp.

References CSubNet::netmask, CSubNet::network, and CSubNet::valid.

Variable Documentation

◆ fAllowPrivateNet

bool fAllowPrivateNet = DEFAULT_ALLOWPRIVATENET

Definition at line 18 of file netaddress.cpp.

Referenced by AppInitParameterInteraction(), and CNetAddr::IsRoutable().

◆ g_internal_prefix

const unsigned char g_internal_prefix[] = { 0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24 }
static

◆ NET_TEREDO

const int NET_TEREDO = NET_MAX + 1
static

Definition at line 403 of file netaddress.cpp.

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

◆ NET_UNKNOWN

const int NET_UNKNOWN = NET_MAX + 0
static

Definition at line 402 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 12 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 13 of file netaddress.cpp.

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

Released under the MIT license