PIMInterfaceTable contains an PIMInterface entry for each interface on which PIM is enabled.
More...
#include <PIMInterfaceTable.h>
PIMInterfaceTable contains an PIMInterface entry for each interface on which PIM is enabled.
When interfaces are added to/deleted from the InterfaceTable, then the corresponding PIMInterface entry is added/deleted automatically.
inet::PIMInterfaceTable::~PIMInterfaceTable |
( |
| ) |
|
|
virtual |
PIMInterfaceVector pimInterfaces
Definition: PIMInterfaceTable.h:74
155 cXMLElement *config = par(
"pimConfig").xmlValue();
156 cXMLElementList interfaceElements = config->getChildrenByTagName(
"interface");
157 InterfaceMatcher matcher(interfaceElements);
159 int i = matcher.findMatchingSelector(ie);
161 PIMInterface *pimInterface =
createInterface(ie, interfaceElements[i]);
virtual PIMInterface * createInterface(InterfaceEntry *ie, cXMLElement *config)
Definition: PIMInterfaceTable.cc:96
PIMInterfaceVector pimInterfaces
Definition: PIMInterfaceTable.h:74
virtual PIMInterfaceVector::iterator findInterface(InterfaceEntry *ie)
Definition: PIMInterfaceTable.cc:142
void inet::PIMInterfaceTable::configureInterfaces |
( |
cXMLElement * |
config | ) |
|
|
protectedvirtual |
79 cXMLElementList interfaceElements = config->getChildrenByTagName(
"interface");
80 InterfaceMatcher matcher(interfaceElements);
81 IInterfaceTable *ift = getModuleFromPar<IInterfaceTable>(par(
"interfaceTableModule"),
this);
83 for (
int k = 0;
k < ift->getNumInterfaces(); ++
k) {
84 InterfaceEntry *ie = ift->getInterface(
k);
85 if (ie->isMulticast() && !ie->isLoopback()) {
86 int i = matcher.findMatchingSelector(ie);
virtual PIMInterface * createInterface(InterfaceEntry *ie, cXMLElement *config)
Definition: PIMInterfaceTable.cc:96
PIMInterfaceVector pimInterfaces
Definition: PIMInterfaceTable.h:74
const double k
Definition: QAM16Modulation.cc:24
98 const char *modeAttr = config->getAttribute(
"mode");
103 if (strcmp(modeAttr,
"dense") == 0)
105 else if (strcmp(modeAttr,
"sparse") == 0)
108 throw cRuntimeError(
"PIMInterfaceTable: invalid 'mode' attribute value in the configuration of interface '%s'", ie->getName());
110 const char *stateRefreshAttr = config->getAttribute(
"state-refresh");
111 bool stateRefreshFlag = stateRefreshAttr && !strcmp(stateRefreshAttr,
"true");
113 return new PIMInterface(ie, mode, stateRefreshFlag);
PIMMode
Definition: PIMInterfaceTable.h:35
Definition: PIMInterfaceTable.h:37
Definition: PIMInterfaceTable.h:36
PIMInterfaceTable::PIMInterfaceVector::iterator inet::PIMInterfaceTable::findInterface |
( |
InterfaceEntry * |
ie | ) |
|
|
protectedvirtual |
145 if ((*it)->getInterfacePtr() == ie)
PIMInterfaceVector pimInterfaces
Definition: PIMInterfaceTable.h:74
virtual PIMInterface* inet::PIMInterfaceTable::getInterface |
( |
int |
k | ) |
|
|
inlinevirtual |
PIMInterface * inet::PIMInterfaceTable::getInterfaceById |
( |
int |
interfaceId | ) |
|
|
virtual |
virtual int inet::PIMInterfaceTable::getNumInterfaces |
( |
| ) |
|
|
inlinevirtual |
void inet::PIMInterfaceTable::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
56 throw cRuntimeError(
"This module doesn't process messages");
void inet::PIMInterfaceTable::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
61 cSimpleModule::initialize(stage);
71 throw cRuntimeError(
"PIMInterfaceTable: containing node not found.");
virtual void configureInterfaces(cXMLElement *config)
Definition: PIMInterfaceTable.cc:77
cModule * findContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:56
Local initializations.
Definition: InitStages.h:35
simsignal_t NF_INTERFACE_CREATED
Definition: NotifierConsts.cc:48
PIMInterfaceVector pimInterfaces
Definition: PIMInterfaceTable.h:74
simsignal_t NF_INTERFACE_DELETED
Definition: NotifierConsts.cc:49
Additional link-layer initializations that depend on the previous stage.
Definition: InitStages.h:64
virtual int inet::PIMInterfaceTable::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
The number of initialization stages.
Definition: InitStages.h:116
void inet::PIMInterfaceTable::receiveSignal |
( |
cComponent * |
source, |
|
|
simsignal_t |
signalID, |
|
|
cObject * |
obj, |
|
|
cObject * |
details |
|
) |
| |
|
overrideprotectedvirtual |
127 Enter_Method_Silent();
131 InterfaceEntry *ie = check_and_cast<InterfaceEntry *>(obj);
132 if (ie->isMulticast() && !ie->isLoopback())
136 InterfaceEntry *ie = check_and_cast<InterfaceEntry *>(obj);
137 if (ie->isMulticast() && !ie->isLoopback())
virtual void removeInterface(InterfaceEntry *ie)
Definition: PIMInterfaceTable.cc:167
virtual void addInterface(InterfaceEntry *ie)
Definition: PIMInterfaceTable.cc:151
simsignal_t NF_INTERFACE_CREATED
Definition: NotifierConsts.cc:48
void printNotificationBanner(simsignal_t signalID, const cObject *obj)
Utility function.
Definition: NotifierConsts.cc:109
simsignal_t NF_INTERFACE_DELETED
Definition: NotifierConsts.cc:49
PIMInterfaceVector pimInterfaces
Definition: PIMInterfaceTable.h:74
virtual PIMInterfaceVector::iterator findInterface(InterfaceEntry *ie)
Definition: PIMInterfaceTable.cc:142
The documentation for this class was generated from the following files: