![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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) | |
void | Init () |
void | SetPort (unsigned short portIn) |
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 (bool fUseGetnameinfo=true) const |
std::string | ToStringPort () const |
std::string | ToStringIPPort (bool fUseGetnameinfo=true) 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, int nType, int nVersion) |
![]() | |
CNetAddr () | |
CNetAddr (const struct in_addr &ipv4Addr) | |
void | Init () |
void | SetIP (const CNetAddr &ip) |
void | SetRaw (Network network, const uint8_t *data) |
bool | SetSpecial (const std::string &strName) |
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 | IsRFC4862 () const |
bool | IsRFC6052 () const |
bool | IsRFC6145 () const |
bool | IsTor () const |
bool | IsLocal () const |
bool | IsRoutable () const |
bool | IsValid () const |
bool | IsMulticast () const |
enum Network | GetNetwork () const |
std::string | ToString () const |
std::string | ToStringIP (bool fUseGetnameinfo=true) 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=NULL) const |
CNetAddr (const struct in6_addr &pipv6Addr) | |
bool | GetIn6Addr (struct in6_addr *pipv6Addr) const |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion) |
Public Attributes | |
ADD_SERIALIZE_METHODS | |
![]() | |
ADD_SERIALIZE_METHODS | |
Protected Attributes | |
unsigned short | port |
![]() | |
unsigned char | ip [16] |
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
Definition at line 132 of file netaddress.h.
CService::CService | ( | ) |
Definition at line 454 of file netaddress.cpp.
Referenced by SetSockAddr().
CService::CService | ( | const CNetAddr & | ip, |
unsigned short | port | ||
) |
Definition at line 459 of file netaddress.cpp.
CService::CService | ( | const struct in_addr & | ipv4Addr, |
unsigned short | port | ||
) |
Definition at line 463 of file netaddress.cpp.
CService::CService | ( | const struct sockaddr_in & | addr | ) |
Definition at line 471 of file netaddress.cpp.
CService::CService | ( | const struct in6_addr & | ipv6Addr, |
unsigned short | port | ||
) |
Definition at line 467 of file netaddress.cpp.
CService::CService | ( | const struct sockaddr_in6 & | addr | ) |
Definition at line 476 of file netaddress.cpp.
std::vector< unsigned char > CService::GetKey | ( | ) | const |
Definition at line 544 of file netaddress.cpp.
Referenced by CNode::AddAddressKnown(), CAddrInfo::GetBucketPosition(), CAddrInfo::GetTriedBucket(), CNode::PushAddress(), and SendMessages().
unsigned short CService::GetPort | ( | ) | const |
Definition at line 495 of file netaddress.cpp.
Referenced by AddLocal(), AppInit2(), ConnectSocket(), CMasternodeBroadcast::Create(), OptionsModel::getProxySettings(), CActiveMasternode::ManageStateInitial(), CMasternodeBroadcast::SimpleCheck(), and CConnman::ThreadOpenConnections().
bool CService::GetSockAddr | ( | struct sockaddr * | paddr, |
socklen_t * | addrlen | ||
) | const |
Definition at line 515 of file netaddress.cpp.
Referenced by CConnman::BindListenPort(), ConnectSocketDirectly(), and CNetAddr::ToStringIP().
void CService::Init | ( | ) |
Definition at line 449 of file netaddress.cpp.
Referenced by CService().
|
inline |
Definition at line 161 of file netaddress.h.
void CService::SetPort | ( | unsigned short | portIn | ) |
Definition at line 573 of file netaddress.cpp.
bool CService::SetSockAddr | ( | const struct sockaddr * | paddr | ) |
Definition at line 481 of file netaddress.cpp.
Referenced by CConnman::AcceptConnection().
std::string CService::ToString | ( | bool | fUseGetnameinfo = true | ) | const |
Definition at line 568 of file netaddress.cpp.
Referenced by CConnman::AcceptConnection(), CMasternodeMan::Add(), TorController::add_onion_cb(), AddLocal(), AdvertiseLocal(), CMasternodeMan::AskForMN(), CConnman::BindListenPort(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), CMasternodeBroadcast::CheckOutpoint(), CMasternodeBroadcast::CheckSignature(), CConnman::ConnectNode(), ConnectSocketDirectly(), CNode::copyStats(), CMasternodeMan::DsegUpdate(), getpoolinfo(), CAddrMan::Good_(), HTTPReq_JSONRPC(), CActiveMasternode::ManageStateInitial(), masternode(), masternodebroadcast(), masternodelist(), CPrivateSendServer::ProcessMessage(), CPrivateSendClient::ProcessMessage(), CGovernanceManager::ProcessMessage(), ProcessMessage(), CMasternodeMan::ProcessVerifyBroadcast(), CMasternodeMan::ProcessVerifyReply(), RemoveLocal(), SendMessages(), CMasternodeMan::SendVerifyReply(), CMasternodeMan::SendVerifyRequest(), CMasternodeBroadcast::Sign(), CMasternodeBroadcast::SimpleCheck(), CPrivateSendClient::StartNewQueue(), CConnman::ThreadOpenConnections(), ThreadSendAlert(), CConnman::ThreadSocketHandler(), CMasternodeBroadcast::Update(), CMasternodeMan::UpdateMasternodeList(), MasternodeList::updateMyMasternodeInfo(), and MasternodeList::updateNodeList().
std::string CService::ToStringIPPort | ( | bool | fUseGetnameinfo = true | ) | const |
Definition at line 559 of file netaddress.cpp.
Referenced by CAddrMan::Add(), CNode::CNode(), getinfo(), GetNetworksInfo(), and ToString().
std::string CService::ToStringPort | ( | ) | const |
Definition at line 554 of file netaddress.cpp.
Referenced by ToStringIPPort(), and OptionsDialog::updateDefaultProxyNets().
Definition at line 505 of file netaddress.cpp.
Definition at line 510 of file netaddress.cpp.
Definition at line 500 of file netaddress.cpp.
CService::ADD_SERIALIZE_METHODS |
Definition at line 158 of file netaddress.h.
|
protected |
Definition at line 135 of file netaddress.h.
Referenced by GetKey(), GetPort(), GetSockAddr(), Init(), operator!=(), operator<(), operator==(), SerializationOp(), SetPort(), and ToStringPort().