32 portQoS[port] = qosId;
33 neighbours[qosId][dst].insert(port);
34 if(neighbours[qosId][dst].size() == 1){
35 rt->insertFlow(addr, dst, qosId, 1);
41 string qosId = portQoS[port];
42 neighbours[qosId][dst].erase(port);
43 if(neighbours[qosId][dst].size() <= 0){
44 rt->removeFlow(addr, dst, qosId);
45 neighbours[qosId].erase(dst);
46 if(neighbours[qosId].size()<=0) {
47 neighbours.erase(qosId);
56 map<string, map<string, nhLMetric<mType> > > changes = rt->getChanges();
58 for(
const auto & qosEntries : changes){
59 string qosId = qosEntries.first;
60 for(
const auto & entry : qosEntries.second){
61 std::vector< RMTPort * > ps;
62 for(
string nextHop : entry.second.nh){
65 auto n = neighbours[qosId].find(nextHop);
66 if(n != neighbours[qosId].end()){
67 if(!n->second.empty()) {
68 p = *(n->second.begin());
75 fwd->addReplace(entry.first, qosId, ps);
85 (getModuleByPath(
"^.^.relayAndMux.pduForwardingPolicy"));
87 (getModuleByPath(
"^.^.routingPolicy"));
89 difA = check_and_cast<
DA *>(getModuleByPath(
"^.^.^.difAllocator.da"));
91 mType infMetric = par(
"infinite");
92 rt->setInfinite(infMetric);
virtual void routingUpdated()
Register_Class(HopsQoSMEntries)
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
Class representing QoSCube with all its properties that is primarily used by FA, RMT and RA Specifica...
std::string getQosId() const
Gets QoSCube identifier.
virtual void onPolicyInit()
virtual void removedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)
const std::string & getName() const
Gets APN string name representation.
virtual void insertedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)
Address class holds IPC Process identification.