Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.h
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | public: | ||||
enum Network GetNetwork() const; | enum Network GetNetwork() const; | ||||
std::string ToString() const; | std::string ToString() const; | ||||
std::string ToStringIP() const; | std::string ToStringIP() const; | ||||
unsigned int GetByte(int n) const; | unsigned int GetByte(int n) const; | ||||
uint64_t GetHash() const; | uint64_t GetHash() const; | ||||
bool GetInAddr(struct in_addr *pipv4Addr) const; | bool GetInAddr(struct in_addr *pipv4Addr) const; | ||||
uint32_t GetNetClass() const; | uint32_t GetNetClass() const; | ||||
//! For IPv4, mapped IPv4, SIIT translated IPv4, Teredo, 6to4 tunneled | |||||
//! addresses, return the relevant IPv4 address as a uint32. | |||||
uint32_t GetLinkedIPv4() const; | |||||
//! Whether this address has a linked IPv4 address (see GetLinkedIPv4()). | |||||
bool HasLinkedIPv4() const; | |||||
// The AS on the BGP path to the node we use to diversify | // The AS on the BGP path to the node we use to diversify | ||||
// peers in AddrMan bucketing based on the AS infrastructure. | // peers in AddrMan bucketing based on the AS infrastructure. | ||||
// The ip->AS mapping depends on how asmap is constructed. | // The ip->AS mapping depends on how asmap is constructed. | ||||
uint32_t GetMappedAS(const std::vector<bool> &asmap) const; | uint32_t GetMappedAS(const std::vector<bool> &asmap) const; | ||||
std::vector<uint8_t> GetGroup(const std::vector<bool> &asmap) const; | std::vector<uint8_t> GetGroup(const std::vector<bool> &asmap) const; | ||||
std::vector<uint8_t> GetAddrBytes() const { | std::vector<uint8_t> GetAddrBytes() const { | ||||
return {std::begin(ip), std::end(ip)}; | return {std::begin(ip), std::end(ip)}; | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |