Bitcoin ABC  0.22.12
P2P Digital Currency
Functions | Variables
netaddress.cpp File Reference
#include <netaddress.h>
#include <hash.h>
#include <tinyformat.h>
#include <util/asmap.h>
#include <util/strencodings.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 uint8_t pchIPv4 [12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}
 
static const uint8_t pchOnionCat [] = {0xFD, 0x87, 0xD8, 0x7E, 0xEB, 0x43}
 
static const uint8_t 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 565 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 861 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 372 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 701 of file netaddress.cpp.

◆ operator<() [3/3]

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

Definition at line 939 of file netaddress.cpp.

◆ operator==() [1/3]

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

Definition at line 368 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 696 of file netaddress.cpp.

◆ operator==() [3/3]

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

Definition at line 934 of file netaddress.cpp.

Variable Documentation

◆ g_internal_prefix

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

Definition at line 17 of file netaddress.cpp.

◆ NET_TEREDO

const int NET_TEREDO = NET_MAX + 1
static

Definition at line 564 of file netaddress.cpp.

◆ NET_UNKNOWN

const int NET_UNKNOWN = NET_MAX + 0
static

Definition at line 563 of file netaddress.cpp.

◆ pchIPv4

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

Definition at line 13 of file netaddress.cpp.

◆ pchOnionCat

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

Definition at line 14 of file netaddress.cpp.