31 neighbours[dst].insert(port);
32 if(neighbours[dst].size() == 1){
33 rt->insertFlow(addr, dst,
"", 1);
39 neighbours[dst].erase(port);
40 if(neighbours[dst].size() <= 0){
41 rt->removeFlow(addr, dst,
"");
42 neighbours.erase(dst);
49 map<string, map<string, nhLMetric<mType> > > changes = rt->getChanges();
51 for(
const auto & entry : changes[
""]){
52 std::vector< RMTPort * > ps;
53 for(
string nextHop : entry.second.nh){
56 auto n = neighbours.find(nextHop);
57 if(n != neighbours.end()){
58 if(!n->second.empty()) {
59 p = *(n->second.begin());
67 fwd->addReplace(entry.first, ps);
75 rt = getRINAModule<IntTSimpleRouting<mType> *>(
this, 2, {
MOD_POL_ROUTING});
79 mType infMetric = par(
"infinite");
80 rt->setInfinite(infMetric);
const char * MOD_POL_ROUTING
const char * MOD_DIFALLOC
virtual void removedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)
virtual void routingUpdated()
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
Register_Class(HopsSingleMEntries)
virtual void onPolicyInit()
const char * MOD_RELAYANDMUX
virtual void insertedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)
Class representing QoSCube with all its properties that is primarily used by FA, RMT and RA Specifica...
const std::string & getName() const
Gets APN string name representation.
const char * MOD_POL_RMT_PDUFWD
Address class holds IPC Process identification.