Bitcoin ABC  0.28.12
P2P Digital Currency
Namespaces | Functions | Variables
netaddress.cpp File Reference
#include <netaddress.h>
#include <crypto/common.h>
#include <crypto/sha3.h>
#include <hash.h>
#include <prevector.h>
#include <util/asmap.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <tinyformat.h>
#include <algorithm>
#include <array>
#include <cstdint>
#include <ios>
#include <iterator>
#include <tuple>
Include dependency graph for netaddress.cpp:

Go to the source code of this file.

Namespaces

 torv3
 

Functions

static void torv3::Checksum (Span< const uint8_t > addr_pubkey, uint8_t(&checksum)[CHECKSUM_LEN])
 
static std::string IPv4ToString (Span< const uint8_t > a)
 
static std::string IPv6ToString (Span< const uint8_t > a, uint32_t scope_id)
 Return an IPv6 address text representation with zero compression as described in RFC 5952 ("A Recommendation for IPv6 Address Text Representation"). More...
 
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 constexpr size_t torv3::CHECKSUM_LEN = 2
 
static const uint8_t torv3::VERSION [] = {3}
 
static constexpr size_t torv3::TOTAL_LEN
 
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 876 of file netaddress.cpp.

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

◆ IPv4ToString()

static std::string IPv4ToString ( Span< const uint8_t >  a)
static

Definition at line 563 of file netaddress.cpp.

Here is the caller graph for this function:

◆ IPv6ToString()

static std::string IPv6ToString ( Span< const uint8_t >  a,
uint32_t  scope_id 
)
static

Return an IPv6 address text representation with zero compression as described in RFC 5952 ("A Recommendation for IPv6 Address Text Representation").

Definition at line 570 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 1130 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 681 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 1019 of file netaddress.cpp.

◆ operator<() [3/3]

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

Definition at line 1254 of file netaddress.cpp.

◆ operator==() [1/3]

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

Definition at line 677 of file netaddress.cpp.

◆ operator==() [2/3]

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

Definition at line 1014 of file netaddress.cpp.

◆ operator==() [3/3]

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

Definition at line 1249 of file netaddress.cpp.

Variable Documentation

◆ NET_TEREDO

const int NET_TEREDO = NET_MAX + 1
static

Definition at line 875 of file netaddress.cpp.

◆ NET_UNKNOWN

const int NET_UNKNOWN = NET_MAX + 0
static

Definition at line 874 of file netaddress.cpp.