Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.h
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | public: | ||||
bool IsInternal() const; | bool IsInternal() const; | ||||
bool IsValid() const; | bool IsValid() const; | ||||
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; | |||||
// The AS on the BGP path to the node we use to diversify | |||||
// peers in AddrMan bucketing based on the AS infrastructure. | |||||
// The ip->AS mapping depends on how asmap is constructed. | |||||
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)}; | ||||
} | } | ||||
int GetReachabilityFrom(const CNetAddr *paddrPartner = nullptr) const; | int GetReachabilityFrom(const CNetAddr *paddrPartner = nullptr) const; | ||||
explicit CNetAddr(const struct in6_addr &pipv6Addr, | explicit CNetAddr(const struct in6_addr &pipv6Addr, | ||||
const uint32_t scope = 0); | const uint32_t scope = 0); | ||||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |