INET Framework for OMNeT++/OMNEST
inet::RsvpTe Class Reference

TODO documentation. More...

#include <RsvpTe.h>

Inheritance diagram for inet::RsvpTe:
inet::RoutingProtocolBase inet::IScriptable inet::OperationalBase inet::OperationalMixin< cSimpleModule > inet::ILifecycle

Classes

struct  HelloState
 RSVP Hello State structure. More...
 
struct  PathStateBlock
 Path State Block (PSB) structure. More...
 
struct  ResvStateBlock
 Reservation State Block (RSB) structure. More...
 
struct  traffic_path_t
 
struct  traffic_session_t
 

Public Member Functions

 RsvpTe ()
 
virtual ~RsvpTe ()
 
- Public Member Functions inherited from inet::RoutingProtocolBase
 RoutingProtocolBase ()
 
- Public Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual ~OperationalMixin ()
 }@ More...
 
- Public Member Functions inherited from inet::ILifecycle
virtual ~ILifecycle ()
 
- Public Member Functions inherited from inet::IScriptable
virtual ~IScriptable ()
 

Protected Types

typedef std::vector< PathStateBlockPsbVector
 
typedef std::vector< ResvStateBlockRsbVector
 
typedef std::vector< HelloStateHelloVector
 
- Protected Types inherited from inet::OperationalMixin< cSimpleModule >
enum  State
 

Protected Member Functions

virtual void processSignallingMessage (SignallingMsg *msg)
 
virtual void processPSB_TIMER (PsbTimerMsg *msg)
 
virtual void processPSB_TIMEOUT (PsbTimeoutMsg *msg)
 
virtual void processRSB_REFRESH_TIMER (RsbRefreshTimerMsg *msg)
 
virtual void processRSB_COMMIT_TIMER (RsbCommitTimerMsg *msg)
 
virtual void processRSB_TIMEOUT (RsbTimeoutMsg *msg)
 
virtual void processHELLO_TIMER (HelloTimerMsg *msg)
 
virtual void processHELLO_TIMEOUT (HelloTimeoutMsg *msg)
 
virtual void processPATH_NOTIFY (PathNotifyMsg *msg)
 
virtual void processRSVPMessage (Packet *pk)
 
virtual void processHelloMsg (Packet *pk)
 
virtual void processPathMsg (Packet *pk)
 
virtual void processResvMsg (Packet *pk)
 
virtual void processPathTearMsg (Packet *pk)
 
virtual void processPathErrMsg (Packet *pk)
 
virtual PathStateBlockcreatePSB (const Ptr< RsvpPathMsg > &msg)
 
virtual PathStateBlockcreateIngressPSB (const traffic_session_t &session, const traffic_path_t &path)
 
virtual void removePSB (PathStateBlock *psb)
 
virtual ResvStateBlockcreateRSB (const Ptr< const RsvpResvMsg > &msg)
 
virtual ResvStateBlockcreateEgressRSB (PathStateBlock *psb)
 
virtual void updateRSB (ResvStateBlock *rsb, const RsvpResvMsg *msg)
 
virtual void removeRSB (ResvStateBlock *rsb)
 
virtual void removeRsbFilter (ResvStateBlock *rsb, unsigned int index)
 
virtual void refreshPath (PathStateBlock *psbEle)
 
virtual void refreshResv (ResvStateBlock *rsbEle)
 
virtual void refreshResv (ResvStateBlock *rsbEle, Ipv4Address PHOP)
 
virtual void commitResv (ResvStateBlock *rsb)
 
virtual void scheduleRefreshTimer (PathStateBlock *psbEle, simtime_t delay)
 
virtual void scheduleTimeout (PathStateBlock *psbEle)
 
virtual void scheduleRefreshTimer (ResvStateBlock *rsbEle, simtime_t delay)
 
virtual void scheduleCommitTimer (ResvStateBlock *rsbEle)
 
virtual void scheduleTimeout (ResvStateBlock *rsbEle)
 
virtual void sendPathErrorMessage (PathStateBlock *psb, int errCode)
 
virtual void sendPathErrorMessage (SessionObj session, SenderTemplateObj sender, SenderTspecObj tspec, Ipv4Address nextHop, int errCode)
 
virtual void sendPathTearMessage (Ipv4Address peerIP, const SessionObj &session, const SenderTemplateObj &sender, Ipv4Address LIH, Ipv4Address NHOP, bool force)
 
virtual void sendPathNotify (int handler, const SessionObj &session, const SenderTemplateObj &sender, int status, simtime_t delay)
 
virtual void setupHello ()
 
virtual void startHello (Ipv4Address peer, simtime_t delay)
 
virtual void removeHello (HelloState *h)
 
virtual void recoveryEvent (Ipv4Address peer)
 
virtual bool allocateResource (Ipv4Address OI, const SessionObj &session, double bandwidth)
 
virtual void preempt (Ipv4Address OI, int priority, double bandwidth)
 
virtual bool doCACCheck (const SessionObj &session, const SenderTspecObj &tspec, Ipv4Address OI)
 
virtual void announceLinkChange (int tedlinkindex)
 
virtual void sendToIP (Packet *msg, Ipv4Address destAddr)
 
virtual bool evalNextHopInterface (Ipv4Address destAddr, const EroVector &ERO, Ipv4Address &OI)
 
virtual PathStateBlockfindPSB (const SessionObj &session, const SenderTemplateObj &sender)
 
virtual ResvStateBlockfindRSB (const SessionObj &session, const SenderTemplateObj &sender, unsigned int &index)
 
virtual PathStateBlockfindPsbById (int id)
 
virtual ResvStateBlockfindRsbById (int id)
 
std::vector< traffic_session_t >::iterator findSession (const SessionObj &session)
 
std::vector< traffic_path_t >::iterator findPath (traffic_session_t *session, const SenderTemplateObj &sender)
 
virtual HelloStatefindHello (Ipv4Address peer)
 
virtual void print (const RsvpPathMsg *p)
 
virtual void print (const RsvpResvMsg *r)
 
virtual void readTrafficFromXML (const cXMLElement *traffic)
 
virtual void readTrafficSessionFromXML (const cXMLElement *session)
 
virtual EroVector readTrafficRouteFromXML (const cXMLElement *route)
 
virtual void createPath (const SessionObj &session, const SenderTemplateObj &sender)
 
virtual void pathProblem (PathStateBlock *psb)
 
virtual void addSession (const cXMLElement &node)
 
virtual void delSession (const cXMLElement &node)
 
virtual int getInLabel (const SessionObj &session, const SenderTemplateObj &sender)
 
virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessageWhenUp (cMessage *msg) override
 
virtual void clear ()
 
virtual void handleStartOperation (LifecycleOperation *operation) override
 
virtual void handleStopOperation (LifecycleOperation *operation) override
 
virtual void handleCrashOperation (LifecycleOperation *operation) override
 
virtual void processCommand (const cXMLElement &node) override
 Called by ScenarioManager whenever a script command needs to be carried out by the module. More...
 
- Protected Member Functions inherited from inet::RoutingProtocolBase
virtual bool isInitializeStage (int stage) const override
 
virtual bool isModuleStartStage (int stage) const override
 
virtual bool isModuleStopStage (int stage) const override
 
- Protected Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual int numInitStages () const override
 
virtual void refreshDisplay () const override
 
virtual void handleMessage (cMessage *msg) override
 
virtual void handleMessageWhenDown (cMessage *msg)
 
virtual bool handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. More...
 
virtual State getInitialOperationalState () const
 Returns initial operational state: OPERATING or NOT_OPERATING. More...
 
virtual void handleActiveOperationTimeout (cMessage *message)
 
virtual bool isUp () const
 utility functions More...
 
virtual bool isDown () const
 
virtual void setOperationalState (State newState)
 
virtual void scheduleOperationTimeout (simtime_t timeout)
 
virtual void setupActiveOperation (LifecycleOperation *operation, IDoneCallback *doneCallback, State)
 
virtual void delayActiveOperationFinish (simtime_t timeout)
 
virtual void startActiveOperationExtraTime (simtime_t delay=SIMTIME_ZERO)
 
virtual void startActiveOperationExtraTimeOrFinish (simtime_t extraTime)
 
virtual void finishActiveOperation ()
 

Protected Attributes

std::vector< traffic_session_ttraffic
 
simtime_t helloInterval
 
simtime_t helloTimeout
 
simtime_t retryInterval
 
ModuleRefByPar< Tedtedmod
 
ModuleRefByPar< IIpv4RoutingTablert
 
ModuleRefByPar< IInterfaceTableift
 
ModuleRefByPar< LibTablelt
 
ModuleRefByPar< IRsvpClassifierrpct
 
int maxPsbId = 0
 
int maxRsbId = 0
 
int maxSrcInstance = 0
 
Ipv4Address routerId
 
PsbVector PSBList
 
RsbVector RSBList
 
HelloVector HelloList
 
- Protected Attributes inherited from inet::OperationalMixin< cSimpleModule >
State operationalState
 
simtime_t lastChange
 
Operation activeOperation
 
cMessage * activeOperationTimeout
 
cMessage * activeOperationExtraTimer
 

Friends

class RsvpClassifier
 

Detailed Description

TODO documentation.

Member Typedef Documentation

◆ HelloVector

typedef std::vector<HelloState> inet::RsvpTe::HelloVector
protected

◆ PsbVector

typedef std::vector<PathStateBlock> inet::RsvpTe::PsbVector
protected

◆ RsbVector

typedef std::vector<ResvStateBlock> inet::RsvpTe::RsbVector
protected

Constructor & Destructor Documentation

◆ RsvpTe()

inet::RsvpTe::RsvpTe ( )
41 {
42 }

◆ ~RsvpTe()

inet::RsvpTe::~RsvpTe ( )
virtual
45 {
46  // TODO cancelAndDelete timers in all data structures
47  for (auto& psb : PSBList) {
48  cancelAndDelete(psb.timerMsg);
49  cancelAndDelete(psb.timeoutMsg);
50  }
51  for (auto& rsb : RSBList) {
52  cancelAndDelete(rsb.refreshTimerMsg);
53  cancelAndDelete(rsb.commitTimerMsg);
54  cancelAndDelete(rsb.timeoutMsg);
55  }
56  for (auto& hello : HelloList) {
57  cancelAndDelete(hello.timer);
58  cancelAndDelete(hello.timeout);
59  }
60 }

Member Function Documentation

◆ addSession()

void inet::RsvpTe::addSession ( const cXMLElement &  node)
protectedvirtual
1737 {
1738  Enter_Method("addSession");
1739 
1741 }

◆ allocateResource()

bool inet::RsvpTe::allocateResource ( Ipv4Address  OI,
const SessionObj session,
double  bandwidth 
)
protectedvirtual
698 {
699  if (OI.isUnspecified())
700  return true;
701 
702  if (!tedmod->isLocalAddress(OI))
703  return true;
704 
705  if (bandwidth == 0.0)
706  return true;
707 
708  int setupPri = session.setupPri;
709  int holdingPri = session.holdingPri;
710 
711  unsigned int index = tedmod->linkIndex(OI);
712 
713  // Note: UnRB[7] <= UnRW[setupPri] <= UnRW[holdingPri] <= BW[0]
714  // UnRW[7] is the actual BW left on the link
715 
716  if (tedmod->ted[index].UnResvBandwidth[setupPri] < bandwidth)
717  return false;
718 
719  for (int p = holdingPri; p < 8; p++) {
720  tedmod->ted[index].UnResvBandwidth[p] -= bandwidth;
721 
722  if (tedmod->ted[index].UnResvBandwidth[p] < 0.0)
723  preempt(OI, p, -tedmod->ted[index].UnResvBandwidth[p]);
724  }
725 
726  // announce changes
727 
728  announceLinkChange(index);
729 
730  return true;
731 }

◆ announceLinkChange()

void inet::RsvpTe::announceLinkChange ( int  tedlinkindex)
protectedvirtual
734 {
735  TedChangeInfo d;
736  d.setTedLinkIndicesArraySize(1);
737  d.setTedLinkIndices(0, tedlinkindex);
738  emit(tedChangedSignal, &d);
739 }

◆ clear()

void inet::RsvpTe::clear ( )
protectedvirtual
2038 {
2039  while (!PSBList.empty())
2040  removePSB(&PSBList.front());
2041  while (!RSBList.empty())
2042  removeRSB(&RSBList.front());
2043  while (!HelloList.empty())
2044  removeHello(&HelloList.front());
2045 }

◆ commitResv()

void inet::RsvpTe::commitResv ( ResvStateBlock rsb)
protectedvirtual
742 {
743  EV_INFO << "commit reservation (RSB " << rsb->id << ")" << endl;
744 
745  // allocate bandwidth as needed
746 
747  EV_INFO << "currently allocated: " << rsb->Flowspec_Object << endl;
748 
749  while (true) {
750  // remove RSB if empty
751 
752  if (rsb->FlowDescriptor.size() == 0) {
753  removeRSB(rsb);
754  return;
755  }
756 
757  FlowSpecObj req;
758  unsigned int maxFlowIndex = 0;
759  req.req_bandwidth = rsb->FlowDescriptor[0].Flowspec_Object.req_bandwidth;
760 
761  for (unsigned int i = 1; i < rsb->FlowDescriptor.size(); i++) {
762  if (rsb->FlowDescriptor[i].Flowspec_Object.req_bandwidth > req.req_bandwidth) {
763  req.req_bandwidth = rsb->FlowDescriptor[i].Flowspec_Object.req_bandwidth;
764  maxFlowIndex = i;
765  }
766  }
767 
768  EV_INFO << "currently required: " << req << endl;
769 
770  double needed = req.req_bandwidth - rsb->Flowspec_Object.req_bandwidth;
771 
772  if (needed != 0.0) {
773  if (allocateResource(rsb->OI, rsb->Session_Object, needed)) {
774  // allocated (deallocated) successfully
775 
776  EV_DETAIL << "additional bandwidth of " << needed << " allocated sucessfully" << endl;
777 
778  rsb->Flowspec_Object.req_bandwidth += needed;
779  }
780  else {
781  // bandwidth not available
782 
783  ASSERT(rsb->inLabelVector.size() == rsb->FlowDescriptor.size());
784 
785  EV_DETAIL << "not enough bandwidth to accommodate this RSB" << endl;
786 
787  int lspid = rsb->FlowDescriptor[maxFlowIndex].Filter_Spec_Object.Lsp_Id;
788  int oldInLabel = rsb->inLabelVector[maxFlowIndex];
789  PathStateBlock *psb = findPSB(rsb->Session_Object, (SenderTemplateObj&)rsb->FlowDescriptor[maxFlowIndex].Filter_Spec_Object);
790 
791  EV_DETAIL << "removing filter lspid=" << lspid << " (max. flow)" << endl;
792 
793  rsb->FlowDescriptor.erase(rsb->FlowDescriptor.begin() + maxFlowIndex);
794  rsb->inLabelVector.erase(rsb->inLabelVector.begin() + maxFlowIndex);
795 
796  if (oldInLabel != -1) {
797  // path already existed, this must be preemption
798 
800 
801  lt->removeLibEntry(oldInLabel);
802  }
803  else {
804  // path not established yet, report as unfeasible
805 
807  }
808 
809  continue;
810  }
811  }
812 
813  break;
814  }
815 
816  // install labels into lib
817 
818  for (unsigned int i = 0; i < rsb->FlowDescriptor.size(); i++) {
819  int lspid = rsb->FlowDescriptor[i].Filter_Spec_Object.Lsp_Id;
820 
821  EV_DETAIL << "processing lspid=" << lspid << endl;
822 
823  PathStateBlock *psb = findPSB(rsb->Session_Object, rsb->FlowDescriptor[i].Filter_Spec_Object);
824 
825  LabelOpVector outLabel;
826  std::string inInterface, outInterface;
827 
828  bool IR = (psb->Previous_Hop_Address == routerId);
829 // bool ER = psb->OutInterface.isUnspecified();
830  if (!IR) {
831  Ipv4Address localInf = tedmod->getInterfaceAddrByPeerAddress(psb->Previous_Hop_Address);
832  inInterface = rt->getInterfaceByAddress(localInf)->getInterfaceName();
833  }
834  else
835  inInterface = "any";
836 
837  // outlabel and outgoing interface
838 
839  LabelOp lop;
840 
841  if (tedmod->isLocalAddress(psb->OutInterface)) {
842  // regular next hop
843 
844  lop.optcode = IR ? PUSH_OPER : SWAP_OPER;
845  lop.label = rsb->FlowDescriptor[i].label;
846  outLabel.push_back(lop);
847 
848  outInterface = rt->getInterfaceByAddress(psb->OutInterface)->getInterfaceName();
849  }
850  else {
851  // egress router
852 
853  lop.label = 0;
854  lop.optcode = POP_OPER;
855  outLabel.push_back(lop);
856 
857  outInterface = "lo0";
858 
859  if (!tedmod->isLocalAddress(psb->Session_Object.DestAddress)) {
860  NetworkInterface *ie = rt->getInterfaceForDestAddr(psb->Session_Object.DestAddress);
861  if (ie)
862  outInterface = ie->getInterfaceName(); // FIXME why use name to identify an interface?
863  }
864  }
865 
866  EV_DETAIL << "installing label for " << lspid << " outLabel=" << outLabel
867  << " outInterface=" << outInterface << endl;
868 
869  ASSERT(rsb->inLabelVector.size() == rsb->FlowDescriptor.size());
870 
871  int inLabel = lt->installLibEntry(rsb->inLabelVector[i], inInterface,
872  outLabel, outInterface, psb->color);
873 
874  ASSERT(inLabel >= 0);
875 
876  if (IR && rsb->inLabelVector[i] == -1) {
877  // path established
878  sendPathNotify(psb->handler, psb->Session_Object, psb->Sender_Template_Object, PATH_CREATED, 0.0);
879  }
880 
881  if (rsb->inLabelVector[i] != inLabel) {
882  // remember our current label
883  rsb->inLabelVector[i] = inLabel;
884 
885  // bind fec
886  rpct->bind(psb->Session_Object, psb->Sender_Template_Object, inLabel);
887  }
888 
889  // schedule commit of merging backups too...
890  for (auto& elem : RSBList) {
891  if (elem.OI == Ipv4Address(lspid))
892  scheduleCommitTimer(&elem);
893  }
894  }
895 }

◆ createEgressRSB()

RsvpTe::ResvStateBlock * inet::RsvpTe::createEgressRSB ( PathStateBlock psb)
protectedvirtual
1208 {
1209  ResvStateBlock rsbEle;
1210 
1211  rsbEle.id = ++maxRsbId;
1212 
1213  rsbEle.timeoutMsg = new RsbTimeoutMsg("rsb timeout");
1214  rsbEle.timeoutMsg->setId(rsbEle.id);
1215 
1216  rsbEle.refreshTimerMsg = new RsbRefreshTimerMsg("rsb timer");
1217  rsbEle.refreshTimerMsg->setId(rsbEle.id);
1218 
1219  rsbEle.commitTimerMsg = new RsbCommitTimerMsg("rsb commit");
1220  rsbEle.commitTimerMsg->setId(rsbEle.id);
1221 
1222  rsbEle.Session_Object = psb->Session_Object;
1223  rsbEle.Next_Hop_Address = psb->Previous_Hop_Address;
1224 
1225  rsbEle.OI = psb->OutInterface;
1226 
1227  FlowDescriptor_t flow;
1228  flow.Flowspec_Object = (FlowSpecObj&)psb->Sender_Tspec_Object;
1229  flow.Filter_Spec_Object = (FilterSpecObj&)psb->Sender_Template_Object;
1230  flow.label = -1;
1231 
1232  rsbEle.FlowDescriptor.push_back(flow);
1233  rsbEle.inLabelVector.push_back(-1);
1234 
1235  RSBList.push_back(rsbEle);
1236  ResvStateBlock *rsb = &(*(RSBList.end() - 1));
1237 
1238  EV_INFO << "created new (egress) RSB " << rsb->id << endl;
1239 
1240  return rsb;
1241 }

◆ createIngressPSB()

RsvpTe::PathStateBlock * inet::RsvpTe::createIngressPSB ( const traffic_session_t session,
const traffic_path_t path 
)
protectedvirtual
1162 {
1163  EroVector ERO = path.ERO;
1164 
1165  while (ERO.size() > 0 && ERO[0].node == routerId) {
1166  // remove ourselves from the beginning of the hop list
1167  ERO.erase(ERO.begin());
1168  }
1169 
1170  Ipv4Address OI;
1171 
1172  if (!evalNextHopInterface(session.sobj.DestAddress, ERO, OI))
1173  return nullptr;
1174 
1175  if (!doCACCheck(session.sobj, path.tspec, OI))
1176  return nullptr;
1177 
1178  EV_INFO << "CACCheck passed, creating PSB" << endl;
1179 
1180  PathStateBlock psbEle;
1181  psbEle.id = ++maxPsbId;
1182 
1183  psbEle.timeoutMsg = new PsbTimeoutMsg("psb timeout");
1184  psbEle.timeoutMsg->setId(psbEle.id);
1185 
1186  psbEle.timerMsg = new PsbTimerMsg("psb timer");
1187  psbEle.timerMsg->setId(psbEle.id);
1188 
1189  psbEle.Session_Object = session.sobj;
1190  psbEle.Sender_Template_Object = path.sender;
1191  psbEle.Sender_Tspec_Object = path.tspec;
1192 
1193  psbEle.Previous_Hop_Address = routerId;
1194 
1195  psbEle.OutInterface = OI;
1196  psbEle.ERO = ERO;
1197  psbEle.color = path.color;
1198 
1199  psbEle.handler = path.owner;
1200 
1201  PSBList.push_back(psbEle);
1202  PathStateBlock *cPSB = &(*(PSBList.end() - 1));
1203 
1204  return cPSB;
1205 }

◆ createPath()

void inet::RsvpTe::createPath ( const SessionObj session,
const SenderTemplateObj sender 
)
protectedvirtual
97 {
98  if (findPSB(session, sender)) {
99  EV_INFO << "path (PSB) already exists, doing nothing" << endl;
100  return;
101  }
102 
103  // find entry in traffic database
104 
105  auto sit = findSession(session);
106 
107  if (sit == traffic.end()) {
108  EV_INFO << "session not found in traffic database, path won't be created" << endl;
109  return;
110  }
111 
112  auto pit = findPath(&(*sit), sender);
113 
114  if (pit == sit->paths.end()) {
115  EV_INFO << "path doesn't belong to this session according to our database, doing nothing" << endl;
116  return;
117  }
118 
119  PathStateBlock *psb = createIngressPSB(*sit, *pit);
120  if (psb) {
121  // PSB successfully created, send path message downstream
122  scheduleRefreshTimer(psb, 0.0);
123  }
124  else {
125  EV_INFO << "ingress PSB couln't be created" << endl;
126 
127  // inform the owner of this path
128  sendPathNotify(pit->owner, sit->sobj, pit->sender, PATH_UNFEASIBLE, 0.0);
129 
130  // remove non-permanent path
131  if (!pit->permanent) {
132  EV_INFO << "removing path from traffic database" << endl;
133 
134  sit->paths.erase(pit--);
135  }
136  else {
137  EV_INFO << "path is permanent, we will try again later" << endl;
138 
139  sendPathNotify(getId(), sit->sobj, pit->sender, PATH_RETRY, retryInterval);
140  }
141  }
142 }

◆ createPSB()

RsvpTe::PathStateBlock * inet::RsvpTe::createPSB ( const Ptr< RsvpPathMsg > &  msg)
protectedvirtual
1116 {
1117  const EroVector& ERO = msg->getERO();
1118  Ipv4Address destAddr = msg->getDestAddress();
1119 
1120  //
1121 
1122  Ipv4Address OI;
1123 
1124  if (!evalNextHopInterface(destAddr, ERO, OI))
1125  return nullptr;
1126 
1127  if (tedmod->isLocalAddress(OI) && !doCACCheck(msg->getSession(), msg->getSenderTspec(), OI))
1128  return nullptr; // not enough resources
1129 
1130  PathStateBlock psbEle;
1131 
1132  psbEle.id = ++maxPsbId;
1133 
1134  psbEle.timeoutMsg = new PsbTimeoutMsg("psb timeout");
1135  psbEle.timeoutMsg->setId(psbEle.id);
1136 
1137  psbEle.timerMsg = new PsbTimerMsg("psb timer");
1138  psbEle.timerMsg->setId(psbEle.id);
1139 
1140  psbEle.Session_Object = msg->getSession();
1141  psbEle.Sender_Template_Object = msg->getSenderTemplate();
1142  psbEle.Sender_Tspec_Object = msg->getSenderTspec();
1143 
1144  psbEle.Previous_Hop_Address = msg->getNHOP();
1145 // psbEle.LIH = msg->getLIH();
1146 
1147  psbEle.OutInterface = OI;
1148  psbEle.ERO = ERO;
1149 
1150  psbEle.color = msg->getColor();
1151  psbEle.handler = -1;
1152 
1153  PSBList.push_back(psbEle);
1154  PathStateBlock *cPSB = &(*(PSBList.end() - 1));
1155 
1156  EV_INFO << "created new PSB " << cPSB->id << endl;
1157 
1158  return cPSB;
1159 }

◆ createRSB()

RsvpTe::ResvStateBlock * inet::RsvpTe::createRSB ( const Ptr< const RsvpResvMsg > &  msg)
protectedvirtual
898 {
899  ResvStateBlock rsbEle;
900 
901  rsbEle.id = ++maxRsbId;
902 
903  rsbEle.timeoutMsg = new RsbTimeoutMsg("rsb timeout");
904  rsbEle.timeoutMsg->setId(rsbEle.id);
905 
906  rsbEle.refreshTimerMsg = new RsbRefreshTimerMsg("rsb timer");
907  rsbEle.refreshTimerMsg->setId(rsbEle.id);
908 
909  rsbEle.commitTimerMsg = new RsbCommitTimerMsg("rsb commit");
910  rsbEle.commitTimerMsg->setId(rsbEle.id);
911 
912  rsbEle.Session_Object = msg->getSession();
913  rsbEle.Next_Hop_Address = msg->getNHOP();
914  rsbEle.OI = msg->getLIH();
915 
916  ASSERT(rsbEle.inLabelVector.size() == rsbEle.FlowDescriptor.size());
917 
918  for (auto& elem : msg->getFlowDescriptor()) {
919  FlowDescriptor_t flow = elem;
920  rsbEle.FlowDescriptor.push_back(flow);
921  rsbEle.inLabelVector.push_back(-1);
922  }
923 
924  RSBList.push_back(rsbEle);
925  ResvStateBlock *rsb = &(*(RSBList.end() - 1));
926 
927  EV_INFO << "created new RSB " << rsb->id << endl;
928 
929  return rsb;
930 }

◆ delSession()

void inet::RsvpTe::delSession ( const cXMLElement &  node)
protectedvirtual
1744 {
1745  Enter_Method("delSession");
1746 
1747  checkTags(&node, "tunnel_id extended_tunnel_id endpoint paths");
1748 
1749  SessionObj sobj;
1750 
1751  sobj.Tunnel_Id = getParameterIntValue(&node, "tunnel_id");
1752  sobj.Extended_Tunnel_Id = getParameterIPAddressValue(&node, "extended_tunnel_id", routerId).getInt();
1753  sobj.DestAddress = getParameterIPAddressValue(&node, "endpoint");
1754 
1755  auto sit = findSession(sobj);
1756  ASSERT(sit != traffic.end());
1757  traffic_session_t *session = &(*sit);
1758 
1759  const cXMLElement *paths = getUniqueChildIfExists(&node, "paths");
1760  cXMLElementList pathList;
1761  if (paths) {
1762  // only specified paths will be removed, session remains
1763 
1764  checkTags(paths, "path");
1765  pathList = paths->getChildrenByTagName("path");
1766  }
1767 
1768  for (auto it = session->paths.begin(); it != session->paths.end(); it++) {
1769  bool remove;
1770 
1771  if (paths) {
1772  remove = false;
1773 
1774  for (auto& elem : pathList) {
1775  if (it->sender.Lsp_Id == getParameterIntValue(elem, "lspid")) {
1776  // remove path from session
1777  remove = true;
1778  break;
1779  }
1780  }
1781  }
1782  else {
1783  // remove all paths
1784 
1785  remove = true;
1786  }
1787 
1788  if (remove) {
1789  PathStateBlock *psb = findPSB(session->sobj, it->sender);
1790  if (psb) {
1791  ASSERT(psb->ERO.size() > 0);
1792 
1793  sendPathTearMessage(psb->ERO[0].node, psb->Session_Object, psb->Sender_Template_Object,
1794  tedmod->getInterfaceAddrByPeerAddress(psb->ERO[0].node), routerId, true);
1795 
1796  removePSB(psb);
1797  }
1798 
1799  session->paths.erase(it--);
1800  }
1801  }
1802 
1803  if (!paths) {
1804  traffic.erase(sit);
1805  }
1806 }

◆ doCACCheck()

bool inet::RsvpTe::doCACCheck ( const SessionObj session,
const SenderTspecObj tspec,
Ipv4Address  OI 
)
protectedvirtual
519 {
520  ASSERT(tedmod->isLocalAddress(OI));
521 
522  int k = tedmod->linkIndex(OI);
523 
524  double sharedBW = 0.0;
525 
526  for (auto& elem : RSBList) {
527  if ((elem.Session_Object == session) && (elem.Flowspec_Object.req_bandwidth > sharedBW))
528  sharedBW = elem.Flowspec_Object.req_bandwidth;
529  }
530 
531  EV_DETAIL << "CACCheck: link=" << OI
532  << " requested=" << tspec.req_bandwidth
533  << " shared=" << sharedBW
534  << " available (immediately)=" << tedmod->ted[k].UnResvBandwidth[7]
535  << " available (preemptible)=" << tedmod->ted[k].UnResvBandwidth[session.setupPri] << endl;
536 
537  return tedmod->ted[k].UnResvBandwidth[session.setupPri] + sharedBW >= tspec.req_bandwidth;
538 }

◆ evalNextHopInterface()

bool inet::RsvpTe::evalNextHopInterface ( Ipv4Address  destAddr,
const EroVector ERO,
Ipv4Address OI 
)
protectedvirtual
1051 {
1052  if (ERO.size() > 0) {
1053  // explicit routing
1054 
1055  if (ERO[0].L) {
1056  NetworkInterface *ie = rt->getInterfaceForDestAddr(ERO[0].node);
1057 
1058  if (!ie) {
1059  EV_INFO << "next (loose) hop address " << ERO[0].node << " is currently unroutable" << endl;
1060  return false;
1061  }
1062 
1063  OI = ie->getProtocolData<Ipv4InterfaceData>()->getIPAddress();
1064  }
1065  else {
1066  OI = tedmod->getInterfaceAddrByPeerAddress(ERO[0].node);
1067  }
1068 
1069  Ipv4Address peer = tedmod->getPeerByLocalAddress(OI);
1070  HelloState *h = findHello(peer);
1071  if (!h)
1072  throw cRuntimeError("Peer %s on interface %s is not an RSVP peer", peer.str().c_str(), OI.str().c_str());
1073 
1074  // ok, only if next hop is up and running
1075 
1076  return h->ok;
1077  }
1078  else {
1079  // hop-by-hop routing
1080 
1081  if (!tedmod->isLocalAddress(destAddr)) {
1082  NetworkInterface *ie = rt->getInterfaceForDestAddr(destAddr);
1083 
1084  if (!ie) {
1085  EV_INFO << "destination address " << destAddr << " is currently unroutable" << endl;
1086  return false;
1087  }
1088 
1089  OI = ie->getProtocolData<Ipv4InterfaceData>()->getIPAddress();
1090 
1091  HelloState *h = findHello(tedmod->getPeerByLocalAddress(OI));
1092  if (!h) {
1093  // outgoing interface is not LSR, we are egress router
1094 
1095  OI = Ipv4Address();
1096 
1097  return true;
1098  }
1099  else {
1100  // outgoing interface is LSR
1101 
1102  ASSERT(h->ok); // rt->getInterfaceForDestAddr() wouldn't choose this entry
1103 
1104  return h->ok;
1105  }
1106  }
1107  else {
1108  // destAddress is ours, we're egress
1109 
1110  return true;
1111  }
1112  }
1113 }

◆ findHello()

RsvpTe::HelloState * inet::RsvpTe::findHello ( Ipv4Address  peer)
protectedvirtual
1962 {
1963  for (auto& elem : HelloList) {
1964  if (elem.peer == peer)
1965  return &(elem);
1966  }
1967  return nullptr;
1968 }

◆ findPath()

std::vector< RsvpTe::traffic_path_t >::iterator inet::RsvpTe::findPath ( traffic_session_t session,
const SenderTemplateObj sender 
)
protected
291 {
292  auto it = session->paths.begin();
293  for (; it != session->paths.end(); it++) {
294  if (it->sender == sender)
295  break;
296  }
297  return it;
298 }

◆ findPSB()

RsvpTe::PathStateBlock * inet::RsvpTe::findPSB ( const SessionObj session,
const SenderTemplateObj sender 
)
protectedvirtual
1933 {
1934  for (auto& elem : PSBList) {
1935  if ((elem.Session_Object == session) && (elem.Sender_Template_Object == sender))
1936  return &(elem);
1937  }
1938  return nullptr;
1939 }

◆ findPsbById()

RsvpTe::PathStateBlock * inet::RsvpTe::findPsbById ( int  id)
protectedvirtual
1942 {
1943  for (auto& elem : PSBList) {
1944  if (elem.id == id)
1945  return &elem;
1946  }
1947  ASSERT(false);
1948  return nullptr; // prevent warning
1949 }

◆ findRSB()

RsvpTe::ResvStateBlock * inet::RsvpTe::findRSB ( const SessionObj session,
const SenderTemplateObj sender,
unsigned int &  index 
)
protectedvirtual
1914 {
1915  for (auto& elem : RSBList) {
1916  if (elem.Session_Object != session)
1917  continue;
1918 
1919  index = 0;
1920  for (auto fit = elem.FlowDescriptor.begin(); fit != elem.FlowDescriptor.end(); fit++) {
1921  if ((SenderTemplateObj&)fit->Filter_Spec_Object == sender) {
1922  return &(elem);
1923  }
1924  ++index;
1925  }
1926 
1927  // don't break here, may be in different (if outInterface is different)
1928  }
1929  return nullptr;
1930 }

◆ findRsbById()

RsvpTe::ResvStateBlock * inet::RsvpTe::findRsbById ( int  id)
protectedvirtual
1952 {
1953  for (auto& elem : RSBList) {
1954  if (elem.id == id)
1955  return &elem;
1956  }
1957  ASSERT(false);
1958  return nullptr; // prevent warning
1959 }

◆ findSession()

std::vector< RsvpTe::traffic_session_t >::iterator inet::RsvpTe::findSession ( const SessionObj session)
protected
1727 {
1728  auto it = traffic.begin();
1729  for (; it != traffic.end(); it++) {
1730  if (it->sobj == session)
1731  break;
1732  }
1733  return it;
1734 }

◆ getInLabel()

int inet::RsvpTe::getInLabel ( const SessionObj session,
const SenderTemplateObj sender 
)
protectedvirtual
87 {
88  unsigned int index;
89  ResvStateBlock *rsb = findRSB(session, sender, index);
90  if (!rsb)
91  return -1;
92 
93  return rsb->inLabelVector[index];
94 }

◆ handleCrashOperation()

void inet::RsvpTe::handleCrashOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

2058 {
2059  clear();
2060 }

◆ handleMessageWhenUp()

void inet::RsvpTe::handleMessageWhenUp ( cMessage *  msg)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

1244 {
1245  if (msg->isSelfMessage()) {
1246  SignallingMsg *sMsg = check_and_cast<SignallingMsg *>(msg);
1248  }
1249  else {
1250  Packet *pk = check_and_cast<Packet *>(msg);
1251  processRSVPMessage(pk);
1252  return;
1253  }
1254 }

◆ handleStartOperation()

void inet::RsvpTe::handleStartOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

2048 {
2049  setupHello();
2050 }

◆ handleStopOperation()

void inet::RsvpTe::handleStopOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

2053 {
2054  clear();
2055 }

◆ initialize()

void inet::RsvpTe::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::OperationalMixin< cSimpleModule >.

63 {
65  // TODO INITSTAGE
66  if (stage == INITSTAGE_LOCAL) {
67  tedmod.reference(this, "tedModule", true);
68  rt.reference(this, "routingTableModule", true);
69  ift.reference(this, "interfaceTableModule", true);
70  lt.reference(this, "libTableModule", true);
71  rpct.reference(this, "classifierModule", true);
72 
73  maxPsbId = 0;
74  maxRsbId = 0;
75  maxSrcInstance = 0;
76 
77  retryInterval = 1.0;
78  }
79  else if (stage == INITSTAGE_ROUTING_PROTOCOLS) {
80  // process traffic configuration
81  readTrafficFromXML(par("traffic"));
82  registerProtocol(Protocol::rsvpTe, gate("ipOut"), gate("ipIn"));
83  }
84 }

◆ numInitStages()

virtual int inet::RsvpTe::numInitStages ( ) const
inlineoverrideprotectedvirtual
271 { return NUM_INIT_STAGES; }

◆ pathProblem()

void inet::RsvpTe::pathProblem ( PathStateBlock psb)
protectedvirtual
1658 {
1659  ASSERT(psb);
1660  ASSERT(!psb->OutInterface.isUnspecified());
1661 
1662  Ipv4Address nextHop = tedmod->getPeerByLocalAddress(psb->OutInterface);
1663 
1664  EV_INFO << "sending PathTear to " << nextHop << endl;
1665 
1666  sendPathTearMessage(nextHop, psb->Session_Object, psb->Sender_Template_Object,
1667  tedmod->getInterfaceAddrByPeerAddress(nextHop), routerId, true);
1668 
1669  // schedule re-creation if path is permanent
1670 
1671  auto sit = findSession(psb->Session_Object);
1672  ASSERT(sit != traffic.end());
1673  traffic_session_t *s = &(*sit);
1674 
1675  auto pit = findPath(s, psb->Sender_Template_Object);
1676  ASSERT(pit != s->paths.end());
1677  traffic_path_t *p = &(*pit);
1678 
1679  if (p->permanent) {
1680  EV_INFO << "this path is permanent, we will try to re-create it later" << endl;
1681 
1682  sendPathNotify(getId(), psb->Session_Object, psb->Sender_Template_Object, PATH_RETRY, retryInterval);
1683  }
1684  else {
1685  EV_INFO << "removing path from traffic database" << endl;
1686 
1687  sit->paths.erase(pit);
1688  }
1689 
1690  // remove path
1691 
1692  EV_INFO << "removing PSB" << endl;
1693 
1694  removePSB(psb);
1695 }

◆ preempt()

void inet::RsvpTe::preempt ( Ipv4Address  OI,
int  priority,
double  bandwidth 
)
protectedvirtual
665 {
666  ASSERT(tedmod->isLocalAddress(OI));
667 
668  unsigned int index = tedmod->linkIndex(OI);
669 
670  for (auto& elem : RSBList) {
671  if (elem.OI != OI)
672  continue;
673 
674  if (elem.Session_Object.holdingPri != priority)
675  continue;
676 
677  if (elem.Flowspec_Object.req_bandwidth == 0.0)
678  continue;
679 
680  // preempt RSB
681 
682  for (int i = priority; i < 8; i++)
683  tedmod->ted[index].UnResvBandwidth[i] += elem.Flowspec_Object.req_bandwidth;
684 
685  bandwidth -= elem.Flowspec_Object.req_bandwidth;
686  elem.Flowspec_Object.req_bandwidth = 0.0;
687 
688  scheduleCommitTimer(&(elem));
689 
690  //
691 
692  if (bandwidth <= 0.0)
693  break;
694  }
695 }

◆ print() [1/2]

void inet::RsvpTe::print ( const RsvpPathMsg p)
protectedvirtual
2024 {
2025  EV_INFO << "PATH_MESSAGE: lspid " << p->getLspId() << " ERO " << vectorToString(p->getERO()) << endl;
2026 }

◆ print() [2/2]

void inet::RsvpTe::print ( const RsvpResvMsg r)
protectedvirtual
2029 {
2030  EV_INFO << "RESV_MESSAGE: " << endl;
2031  for (auto& elem : r->getFlowDescriptor()) {
2032  EV_INFO << " lspid " << elem.Filter_Spec_Object.Lsp_Id
2033  << " label " << elem.label << endl;
2034  }
2035 }

◆ processCommand()

void inet::RsvpTe::processCommand ( const cXMLElement &  node)
overrideprotectedvirtual

Called by ScenarioManager whenever a script command needs to be carried out by the module.

The command is represented by the XML element or element tree. The command name can be obtained as:

const char *command = node->getTagName()

Parameters are XML attributes, e.g. a "neighbour" parameter can be retrieved as:

const char *attr = node->getAttribute("neighbour")

More complex input can be passed in child elements.

See also
cXMLElement

Implements inet::IScriptable.

1809 {
1810  if (!strcmp(node.getTagName(), "add-session")) {
1811  addSession(node);
1812  }
1813  else if (!strcmp(node.getTagName(), "del-session")) {
1814  delSession(node);
1815  }
1816  else
1817  ASSERT(false);
1818 }

◆ processHELLO_TIMEOUT()

void inet::RsvpTe::processHELLO_TIMEOUT ( HelloTimeoutMsg msg)
protectedvirtual
400 {
401  Ipv4Address peer = msg->getPeer();
402 
403  EV_INFO << "hello timeout, considering " << peer << " failed" << endl;
404 
405  // update hello state (set to failed and turn hello off)
406 
407  HelloState *hello = findHello(peer);
408  ASSERT(hello);
409  hello->ok = false;
410  ASSERT(!hello->timeout->isScheduled());
411  cancelEvent(hello->timer);
412 
413  // update TED and routing table
414 
415  unsigned int index = tedmod->linkIndex(routerId, peer);
416  tedmod->ted[index].state = false;
417  announceLinkChange(index);
418  tedmod->rebuildRoutingTable();
419 
420  // send PATH_ERROR for existing paths
421 
422  for (auto& elem : PSBList) {
423  if (elem.OutInterface == tedmod->ted[index].local)
425  }
426 }

◆ processHELLO_TIMER()

void inet::RsvpTe::processHELLO_TIMER ( HelloTimerMsg msg)
protectedvirtual
429 {
430  Ipv4Address peer = msg->getPeer();
431 
432  HelloState *h = findHello(peer);
433  ASSERT(h);
434 
435  Packet *pk = new Packet("hello message");
436  const auto& hMsg = makeShared<RsvpHelloMsg>();
437 
438  hMsg->setSrcInstance(h->srcInstance);
439  hMsg->setDstInstance(h->dstInstance);
440 
441  hMsg->setRequest(h->request);
442  hMsg->setAck(h->ack);
443 
444  int length = 10;
445 
446  // see comment elsewhere (in Ted.cc)
447  length /= 10;
448 
449  hMsg->setChunkLength(B(length));
450  pk->insertAtBack(hMsg);
451 
452  sendToIP(pk, peer);
453 
454  h->ack = false;
455 
456  scheduleAfter(helloInterval, msg);
457 }

◆ processHelloMsg()

void inet::RsvpTe::processHelloMsg ( Packet pk)
protectedvirtual
1287 {
1288  EV_INFO << "Received RSVP_HELLO" << endl;
1289 // print(msg);
1290  const auto& msg = pk->peekAtFront<RsvpHelloMsg>();
1291  Ipv4Address sender = pk->getTag<L3AddressInd>()->getSrcAddress().toIpv4();
1292  Ipv4Address peer = tedmod->primaryAddress(sender);
1293 
1294  bool request = msg->getRequest();
1295  bool ack = msg->getAck();
1296 
1297  EV_INFO << "hello sender " << peer;
1298  if (request)
1299  EV_INFO << " REQ";
1300  if (ack)
1301  EV_INFO << " ACK";
1302  EV_INFO << endl;
1303 
1304  int rcvSrcInstance = msg->getSrcInstance();
1305  int rcvDstInstance = msg->getDstInstance();
1306 
1307  delete pk;
1308 
1309  HelloState *h = findHello(peer);
1310  ASSERT(h);
1311 
1312  ASSERT(h->srcInstance);
1313  ASSERT(rcvSrcInstance);
1314 
1315  bool failure = false;
1316 
1317  if (h->srcInstance != rcvDstInstance) {
1318  if (rcvDstInstance != 0) {
1319  failure = true;
1320  }
1321  else {
1322  ASSERT(request);
1323  }
1324  }
1325 
1326  if (h->dstInstance != rcvSrcInstance) {
1327  if (h->dstInstance != 0) {
1328  failure = true;
1329  }
1330  h->dstInstance = rcvSrcInstance;
1331  }
1332 
1333  if (failure) {
1334  // mismatch encountered
1335  h->srcInstance = ++maxSrcInstance;
1336  }
1337 
1338  if (failure || !h->ok) {
1339  h->ok = true;
1340 
1341  EV_INFO << "local peer " << peer << " is now considered up and running" << endl;
1342 
1343  recoveryEvent(peer);
1344 
1345  // if peer was considered down, we have stopped sending hellos: resume now
1346  if (!h->timer->isScheduled())
1347  scheduleAfter(SIMTIME_ZERO, h->timer);
1348  }
1349 
1350  if (request) {
1351  // immediately respond to a request with an ack
1352  h->ack = true;
1353  h->request = false;
1354 
1355  rescheduleAfter(SIMTIME_ZERO, h->timer);
1356  }
1357  else {
1358  // next message will be regular
1359 
1360  h->ack = false;
1361  h->request = false;
1362 
1363  ASSERT(h->timer->isScheduled());
1364  }
1365 
1366  rescheduleAfter(helloTimeout, h->timeout);
1367 }

◆ processPATH_NOTIFY()

void inet::RsvpTe::processPATH_NOTIFY ( PathNotifyMsg msg)
protectedvirtual
1698 {
1699  PathStateBlock *psb;
1700 
1701  switch (msg->getStatus()) {
1702  case PATH_RETRY:
1703  createPath(msg->getSession(), msg->getSender());
1704  break;
1705 
1706  case PATH_UNFEASIBLE:
1707  case PATH_PREEMPTED:
1708  case PATH_FAILED:
1709  psb = findPSB(msg->getSession(), msg->getSender());
1710  if (psb)
1711  pathProblem(psb);
1712  break;
1713 
1714  case PATH_CREATED:
1715  EV_INFO << "Path successfully established" << endl;
1716  break;
1717 
1718  default:
1719  ASSERT(false);
1720  break;
1721  }
1722 
1723  delete msg;
1724 }

◆ processPathErrMsg()

void inet::RsvpTe::processPathErrMsg ( Packet pk)
protectedvirtual
1370 {
1371  EV_INFO << "Received PATH_ERROR" << endl;
1372 // print(msg);
1373 
1374  const auto& msg = pk->peekAtFront<RsvpPathError>();
1375 // int lspid = msg->getLspId();
1376  int errCode = msg->getErrorCode();
1377 
1378  PathStateBlock *psb = findPSB(msg->getSession(), msg->getSenderTemplate());
1379  if (!psb) {
1380  EV_INFO << "matching PSB not found, ignoring error message" << endl;
1381  delete pk;
1382  return;
1383  }
1384 
1385  if (psb->Previous_Hop_Address != routerId) {
1386  EV_INFO << "forwarding error message to PHOP (" << psb->Previous_Hop_Address << ")" << endl;
1387 
1388  delete pk->removeControlInfo(); // FIXME
1389  pk->trim();
1390  sendToIP(pk, psb->Previous_Hop_Address);
1391  }
1392  else {
1393  EV_INFO << "error reached ingress router" << endl;
1394 
1395  switch (errCode) {
1396  case PATH_ERR_PREEMPTED:
1397  sendPathNotify(psb->handler, psb->Session_Object, psb->Sender_Template_Object, PATH_PREEMPTED, 0.0);
1398  break;
1399 
1400  case PATH_ERR_UNFEASIBLE:
1401  sendPathNotify(psb->handler, psb->Session_Object, psb->Sender_Template_Object, PATH_UNFEASIBLE, 0.0);
1402  break;
1403 
1405  sendPathNotify(psb->handler, psb->Session_Object, psb->Sender_Template_Object, PATH_FAILED, 0.0);
1406  break;
1407 
1408  default:
1409  throw cRuntimeError("Invalid errorcode %d in message '%s'", errCode, msg->getName());
1410  }
1411 
1412  delete pk;
1413  }
1414 }

◆ processPathMsg()

void inet::RsvpTe::processPathMsg ( Packet pk)
protectedvirtual
1475 {
1476  EV_INFO << "Received PATH_MESSAGE" << endl;
1477  auto msg = dynamicPtrCast<RsvpPathMsg>(pk->peekAtFront<RsvpPathMsg>()->dupShared());
1478  print(msg.get());
1479 
1480  // process ERO *************************************************************
1481 
1482  EroVector ERO = msg->getERO();
1483 
1484  while (ERO.size() > 0 && ERO[0].node == routerId) {
1485  ERO.erase(ERO.begin());
1486  }
1487 
1488  msg->setERO(ERO);
1489 
1490  // create PSB if doesn't exist yet *****************************************
1491 
1492  PathStateBlock *psb = findPSB(msg->getSession(), msg->getSenderTemplate());
1493 
1494  if (!psb) {
1495  psb = createPSB(msg);
1496  if (!psb) {
1497  sendPathErrorMessage(msg->getSession(), msg->getSenderTemplate(),
1498  msg->getSenderTspec(), msg->getNHOP(), PATH_ERR_UNFEASIBLE);
1499  delete pk;
1500  return;
1501  }
1502  scheduleRefreshTimer(psb, 0.0);
1503 
1504  if (tedmod->isLocalAddress(psb->OutInterface)) {
1505  unsigned int index = tedmod->linkIndex(psb->OutInterface);
1506  if (!tedmod->ted[index].state) {
1508  }
1509  }
1510  }
1511 
1512  // schedule timer&timeout **************************************************
1513 
1514  scheduleTimeout(psb);
1515 
1516  // create RSB if we're egress and doesn't exist yet ************************
1517 
1518  unsigned int index;
1519  ResvStateBlock *rsb = findRSB(msg->getSession(), msg->getSenderTemplate(), index);
1520 
1521  if (!rsb && psb->OutInterface.isUnspecified()) {
1522  ASSERT(ERO.size() == 0);
1523  rsb = createEgressRSB(psb);
1524  ASSERT(rsb);
1525  scheduleCommitTimer(rsb);
1526  }
1527 
1528  if (rsb)
1529  scheduleRefreshTimer(rsb, 0.0);
1530 
1531  delete pk;
1532 }

◆ processPathTearMsg()

void inet::RsvpTe::processPathTearMsg ( Packet pk)
protectedvirtual
1417 {
1418  EV_INFO << "Received PATH_TEAR" << endl;
1419 // print(msg);
1420 
1421  const auto& msg = pk->peekAtFront<RsvpPathTear>();
1422  int lspid = msg->getLspId();
1423 
1424  PathStateBlock *psb = findPSB(msg->getSession(), msg->getSenderTemplate());
1425  if (!psb) {
1426  EV_DETAIL << "received PATH_TEAR for nonexisting lspid=" << lspid << endl;
1427  delete pk;
1428  return;
1429  }
1430 
1431  // ignore message if backup exists and force flag is not set
1432 
1433  bool modified = false;
1434 
1435  for (auto it = PSBList.begin(); it != PSBList.end(); it++) {
1436  if (it->OutInterface.getInt() != (uint32_t)lspid)
1437  continue;
1438 
1439  // merging backup exists
1440 
1441  if (!msg->getForce()) {
1442  EV_DETAIL << "merging backup tunnel exists and force flag is not set, ignoring teardown" << endl;
1443  delete pk;
1444  return;
1445  }
1446 
1447  EV_DETAIL << "merging backup must be removed too" << endl;
1448 
1449  removePSB(&(*it));
1450  --it;
1451 
1452  modified = true;
1453  }
1454 
1455  if (modified)
1456  psb = findPSB(msg->getSession(), msg->getSenderTemplate());
1457 
1458  // forward path teardown downstream
1459 
1460  if (psb->ERO.size() > 0) {
1461  EV_INFO << "forward teardown downstream" << endl;
1462 
1463  sendPathTearMessage(psb->ERO[0].node, psb->Session_Object, psb->Sender_Template_Object,
1464  tedmod->getInterfaceAddrByPeerAddress(psb->ERO[0].node), routerId, msg->getForce());
1465  }
1466 
1467  // remove path state block
1468 
1469  removePSB(psb);
1470 
1471  delete pk;
1472 }

◆ processPSB_TIMEOUT()

void inet::RsvpTe::processPSB_TIMEOUT ( PsbTimeoutMsg msg)
protectedvirtual
469 {
470  PathStateBlock *psb = findPsbById(msg->getId());
471  ASSERT(psb);
472 
473  if (tedmod->isLocalAddress(psb->OutInterface)) {
474  ASSERT(psb->OutInterface == tedmod->getInterfaceAddrByPeerAddress(psb->ERO[0].node));
475 
476  sendPathTearMessage(psb->ERO[0].node, psb->Session_Object,
477  psb->Sender_Template_Object, psb->OutInterface, routerId, false);
478  }
479 
480  removePSB(psb);
481 }

◆ processPSB_TIMER()

void inet::RsvpTe::processPSB_TIMER ( PsbTimerMsg msg)
protectedvirtual
460 {
461  PathStateBlock *psb = findPsbById(msg->getId());
462  ASSERT(psb);
463 
464  refreshPath(psb);
466 }

◆ processResvMsg()

void inet::RsvpTe::processResvMsg ( Packet pk)
protectedvirtual
1535 {
1536  EV_INFO << "Received RESV_MESSAGE" << endl;
1537  pk->trimFront();
1538  auto msg = pk->removeAtFront<RsvpResvMsg>();
1539  print(msg.get());
1540 
1541  Ipv4Address OI = msg->getLIH();
1542 
1543  // find matching PSB for every flow ****************************************
1544 
1545  for (unsigned int m = 0; m < msg->getFlowDescriptor().size(); m++) {
1546  PathStateBlock *psb = findPSB(msg->getSession(), (SenderTemplateObj&)msg->getFlowDescriptor()[m].Filter_Spec_Object);
1547  if (!psb) {
1548  EV_DETAIL << "matching PSB not found for lspid=" << msg->getFlowDescriptor()[m].Filter_Spec_Object.Lsp_Id << endl;
1549  // remove descriptor from message
1550  msg->getFlowDescriptorForUpdate().erase(msg->getFlowDescriptorForUpdate().begin() + m);
1551  --m;
1552  }
1553  }
1554 
1555  if (msg->getFlowDescriptor().size() == 0) {
1556  EV_INFO << "no matching PSB found" << endl;
1557  delete pk;
1558  return;
1559  }
1560 
1561  // find matching RSB *******************************************************
1562 
1563  ResvStateBlock *rsb = nullptr;
1564  for (auto& elem : RSBList) {
1565  if (!(msg->isInSession(&elem.Session_Object)))
1566  continue;
1567 
1568  if (elem.Next_Hop_Address != msg->getNHOP())
1569  continue;
1570 
1571  if (elem.OI != msg->getLIH())
1572  continue;
1573 
1574  rsb = &(elem);
1575  break;
1576  }
1577 
1578  if (!rsb) {
1579  rsb = createRSB(msg);
1580 
1581  scheduleCommitTimer(rsb);
1582 
1583  // reservation is new, propagate upstream immediately
1584  scheduleRefreshTimer(rsb, 0.0);
1585  }
1586  else
1587  updateRSB(rsb, msg.get());
1588 
1589  scheduleTimeout(rsb);
1590 
1591  delete pk;
1592 }

◆ processRSB_COMMIT_TIMER()

void inet::RsvpTe::processRSB_COMMIT_TIMER ( RsbCommitTimerMsg msg)
protectedvirtual
498 {
499  ResvStateBlock *rsb = findRsbById(msg->getId());
500  commitResv(rsb);
501 }

◆ processRSB_REFRESH_TIMER()

void inet::RsvpTe::processRSB_REFRESH_TIMER ( RsbRefreshTimerMsg msg)
protectedvirtual
484 {
485  ResvStateBlock *rsb = findRsbById(msg->getId());
486  if (rsb->commitTimerMsg->isScheduled()) {
487  // reschedule after commit
488  scheduleRefreshTimer(rsb, 0.0);
489  }
490  else {
491  refreshResv(rsb);
492 
494  }
495 }

◆ processRSB_TIMEOUT()

void inet::RsvpTe::processRSB_TIMEOUT ( RsbTimeoutMsg msg)
protectedvirtual
504 {
505  EV_INFO << "RSB TIMEOUT RSB " << msg->getId() << endl;
506 
507  ResvStateBlock *rsb = findRsbById(msg->getId());
508 
509  ASSERT(rsb);
510  ASSERT(tedmod->isLocalAddress(rsb->OI));
511 
512  for (unsigned int i = 0; i < rsb->FlowDescriptor.size(); i++) {
513  removeRsbFilter(rsb, 0);
514  }
515  removeRSB(rsb);
516 }

◆ processRSVPMessage()

void inet::RsvpTe::processRSVPMessage ( Packet pk)
protectedvirtual
1257 {
1258  const auto& msg = pk->peekAtFront<RsvpMessage>();
1259  int kind = msg->getRsvpKind();
1260  switch (kind) {
1261  case PATH_MESSAGE:
1262  processPathMsg(pk);
1263  break;
1264 
1265  case RESV_MESSAGE:
1266  processResvMsg(pk);
1267  break;
1268 
1269  case PTEAR_MESSAGE:
1270  processPathTearMsg(pk);
1271  break;
1272 
1273  case HELLO_MESSAGE:
1274  processHelloMsg(pk);
1275  break;
1276 
1277  case PERROR_MESSAGE:
1278  processPathErrMsg(pk);
1279  break;
1280 
1281  default:
1282  throw cRuntimeError("Invalid RSVP kind of message '%s': %d", pk->getName(), kind);
1283  }
1284 }

◆ processSignallingMessage()

void inet::RsvpTe::processSignallingMessage ( SignallingMsg msg)
protectedvirtual
1617 {
1618  int command = msg->getCommand();
1619  switch (command) {
1620  case MSG_PSB_TIMER:
1621  processPSB_TIMER(check_and_cast<PsbTimerMsg *>(msg));
1622  break;
1623 
1624  case MSG_PSB_TIMEOUT:
1625  processPSB_TIMEOUT(check_and_cast<PsbTimeoutMsg *>(msg));
1626  break;
1627 
1628  case MSG_RSB_REFRESH_TIMER:
1629  processRSB_REFRESH_TIMER(check_and_cast<RsbRefreshTimerMsg *>(msg));
1630  break;
1631 
1632  case MSG_RSB_COMMIT_TIMER:
1633  processRSB_COMMIT_TIMER(check_and_cast<RsbCommitTimerMsg *>(msg));
1634  break;
1635 
1636  case MSG_RSB_TIMEOUT:
1637  processRSB_TIMEOUT(check_and_cast<RsbTimeoutMsg *>(msg));
1638  break;
1639 
1640  case MSG_HELLO_TIMER:
1641  processHELLO_TIMER(check_and_cast<HelloTimerMsg *>(msg));
1642  break;
1643 
1644  case MSG_HELLO_TIMEOUT:
1645  processHELLO_TIMEOUT(check_and_cast<HelloTimeoutMsg *>(msg));
1646  break;
1647 
1648  case MSG_PATH_NOTIFY:
1649  processPATH_NOTIFY(check_and_cast<PathNotifyMsg *>(msg));
1650  break;
1651 
1652  default:
1653  throw cRuntimeError("Invalid command %d in message '%s'", command, msg->getName());
1654  }
1655 }

◆ readTrafficFromXML()

void inet::RsvpTe::readTrafficFromXML ( const cXMLElement *  traffic)
protectedvirtual
145 {
146  ASSERT(traffic);
147  ASSERT(!strcmp(traffic->getTagName(), "sessions"));
148  checkTags(traffic, "session");
149  cXMLElementList list = traffic->getChildrenByTagName("session");
150  for (auto& elem : list)
152 }

◆ readTrafficRouteFromXML()

EroVector inet::RsvpTe::readTrafficRouteFromXML ( const cXMLElement *  route)
protectedvirtual
155 {
156  checkTags(route, "node lnode");
157 
158  EroVector ERO;
159 
160  for (cXMLElement *hop = route->getFirstChild(); hop; hop = hop->getNextSibling()) {
161  EroObj h;
162  if (!strcmp(hop->getTagName(), "node")) {
163  h.L = false;
164  h.node = L3AddressResolver().resolve(hop->getNodeValue()).toIpv4();
165  }
166  else if (!strcmp(hop->getTagName(), "lnode")) {
167  h.L = true;
168  h.node = L3AddressResolver().resolve(hop->getNodeValue()).toIpv4();
169  }
170  else {
171  ASSERT(false);
172  }
173  ERO.push_back(h);
174  }
175 
176  return ERO;
177 }

◆ readTrafficSessionFromXML()

void inet::RsvpTe::readTrafficSessionFromXML ( const cXMLElement *  session)
protectedvirtual
180 {
181  checkTags(session, "tunnel_id endpoint setup_pri holding_pri paths");
182 
183  traffic_session_t newSession;
184 
185  newSession.sobj.Tunnel_Id = getParameterIntValue(session, "tunnel_id");
186  newSession.sobj.Extended_Tunnel_Id = routerId.getInt();
187  newSession.sobj.DestAddress = getParameterIPAddressValue(session, "endpoint");
188 
189  auto sit = findSession(newSession.sobj);
190 
191  bool merge;
192 
193  if (sit != traffic.end()) {
194  // session already exits, add new paths
195 
196  merge = true;
197 
198  ASSERT(!getUniqueChildIfExists(session, "holding_pri") || getParameterIntValue(session, "holding_pri") == sit->sobj.holdingPri);
199  ASSERT(!getUniqueChildIfExists(session, "setup_pri") || getParameterIntValue(session, "setup_pri") == sit->sobj.setupPri);
200 
201  newSession.sobj.setupPri = sit->sobj.setupPri;
202  newSession.sobj.holdingPri = sit->sobj.holdingPri;
203 
204  sit->sobj = newSession.sobj;
205  }
206  else {
207  // session not found, create new
208 
209  merge = false;
210 
211  newSession.sobj.setupPri = getParameterIntValue(session, "setup_pri", 7);
212  newSession.sobj.holdingPri = getParameterIntValue(session, "holding_pri", 7);
213  }
214 
215  const cXMLElement *paths = getUniqueChild(session, "paths");
216  checkTags(paths, "path");
217 
218  cXMLElementList list = paths->getChildrenByTagName("path");
219  for (auto path : list) {
220  checkTags(path, "sender lspid bandwidth max_delay route permanent owner color");
221 
222  int lspid = getParameterIntValue(path, "lspid");
223 
224  std::vector<traffic_path_t>::iterator pit;
225 
226  traffic_path_t newPath;
227 
228  newPath.sender.SrcAddress = getParameterIPAddressValue(path, "sender", routerId);
229  newPath.sender.Lsp_Id = lspid;
230 
231  // make sure path doesn't exist yet
232 
233  if (merge) {
234  pit = findPath(&(*sit), newPath.sender);
235  if (pit != sit->paths.end()) {
236  EV_DETAIL << "path " << lspid << " already exists in this session, doing nothing" << endl;
237  continue;
238  }
239  }
240  else {
241  pit = findPath(&newSession, newPath.sender);
242  if (pit != newSession.paths.end()) {
243  EV_INFO << "path " << lspid << " already exists in this session, doing nothing" << endl;
244  continue;
245  }
246  }
247 
248  const char *str = getParameterStrValue(path, "owner", "");
249  if (strlen(str)) {
250  cModule *mod = getModuleByPath(str);
251  newPath.owner = mod->getId();
252  }
253  else {
254  newPath.owner = getId();
255  }
256 
257  newPath.permanent = getParameterBoolValue(path, "permanent", true);
258  newPath.color = getParameterIntValue(path, "color", 0);
259 
260  newPath.tspec.req_bandwidth = getParameterDoubleValue(path, "bandwidth", 0.0);
261  newPath.max_delay = getParameterDoubleValue(path, "max_delay", 0.0);
262 
263  const cXMLElement *route = getUniqueChildIfExists(path, "route");
264  if (route)
265  newPath.ERO = readTrafficRouteFromXML(route);
266 
267  if (merge) {
268  EV_INFO << "adding new path into an existing session" << endl;
269 
270  sit->paths.push_back(newPath);
271  }
272  else {
273  EV_INFO << "adding new path into new session" << endl;
274 
275  newSession.paths.push_back(newPath);
276  }
277 
278  // schedule path creation
279 
280  sendPathNotify(getId(), newSession.sobj, newPath.sender, PATH_RETRY, 0.0);
281  }
282 
283  if (!merge) {
284  EV_INFO << "adding new session into database" << endl;
285 
286  traffic.push_back(newSession);
287  }
288 }

◆ recoveryEvent()

void inet::RsvpTe::recoveryEvent ( Ipv4Address  peer)
protectedvirtual
1595 {
1596  // called when peer's operation is restored
1597 
1598  unsigned int index = tedmod->linkIndex(routerId, peer);
1599  bool rtmodified = !tedmod->ted[index].state;
1600  tedmod->ted[index].state = true;
1601  announceLinkChange(index);
1602 
1603  // rebuild routing table if link state changed
1604  if (rtmodified)
1605  tedmod->rebuildRoutingTable();
1606 
1607  // refresh all paths towards this neighbour
1608  for (auto& elem : PSBList) {
1609  if (elem.OutInterface != tedmod->ted[index].local)
1610  continue;
1611 
1612  scheduleRefreshTimer(&(elem), 0.0);
1613  }
1614 }

◆ refreshPath()

void inet::RsvpTe::refreshPath ( PathStateBlock psbEle)
protectedvirtual
541 {
542  EV_INFO << "refresh path (PSB " << psbEle->id << ")" << endl;
543 
544  Ipv4Address& OI = psbEle->OutInterface;
545  EroVector& ERO = psbEle->ERO;
546 
547  ASSERT(!OI.isUnspecified());
548  ASSERT(tedmod->isLocalAddress(OI));
549 
550  Packet *pk = new Packet("Path");
551  const auto& pm = makeShared<RsvpPathMsg>();
552 
553  pm->setSession(psbEle->Session_Object);
554  pm->setSenderTemplate(psbEle->Sender_Template_Object);
555  pm->setSenderTspec(psbEle->Sender_Tspec_Object);
556 
557  RsvpHopObj hop;
558  hop.Logical_Interface_Handle = OI;
559  hop.Next_Hop_Address = routerId;
560  pm->setHop(hop);
561 
562  pm->setERO(ERO);
563  pm->setColor(psbEle->color);
564 
565  int length = 85 + (ERO.size() * 5);
566 
567  pm->setChunkLength(B(length));
568  pk->insertAtBack(pm);
569 
570  Ipv4Address nextHop = tedmod->getPeerByLocalAddress(OI);
571 
572  ASSERT(ERO.size() == 0 || ERO[0].node.equals(nextHop) || ERO[0].L);
573 
574  sendToIP(pk, nextHop);
575 }

◆ refreshResv() [1/2]

void inet::RsvpTe::refreshResv ( ResvStateBlock rsbEle)
protectedvirtual
578 {
579  EV_INFO << "refresh reservation (RSB " << rsbEle->id << ")" << endl;
580 
581  Ipv4AddressVector phops;
582 
583  for (auto& elem : PSBList) {
584  if (elem.OutInterface != rsbEle->OI)
585  continue;
586 
587  for (auto& _i : rsbEle->FlowDescriptor) {
588  if ((FilterSpecObj&)elem.Sender_Template_Object != _i.Filter_Spec_Object)
589  continue;
590 
591  if (tedmod->isLocalAddress(elem.Previous_Hop_Address))
592  continue; // IR nothing to refresh
593 
594  if (!contains(phops, elem.Previous_Hop_Address))
595  phops.push_back(elem.Previous_Hop_Address);
596  }
597 
598  for (auto& phop : phops)
599  refreshResv(rsbEle, phop);
600  }
601 }

◆ refreshResv() [2/2]

void inet::RsvpTe::refreshResv ( ResvStateBlock rsbEle,
Ipv4Address  PHOP 
)
protectedvirtual
604 {
605  EV_INFO << "refresh reservation (RSB " << rsbEle->id << ") PHOP " << PHOP << endl;
606 
607  Packet *pk = new Packet(" Resv");
608  const auto& msg = makeShared<RsvpResvMsg>();
609 
610  FlowDescriptorVector flows;
611 
612  msg->setSession(rsbEle->Session_Object);
613 
614  RsvpHopObj hop;
615  hop.Logical_Interface_Handle = tedmod->peerRemoteInterface(PHOP);
616  hop.Next_Hop_Address = PHOP;
617  msg->setHop(hop);
618 
619  for (auto& elem : PSBList) {
620  if (elem.Previous_Hop_Address != PHOP)
621  continue;
622 
623  //if (it->LIH != LIH)
624 // continue;
625 
626  if (elem.Session_Object != rsbEle->Session_Object)
627  continue;
628 
629  for (unsigned int c = 0; c < rsbEle->FlowDescriptor.size(); c++) {
630  if ((FilterSpecObj&)elem.Sender_Template_Object != rsbEle->FlowDescriptor[c].Filter_Spec_Object)
631  continue;
632 
633  ASSERT(rsbEle->inLabelVector.size() == rsbEle->FlowDescriptor.size());
634 
635  FlowDescriptor_t flow;
636  flow.Filter_Spec_Object = (FilterSpecObj&)elem.Sender_Template_Object;
637  flow.Flowspec_Object = (FlowSpecObj&)elem.Sender_Tspec_Object;
638  flow.RRO = rsbEle->FlowDescriptor[c].RRO;
639  flow.RRO.push_back(routerId);
640  flow.label = rsbEle->inLabelVector[c];
641  flows.push_back(flow);
642 
643  break;
644  }
645  }
646 
647  msg->setFlowDescriptor(flows);
648 
649  int fd_length = 0;
650  for (auto& flow : flows)
651  fd_length += 28 + (flow.RRO.size() * 4);
652 
653  int length = 34 + fd_length;
654 
655  // see comment elsewhere (in Ted.cc)
656  length /= 10;
657 
658  msg->setChunkLength(B(length));
659  pk->insertAtBack(msg);
660 
661  sendToIP(pk, PHOP);
662 }

◆ removeHello()

void inet::RsvpTe::removeHello ( HelloState h)
protectedvirtual
361 {
362  cancelEvent(h->timeout);
363  cancelEvent(h->timer);
364 
365  delete h->timeout;
366  delete h->timer;
367 
368  for (auto it = HelloList.begin(); it != HelloList.end(); it++) {
369  if (it->peer == h->peer) {
370  HelloList.erase(it);
371  return;
372  }
373  }
374  ASSERT(false);
375 }

◆ removePSB()

void inet::RsvpTe::removePSB ( PathStateBlock psb)
protectedvirtual
1019 {
1020  ASSERT(psb);
1021 
1022  int lspid = psb->Sender_Template_Object.Lsp_Id;
1023 
1024  EV_INFO << "removing PSB " << psb->id << " (lspid " << lspid << ")" << endl;
1025 
1026  // remove reservation state if exists **************************************
1027 
1028  unsigned int filterIndex;
1029  ResvStateBlock *rsb = findRSB(psb->Session_Object, psb->Sender_Template_Object, filterIndex);
1030  if (rsb) {
1031  EV_INFO << "reservation state present, will be removed too" << endl;
1032 
1033  removeRsbFilter(rsb, filterIndex);
1034  }
1035 
1036  // proceed with actual removal *********************************************
1037 
1038  cancelAndDelete(psb->timerMsg);
1039  cancelAndDelete(psb->timeoutMsg);
1040 
1041  for (auto it = PSBList.begin(); it != PSBList.end(); it++) {
1042  if (it->id == psb->id) {
1043  PSBList.erase(it);
1044  return;
1045  }
1046  }
1047  ASSERT(false);
1048 }

◆ removeRSB()

void inet::RsvpTe::removeRSB ( ResvStateBlock rsb)
protectedvirtual
994 {
995  ASSERT(rsb);
996  ASSERT(rsb->FlowDescriptor.size() == 0);
997 
998  EV_INFO << "removing empty RSB " << rsb->id << endl;
999 
1000  cancelAndDelete(rsb->refreshTimerMsg);
1001  cancelAndDelete(rsb->commitTimerMsg);
1002  cancelAndDelete(rsb->timeoutMsg);
1003 
1004  if (rsb->Flowspec_Object.req_bandwidth > 0) {
1005  // deallocate resources
1006  allocateResource(rsb->OI, rsb->Session_Object, -rsb->Flowspec_Object.req_bandwidth);
1007  }
1008 
1009  for (auto it = RSBList.begin(); it != RSBList.end(); it++) {
1010  if (it->id == rsb->id) {
1011  RSBList.erase(it);
1012  return;
1013  }
1014  }
1015  ASSERT(false);
1016 }

◆ removeRsbFilter()

void inet::RsvpTe::removeRsbFilter ( ResvStateBlock rsb,
unsigned int  index 
)
protectedvirtual
974 {
975  ASSERT(rsb);
976  ASSERT(index < rsb->FlowDescriptor.size());
977  ASSERT(rsb->inLabelVector.size() == rsb->FlowDescriptor.size());
978 
979  int lspid = rsb->FlowDescriptor[index].Filter_Spec_Object.Lsp_Id;
980  int inLabel = rsb->inLabelVector[index];
981 
982  EV_INFO << "removing filter (lspid=" << lspid << ")" << endl;
983 
984  if (inLabel != -1)
985  lt->removeLibEntry(inLabel);
986 
987  rsb->FlowDescriptor.erase(rsb->FlowDescriptor.begin() + index);
988  rsb->inLabelVector.erase(rsb->inLabelVector.begin() + index);
989 
990  scheduleCommitTimer(rsb);
991 }

◆ scheduleCommitTimer()

void inet::RsvpTe::scheduleCommitTimer ( ResvStateBlock rsbEle)
protectedvirtual
1908 {
1909  ASSERT(rsbEle);
1910  rescheduleAfter(SIMTIME_ZERO, rsbEle->commitTimerMsg);
1911 }

◆ scheduleRefreshTimer() [1/2]

void inet::RsvpTe::scheduleRefreshTimer ( PathStateBlock psbEle,
simtime_t  delay 
)
protectedvirtual
1881 {
1882  ASSERT(psbEle);
1883 
1884  if (psbEle->OutInterface.isUnspecified())
1885  return;
1886 
1887  if (!tedmod->isLocalAddress(psbEle->OutInterface))
1888  return;
1889 
1890  EV_DETAIL << "scheduling PSB " << psbEle->id << " refresh " << (simTime() + delay) << endl;
1891 
1892  rescheduleAfter(delay, psbEle->timerMsg);
1893 }

◆ scheduleRefreshTimer() [2/2]

void inet::RsvpTe::scheduleRefreshTimer ( ResvStateBlock rsbEle,
simtime_t  delay 
)
protectedvirtual
1902 {
1903  ASSERT(rsbEle);
1904  rescheduleAfter(delay, rsbEle->refreshTimerMsg);
1905 }

◆ scheduleTimeout() [1/2]

void inet::RsvpTe::scheduleTimeout ( PathStateBlock psbEle)
protectedvirtual
1875 {
1876  ASSERT(psbEle);
1877  rescheduleAfter(PSB_TIMEOUT_INTERVAL, psbEle->timeoutMsg);
1878 }

◆ scheduleTimeout() [2/2]

void inet::RsvpTe::scheduleTimeout ( ResvStateBlock rsbEle)
protectedvirtual
1896 {
1897  ASSERT(rsbEle);
1898  rescheduleAfter(RSB_TIMEOUT_INTERVAL, rsbEle->timeoutMsg);
1899 }

◆ sendPathErrorMessage() [1/2]

void inet::RsvpTe::sendPathErrorMessage ( PathStateBlock psb,
int  errCode 
)
protectedvirtual
1839 {
1840  sendPathErrorMessage(psb->Session_Object, psb->Sender_Template_Object, psb->Sender_Tspec_Object, psb->Previous_Hop_Address, errCode);
1841 }

◆ sendPathErrorMessage() [2/2]

void inet::RsvpTe::sendPathErrorMessage ( SessionObj  session,
SenderTemplateObj  sender,
SenderTspecObj  tspec,
Ipv4Address  nextHop,
int  errCode 
)
protectedvirtual
1844 {
1845  Packet *pk = new Packet("PathErr");
1846  const auto& msg = makeShared<RsvpPathError>();
1847  msg->setErrorCode(errCode);
1848  msg->setErrorNode(routerId);
1849  msg->setSession(session);
1850  msg->setSenderTemplate(sender);
1851  msg->setSenderTspec(tspec);
1852 
1853  int length = 52;
1854 
1855  // see comment elsewhere (in Ted.cc)
1856  length /= 10;
1857 
1858  msg->setChunkLength(B(length));
1859  pk->insertAtBack(msg);
1860 
1861  sendToIP(pk, nextHop);
1862 }

◆ sendPathNotify()

void inet::RsvpTe::sendPathNotify ( int  handler,
const SessionObj session,
const SenderTemplateObj sender,
int  status,
simtime_t  delay 
)
protectedvirtual
378 {
379  if (handler < 0)
380  return; // handler not specified
381 
382  cModule *mod = getSimulation()->getModule(handler);
383 
384  if (!mod)
385  return; // handler no longer exists
386 
387  PathNotifyMsg *msg = new PathNotifyMsg("path notify");
388 
389  msg->setSession(session);
390  msg->setSender(sender);
391  msg->setStatus(status);
392 
393  if (handler == getId())
394  scheduleAfter(delay, msg);
395  else
396  sendDirect(msg, delay, 0, mod, "from_rsvp");
397 }

◆ sendPathTearMessage()

void inet::RsvpTe::sendPathTearMessage ( Ipv4Address  peerIP,
const SessionObj session,
const SenderTemplateObj sender,
Ipv4Address  LIH,
Ipv4Address  NHOP,
bool  force 
)
protectedvirtual
1821 {
1822  Packet *pk = new Packet("PathTear");
1823  const auto& msg = makeShared<RsvpPathTear>();
1824  msg->setSenderTemplate(sender);
1825  msg->setSession(session);
1826  RsvpHopObj hop;
1827  hop.Logical_Interface_Handle = LIH;
1828  hop.Next_Hop_Address = NHOP;
1829  msg->setHop(hop);
1830  msg->setForce(force);
1831  B length = B(44);
1832  msg->setChunkLength(length);
1833  pk->insertAtBack(msg);
1834 
1835  sendToIP(pk, peerIP);
1836 }

◆ sendToIP()

void inet::RsvpTe::sendToIP ( Packet msg,
Ipv4Address  destAddr 
)
protectedvirtual
1865 {
1866  msg->addPar("color") = RSVP_TRAFFIC;
1867  msg->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::rsvpTe);
1868  msg->addTagIfAbsent<DispatchProtocolInd>()->setProtocol(&Protocol::rsvpTe);
1869  msg->addTagIfAbsent<DispatchProtocolReq>()->setProtocol(&Protocol::ipv4);
1870  msg->addTagIfAbsent<L3AddressReq>()->setDestAddress(destAddr);
1871  send(msg, "ipOut");
1872 }

◆ setupHello()

void inet::RsvpTe::setupHello ( )
protectedvirtual
301 {
302  routerId = rt->getRouterId();
303 
304  helloInterval = par("helloInterval");
305  helloTimeout = par("helloTimeout");
306 
307  cStringTokenizer tokenizer(par("peers"));
308  const char *token;
309  while ((token = tokenizer.nextToken()) != nullptr) {
310  Ipv4Address peer = tedmod->getPeerByLocalAddress(CHK(ift->findInterfaceByName(token))->getProtocolData<Ipv4InterfaceData>()->getIPAddress());
311 
312  HelloState h;
313 
314  h.timer = new HelloTimerMsg("hello timer");
315  h.timer->setPeer(peer);
316 
317  h.timeout = new HelloTimeoutMsg("hello timeout");
318  h.timeout->setPeer(peer);
319 
320  h.peer = peer;
321 
322  if (helloInterval > 0.0) {
323  // peer is down until we know he is ok
324 
325  h.ok = false;
326  }
327  else {
328  // don't use HELLO at all, consider all peers running all the time
329 
330  h.ok = true;
331  }
332 
333  HelloList.push_back(h);
334 
335  if (helloInterval > 0.0) {
336  startHello(peer, exponential(helloInterval));
337  }
338  }
339 }

◆ startHello()

void inet::RsvpTe::startHello ( Ipv4Address  peer,
simtime_t  delay 
)
protectedvirtual
342 {
343  EV_INFO << "scheduling hello start in " << delay << " seconds" << endl;
344 
345  HelloState *h = findHello(peer);
346  ASSERT(h);
347 
348  ASSERT(!h->timer->isScheduled());
349  ASSERT(!h->timeout->isScheduled());
350  ASSERT(!h->ok);
351 
352  h->srcInstance = ++maxSrcInstance;
353  h->dstInstance = 0;
354  h->request = true;
355  h->ack = false;
356 
357  scheduleAfter(delay, h->timer);
358 }

◆ updateRSB()

void inet::RsvpTe::updateRSB ( ResvStateBlock rsb,
const RsvpResvMsg msg 
)
protectedvirtual
933 {
934  ASSERT(rsb);
935 
936  for (auto& elem : msg->getFlowDescriptor()) {
937  FlowDescriptor_t flow = elem;
938 
939  unsigned int m;
940  for (m = 0; m < rsb->FlowDescriptor.size(); m++) {
941  if (rsb->FlowDescriptor[m].Filter_Spec_Object == flow.Filter_Spec_Object) {
942  // sender found
943  EV_DETAIL << "sender (lspid=" << flow.Filter_Spec_Object.Lsp_Id << ") found in RSB" << endl;
944 
945  if (rsb->FlowDescriptor[m].label != flow.label) {
946  EV_DETAIL << "label modified (new label=" << flow.label << ")" << endl;
947 
948  rsb->FlowDescriptor[m].label = flow.label;
949 
950  // label must be updated in lib table
951 
952  scheduleCommitTimer(rsb);
953  }
954 
955  break;
956  }
957  }
958  if (m == rsb->FlowDescriptor.size()) {
959  // sender not found
960  EV_INFO << "sender (lspid=" << flow.Filter_Spec_Object.Lsp_Id << ") not found in RSB, adding..." << endl;
961 
962  rsb->FlowDescriptor.push_back(flow);
963  rsb->inLabelVector.push_back(-1);
964 
965  // resv is new and must be forwarded
966 
967  scheduleCommitTimer(rsb);
968  scheduleRefreshTimer(rsb, 0.0);
969  }
970  }
971 }

Friends And Related Function Documentation

◆ RsvpClassifier

friend class RsvpClassifier
friend

Member Data Documentation

◆ helloInterval

simtime_t inet::RsvpTe::helloInterval
protected

◆ HelloList

HelloVector inet::RsvpTe::HelloList
protected

◆ helloTimeout

simtime_t inet::RsvpTe::helloTimeout
protected

◆ ift

ModuleRefByPar<IInterfaceTable> inet::RsvpTe::ift
protected

◆ lt

ModuleRefByPar<LibTable> inet::RsvpTe::lt
protected

◆ maxPsbId

int inet::RsvpTe::maxPsbId = 0
protected

◆ maxRsbId

int inet::RsvpTe::maxRsbId = 0
protected

◆ maxSrcInstance

int inet::RsvpTe::maxSrcInstance = 0
protected

◆ PSBList

PsbVector inet::RsvpTe::PSBList
protected

◆ retryInterval

simtime_t inet::RsvpTe::retryInterval
protected

◆ routerId

Ipv4Address inet::RsvpTe::routerId
protected

◆ rpct

ModuleRefByPar<IRsvpClassifier> inet::RsvpTe::rpct
protected

◆ RSBList

RsbVector inet::RsvpTe::RSBList
protected

◆ rt

ModuleRefByPar<IIpv4RoutingTable> inet::RsvpTe::rt
protected

◆ tedmod

ModuleRefByPar<Ted> inet::RsvpTe::tedmod
protected

◆ traffic

std::vector<traffic_session_t> inet::RsvpTe::traffic
protected

The documentation for this class was generated from the following files:
inet::math::mod
double mod(double dividend, double divisor)
Returns the rest of a whole-numbered division.
Definition: INETMath.h:96
CHK
#define CHK(x)
Definition: INETDefs.h:87
inet::RsvpTe::createIngressPSB
virtual PathStateBlock * createIngressPSB(const traffic_session_t &session, const traffic_path_t &path)
Definition: RsvpTe.cc:1161
inet::RsvpTe::readTrafficFromXML
virtual void readTrafficFromXML(const cXMLElement *traffic)
Definition: RsvpTe.cc:144
inet::xmlutils::getParameterIntValue
int getParameterIntValue(const cXMLElement *ptr, const char *name, int def)
Definition: XMLUtils.cc:106
inet::RsvpTe::processPathMsg
virtual void processPathMsg(Packet *pk)
Definition: RsvpTe.cc:1474
inet::Protocol::rsvpTe
static const Protocol rsvpTe
Definition: Protocol.h:106
inet::Ipv4Address::getInt
uint32_t getInt() const
Returns the address as an uint32_t in host byte order (e.g.
Definition: Ipv4Address.h:186
inet::units::constants::c
const value< double, compose< units::m, pow< units::s, -1 > > > c(299792458)
inet::MSG_PSB_TIMER
@ MSG_PSB_TIMER
Definition: SignallingMsg_m.h:80
inet::vectorToString
std::string vectorToString(const Ipv4AddressVector &vec)
Definition: Utils.cc:13
inet::RsvpTe::findRsbById
virtual ResvStateBlock * findRsbById(int id)
Definition: RsvpTe.cc:1951
inet::xmlutils::getParameterBoolValue
bool getParameterBoolValue(const cXMLElement *ptr, const char *name, bool def)
Definition: XMLUtils.cc:85
inet::PATH_CREATED
@ PATH_CREATED
Definition: SignallingMsg_m.h:88
inet::RsvpTe::removeRSB
virtual void removeRSB(ResvStateBlock *rsb)
Definition: RsvpTe.cc:993
inet::RsvpTe::findSession
std::vector< traffic_session_t >::iterator findSession(const SessionObj &session)
Definition: RsvpTe.cc:1726
inet::RsvpTe::findRSB
virtual ResvStateBlock * findRSB(const SessionObj &session, const SenderTemplateObj &sender, unsigned int &index)
Definition: RsvpTe.cc:1913
inet::RsvpTe::processResvMsg
virtual void processResvMsg(Packet *pk)
Definition: RsvpTe.cc:1534
inet::Protocol::ipv4
static const Protocol ipv4
Definition: Protocol.h:93
inet::RsvpTe::delSession
virtual void delSession(const cXMLElement &node)
Definition: RsvpTe.cc:1743
inet::MSG_RSB_COMMIT_TIMER
@ MSG_RSB_COMMIT_TIMER
Definition: SignallingMsg_m.h:83
inet::RsvpTe::createEgressRSB
virtual ResvStateBlock * createEgressRSB(PathStateBlock *psb)
Definition: RsvpTe.cc:1207
inet::RsvpTe::findPath
std::vector< traffic_path_t >::iterator findPath(traffic_session_t *session, const SenderTemplateObj &sender)
Definition: RsvpTe.cc:290
inet::RsvpTe::createRSB
virtual ResvStateBlock * createRSB(const Ptr< const RsvpResvMsg > &msg)
Definition: RsvpTe.cc:897
inet::RsvpTe::retryInterval
simtime_t retryInterval
Definition: RsvpTe.h:158
merge
MIT License free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to merge
Definition: LICENSE.txt:8
inet::PATH_UNFEASIBLE
@ PATH_UNFEASIBLE
Definition: SignallingMsg_m.h:89
inet::RsvpTe::processPSB_TIMEOUT
virtual void processPSB_TIMEOUT(PsbTimeoutMsg *msg)
Definition: RsvpTe.cc:468
inet::remove
void remove(std::vector< T > &v, const Tk &a)
Definition: stlutils.h:107
inet::RsvpTe::processHELLO_TIMER
virtual void processHELLO_TIMER(HelloTimerMsg *msg)
Definition: RsvpTe.cc:428
inet::OperationalMixin< cSimpleModule >::initialize
virtual void initialize(int stage) override
Definition: OperationalMixinImpl.h:26
inet::RsvpTe::evalNextHopInterface
virtual bool evalNextHopInterface(Ipv4Address destAddr, const EroVector &ERO, Ipv4Address &OI)
Definition: RsvpTe.cc:1050
inet::RsvpTe::removePSB
virtual void removePSB(PathStateBlock *psb)
Definition: RsvpTe.cc:1018
inet::RsvpTe::helloTimeout
simtime_t helloTimeout
Definition: RsvpTe.h:157
inet::RESV_MESSAGE
@ RESV_MESSAGE
Definition: RsvpPacket_m.h:70
DispatchProtocolReq
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
L3AddressInd
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
inet::RsvpTe::processPSB_TIMER
virtual void processPSB_TIMER(PsbTimerMsg *msg)
Definition: RsvpTe.cc:459
inet::MSG_HELLO_TIMEOUT
@ MSG_HELLO_TIMEOUT
Definition: SignallingMsg_m.h:86
inet::PATH_RETRY
@ PATH_RETRY
Definition: SignallingMsg_m.h:92
inet::RsvpTe::processPATH_NOTIFY
virtual void processPATH_NOTIFY(PathNotifyMsg *msg)
Definition: RsvpTe.cc:1697
RSVP_TRAFFIC
#define RSVP_TRAFFIC
Definition: RsvpPacket_m.h:50
inet::RsvpTe::scheduleCommitTimer
virtual void scheduleCommitTimer(ResvStateBlock *rsbEle)
Definition: RsvpTe.cc:1907
RSB_REFRESH_INTERVAL
#define RSB_REFRESH_INTERVAL
Definition: RsvpTe.cc:27
inet::HELLO_MESSAGE
@ HELLO_MESSAGE
Definition: RsvpPacket_m.h:75
PSB_TIMEOUT_INTERVAL
#define PSB_TIMEOUT_INTERVAL
Definition: RsvpTe.cc:29
inet::PATH_MESSAGE
@ PATH_MESSAGE
Definition: RsvpPacket_m.h:69
inet::Ipv4AddressVector
std::vector< Ipv4Address > Ipv4AddressVector
Definition: Ipv4Address_m.h:46
inet::SWAP_OPER
@ SWAP_OPER
Definition: LibTable.h:22
inet::MSG_PATH_NOTIFY
@ MSG_PATH_NOTIFY
Definition: SignallingMsg_m.h:87
PacketProtocolTag
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
inet::RsvpTe::refreshPath
virtual void refreshPath(PathStateBlock *psbEle)
Definition: RsvpTe.cc:540
inet::RsvpTe::commitResv
virtual void commitResv(ResvStateBlock *rsb)
Definition: RsvpTe.cc:741
PSB_REFRESH_INTERVAL
#define PSB_REFRESH_INTERVAL
Definition: RsvpTe.cc:26
inet::RsvpTe::readTrafficSessionFromXML
virtual void readTrafficSessionFromXML(const cXMLElement *session)
Definition: RsvpTe.cc:179
inet::RsvpTe::processHELLO_TIMEOUT
virtual void processHELLO_TIMEOUT(HelloTimeoutMsg *msg)
Definition: RsvpTe.cc:399
inet::xmlutils::checkTags
void checkTags(const cXMLElement *node, const char *allowed)
Definition: XMLUtils.cc:55
inet::RsvpTe::processHelloMsg
virtual void processHelloMsg(Packet *pk)
Definition: RsvpTe.cc:1286
inet::RsvpTe::findHello
virtual HelloState * findHello(Ipv4Address peer)
Definition: RsvpTe.cc:1961
inet::RsvpTe::HelloList
HelloVector HelloList
Definition: RsvpTe.h:176
inet::units::values::s
value< double, units::s > s
Definition: Units.h:1235
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::tedChangedSignal
simsignal_t tedChangedSignal
Definition: Simsignals.cc:38
inet::RsvpTe::findPSB
virtual PathStateBlock * findPSB(const SessionObj &session, const SenderTemplateObj &sender)
Definition: RsvpTe.cc:1932
inet::MSG_RSB_REFRESH_TIMER
@ MSG_RSB_REFRESH_TIMER
Definition: SignallingMsg_m.h:82
inet::RsvpTe::RSBList
RsbVector RSBList
Definition: RsvpTe.h:175
inet::RsvpTe::maxPsbId
int maxPsbId
Definition: RsvpTe.h:167
inet::RsvpTe::helloInterval
simtime_t helloInterval
Definition: RsvpTe.h:156
inet::xmlutils::getParameterStrValue
const char * getParameterStrValue(const cXMLElement *ptr, const char *name, const char *def)
Definition: XMLUtils.cc:76
inet::contains
bool contains(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:65
inet::RsvpTe::routerId
Ipv4Address routerId
Definition: RsvpTe.h:172
inet::RsvpTe::removeHello
virtual void removeHello(HelloState *h)
Definition: RsvpTe.cc:360
inet::RsvpTe::processRSB_REFRESH_TIMER
virtual void processRSB_REFRESH_TIMER(RsbRefreshTimerMsg *msg)
Definition: RsvpTe.cc:483
inet::LabelOpVector
std::vector< LabelOp > LabelOpVector
Definition: LibTable.h:32
inet::xmlutils::getParameterIPAddressValue
Ipv4Address getParameterIPAddressValue(const cXMLElement *ptr, const char *name, Ipv4Address def)
Definition: XMLUtils.cc:121
inet::RsvpTe::PSBList
PsbVector PSBList
Definition: RsvpTe.h:174
inet::RsvpTe::tedmod
ModuleRefByPar< Ted > tedmod
Definition: RsvpTe.h:161
inet::EroVector
std::vector< struct EroObj > EroVector
Definition: IntServ_m.h:54
inet::RsvpTe::rt
ModuleRefByPar< IIpv4RoutingTable > rt
Definition: RsvpTe.h:162
inet::xmlutils::getUniqueChild
const cXMLElement * getUniqueChild(const cXMLElement *node, const char *name)
Definition: XMLUtils.cc:9
inet::RsvpTe::setupHello
virtual void setupHello()
Definition: RsvpTe.cc:300
inet::RsvpTe::maxRsbId
int maxRsbId
Definition: RsvpTe.h:168
inet::RsvpTe::createPath
virtual void createPath(const SessionObj &session, const SenderTemplateObj &sender)
Definition: RsvpTe.cc:96
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::PATH_PREEMPTED
@ PATH_PREEMPTED
Definition: SignallingMsg_m.h:91
inet::RsvpTe::sendPathTearMessage
virtual void sendPathTearMessage(Ipv4Address peerIP, const SessionObj &session, const SenderTemplateObj &sender, Ipv4Address LIH, Ipv4Address NHOP, bool force)
Definition: RsvpTe.cc:1820
inet::PTEAR_MESSAGE
@ PTEAR_MESSAGE
Definition: RsvpPacket_m.h:71
kind
removed DscpReq kind
Definition: IUdp-gates.txt:12
inet::RsvpTe::clear
virtual void clear()
Definition: RsvpTe.cc:2037
inet::RsvpTe::lt
ModuleRefByPar< LibTable > lt
Definition: RsvpTe.h:164
inet::RsvpTe::doCACCheck
virtual bool doCACCheck(const SessionObj &session, const SenderTspecObj &tspec, Ipv4Address OI)
Definition: RsvpTe.cc:518
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::physicallayer::k
const double k
Definition: Qam1024Modulation.cc:14
inet::RsvpTe::scheduleTimeout
virtual void scheduleTimeout(PathStateBlock *psbEle)
Definition: RsvpTe.cc:1874
inet::RsvpTe::maxSrcInstance
int maxSrcInstance
Definition: RsvpTe.h:170
inet::RsvpTe::processPathErrMsg
virtual void processPathErrMsg(Packet *pk)
Definition: RsvpTe.cc:1369
RSB_TIMEOUT_INTERVAL
#define RSB_TIMEOUT_INTERVAL
Definition: RsvpTe.cc:30
inet::RsvpTe::readTrafficRouteFromXML
virtual EroVector readTrafficRouteFromXML(const cXMLElement *route)
Definition: RsvpTe.cc:154
inet::RsvpTe::preempt
virtual void preempt(Ipv4Address OI, int priority, double bandwidth)
Definition: RsvpTe.cc:664
inet::xmlutils::getUniqueChildIfExists
const cXMLElement * getUniqueChildIfExists(const cXMLElement *node, const char *name)
Definition: XMLUtils.cc:18
inet::RsvpTe::scheduleRefreshTimer
virtual void scheduleRefreshTimer(PathStateBlock *psbEle, simtime_t delay)
Definition: RsvpTe.cc:1880
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::POP_OPER
@ POP_OPER
Definition: LibTable.h:23
inet::RsvpTe::processSignallingMessage
virtual void processSignallingMessage(SignallingMsg *msg)
Definition: RsvpTe.cc:1616
inet::RsvpTe::sendPathNotify
virtual void sendPathNotify(int handler, const SessionObj &session, const SenderTemplateObj &sender, int status, simtime_t delay)
Definition: RsvpTe.cc:377
inet::RsvpTe::findPsbById
virtual PathStateBlock * findPsbById(int id)
Definition: RsvpTe.cc:1941
inet::RsvpTe::processRSB_COMMIT_TIMER
virtual void processRSB_COMMIT_TIMER(RsbCommitTimerMsg *msg)
Definition: RsvpTe.cc:497
inet::RsvpTe::ift
ModuleRefByPar< IInterfaceTable > ift
Definition: RsvpTe.h:163
inet::RsvpTe::removeRsbFilter
virtual void removeRsbFilter(ResvStateBlock *rsb, unsigned int index)
Definition: RsvpTe.cc:973
inet::RsvpTe::rpct
ModuleRefByPar< IRsvpClassifier > rpct
Definition: RsvpTe.h:165
inet::RsvpTe::processPathTearMsg
virtual void processPathTearMsg(Packet *pk)
Definition: RsvpTe.cc:1416
inet::RsvpTe::startHello
virtual void startHello(Ipv4Address peer, simtime_t delay)
Definition: RsvpTe.cc:341
inet::FlowDescriptorVector
std::vector< struct FlowDescriptor_t > FlowDescriptorVector
Definition: IntServ_m.h:55
PATH_ERR_UNFEASIBLE
#define PATH_ERR_UNFEASIBLE
Definition: RsvpTe.cc:32
inet::units::values::m
value< double, units::m > m
Definition: Units.h:1233
inet::RsvpTe::pathProblem
virtual void pathProblem(PathStateBlock *psb)
Definition: RsvpTe.cc:1657
inet::PERROR_MESSAGE
@ PERROR_MESSAGE
Definition: RsvpPacket_m.h:73
inet::RsvpTe::sendToIP
virtual void sendToIP(Packet *msg, Ipv4Address destAddr)
Definition: RsvpTe.cc:1864
inet::RsvpTe::refreshResv
virtual void refreshResv(ResvStateBlock *rsbEle)
Definition: RsvpTe.cc:577
inet::registerProtocol
void registerProtocol(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a protocol primitive (PDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:83
inet::RsvpTe::addSession
virtual void addSession(const cXMLElement &node)
Definition: RsvpTe.cc:1736
inet::RsvpTe::processRSVPMessage
virtual void processRSVPMessage(Packet *pk)
Definition: RsvpTe.cc:1256
inet::RsvpTe::processRSB_TIMEOUT
virtual void processRSB_TIMEOUT(RsbTimeoutMsg *msg)
Definition: RsvpTe.cc:503
inet::MSG_PSB_TIMEOUT
@ MSG_PSB_TIMEOUT
Definition: SignallingMsg_m.h:81
inet::RsvpTe::print
virtual void print(const RsvpPathMsg *p)
Definition: RsvpTe.cc:2023
PATH_ERR_PREEMPTED
#define PATH_ERR_PREEMPTED
Definition: RsvpTe.cc:33
inet::RsvpTe::updateRSB
virtual void updateRSB(ResvStateBlock *rsb, const RsvpResvMsg *msg)
Definition: RsvpTe.cc:932
inet::MSG_HELLO_TIMER
@ MSG_HELLO_TIMER
Definition: SignallingMsg_m.h:85
inet::RsvpTe::traffic
std::vector< traffic_session_t > traffic
Definition: RsvpTe.h:55
inet::xmlutils::getParameterDoubleValue
double getParameterDoubleValue(const cXMLElement *ptr, const char *name, double def)
Definition: XMLUtils.cc:136
PATH_ERR_NEXTHOP_FAILED
#define PATH_ERR_NEXTHOP_FAILED
Definition: RsvpTe.cc:34
inet::RsvpTe::recoveryEvent
virtual void recoveryEvent(Ipv4Address peer)
Definition: RsvpTe.cc:1594
inet::PUSH_OPER
@ PUSH_OPER
Definition: LibTable.h:21
inet::MSG_RSB_TIMEOUT
@ MSG_RSB_TIMEOUT
Definition: SignallingMsg_m.h:84
inet::units::constants::h
const value< double, compose< units::J, units::s > > h(6.62606896e-34)
inet::INITSTAGE_ROUTING_PROTOCOLS
INET_API InitStage INITSTAGE_ROUTING_PROTOCOLS
Initialization of routing protocols.
inet::RsvpTe::announceLinkChange
virtual void announceLinkChange(int tedlinkindex)
Definition: RsvpTe.cc:733
inet::PATH_FAILED
@ PATH_FAILED
Definition: SignallingMsg_m.h:90
inet::RsvpTe::sendPathErrorMessage
virtual void sendPathErrorMessage(PathStateBlock *psb, int errCode)
Definition: RsvpTe.cc:1838
inet::RsvpTe::createPSB
virtual PathStateBlock * createPSB(const Ptr< RsvpPathMsg > &msg)
Definition: RsvpTe.cc:1115
inet::RsvpTe::allocateResource
virtual bool allocateResource(Ipv4Address OI, const SessionObj &session, double bandwidth)
Definition: RsvpTe.cc:697