|
INET Framework for OMNeT++/OMNEST
|
TODO documentation.
More...
#include <RsvpTe.h>
|
| 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 PathStateBlock * | createPSB (const Ptr< RsvpPathMsg > &msg) |
| |
| virtual PathStateBlock * | createIngressPSB (const traffic_session_t &session, const traffic_path_t &path) |
| |
| virtual void | removePSB (PathStateBlock *psb) |
| |
| virtual ResvStateBlock * | createRSB (const Ptr< const RsvpResvMsg > &msg) |
| |
| virtual ResvStateBlock * | createEgressRSB (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 PathStateBlock * | findPSB (const SessionObj &session, const SenderTemplateObj &sender) |
| |
| virtual ResvStateBlock * | findRSB (const SessionObj &session, const SenderTemplateObj &sender, unsigned int &index) |
| |
| virtual PathStateBlock * | findPsbById (int id) |
| |
| virtual ResvStateBlock * | findRsbById (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 HelloState * | findHello (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...
|
| |
| virtual bool | isInitializeStage (int stage) const override |
| |
| virtual bool | isModuleStartStage (int stage) const override |
| |
| virtual bool | isModuleStopStage (int stage) const override |
| |
| 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 () |
| |
◆ HelloVector
◆ PsbVector
◆ RsbVector
◆ RsvpTe()
◆ ~RsvpTe()
| inet::RsvpTe::~RsvpTe |
( |
| ) |
|
|
virtual |
48 cancelAndDelete(psb.timerMsg);
49 cancelAndDelete(psb.timeoutMsg);
52 cancelAndDelete(rsb.refreshTimerMsg);
53 cancelAndDelete(rsb.commitTimerMsg);
54 cancelAndDelete(rsb.timeoutMsg);
57 cancelAndDelete(hello.timer);
58 cancelAndDelete(hello.timeout);
◆ addSession()
| void inet::RsvpTe::addSession |
( |
const cXMLElement & |
node | ) |
|
|
protectedvirtual |
◆ allocateResource()
699 if (OI.isUnspecified())
702 if (!
tedmod->isLocalAddress(OI))
705 if (bandwidth == 0.0)
708 int setupPri = session.setupPri;
709 int holdingPri = session.holdingPri;
711 unsigned int index =
tedmod->linkIndex(OI);
716 if (
tedmod->ted[index].UnResvBandwidth[setupPri] < bandwidth)
719 for (
int p = holdingPri; p < 8; p++) {
720 tedmod->ted[index].UnResvBandwidth[p] -= bandwidth;
722 if (
tedmod->ted[index].UnResvBandwidth[p] < 0.0)
◆ announceLinkChange()
| void inet::RsvpTe::announceLinkChange |
( |
int |
tedlinkindex | ) |
|
|
protectedvirtual |
736 d.setTedLinkIndicesArraySize(1);
737 d.setTedLinkIndices(0, tedlinkindex);
◆ clear()
| void inet::RsvpTe::clear |
( |
| ) |
|
|
protectedvirtual |
◆ commitResv()
743 EV_INFO <<
"commit reservation (RSB " << rsb->id <<
")" << endl;
747 EV_INFO <<
"currently allocated: " << rsb->Flowspec_Object << endl;
752 if (rsb->FlowDescriptor.size() == 0) {
758 unsigned int maxFlowIndex = 0;
759 req.req_bandwidth = rsb->FlowDescriptor[0].Flowspec_Object.req_bandwidth;
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;
768 EV_INFO <<
"currently required: " << req << endl;
770 double needed = req.req_bandwidth - rsb->Flowspec_Object.req_bandwidth;
776 EV_DETAIL <<
"additional bandwidth of " << needed <<
" allocated sucessfully" << endl;
778 rsb->Flowspec_Object.req_bandwidth += needed;
783 ASSERT(rsb->inLabelVector.size() == rsb->FlowDescriptor.size());
785 EV_DETAIL <<
"not enough bandwidth to accommodate this RSB" << endl;
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);
791 EV_DETAIL <<
"removing filter lspid=" << lspid <<
" (max. flow)" << endl;
793 rsb->FlowDescriptor.erase(rsb->FlowDescriptor.begin() + maxFlowIndex);
794 rsb->inLabelVector.erase(rsb->inLabelVector.begin() + maxFlowIndex);
796 if (oldInLabel != -1) {
801 lt->removeLibEntry(oldInLabel);
818 for (
unsigned int i = 0; i < rsb->FlowDescriptor.size(); i++) {
819 int lspid = rsb->FlowDescriptor[i].Filter_Spec_Object.Lsp_Id;
821 EV_DETAIL <<
"processing lspid=" << lspid << endl;
823 PathStateBlock *psb =
findPSB(rsb->Session_Object, rsb->FlowDescriptor[i].Filter_Spec_Object);
826 std::string inInterface, outInterface;
828 bool IR = (psb->Previous_Hop_Address ==
routerId);
831 Ipv4Address localInf =
tedmod->getInterfaceAddrByPeerAddress(psb->Previous_Hop_Address);
832 inInterface =
rt->getInterfaceByAddress(localInf)->getInterfaceName();
841 if (
tedmod->isLocalAddress(psb->OutInterface)) {
845 lop.label = rsb->FlowDescriptor[i].label;
846 outLabel.push_back(lop);
848 outInterface =
rt->getInterfaceByAddress(psb->OutInterface)->getInterfaceName();
855 outLabel.push_back(lop);
857 outInterface =
"lo0";
859 if (!
tedmod->isLocalAddress(psb->Session_Object.DestAddress)) {
860 NetworkInterface *ie =
rt->getInterfaceForDestAddr(psb->Session_Object.DestAddress);
862 outInterface = ie->getInterfaceName();
866 EV_DETAIL <<
"installing label for " << lspid <<
" outLabel=" << outLabel
867 <<
" outInterface=" << outInterface << endl;
869 ASSERT(rsb->inLabelVector.size() == rsb->FlowDescriptor.size());
871 int inLabel =
lt->installLibEntry(rsb->inLabelVector[i], inInterface,
872 outLabel, outInterface, psb->color);
874 ASSERT(inLabel >= 0);
876 if (IR && rsb->inLabelVector[i] == -1) {
881 if (rsb->inLabelVector[i] != inLabel) {
883 rsb->inLabelVector[i] = inLabel;
886 rpct->bind(psb->Session_Object, psb->Sender_Template_Object, inLabel);
891 if (elem.OI == Ipv4Address(lspid))
◆ createEgressRSB()
1209 ResvStateBlock rsbEle;
1213 rsbEle.timeoutMsg =
new RsbTimeoutMsg(
"rsb timeout");
1214 rsbEle.timeoutMsg->setId(rsbEle.id);
1216 rsbEle.refreshTimerMsg =
new RsbRefreshTimerMsg(
"rsb timer");
1217 rsbEle.refreshTimerMsg->setId(rsbEle.id);
1219 rsbEle.commitTimerMsg =
new RsbCommitTimerMsg(
"rsb commit");
1220 rsbEle.commitTimerMsg->setId(rsbEle.id);
1222 rsbEle.Session_Object = psb->Session_Object;
1223 rsbEle.Next_Hop_Address = psb->Previous_Hop_Address;
1225 rsbEle.OI = psb->OutInterface;
1227 FlowDescriptor_t flow;
1228 flow.Flowspec_Object = (FlowSpecObj&)psb->Sender_Tspec_Object;
1229 flow.Filter_Spec_Object = (FilterSpecObj&)psb->Sender_Template_Object;
1232 rsbEle.FlowDescriptor.push_back(flow);
1233 rsbEle.inLabelVector.push_back(-1);
1236 ResvStateBlock *rsb = &(*(
RSBList.end() - 1));
1238 EV_INFO <<
"created new (egress) RSB " << rsb->id << endl;
◆ createIngressPSB()
1165 while (ERO.size() > 0 && ERO[0].node ==
routerId) {
1167 ERO.erase(ERO.begin());
1175 if (!
doCACCheck(session.sobj, path.tspec, OI))
1178 EV_INFO <<
"CACCheck passed, creating PSB" << endl;
1180 PathStateBlock psbEle;
1183 psbEle.timeoutMsg =
new PsbTimeoutMsg(
"psb timeout");
1184 psbEle.timeoutMsg->setId(psbEle.id);
1186 psbEle.timerMsg =
new PsbTimerMsg(
"psb timer");
1187 psbEle.timerMsg->setId(psbEle.id);
1189 psbEle.Session_Object = session.sobj;
1190 psbEle.Sender_Template_Object = path.sender;
1191 psbEle.Sender_Tspec_Object = path.tspec;
1193 psbEle.Previous_Hop_Address =
routerId;
1195 psbEle.OutInterface = OI;
1197 psbEle.color = path.color;
1199 psbEle.handler = path.owner;
1202 PathStateBlock *cPSB = &(*(
PSBList.end() - 1));
◆ createPath()
99 EV_INFO <<
"path (PSB) already exists, doing nothing" << endl;
108 EV_INFO <<
"session not found in traffic database, path won't be created" << endl;
112 auto pit =
findPath(&(*sit), sender);
114 if (pit == sit->paths.end()) {
115 EV_INFO <<
"path doesn't belong to this session according to our database, doing nothing" << endl;
125 EV_INFO <<
"ingress PSB couln't be created" << endl;
131 if (!pit->permanent) {
132 EV_INFO <<
"removing path from traffic database" << endl;
134 sit->paths.erase(pit--);
137 EV_INFO <<
"path is permanent, we will try again later" << endl;
◆ createPSB()
1118 Ipv4Address destAddr = msg->getDestAddress();
1127 if (
tedmod->isLocalAddress(OI) && !
doCACCheck(msg->getSession(), msg->getSenderTspec(), OI))
1130 PathStateBlock psbEle;
1134 psbEle.timeoutMsg =
new PsbTimeoutMsg(
"psb timeout");
1135 psbEle.timeoutMsg->setId(psbEle.id);
1137 psbEle.timerMsg =
new PsbTimerMsg(
"psb timer");
1138 psbEle.timerMsg->setId(psbEle.id);
1140 psbEle.Session_Object = msg->getSession();
1141 psbEle.Sender_Template_Object = msg->getSenderTemplate();
1142 psbEle.Sender_Tspec_Object = msg->getSenderTspec();
1144 psbEle.Previous_Hop_Address = msg->getNHOP();
1147 psbEle.OutInterface = OI;
1150 psbEle.color = msg->getColor();
1151 psbEle.handler = -1;
1154 PathStateBlock *cPSB = &(*(
PSBList.end() - 1));
1156 EV_INFO <<
"created new PSB " << cPSB->id << endl;
◆ createRSB()
899 ResvStateBlock rsbEle;
903 rsbEle.timeoutMsg =
new RsbTimeoutMsg(
"rsb timeout");
904 rsbEle.timeoutMsg->setId(rsbEle.id);
906 rsbEle.refreshTimerMsg =
new RsbRefreshTimerMsg(
"rsb timer");
907 rsbEle.refreshTimerMsg->setId(rsbEle.id);
909 rsbEle.commitTimerMsg =
new RsbCommitTimerMsg(
"rsb commit");
910 rsbEle.commitTimerMsg->setId(rsbEle.id);
912 rsbEle.Session_Object = msg->getSession();
913 rsbEle.Next_Hop_Address = msg->getNHOP();
914 rsbEle.OI = msg->getLIH();
916 ASSERT(rsbEle.inLabelVector.size() == rsbEle.FlowDescriptor.size());
918 for (
auto& elem : msg->getFlowDescriptor()) {
919 FlowDescriptor_t flow = elem;
920 rsbEle.FlowDescriptor.push_back(flow);
921 rsbEle.inLabelVector.push_back(-1);
925 ResvStateBlock *rsb = &(*(
RSBList.end() - 1));
927 EV_INFO <<
"created new RSB " << rsb->id << endl;
◆ delSession()
| void inet::RsvpTe::delSession |
( |
const cXMLElement & |
node | ) |
|
|
protectedvirtual |
1747 checkTags(&node,
"tunnel_id extended_tunnel_id endpoint paths");
1757 traffic_session_t *session = &(*sit);
1760 cXMLElementList pathList;
1765 pathList = paths->getChildrenByTagName(
"path");
1768 for (
auto it = session->paths.begin(); it != session->paths.end(); it++) {
1774 for (
auto& elem : pathList) {
1789 PathStateBlock *psb =
findPSB(session->sobj, it->sender);
1791 ASSERT(psb->ERO.size() > 0);
1794 tedmod->getInterfaceAddrByPeerAddress(psb->ERO[0].node),
routerId,
true);
1799 session->paths.erase(it--);
◆ doCACCheck()
520 ASSERT(
tedmod->isLocalAddress(OI));
524 double sharedBW = 0.0;
527 if ((elem.Session_Object == session) && (elem.Flowspec_Object.req_bandwidth > sharedBW))
528 sharedBW = elem.Flowspec_Object.req_bandwidth;
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;
537 return tedmod->ted[
k].UnResvBandwidth[session.setupPri] + sharedBW >= tspec.req_bandwidth;
◆ evalNextHopInterface()
1052 if (ERO.size() > 0) {
1056 NetworkInterface *ie =
rt->getInterfaceForDestAddr(ERO[0].node);
1059 EV_INFO <<
"next (loose) hop address " << ERO[0].node <<
" is currently unroutable" << endl;
1063 OI = ie->getProtocolData<Ipv4InterfaceData>()->getIPAddress();
1066 OI =
tedmod->getInterfaceAddrByPeerAddress(ERO[0].node);
1069 Ipv4Address peer =
tedmod->getPeerByLocalAddress(OI);
1072 throw cRuntimeError(
"Peer %s on interface %s is not an RSVP peer", peer.str().c_str(), OI.str().c_str());
1081 if (!
tedmod->isLocalAddress(destAddr)) {
1082 NetworkInterface *ie =
rt->getInterfaceForDestAddr(destAddr);
1085 EV_INFO <<
"destination address " << destAddr <<
" is currently unroutable" << endl;
1089 OI = ie->getProtocolData<Ipv4InterfaceData>()->getIPAddress();
◆ findHello()
1964 if (elem.peer == peer)
◆ findPath()
292 auto it = session->paths.begin();
293 for (; it != session->paths.end(); it++) {
294 if (it->sender == sender)
◆ findPSB()
1935 if ((elem.Session_Object == session) && (elem.Sender_Template_Object == sender))
◆ findPsbById()
◆ findRSB()
1916 if (elem.Session_Object != session)
1920 for (
auto fit = elem.FlowDescriptor.begin(); fit != elem.FlowDescriptor.end(); fit++) {
1921 if ((SenderTemplateObj&)fit->Filter_Spec_Object == sender) {
◆ findRsbById()
◆ findSession()
1729 for (; it !=
traffic.end(); it++) {
1730 if (it->sobj == session)
◆ getInLabel()
89 ResvStateBlock *rsb =
findRSB(session, sender, index);
93 return rsb->inLabelVector[index];
◆ handleCrashOperation()
◆ handleMessageWhenUp()
| void inet::RsvpTe::handleMessageWhenUp |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
Implements inet::OperationalMixin< cSimpleModule >.
1245 if (msg->isSelfMessage()) {
1246 SignallingMsg *sMsg = check_and_cast<SignallingMsg *>(msg);
1250 Packet *pk = check_and_cast<Packet *>(msg);
◆ handleStartOperation()
◆ handleStopOperation()
◆ initialize()
| void inet::RsvpTe::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
Reimplemented from inet::OperationalMixin< cSimpleModule >.
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);
◆ numInitStages()
| virtual int inet::RsvpTe::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ pathProblem()
1660 ASSERT(!psb->OutInterface.isUnspecified());
1662 Ipv4Address nextHop =
tedmod->getPeerByLocalAddress(psb->OutInterface);
1664 EV_INFO <<
"sending PathTear to " << nextHop << endl;
1673 traffic_session_t *
s = &(*sit);
1675 auto pit =
findPath(
s, psb->Sender_Template_Object);
1676 ASSERT(pit !=
s->paths.end());
1677 traffic_path_t *p = &(*pit);
1680 EV_INFO <<
"this path is permanent, we will try to re-create it later" << endl;
1685 EV_INFO <<
"removing path from traffic database" << endl;
1687 sit->paths.erase(pit);
1692 EV_INFO <<
"removing PSB" << endl;
◆ preempt()
| void inet::RsvpTe::preempt |
( |
Ipv4Address |
OI, |
|
|
int |
priority, |
|
|
double |
bandwidth |
|
) |
| |
|
protectedvirtual |
666 ASSERT(
tedmod->isLocalAddress(OI));
668 unsigned int index =
tedmod->linkIndex(OI);
674 if (elem.Session_Object.holdingPri != priority)
677 if (elem.Flowspec_Object.req_bandwidth == 0.0)
682 for (
int i = priority; i < 8; i++)
683 tedmod->ted[index].UnResvBandwidth[i] += elem.Flowspec_Object.req_bandwidth;
685 bandwidth -= elem.Flowspec_Object.req_bandwidth;
686 elem.Flowspec_Object.req_bandwidth = 0.0;
692 if (bandwidth <= 0.0)
◆ print() [1/2]
2025 EV_INFO <<
"PATH_MESSAGE: lspid " << p->getLspId() <<
" ERO " <<
vectorToString(p->getERO()) << endl;
◆ print() [2/2]
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;
◆ 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.
1810 if (!strcmp(node.getTagName(),
"add-session")) {
1813 else if (!strcmp(node.getTagName(),
"del-session")) {
◆ processHELLO_TIMEOUT()
401 Ipv4Address peer = msg->getPeer();
403 EV_INFO <<
"hello timeout, considering " << peer <<
" failed" << endl;
410 ASSERT(!hello->timeout->isScheduled());
411 cancelEvent(hello->timer);
416 tedmod->ted[index].state =
false;
418 tedmod->rebuildRoutingTable();
423 if (elem.OutInterface ==
tedmod->ted[index].local)
◆ processHELLO_TIMER()
430 Ipv4Address peer = msg->getPeer();
435 Packet *pk =
new Packet(
"hello message");
436 const auto& hMsg = makeShared<RsvpHelloMsg>();
438 hMsg->setSrcInstance(
h->srcInstance);
439 hMsg->setDstInstance(
h->dstInstance);
441 hMsg->setRequest(
h->request);
442 hMsg->setAck(
h->ack);
449 hMsg->setChunkLength(
B(length));
450 pk->insertAtBack(hMsg);
◆ processHelloMsg()
| void inet::RsvpTe::processHelloMsg |
( |
Packet * |
pk | ) |
|
|
protectedvirtual |
1288 EV_INFO <<
"Received RSVP_HELLO" << endl;
1290 const auto& msg = pk->peekAtFront<RsvpHelloMsg>();
1291 Ipv4Address sender = pk->getTag<
L3AddressInd>()->getSrcAddress().toIpv4();
1292 Ipv4Address peer =
tedmod->primaryAddress(sender);
1294 bool request = msg->getRequest();
1295 bool ack = msg->getAck();
1297 EV_INFO <<
"hello sender " << peer;
1304 int rcvSrcInstance = msg->getSrcInstance();
1305 int rcvDstInstance = msg->getDstInstance();
1312 ASSERT(
h->srcInstance);
1313 ASSERT(rcvSrcInstance);
1315 bool failure =
false;
1317 if (
h->srcInstance != rcvDstInstance) {
1318 if (rcvDstInstance != 0) {
1326 if (
h->dstInstance != rcvSrcInstance) {
1327 if (
h->dstInstance != 0) {
1330 h->dstInstance = rcvSrcInstance;
1338 if (failure || !
h->ok) {
1341 EV_INFO <<
"local peer " << peer <<
" is now considered up and running" << endl;
1346 if (!
h->timer->isScheduled())
1347 scheduleAfter(SIMTIME_ZERO,
h->timer);
1355 rescheduleAfter(SIMTIME_ZERO,
h->timer);
1363 ASSERT(
h->timer->isScheduled());
◆ processPATH_NOTIFY()
1699 PathStateBlock *psb;
1701 switch (msg->getStatus()) {
1703 createPath(msg->getSession(), msg->getSender());
1709 psb =
findPSB(msg->getSession(), msg->getSender());
1715 EV_INFO <<
"Path successfully established" << endl;
◆ processPathErrMsg()
| void inet::RsvpTe::processPathErrMsg |
( |
Packet * |
pk | ) |
|
|
protectedvirtual |
1371 EV_INFO <<
"Received PATH_ERROR" << endl;
1374 const auto& msg = pk->peekAtFront<RsvpPathError>();
1376 int errCode = msg->getErrorCode();
1378 PathStateBlock *psb =
findPSB(msg->getSession(), msg->getSenderTemplate());
1380 EV_INFO <<
"matching PSB not found, ignoring error message" << endl;
1385 if (psb->Previous_Hop_Address !=
routerId) {
1386 EV_INFO <<
"forwarding error message to PHOP (" << psb->Previous_Hop_Address <<
")" << endl;
1388 delete pk->removeControlInfo();
1390 sendToIP(pk, psb->Previous_Hop_Address);
1393 EV_INFO <<
"error reached ingress router" << endl;
1409 throw cRuntimeError(
"Invalid errorcode %d in message '%s'", errCode, msg->getName());
◆ processPathMsg()
| void inet::RsvpTe::processPathMsg |
( |
Packet * |
pk | ) |
|
|
protectedvirtual |
1476 EV_INFO <<
"Received PATH_MESSAGE" << endl;
1477 auto msg = dynamicPtrCast<RsvpPathMsg>(pk->peekAtFront<RsvpPathMsg>()->dupShared());
1484 while (ERO.size() > 0 && ERO[0].node ==
routerId) {
1485 ERO.erase(ERO.begin());
1492 PathStateBlock *psb =
findPSB(msg->getSession(), msg->getSenderTemplate());
1504 if (
tedmod->isLocalAddress(psb->OutInterface)) {
1505 unsigned int index =
tedmod->linkIndex(psb->OutInterface);
1506 if (!
tedmod->ted[index].state) {
1519 ResvStateBlock *rsb =
findRSB(msg->getSession(), msg->getSenderTemplate(), index);
1521 if (!rsb && psb->OutInterface.isUnspecified()) {
1522 ASSERT(ERO.size() == 0);
◆ processPathTearMsg()
| void inet::RsvpTe::processPathTearMsg |
( |
Packet * |
pk | ) |
|
|
protectedvirtual |
1418 EV_INFO <<
"Received PATH_TEAR" << endl;
1421 const auto& msg = pk->peekAtFront<RsvpPathTear>();
1422 int lspid = msg->getLspId();
1424 PathStateBlock *psb =
findPSB(msg->getSession(), msg->getSenderTemplate());
1426 EV_DETAIL <<
"received PATH_TEAR for nonexisting lspid=" << lspid << endl;
1433 bool modified =
false;
1436 if (it->OutInterface.getInt() != (uint32_t)lspid)
1441 if (!msg->getForce()) {
1442 EV_DETAIL <<
"merging backup tunnel exists and force flag is not set, ignoring teardown" << endl;
1447 EV_DETAIL <<
"merging backup must be removed too" << endl;
1456 psb =
findPSB(msg->getSession(), msg->getSenderTemplate());
1460 if (psb->ERO.size() > 0) {
1461 EV_INFO <<
"forward teardown downstream" << endl;
1464 tedmod->getInterfaceAddrByPeerAddress(psb->ERO[0].node),
routerId, msg->getForce());
◆ processPSB_TIMEOUT()
473 if (
tedmod->isLocalAddress(psb->OutInterface)) {
474 ASSERT(psb->OutInterface ==
tedmod->getInterfaceAddrByPeerAddress(psb->ERO[0].node));
477 psb->Sender_Template_Object, psb->OutInterface,
routerId,
false);
◆ processPSB_TIMER()
| void inet::RsvpTe::processPSB_TIMER |
( |
PsbTimerMsg * |
msg | ) |
|
|
protectedvirtual |
◆ processResvMsg()
| void inet::RsvpTe::processResvMsg |
( |
Packet * |
pk | ) |
|
|
protectedvirtual |
1536 EV_INFO <<
"Received RESV_MESSAGE" << endl;
1538 auto msg = pk->removeAtFront<RsvpResvMsg>();
1541 Ipv4Address OI = msg->getLIH();
1545 for (
unsigned int m = 0;
m < msg->getFlowDescriptor().size();
m++) {
1546 PathStateBlock *psb =
findPSB(msg->getSession(), (SenderTemplateObj&)msg->getFlowDescriptor()[
m].Filter_Spec_Object);
1548 EV_DETAIL <<
"matching PSB not found for lspid=" << msg->getFlowDescriptor()[
m].Filter_Spec_Object.Lsp_Id << endl;
1550 msg->getFlowDescriptorForUpdate().erase(msg->getFlowDescriptorForUpdate().begin() +
m);
1555 if (msg->getFlowDescriptor().size() == 0) {
1556 EV_INFO <<
"no matching PSB found" << endl;
1563 ResvStateBlock *rsb =
nullptr;
1565 if (!(msg->isInSession(&elem.Session_Object)))
1568 if (elem.Next_Hop_Address != msg->getNHOP())
1571 if (elem.OI != msg->getLIH())
◆ processRSB_COMMIT_TIMER()
◆ processRSB_REFRESH_TIMER()
486 if (rsb->commitTimerMsg->isScheduled()) {
◆ processRSB_TIMEOUT()
505 EV_INFO <<
"RSB TIMEOUT RSB " << msg->getId() << endl;
510 ASSERT(
tedmod->isLocalAddress(rsb->OI));
512 for (
unsigned int i = 0; i < rsb->FlowDescriptor.size(); i++) {
◆ processRSVPMessage()
| void inet::RsvpTe::processRSVPMessage |
( |
Packet * |
pk | ) |
|
|
protectedvirtual |
1258 const auto& msg = pk->peekAtFront<RsvpMessage>();
1259 int kind = msg->getRsvpKind();
1282 throw cRuntimeError(
"Invalid RSVP kind of message '%s': %d", pk->getName(),
kind);
◆ processSignallingMessage()
| void inet::RsvpTe::processSignallingMessage |
( |
SignallingMsg * |
msg | ) |
|
|
protectedvirtual |
1618 int command = msg->getCommand();
1653 throw cRuntimeError(
"Invalid command %d in message '%s'", command, msg->getName());
◆ readTrafficFromXML()
| void inet::RsvpTe::readTrafficFromXML |
( |
const cXMLElement * |
traffic | ) |
|
|
protectedvirtual |
147 ASSERT(!strcmp(
traffic->getTagName(),
"sessions"));
149 cXMLElementList list =
traffic->getChildrenByTagName(
"session");
150 for (
auto& elem : list)
◆ readTrafficRouteFromXML()
| EroVector inet::RsvpTe::readTrafficRouteFromXML |
( |
const cXMLElement * |
route | ) |
|
|
protectedvirtual |
160 for (cXMLElement *hop = route->getFirstChild(); hop; hop = hop->getNextSibling()) {
162 if (!strcmp(hop->getTagName(),
"node")) {
164 h.node = L3AddressResolver().resolve(hop->getNodeValue()).toIpv4();
166 else if (!strcmp(hop->getTagName(),
"lnode")) {
168 h.node = L3AddressResolver().resolve(hop->getNodeValue()).toIpv4();
◆ readTrafficSessionFromXML()
| void inet::RsvpTe::readTrafficSessionFromXML |
( |
const cXMLElement * |
session | ) |
|
|
protectedvirtual |
181 checkTags(session,
"tunnel_id endpoint setup_pri holding_pri paths");
183 traffic_session_t newSession;
201 newSession.sobj.setupPri = sit->sobj.setupPri;
202 newSession.sobj.holdingPri = sit->sobj.holdingPri;
204 sit->sobj = newSession.sobj;
218 cXMLElementList list = paths->getChildrenByTagName(
"path");
219 for (
auto path : list) {
220 checkTags(path,
"sender lspid bandwidth max_delay route permanent owner color");
224 std::vector<traffic_path_t>::iterator pit;
226 traffic_path_t newPath;
229 newPath.sender.Lsp_Id = lspid;
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;
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;
250 cModule *
mod = getModuleByPath(str);
251 newPath.owner =
mod->getId();
254 newPath.owner = getId();
268 EV_INFO <<
"adding new path into an existing session" << endl;
270 sit->paths.push_back(newPath);
273 EV_INFO <<
"adding new path into new session" << endl;
275 newSession.paths.push_back(newPath);
284 EV_INFO <<
"adding new session into database" << endl;
◆ recoveryEvent()
1599 bool rtmodified = !
tedmod->ted[index].state;
1600 tedmod->ted[index].state =
true;
1605 tedmod->rebuildRoutingTable();
1609 if (elem.OutInterface !=
tedmod->ted[index].local)
◆ refreshPath()
542 EV_INFO <<
"refresh path (PSB " << psbEle->id <<
")" << endl;
544 Ipv4Address& OI = psbEle->OutInterface;
547 ASSERT(!OI.isUnspecified());
548 ASSERT(
tedmod->isLocalAddress(OI));
550 Packet *pk =
new Packet(
"Path");
551 const auto& pm = makeShared<RsvpPathMsg>();
553 pm->setSession(psbEle->Session_Object);
554 pm->setSenderTemplate(psbEle->Sender_Template_Object);
555 pm->setSenderTspec(psbEle->Sender_Tspec_Object);
558 hop.Logical_Interface_Handle = OI;
563 pm->setColor(psbEle->color);
565 int length = 85 + (ERO.size() * 5);
567 pm->setChunkLength(
B(length));
568 pk->insertAtBack(pm);
570 Ipv4Address nextHop =
tedmod->getPeerByLocalAddress(OI);
572 ASSERT(ERO.size() == 0 || ERO[0].node.equals(nextHop) || ERO[0].L);
◆ refreshResv() [1/2]
579 EV_INFO <<
"refresh reservation (RSB " << rsbEle->id <<
")" << endl;
584 if (elem.OutInterface != rsbEle->OI)
587 for (
auto& _i : rsbEle->FlowDescriptor) {
588 if ((FilterSpecObj&)elem.Sender_Template_Object != _i.Filter_Spec_Object)
591 if (
tedmod->isLocalAddress(elem.Previous_Hop_Address))
594 if (!
contains(phops, elem.Previous_Hop_Address))
595 phops.push_back(elem.Previous_Hop_Address);
598 for (
auto& phop : phops)
◆ refreshResv() [2/2]
605 EV_INFO <<
"refresh reservation (RSB " << rsbEle->id <<
") PHOP " << PHOP << endl;
607 Packet *pk =
new Packet(
" Resv");
608 const auto& msg = makeShared<RsvpResvMsg>();
612 msg->setSession(rsbEle->Session_Object);
615 hop.Logical_Interface_Handle =
tedmod->peerRemoteInterface(PHOP);
616 hop.Next_Hop_Address = PHOP;
620 if (elem.Previous_Hop_Address != PHOP)
626 if (elem.Session_Object != rsbEle->Session_Object)
629 for (
unsigned int c = 0;
c < rsbEle->FlowDescriptor.size();
c++) {
630 if ((FilterSpecObj&)elem.Sender_Template_Object != rsbEle->FlowDescriptor[
c].Filter_Spec_Object)
633 ASSERT(rsbEle->inLabelVector.size() == rsbEle->FlowDescriptor.size());
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;
640 flow.label = rsbEle->inLabelVector[
c];
641 flows.push_back(flow);
647 msg->setFlowDescriptor(flows);
650 for (
auto& flow : flows)
651 fd_length += 28 + (flow.RRO.size() * 4);
653 int length = 34 + fd_length;
658 msg->setChunkLength(
B(length));
659 pk->insertAtBack(msg);
◆ removeHello()
362 cancelEvent(
h->timeout);
363 cancelEvent(
h->timer);
369 if (it->peer ==
h->peer) {
◆ removePSB()
1022 int lspid = psb->Sender_Template_Object.Lsp_Id;
1024 EV_INFO <<
"removing PSB " << psb->id <<
" (lspid " << lspid <<
")" << endl;
1028 unsigned int filterIndex;
1029 ResvStateBlock *rsb =
findRSB(psb->Session_Object, psb->Sender_Template_Object, filterIndex);
1031 EV_INFO <<
"reservation state present, will be removed too" << endl;
1038 cancelAndDelete(psb->timerMsg);
1039 cancelAndDelete(psb->timeoutMsg);
1042 if (it->id == psb->id) {
◆ removeRSB()
996 ASSERT(rsb->FlowDescriptor.size() == 0);
998 EV_INFO <<
"removing empty RSB " << rsb->id << endl;
1000 cancelAndDelete(rsb->refreshTimerMsg);
1001 cancelAndDelete(rsb->commitTimerMsg);
1002 cancelAndDelete(rsb->timeoutMsg);
1004 if (rsb->Flowspec_Object.req_bandwidth > 0) {
1006 allocateResource(rsb->OI, rsb->Session_Object, -rsb->Flowspec_Object.req_bandwidth);
1010 if (it->id == rsb->id) {
◆ removeRsbFilter()
| void inet::RsvpTe::removeRsbFilter |
( |
ResvStateBlock * |
rsb, |
|
|
unsigned int |
index |
|
) |
| |
|
protectedvirtual |
976 ASSERT(index < rsb->FlowDescriptor.size());
977 ASSERT(rsb->inLabelVector.size() == rsb->FlowDescriptor.size());
979 int lspid = rsb->FlowDescriptor[index].Filter_Spec_Object.Lsp_Id;
980 int inLabel = rsb->inLabelVector[index];
982 EV_INFO <<
"removing filter (lspid=" << lspid <<
")" << endl;
985 lt->removeLibEntry(inLabel);
987 rsb->FlowDescriptor.erase(rsb->FlowDescriptor.begin() + index);
988 rsb->inLabelVector.erase(rsb->inLabelVector.begin() + index);
◆ scheduleCommitTimer()
1910 rescheduleAfter(SIMTIME_ZERO, rsbEle->commitTimerMsg);
◆ scheduleRefreshTimer() [1/2]
| void inet::RsvpTe::scheduleRefreshTimer |
( |
PathStateBlock * |
psbEle, |
|
|
simtime_t |
delay |
|
) |
| |
|
protectedvirtual |
1884 if (psbEle->OutInterface.isUnspecified())
1887 if (!
tedmod->isLocalAddress(psbEle->OutInterface))
1890 EV_DETAIL <<
"scheduling PSB " << psbEle->id <<
" refresh " << (simTime() + delay) << endl;
1892 rescheduleAfter(delay, psbEle->timerMsg);
◆ scheduleRefreshTimer() [2/2]
| void inet::RsvpTe::scheduleRefreshTimer |
( |
ResvStateBlock * |
rsbEle, |
|
|
simtime_t |
delay |
|
) |
| |
|
protectedvirtual |
1904 rescheduleAfter(delay, rsbEle->refreshTimerMsg);
◆ scheduleTimeout() [1/2]
◆ scheduleTimeout() [2/2]
◆ sendPathErrorMessage() [1/2]
| void inet::RsvpTe::sendPathErrorMessage |
( |
PathStateBlock * |
psb, |
|
|
int |
errCode |
|
) |
| |
|
protectedvirtual |
1840 sendPathErrorMessage(psb->Session_Object, psb->Sender_Template_Object, psb->Sender_Tspec_Object, psb->Previous_Hop_Address, errCode);
◆ sendPathErrorMessage() [2/2]
1845 Packet *pk =
new Packet(
"PathErr");
1846 const auto& msg = makeShared<RsvpPathError>();
1847 msg->setErrorCode(errCode);
1849 msg->setSession(session);
1850 msg->setSenderTemplate(sender);
1851 msg->setSenderTspec(tspec);
1858 msg->setChunkLength(
B(length));
1859 pk->insertAtBack(msg);
◆ sendPathNotify()
| void inet::RsvpTe::sendPathNotify |
( |
int |
handler, |
|
|
const SessionObj & |
session, |
|
|
const SenderTemplateObj & |
sender, |
|
|
int |
status, |
|
|
simtime_t |
delay |
|
) |
| |
|
protectedvirtual |
382 cModule *
mod = getSimulation()->getModule(handler);
387 PathNotifyMsg *msg =
new PathNotifyMsg(
"path notify");
389 msg->setSession(session);
390 msg->setSender(sender);
391 msg->setStatus(status);
393 if (handler == getId())
394 scheduleAfter(delay, msg);
396 sendDirect(msg, delay, 0,
mod,
"from_rsvp");
◆ sendPathTearMessage()
1822 Packet *pk =
new Packet(
"PathTear");
1823 const auto& msg = makeShared<RsvpPathTear>();
1824 msg->setSenderTemplate(sender);
1825 msg->setSession(session);
1827 hop.Logical_Interface_Handle = LIH;
1828 hop.Next_Hop_Address = NHOP;
1830 msg->setForce(force);
1832 msg->setChunkLength(length);
1833 pk->insertAtBack(msg);
◆ sendToIP()
1868 msg->addTagIfAbsent<DispatchProtocolInd>()->setProtocol(&
Protocol::rsvpTe);
1870 msg->addTagIfAbsent<L3AddressReq>()->setDestAddress(destAddr);
◆ setupHello()
| void inet::RsvpTe::setupHello |
( |
| ) |
|
|
protectedvirtual |
307 cStringTokenizer tokenizer(par(
"peers"));
309 while ((token = tokenizer.nextToken()) !=
nullptr) {
310 Ipv4Address peer =
tedmod->getPeerByLocalAddress(
CHK(
ift->findInterfaceByName(token))->getProtocolData<Ipv4InterfaceData>()->getIPAddress());
314 h.timer =
new HelloTimerMsg(
"hello timer");
315 h.timer->setPeer(peer);
317 h.timeout =
new HelloTimeoutMsg(
"hello timeout");
318 h.timeout->setPeer(peer);
◆ startHello()
| void inet::RsvpTe::startHello |
( |
Ipv4Address |
peer, |
|
|
simtime_t |
delay |
|
) |
| |
|
protectedvirtual |
343 EV_INFO <<
"scheduling hello start in " << delay <<
" seconds" << endl;
348 ASSERT(!
h->timer->isScheduled());
349 ASSERT(!
h->timeout->isScheduled());
357 scheduleAfter(delay,
h->timer);
◆ updateRSB()
936 for (
auto& elem : msg->getFlowDescriptor()) {
937 FlowDescriptor_t flow = elem;
940 for (
m = 0;
m < rsb->FlowDescriptor.size();
m++) {
941 if (rsb->FlowDescriptor[
m].Filter_Spec_Object == flow.Filter_Spec_Object) {
943 EV_DETAIL <<
"sender (lspid=" << flow.Filter_Spec_Object.Lsp_Id <<
") found in RSB" << endl;
945 if (rsb->FlowDescriptor[
m].label != flow.label) {
946 EV_DETAIL <<
"label modified (new label=" << flow.label <<
")" << endl;
948 rsb->FlowDescriptor[
m].label = flow.label;
958 if (
m == rsb->FlowDescriptor.size()) {
960 EV_INFO <<
"sender (lspid=" << flow.Filter_Spec_Object.Lsp_Id <<
") not found in RSB, adding..." << endl;
962 rsb->FlowDescriptor.push_back(flow);
963 rsb->inLabelVector.push_back(-1);
◆ RsvpClassifier
◆ helloInterval
| simtime_t inet::RsvpTe::helloInterval |
|
protected |
◆ HelloList
◆ helloTimeout
| simtime_t inet::RsvpTe::helloTimeout |
|
protected |
◆ ift
◆ lt
◆ maxPsbId
| int inet::RsvpTe::maxPsbId = 0 |
|
protected |
◆ maxRsbId
| int inet::RsvpTe::maxRsbId = 0 |
|
protected |
◆ maxSrcInstance
| int inet::RsvpTe::maxSrcInstance = 0 |
|
protected |
◆ PSBList
◆ retryInterval
| simtime_t inet::RsvpTe::retryInterval |
|
protected |
◆ routerId
◆ rpct
◆ RSBList
◆ rt
◆ tedmod
◆ traffic
The documentation for this class was generated from the following files:
double mod(double dividend, double divisor)
Returns the rest of a whole-numbered division.
Definition: INETMath.h:96
#define CHK(x)
Definition: INETDefs.h:87
virtual PathStateBlock * createIngressPSB(const traffic_session_t &session, const traffic_path_t &path)
Definition: RsvpTe.cc:1161
virtual void readTrafficFromXML(const cXMLElement *traffic)
Definition: RsvpTe.cc:144
int getParameterIntValue(const cXMLElement *ptr, const char *name, int def)
Definition: XMLUtils.cc:106
virtual void processPathMsg(Packet *pk)
Definition: RsvpTe.cc:1474
static const Protocol rsvpTe
Definition: Protocol.h:106
uint32_t getInt() const
Returns the address as an uint32_t in host byte order (e.g.
Definition: Ipv4Address.h:186
const value< double, compose< units::m, pow< units::s, -1 > > > c(299792458)
@ MSG_PSB_TIMER
Definition: SignallingMsg_m.h:80
std::string vectorToString(const Ipv4AddressVector &vec)
Definition: Utils.cc:13
virtual ResvStateBlock * findRsbById(int id)
Definition: RsvpTe.cc:1951
bool getParameterBoolValue(const cXMLElement *ptr, const char *name, bool def)
Definition: XMLUtils.cc:85
@ PATH_CREATED
Definition: SignallingMsg_m.h:88
virtual void removeRSB(ResvStateBlock *rsb)
Definition: RsvpTe.cc:993
std::vector< traffic_session_t >::iterator findSession(const SessionObj &session)
Definition: RsvpTe.cc:1726
virtual ResvStateBlock * findRSB(const SessionObj &session, const SenderTemplateObj &sender, unsigned int &index)
Definition: RsvpTe.cc:1913
virtual void processResvMsg(Packet *pk)
Definition: RsvpTe.cc:1534
static const Protocol ipv4
Definition: Protocol.h:93
virtual void delSession(const cXMLElement &node)
Definition: RsvpTe.cc:1743
@ MSG_RSB_COMMIT_TIMER
Definition: SignallingMsg_m.h:83
virtual ResvStateBlock * createEgressRSB(PathStateBlock *psb)
Definition: RsvpTe.cc:1207
std::vector< traffic_path_t >::iterator findPath(traffic_session_t *session, const SenderTemplateObj &sender)
Definition: RsvpTe.cc:290
virtual ResvStateBlock * createRSB(const Ptr< const RsvpResvMsg > &msg)
Definition: RsvpTe.cc:897
simtime_t retryInterval
Definition: RsvpTe.h:158
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
@ PATH_UNFEASIBLE
Definition: SignallingMsg_m.h:89
virtual void processPSB_TIMEOUT(PsbTimeoutMsg *msg)
Definition: RsvpTe.cc:468
void remove(std::vector< T > &v, const Tk &a)
Definition: stlutils.h:107
virtual void processHELLO_TIMER(HelloTimerMsg *msg)
Definition: RsvpTe.cc:428
virtual void initialize(int stage) override
Definition: OperationalMixinImpl.h:26
virtual bool evalNextHopInterface(Ipv4Address destAddr, const EroVector &ERO, Ipv4Address &OI)
Definition: RsvpTe.cc:1050
virtual void removePSB(PathStateBlock *psb)
Definition: RsvpTe.cc:1018
simtime_t helloTimeout
Definition: RsvpTe.h:157
@ RESV_MESSAGE
Definition: RsvpPacket_m.h:70
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
virtual void processPSB_TIMER(PsbTimerMsg *msg)
Definition: RsvpTe.cc:459
@ MSG_HELLO_TIMEOUT
Definition: SignallingMsg_m.h:86
@ PATH_RETRY
Definition: SignallingMsg_m.h:92
virtual void processPATH_NOTIFY(PathNotifyMsg *msg)
Definition: RsvpTe.cc:1697
#define RSVP_TRAFFIC
Definition: RsvpPacket_m.h:50
virtual void scheduleCommitTimer(ResvStateBlock *rsbEle)
Definition: RsvpTe.cc:1907
#define RSB_REFRESH_INTERVAL
Definition: RsvpTe.cc:27
@ HELLO_MESSAGE
Definition: RsvpPacket_m.h:75
#define PSB_TIMEOUT_INTERVAL
Definition: RsvpTe.cc:29
@ PATH_MESSAGE
Definition: RsvpPacket_m.h:69
std::vector< Ipv4Address > Ipv4AddressVector
Definition: Ipv4Address_m.h:46
@ SWAP_OPER
Definition: LibTable.h:22
@ MSG_PATH_NOTIFY
Definition: SignallingMsg_m.h:87
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
virtual void refreshPath(PathStateBlock *psbEle)
Definition: RsvpTe.cc:540
virtual void commitResv(ResvStateBlock *rsb)
Definition: RsvpTe.cc:741
#define PSB_REFRESH_INTERVAL
Definition: RsvpTe.cc:26
virtual void readTrafficSessionFromXML(const cXMLElement *session)
Definition: RsvpTe.cc:179
virtual void processHELLO_TIMEOUT(HelloTimeoutMsg *msg)
Definition: RsvpTe.cc:399
void checkTags(const cXMLElement *node, const char *allowed)
Definition: XMLUtils.cc:55
virtual void processHelloMsg(Packet *pk)
Definition: RsvpTe.cc:1286
virtual HelloState * findHello(Ipv4Address peer)
Definition: RsvpTe.cc:1961
HelloVector HelloList
Definition: RsvpTe.h:176
value< double, units::s > s
Definition: Units.h:1235
intscale< b, 1, 8 > B
Definition: Units.h:1168
simsignal_t tedChangedSignal
Definition: Simsignals.cc:38
virtual PathStateBlock * findPSB(const SessionObj &session, const SenderTemplateObj &sender)
Definition: RsvpTe.cc:1932
@ MSG_RSB_REFRESH_TIMER
Definition: SignallingMsg_m.h:82
RsbVector RSBList
Definition: RsvpTe.h:175
int maxPsbId
Definition: RsvpTe.h:167
simtime_t helloInterval
Definition: RsvpTe.h:156
const char * getParameterStrValue(const cXMLElement *ptr, const char *name, const char *def)
Definition: XMLUtils.cc:76
bool contains(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:65
Ipv4Address routerId
Definition: RsvpTe.h:172
virtual void removeHello(HelloState *h)
Definition: RsvpTe.cc:360
virtual void processRSB_REFRESH_TIMER(RsbRefreshTimerMsg *msg)
Definition: RsvpTe.cc:483
std::vector< LabelOp > LabelOpVector
Definition: LibTable.h:32
Ipv4Address getParameterIPAddressValue(const cXMLElement *ptr, const char *name, Ipv4Address def)
Definition: XMLUtils.cc:121
PsbVector PSBList
Definition: RsvpTe.h:174
ModuleRefByPar< Ted > tedmod
Definition: RsvpTe.h:161
std::vector< struct EroObj > EroVector
Definition: IntServ_m.h:54
ModuleRefByPar< IIpv4RoutingTable > rt
Definition: RsvpTe.h:162
const cXMLElement * getUniqueChild(const cXMLElement *node, const char *name)
Definition: XMLUtils.cc:9
virtual void setupHello()
Definition: RsvpTe.cc:300
int maxRsbId
Definition: RsvpTe.h:168
virtual void createPath(const SessionObj &session, const SenderTemplateObj &sender)
Definition: RsvpTe.cc:96
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
@ PATH_PREEMPTED
Definition: SignallingMsg_m.h:91
virtual void sendPathTearMessage(Ipv4Address peerIP, const SessionObj &session, const SenderTemplateObj &sender, Ipv4Address LIH, Ipv4Address NHOP, bool force)
Definition: RsvpTe.cc:1820
@ PTEAR_MESSAGE
Definition: RsvpPacket_m.h:71
removed DscpReq kind
Definition: IUdp-gates.txt:12
virtual void clear()
Definition: RsvpTe.cc:2037
ModuleRefByPar< LibTable > lt
Definition: RsvpTe.h:164
virtual bool doCACCheck(const SessionObj &session, const SenderTspecObj &tspec, Ipv4Address OI)
Definition: RsvpTe.cc:518
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
const double k
Definition: Qam1024Modulation.cc:14
virtual void scheduleTimeout(PathStateBlock *psbEle)
Definition: RsvpTe.cc:1874
int maxSrcInstance
Definition: RsvpTe.h:170
virtual void processPathErrMsg(Packet *pk)
Definition: RsvpTe.cc:1369
#define RSB_TIMEOUT_INTERVAL
Definition: RsvpTe.cc:30
virtual EroVector readTrafficRouteFromXML(const cXMLElement *route)
Definition: RsvpTe.cc:154
virtual void preempt(Ipv4Address OI, int priority, double bandwidth)
Definition: RsvpTe.cc:664
const cXMLElement * getUniqueChildIfExists(const cXMLElement *node, const char *name)
Definition: XMLUtils.cc:18
virtual void scheduleRefreshTimer(PathStateBlock *psbEle, simtime_t delay)
Definition: RsvpTe.cc:1880
#define Enter_Method(...)
Definition: SelfDoc.h:71
@ POP_OPER
Definition: LibTable.h:23
virtual void processSignallingMessage(SignallingMsg *msg)
Definition: RsvpTe.cc:1616
virtual void sendPathNotify(int handler, const SessionObj &session, const SenderTemplateObj &sender, int status, simtime_t delay)
Definition: RsvpTe.cc:377
virtual PathStateBlock * findPsbById(int id)
Definition: RsvpTe.cc:1941
virtual void processRSB_COMMIT_TIMER(RsbCommitTimerMsg *msg)
Definition: RsvpTe.cc:497
ModuleRefByPar< IInterfaceTable > ift
Definition: RsvpTe.h:163
virtual void removeRsbFilter(ResvStateBlock *rsb, unsigned int index)
Definition: RsvpTe.cc:973
ModuleRefByPar< IRsvpClassifier > rpct
Definition: RsvpTe.h:165
virtual void processPathTearMsg(Packet *pk)
Definition: RsvpTe.cc:1416
virtual void startHello(Ipv4Address peer, simtime_t delay)
Definition: RsvpTe.cc:341
std::vector< struct FlowDescriptor_t > FlowDescriptorVector
Definition: IntServ_m.h:55
#define PATH_ERR_UNFEASIBLE
Definition: RsvpTe.cc:32
value< double, units::m > m
Definition: Units.h:1233
virtual void pathProblem(PathStateBlock *psb)
Definition: RsvpTe.cc:1657
@ PERROR_MESSAGE
Definition: RsvpPacket_m.h:73
virtual void sendToIP(Packet *msg, Ipv4Address destAddr)
Definition: RsvpTe.cc:1864
virtual void refreshResv(ResvStateBlock *rsbEle)
Definition: RsvpTe.cc:577
void registerProtocol(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a protocol primitive (PDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:83
virtual void addSession(const cXMLElement &node)
Definition: RsvpTe.cc:1736
virtual void processRSVPMessage(Packet *pk)
Definition: RsvpTe.cc:1256
virtual void processRSB_TIMEOUT(RsbTimeoutMsg *msg)
Definition: RsvpTe.cc:503
@ MSG_PSB_TIMEOUT
Definition: SignallingMsg_m.h:81
virtual void print(const RsvpPathMsg *p)
Definition: RsvpTe.cc:2023
#define PATH_ERR_PREEMPTED
Definition: RsvpTe.cc:33
virtual void updateRSB(ResvStateBlock *rsb, const RsvpResvMsg *msg)
Definition: RsvpTe.cc:932
@ MSG_HELLO_TIMER
Definition: SignallingMsg_m.h:85
std::vector< traffic_session_t > traffic
Definition: RsvpTe.h:55
double getParameterDoubleValue(const cXMLElement *ptr, const char *name, double def)
Definition: XMLUtils.cc:136
#define PATH_ERR_NEXTHOP_FAILED
Definition: RsvpTe.cc:34
virtual void recoveryEvent(Ipv4Address peer)
Definition: RsvpTe.cc:1594
@ PUSH_OPER
Definition: LibTable.h:21
@ MSG_RSB_TIMEOUT
Definition: SignallingMsg_m.h:84
const value< double, compose< units::J, units::s > > h(6.62606896e-34)
INET_API InitStage INITSTAGE_ROUTING_PROTOCOLS
Initialization of routing protocols.
virtual void announceLinkChange(int tedlinkindex)
Definition: RsvpTe.cc:733
@ PATH_FAILED
Definition: SignallingMsg_m.h:90
virtual void sendPathErrorMessage(PathStateBlock *psb, int errCode)
Definition: RsvpTe.cc:1838
virtual PathStateBlock * createPSB(const Ptr< RsvpPathMsg > &msg)
Definition: RsvpTe.cc:1115
virtual bool allocateResource(Ipv4Address OI, const SessionObj &session, double bandwidth)
Definition: RsvpTe.cc:697