nfd::Network Class Reference

#include <core/network.hpp>

+ Inheritance diagram for nfd::Network:
+ Collaboration diagram for nfd::Network:

Public Member Functions

 Network ()
 
 Network (const boost::asio::ip::address &minAddress, const boost::asio::ip::address &maxAddress)
 
bool doesContain (const boost::asio::ip::address &address) const noexcept
 

Static Public Member Functions

static const NetworkgetMaxRangeV4 ()
 
static const NetworkgetMaxRangeV6 ()
 
static bool isValidCidr (std::string_view cidr) noexcept
 

Friends

std::ostream & operator<< (std::ostream &os, const Network &network)
 
bool operator== (const Network &lhs, const Network &rhs) noexcept
 
std::istream & operator>> (std::istream &is, Network &network)
 

Detailed Description

Definition at line 36 of file network.hpp.

Constructor & Destructor Documentation

◆ Network() [1/2]

nfd::Network::Network ( )
default

◆ Network() [2/2]

nfd::Network::Network ( const boost::asio::ip::address &  minAddress,
const boost::asio::ip::address &  maxAddress 
)

Definition at line 40 of file network.cpp.

Member Function Documentation

◆ doesContain()

bool nfd::Network::doesContain ( const boost::asio::ip::address &  address) const
inlinenoexcept

Definition at line 45 of file network.hpp.

◆ getMaxRangeV4()

const Network & nfd::Network::getMaxRangeV4 ( )
static

Definition at line 48 of file network.cpp.

◆ getMaxRangeV6()

const Network & nfd::Network::getMaxRangeV6 ( )
static

Definition at line 56 of file network.cpp.

◆ isValidCidr()

bool nfd::Network::isValidCidr ( std::string_view  cidr)
staticnoexcept

Definition at line 66 of file network.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Network network 
)
friend

Definition at line 82 of file network.cpp.

◆ operator==

bool operator== ( const Network lhs,
const Network rhs 
)
friend

Definition at line 61 of file network.hpp.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
Network network 
)
friend

Definition at line 89 of file network.cpp.