nfd::NetworkInterfacePredicate Class Reference

Represents a predicate to accept or reject a NetworkInterfaceInfo. More...

#include <core/network-interface-predicate.hpp>

Public Member Functions

 NetworkInterfacePredicate ()
 
void clear ()
 Set the whitelist to "*" and clear the blacklist. More...
 
bool operator!= (const NetworkInterfacePredicate &other) const
 
bool operator() (const ndn::net::NetworkInterface &netif) const
 
bool operator== (const NetworkInterfacePredicate &other) const
 
void parseBlacklist (const boost::property_tree::ptree &list)
 
void parseWhitelist (const boost::property_tree::ptree &list)
 

Detailed Description

Represents a predicate to accept or reject a NetworkInterfaceInfo.

The predicate consists of a whitelist and a blacklist. Whitelist and blacklist can contain, in no particular order, interface names (e.g., ifname eth0), mac addresses (e.g., ether 85:3b:4d:d3:5f:c2), subnets (e.g., subnet 192.0.2.0/24) or a wildcard (*) that matches all interfaces. A NetworkInterfaceInfo is accepted if it matches any entry in the whitelist and none of the entries in the blacklist.

Definition at line 43 of file network-interface-predicate.hpp.

Constructor & Destructor Documentation

nfd::NetworkInterfacePredicate::NetworkInterfacePredicate ( )

Definition at line 35 of file network-interface-predicate.cpp.

Member Function Documentation

void nfd::NetworkInterfacePredicate::clear ( )

Set the whitelist to "*" and clear the blacklist.

Definition at line 41 of file network-interface-predicate.cpp.

bool nfd::NetworkInterfacePredicate::operator!= ( const NetworkInterfacePredicate other) const
inline

Definition at line 67 of file network-interface-predicate.hpp.

bool nfd::NetworkInterfacePredicate::operator() ( const ndn::net::NetworkInterface &  netif) const

Definition at line 125 of file network-interface-predicate.cpp.

bool nfd::NetworkInterfacePredicate::operator== ( const NetworkInterfacePredicate other) const

Definition at line 132 of file network-interface-predicate.cpp.

void nfd::NetworkInterfacePredicate::parseBlacklist ( const boost::property_tree::ptree &  list)

Definition at line 93 of file network-interface-predicate.cpp.

void nfd::NetworkInterfacePredicate::parseWhitelist ( const boost::property_tree::ptree &  list)

Definition at line 87 of file network-interface-predicate.cpp.