32 neighbours[dst].insert(port);
34 if(neighbours[dst].size() == 1){
35 rt->insertFlow(addr, dst,
"hops", 1);
42 neighbours[dst].erase(port);
43 if(neighbours[dst].size() <= 0){
44 rt->removeFlow(addr, dst,
"hops");
45 neighbours.erase(dst);
52 map<string, map<string, nhLMetric<mType> > > changes = rt->getChanges();
54 for(
const auto & qosEntries : changes){
55 for(
const auto & entry : qosEntries.second){
56 std::vector< RMTPort * > ps;
57 for(
string nextHop : entry.second.nh){
59 if(!neighbours[nextHop].empty()) {
60 ps.push_back(*neighbours[nextHop].begin());
65 fwd->addReplace(entry.first, ps);
74 (getModuleByPath(
"^.^.relayAndMux.pduForwardingPolicy"));
76 (getModuleByPath(
"^.^.routingPolicy"));
78 difA = check_and_cast<
DA *>(getModuleByPath(
"^.^.^.difAllocator.da"));
80 mType infMetric = par(
"infinite");
81 rt->setInfinite(infMetric);
83 string myAddr = getModuleByPath(
"^.^")->par(
"ipcAddress").stringValue();
virtual void onPolicyInit()
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
virtual void insertedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)
Register_Class(SimpleHopMEntries)
Class representing QoSCube with all its properties that is primarily used by FA, RMT and RA Specifica...
virtual void routingUpdated()
virtual void removedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)
const std::string & getName() const
Gets APN string name representation.
Address class holds IPC Process identification.