#include <FlatNetworkConfigurator6.h>
For more info please see the NED file.
Public Types | |
| typedef std::vector< std::string > | StringVector |
Protected Member Functions | |
| virtual int | numInitStages () const |
| virtual void | initialize (int stage) |
| virtual void | handleMessage (cMessage *msg) |
| void | configureAdvPrefixes (cTopology &topo, StringVector &nonIPTypes) |
| void | addOwnAdvPrefixRoutes (cTopology &topo, StringVector &nonIPTypes) |
| void | addStaticRoutes (cTopology &topo, StringVector &nonIPTypes) |
| void | setDisplayString (int numIPNodes, int numNonIPNodes) |
| bool | isNonIPType (cTopology::Node *node, StringVector &nonIPTypes) |
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
00068 {
00069 error("this module doesn't handle messages, it runs only in initialize()");
00070 }
|
|
|
00038 {
00039 #ifdef WITH_IPv6
00040 // FIXME refactor: make routers[] array? (std::vector<cTopology::Node*>)
00041 // FIXME: spare common beginning for all stages?
00042
00043 cTopology topo("topo");
00044 StringVector types = cStringTokenizer(par("moduleTypes"), " ").asVector();
00045 StringVector nonIPTypes = cStringTokenizer(par("nonIPModuleTypes"), " ").asVector();
00046 for (unsigned int i=0; i<nonIPTypes.size(); i++)
00047 types.push_back(nonIPTypes[i]);
00048
00049 // extract topology
00050 topo.extractByModuleType(types);
00051 EV << "cTopology found " << topo.nodes() << " nodes\n";
00052
00053 if (stage==2)
00054 {
00055 configureAdvPrefixes(topo, nonIPTypes);
00056 }
00057 else if (stage==3)
00058 {
00059 addOwnAdvPrefixRoutes(topo, nonIPTypes);
00060 addStaticRoutes(topo, nonIPTypes);
00061 }
00062 #else
00063 error("FlatNetworkConfigurator6 not supported: WITH_IPv6 option was off during compilation");
00064 #endif
00065 }
|
|
||||||||||||
|
00081 {
00082 return std::find(nonIPTypes.begin(), nonIPTypes.end(), node->module()->className())!=nonIPTypes.end();
00083 }
|
|
|
00040 {return 4;}
|
|
||||||||||||
|
00073 {
00074 // update display string
00075 char buf[80];
00076 sprintf(buf, "%d IPv6 nodes\n%d non-IP nodes", numIPNodes, numNonIPNodes);
00077 displayString().setTagArg("t", 0, buf);
00078 }
|
1.4.1