Dash Core  0.12.2.1
P2P Digital Currency
CSubNet Class Reference

#include <netaddress.h>

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, int nType, int nVersion)
 

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 94 of file netaddress.h.

Constructor & Destructor Documentation

◆ CSubNet() [1/4]

CSubNet::CSubNet ( )

Definition at line 578 of file netaddress.cpp.

◆ CSubNet() [2/4]

CSubNet::CSubNet ( const CNetAddr addr,
int32_t  mask 
)

Definition at line 584 of file netaddress.cpp.

◆ CSubNet() [3/4]

CSubNet::CSubNet ( const CNetAddr addr,
const CNetAddr mask 
)

Definition at line 609 of file netaddress.cpp.

◆ CSubNet() [4/4]

CSubNet::CSubNet ( const CNetAddr addr)
explicit

Definition at line 627 of file netaddress.cpp.

Member Function Documentation

◆ IsValid()

bool CSubNet::IsValid ( ) const

◆ Match()

bool CSubNet::Match ( const CNetAddr addr) const

◆ SerializationOp()

template<typename Stream , typename Operation >
void CSubNet::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 124 of file netaddress.h.

◆ ToString()

std::string CSubNet::ToString ( ) const

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const CSubNet a,
const CSubNet b 
)
friend

Definition at line 708 of file netaddress.cpp.

◆ operator<

bool operator< ( const CSubNet a,
const CSubNet b 
)
friend

Definition at line 713 of file netaddress.cpp.

◆ operator==

bool operator== ( const CSubNet a,
const CSubNet b 
)
friend

Definition at line 703 of file netaddress.cpp.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CSubNet::ADD_SERIALIZE_METHODS

Definition at line 121 of file netaddress.h.

◆ netmask

uint8_t CSubNet::netmask[16]
protected

Netmask, in network byte order.

Definition at line 100 of file netaddress.h.

Referenced by CSubNet(), Match(), operator<(), operator==(), SerializationOp(), and ToString().

◆ network

CNetAddr CSubNet::network
protected

Network (base) address.

Definition at line 98 of file netaddress.h.

Referenced by CSubNet(), Match(), operator<(), operator==(), SerializationOp(), and ToString().

◆ valid

bool CSubNet::valid
protected

Is this value valid? (only used to signal parse errors)

Definition at line 102 of file netaddress.h.

Referenced by CSubNet(), IsValid(), Match(), operator==(), and SerializationOp().


The documentation for this class was generated from the following files: