Bitcoin
|
#include <netaddress.h>
Public Member Functions | |
CService () | |
CService (const CNetAddr &ip, unsigned short port) | |
CService (const struct in_addr &ipv4Addr, unsigned short port) | |
CService (const struct sockaddr_in &addr) | |
unsigned short | GetPort () const |
bool | GetSockAddr (struct sockaddr *paddr, socklen_t *addrlen) const |
bool | SetSockAddr (const struct sockaddr *paddr) |
std::vector< unsigned char > | GetKey () const |
std::string | ToString () const |
std::string | ToStringPort () const |
std::string | ToStringIPPort () const |
CService (const struct in6_addr &ipv6Addr, unsigned short port) | |
CService (const struct sockaddr_in6 &addr) | |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action) |
![]() | |
CNetAddr () | |
CNetAddr (const struct in_addr &ipv4Addr) | |
void | SetIP (const CNetAddr &ip) |
bool | SetInternal (const std::string &name) |
bool | SetSpecial (const std::string &strName) |
bool | IsBindAny () const |
bool | IsIPv4 () const |
bool | IsIPv6 () const |
bool | IsRFC1918 () const |
bool | IsRFC2544 () const |
bool | IsRFC6598 () const |
bool | IsRFC5737 () const |
bool | IsRFC3849 () const |
bool | IsRFC3927 () const |
bool | IsRFC3964 () const |
bool | IsRFC4193 () const |
bool | IsRFC4380 () const |
bool | IsRFC4843 () const |
bool | IsRFC7343 () const |
bool | IsRFC4862 () const |
bool | IsRFC6052 () const |
bool | IsRFC6145 () const |
bool | IsTor () const |
bool | IsLocal () const |
bool | IsRoutable () const |
bool | IsInternal () const |
bool | IsValid () const |
enum Network | GetNetwork () const |
std::string | ToString () const |
std::string | ToStringIP () const |
unsigned int | GetByte (int n) const |
uint64_t | GetHash () const |
bool | GetInAddr (struct in_addr *pipv4Addr) const |
std::vector< unsigned char > | GetGroup () const |
int | GetReachabilityFrom (const CNetAddr *paddrPartner=nullptr) const |
CNetAddr (const struct in6_addr &pipv6Addr, const uint32_t scope=0) | |
bool | GetIn6Addr (struct in6_addr *pipv6Addr) const |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action) |
Public Attributes | |
ADD_SERIALIZE_METHODS | |
![]() | |
ADD_SERIALIZE_METHODS | |
Protected Attributes | |
uint16_t | port |
![]() | |
unsigned char | ip [16] |
uint32_t | scopeId {0} |
Friends | |
bool | operator== (const CService &a, const CService &b) |
bool | operator!= (const CService &a, const CService &b) |
bool | operator< (const CService &a, const CService &b) |
A combination of a network address (CNetAddr) and a (TCP) port
CService::CService | ( | ) |
CService::CService | ( | const CNetAddr & | ip, |
unsigned short | port | ||
) |
CService::CService | ( | const struct in_addr & | ipv4Addr, |
unsigned short | port | ||
) |
|
explicit |
CService::CService | ( | const struct in6_addr & | ipv6Addr, |
unsigned short | port | ||
) |
|
explicit |
std::vector< unsigned char > CService::GetKey | ( | ) | const |
unsigned short CService::GetPort | ( | ) | const |
bool CService::GetSockAddr | ( | struct sockaddr * | paddr, |
socklen_t * | addrlen | ||
) | const |
Obtain the IPv4/6 socket address this represents.
[out] | paddr | The obtained socket address. |
[in,out] | addrlen | The size, in bytes, of the address structure pointed to by paddr. The value that's pointed to by this parameter might change after calling this function if the size of the corresponding address structure changed. |
|
inline |
bool CService::SetSockAddr | ( | const struct sockaddr * | paddr | ) |
std::string CService::ToString | ( | ) | const |
std::string CService::ToStringIPPort | ( | ) | const |
std::string CService::ToStringPort | ( | ) | const |
CService::ADD_SERIALIZE_METHODS |
|
protected |