Bitcoin Core  0.18.99
P2P Digital Currency
Functions | Variables
netaddress.cpp File Reference
#include <netaddress.h>
#include <hash.h>
#include <util/strencodings.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 }
 
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 501 of file netaddress.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NetmaskBits()

static int NetmaskBits ( uint8_t  x)
inlinestatic
Returns
The number of 1-bits in the prefix of the specified subnet mask. If the specified subnet mask is not a valid one, -1.

Definition at line 772 of file netaddress.cpp.

Here is the caller graph for this function:

◆ operator<() [1/3]

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

Definition at line 361 of file netaddress.cpp.

Here is the caller graph for this function:

◆ operator<() [2/3]

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

Definition at line 619 of file netaddress.cpp.

◆ operator<() [3/3]

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

Definition at line 836 of file netaddress.cpp.

◆ operator==() [1/3]

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

Definition at line 356 of file netaddress.cpp.

◆ operator==() [2/3]

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

Definition at line 614 of file netaddress.cpp.

◆ operator==() [3/3]

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

Definition at line 831 of file netaddress.cpp.

Variable Documentation

◆ g_internal_prefix

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

Definition at line 15 of file netaddress.cpp.

◆ NET_TEREDO

const int NET_TEREDO = NET_MAX + 1
static

Definition at line 500 of file netaddress.cpp.

◆ NET_UNKNOWN

const int NET_UNKNOWN = NET_MAX + 0
static

Definition at line 499 of file netaddress.cpp.

◆ pchIPv4

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

Definition at line 11 of file netaddress.cpp.

◆ pchOnionCat

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

Definition at line 12 of file netaddress.cpp.