NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::face::IpAddressPredicate Class Reference

Represents a predicate to accept or reject an IP address. More...

#include <network-predicate.hpp>

Inheritance diagram for nfd::face::IpAddressPredicate:
Collaboration diagram for nfd::face::IpAddressPredicate:

Public Member Functions

bool operator() (const boost::asio::ip::address &address) const
 
- Public Member Functions inherited from nfd::face::NetworkPredicateBase
 NetworkPredicateBase ()
 
virtual ~NetworkPredicateBase ()
 
void clear ()
 Set the whitelist to "*" and clear the blacklist. More...
 
void parseWhitelist (const boost::property_tree::ptree &list)
 
void parseBlacklist (const boost::property_tree::ptree &list)
 
void assign (std::initializer_list< std::pair< std::string, std::string >> whitelist, std::initializer_list< std::pair< std::string, std::string >> blacklist)
 
bool operator== (const NetworkPredicateBase &other) const
 
bool operator!= (const NetworkPredicateBase &other) const
 

Additional Inherited Members

- Protected Attributes inherited from nfd::face::NetworkPredicateBase
std::set< std::string > m_whitelist
 
std::set< std::string > m_blacklist
 

Detailed Description

Represents a predicate to accept or reject an IP address.

The predicate consists of a whitelist and a blacklist. Whitelist and blacklist can contain, in no particular order, IPv4 and IPv6 subnets (e.g., subnet 192.0.2.0/24 or subnet 2001:db8:2::/64) or a wildcard (*) that matches all IP addresses. An IP address is accepted if it matches any entry in the whitelist and none of the entries in the blacklist.

Definition at line 119 of file network-predicate.hpp.

Member Function Documentation

◆ operator()()

bool nfd::face::IpAddressPredicate::operator() ( const boost::asio::ip::address &  address) const

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