#include <NetworkConfiguratorBase.h>
inet::NetworkConfiguratorBase::InterfaceMatcher::InterfaceMatcher |
( |
const char * |
pattern | ) |
|
555 cStringTokenizer tokenizer(pattern);
556 while (tokenizer.hasMoreTokens()) {
557 const char *token = tokenizer.nextToken();
std::vector< inet::PatternMatcher * > nameMatchers
Definition: NetworkConfiguratorBase.h:146
std::vector< inet::PatternMatcher * > towardsMatchers
Definition: NetworkConfiguratorBase.h:147
bool matchesany
Definition: NetworkConfiguratorBase.h:145
Glob-style pattern matching class, adopted to special OMNeT++ requirements.
Definition: PatternMatcher.h:78
bool isEmpty(const char *s)
Definition: L2NetworkConfigurator.cc:35
inet::NetworkConfiguratorBase::InterfaceMatcher::~InterfaceMatcher |
( |
| ) |
|
570 delete towardsMatcher;
std::vector< inet::PatternMatcher * > nameMatchers
Definition: NetworkConfiguratorBase.h:146
std::vector< inet::PatternMatcher * > towardsMatchers
Definition: NetworkConfiguratorBase.h:147
bool inet::NetworkConfiguratorBase::InterfaceMatcher::matches |
( |
InterfaceInfo * |
interfaceInfo | ) |
|
Referenced by inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration().
578 const char *interfaceName = interfaceInfo->interfaceEntry->getName();
580 if (nameMatcher->matches(interfaceName))
583 LinkInfo *linkInfo = interfaceInfo->linkInfo;
584 cModule *ownerModule = interfaceInfo->interfaceEntry->getInterfaceTable()->getHostModule();
585 for (
auto & candidateInfo : linkInfo->interfaceInfos) {
586 cModule *candidateModule = candidateInfo->interfaceEntry->getInterfaceTable()->getHostModule();
587 if (candidateModule == ownerModule)
589 std::string candidateFullPath = candidateModule->getFullPath();
590 std::string candidateShortenedFullPath = candidateFullPath.substr(candidateFullPath.find(
'.') + 1);
592 if (towardsMatcher->matches(candidateShortenedFullPath.c_str()) ||
593 towardsMatcher->matches(candidateFullPath.c_str()))
std::vector< inet::PatternMatcher * > nameMatchers
Definition: NetworkConfiguratorBase.h:146
std::vector< inet::PatternMatcher * > towardsMatchers
Definition: NetworkConfiguratorBase.h:147
bool matchesany
Definition: NetworkConfiguratorBase.h:145
bool inet::NetworkConfiguratorBase::InterfaceMatcher::matchesAny |
( |
| ) |
|
|
inline |
bool matchesany
Definition: NetworkConfiguratorBase.h:145
bool inet::NetworkConfiguratorBase::InterfaceMatcher::matchesany = false |
|
protected |
std::vector<inet::PatternMatcher *> inet::NetworkConfiguratorBase::InterfaceMatcher::towardsMatchers |
|
protected |
The documentation for this class was generated from the following files: