Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <netaddress.h>
Collaboration diagram for CSubNet:Public Member Functions | |
| CSubNet () | |
| CSubNet (const CNetAddr &addr, int32_t mask) | |
| CSubNet (const CNetAddr &addr, const CNetAddr &mask) | |
| CSubNet (const CNetAddr &addr) | |
| bool | Match (const CNetAddr &addr) const |
| std::string | ToString () const |
| bool | IsValid () const |
| template<typename Stream , typename Operation > | |
| void | SerializationOp (Stream &s, Operation ser_action) |
Public Attributes | |
| ADD_SERIALIZE_METHODS | |
Protected Attributes | |
| CNetAddr | network |
| Network (base) address. More... | |
| uint8_t | netmask [16] |
| Netmask, in network byte order. More... | |
| bool | valid |
| Is this value valid? (only used to signal parse errors) More... | |
Friends | |
| bool | operator== (const CSubNet &a, const CSubNet &b) |
| bool | operator!= (const CSubNet &a, const CSubNet &b) |
| bool | operator< (const CSubNet &a, const CSubNet &b) |
Detailed Description
Definition at line 105 of file netaddress.h.
Constructor & Destructor Documentation
◆ CSubNet() [1/4]
| CSubNet::CSubNet | ( | ) |
Definition at line 591 of file netaddress.cpp.
References netmask.
◆ CSubNet() [2/4]
| CSubNet::CSubNet | ( | const CNetAddr & | addr, |
| int32_t | mask | ||
| ) |
Definition at line 597 of file netaddress.cpp.
References CNetAddr::ip, CNetAddr::IsIPv4(), immer::detail::hamts::mask, netmask, network, and valid.
◆ CSubNet() [3/4]
Definition at line 622 of file netaddress.cpp.
References CNetAddr::ip, CNetAddr::IsIPv4(), immer::detail::hamts::mask, netmask, network, and valid.
◆ CSubNet() [4/4]
|
explicit |
Definition at line 640 of file netaddress.cpp.
Member Function Documentation
◆ IsValid()
| bool CSubNet::IsValid | ( | ) | const |
Definition at line 711 of file netaddress.cpp.
References valid.
Referenced by AppInitMain(), InitHTTPAllowList(), LookupSubNet(), setban(), and RPCConsole::unbanSelectedNode().
◆ Match()
| bool CSubNet::Match | ( | const CNetAddr & | addr | ) | const |
Definition at line 647 of file netaddress.cpp.
References CNetAddr::ip, CNetAddr::IsValid(), netmask, network, and valid.
Referenced by CConnman::Ban(), CConnman::FindNode(), and CConnman::IsBanned().
◆ SerializationOp()
|
inline |
◆ ToString()
| std::string CSubNet::ToString | ( | ) | const |
Definition at line 673 of file netaddress.cpp.
References immer::detail::rbts::bits, CNetAddr::IsIPv4(), netmask, NetmaskBits(), network, strprintf, and CNetAddr::ToString().
Referenced by BanTableModel::data(), BannedNodeLessThan::operator()(), and CConnman::SweepBanned().
Friends And Related Function Documentation
◆ operator!=
Definition at line 129 of file netaddress.h.
◆ operator<
Definition at line 721 of file netaddress.cpp.
◆ operator==
Definition at line 716 of file netaddress.cpp.
Member Data Documentation
◆ ADD_SERIALIZE_METHODS
| CSubNet::ADD_SERIALIZE_METHODS |
Definition at line 132 of file netaddress.h.
◆ netmask
|
protected |
Netmask, in network byte order.
Definition at line 111 of file netaddress.h.
Referenced by CSubNet(), Match(), operator<(), operator==(), SerializationOp(), and ToString().
◆ network
|
protected |
Network (base) address.
Definition at line 109 of file netaddress.h.
Referenced by CSubNet(), Match(), operator<(), operator==(), SerializationOp(), and ToString().
◆ valid
|
protected |
Is this value valid? (only used to signal parse errors)
Definition at line 113 of file netaddress.h.
Referenced by CSubNet(), IsValid(), Match(), operator==(), and SerializationOp().
The documentation for this class was generated from the following files:
- src/netaddress.h
- src/netaddress.cpp

