Represents a predicate to accept or reject a NetworkInterfaceInfo. More...
#include <network-interface-predicate.hpp>
Public Member Functions | |
NetworkInterfacePredicate () | |
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) |
bool | operator() (const NetworkInterfaceInfo &nic) const |
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 45 of file network-interface-predicate.hpp.
nfd::NetworkInterfacePredicate::NetworkInterfacePredicate | ( | ) |
Definition at line 34 of file network-interface-predicate.cpp.
References clear().
void nfd::NetworkInterfacePredicate::clear | ( | ) |
Set the whitelist to "*" and clear the blacklist.
Definition at line 40 of file network-interface-predicate.cpp.
Referenced by NetworkInterfacePredicate().
void nfd::NetworkInterfacePredicate::parseWhitelist | ( | const boost::property_tree::ptree & | list | ) |
Definition at line 86 of file network-interface-predicate.cpp.
References nfd::parseList().
Referenced by nfd::FaceManager::setConfigFile().
void nfd::NetworkInterfacePredicate::parseBlacklist | ( | const boost::property_tree::ptree & | list | ) |
Definition at line 92 of file network-interface-predicate.cpp.
References nfd::parseList().
Referenced by nfd::FaceManager::setConfigFile().
bool nfd::NetworkInterfacePredicate::operator() | ( | const NetworkInterfaceInfo & | nic | ) | const |
Definition at line 116 of file network-interface-predicate.cpp.
References nfd::doesMatchRule().