Base class for lifecycle operations that manipulate a network interface.
More...
#include <InterfaceOperations.h>
Base class for lifecycle operations that manipulate a network interface.
◆ Stage
| Enumerator |
|---|
| STAGE_LOCAL | |
| STAGE_LAST | |
◆ InterfaceOperationBase()
| inet::InterfaceOperationBase::InterfaceOperationBase |
( |
| ) |
|
|
inline |
◆ getInterface()
◆ getNumStages()
| virtual int inet::InterfaceOperationBase::getNumStages |
( |
| ) |
const |
|
inlinevirtual |
◆ initialize()
| void inet::InterfaceOperationBase::initialize |
( |
cModule * |
module, |
|
|
StringMap & |
params |
|
) |
| |
|
virtual |
Initialize the operation using the parameters provided in the string map.
The implementation should destructively modify the map, removing from it the parameters it understands. Ideally, the map should be empty when this method returns; if it is not, the caller should treat that as an error, and report the remaining parameters as unrecognized by the operation.
Reimplemented from inet::LifecycleOperation.
22 throw cRuntimeError(
"Interface operations may only be applied to network nodes (host, router, etc.)");
27 IInterfaceTable *ift = L3AddressResolver().findInterfaceTableOf(module);
29 throw cRuntimeError(
"Interface table of network node '%s' not found, required for operation %s", module->getFullPath().c_str(), getClassName());
30 std::string interfaceName = params[
"interfacename"];
31 params.erase(
"interfacename");
32 if (interfaceName.empty())
33 throw cRuntimeError(
"interfacename attribute missing, required for operation %s", getClassName());
34 NetworkInterface *
ie = ift->findInterfaceByName(interfaceName.c_str());
36 throw cRuntimeError(
"No interface named '%s', required for operation %s", interfaceName.c_str(), getClassName());
◆ ie
The documentation for this class was generated from the following files: