RINASim  October 2016
Documentation of framework for OMNeT++
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FA.cc
Go to the documentation of this file.
1 // The MIT License (MIT)
2 //
3 // Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22 
23 #include "FA.h"
24 
25 //Constants
27 const int MAX_PORTID = 65535;
28 const int MAX_CEPID = 65535;
29 const char* MOD_NEFFLOWREQPOLICY = "newFlowRequestPolicy";
30 
32 
33 FA::FA() {
34  N_flowTable = NULL;
35 }
36 
38  N_flowTable = NULL;
39 }
40 
42  N_flowTable = check_and_cast<NFlowTable*>(getParentModule()->getSubmodule(MOD_NFLOWTABLE));
43  Efcp = getRINAModule<EFCP*>(this, 2, {MOD_EFCP, MOD_EFCP});
44 
45  DifAllocator = getRINAModule<DA*>(this, 3, {MOD_DIFALLOC, MOD_DA});
46  NFloReqPolicy = getRINAModule<NewFlowRequestBase*>(this, 1, {MOD_NEFFLOWREQPOLICY});
47  RaModule = getRINAModule<RABase*>(this, 2, {MOD_RESALLOC, MOD_RA});
48  Enrollment = getRINAModule<EnrollmentStateTable*>(this, 2, {MOD_ENROLLMENT, MOD_ENROLLMENTTABLE});
49 }
50 
52  cModule* catcher3 = this->getModuleByPath("^.^.^");
53  cModule* catcher2 = this->getModuleByPath("^.^");
54 
55  //Signals that this module is emitting
56  //sigFACreResPosiFwd = registerSignal(SIG_FA_CreateFlowResponseForward);
60 
61  //Signals that this module is processing
62  /*
63  // AllocateRequest
64  this->lisAllocReq = new LisFAAllocReq(this);
65  catcher3->subscribe(SIG_IRM_AllocateRequest, this->lisAllocReq);
66  // DeallocateRequest
67  this->lisDeallocReq = new LisFADeallocReq(this);
68  catcher3->subscribe(SIG_IRM_DeallocateRequest, this->lisDeallocReq);
69  */
70  //AllocateResponsePositive
71  lisCreFloPosi = new LisFACreFloPosi(this);
72  catcher3->subscribe(SIG_FAI_AllocateResponsePositive, lisCreFloPosi);
73 
74  //CreateRequestFlow
75  lisCreReq = new LisFACreReq(this);
76  catcher2->subscribe(SIG_RIBD_CreateRequestFlow, lisCreReq);
77 
78  //Allocate after management flow is prepared (enrollment done)
79  lisEnrollFin = new LisFAAllocFinMgmt(this);
80  //catcher2->subscribe(SIG_FAI_AllocateFinishManagement, lisAllocFinMgmt);
81  catcher2->subscribe(SIG_ENROLLMENT_Finished, lisEnrollFin);
82 
83 }
84 
86  initPointers();
88 
89  //Setup MyAddress
90  initMyAddress();
91 }
92 //XXX: Vesely - Dirty! Needs refactoring...
93 const Address FA::getAddressFromDa(const APN& apn, bool useNeighbor, bool isMgmtFlow) {
94  Address addr;
95  if (!isMgmtFlow) {
96  //Ask DA which IPC to use to reach src App
98  if (ad == NULL) {
99  EV << "DifAllocator returned NULL for resolving " << apn << endl;
100  return Address();
101  }
102  addr = *ad;
103  }
104  else {
105  addr = Address(apn);
106  }
107  if (useNeighbor) {
108  const APNList* apnlist = DifAllocator->findApnNeigbors(addr.getApn());
109  if (apnlist) {
110  for (ApnCItem it = apnlist->begin(); it != apnlist->end(); ++it) {
111  Address tmp = Address(it->getName());
112  //EV << "!!!!!" << tmp << endl;
113  if (addr.getDifName() == tmp.getDifName()) {
114  addr = tmp;
115  break;
116  }
117  }
118  }
119  }
120  return addr;
121 }
123  //TODO: Vesely - Simulate malformed
124  if ( !strcmp(flow->getDstApni().getApn().getName().c_str(), "AppERR") )
125  return true;
126  return false;
127 }
128 
129 void FA::handleMessage(cMessage *msg) {
130  if ( msg->isSelfMessage() && !opp_strcmp(msg->getName(), TIM_FAPENDFLOWS) ) {
131  while (!PendingFlows.empty()) {
133  if (fte && fte->getFai()) {
134  FAIBase* fai = fte->getFai();
135  if (fai) {
136  fai->receiveAllocateRequest();
137  }
138  }
139  PendingFlows.pop_front();
140  }
141  cancelAndDelete(msg);
142  }
143  else
144  {
145  EV << "Unsupported message received by FA " << getFullName() << endl;
146  }
147 }
148 
149 bool FA::changeSrcAddress(Flow* flow, bool useNeighbor) {
150  //Add source...
151  if (!useNeighbor) {
152  flow->setSrcAddr(MyAddress);
153  }
154  else {
155  //Ask DA which IPC to use to reach src App
157  if (ad == NULL) {
158  EV << "DifAllocator returned NULL for resolving " << flow->getSrcApni().getApn() << endl;
159  return false;
160  }
161  Address addr = *ad;
162  flow->setSrcAddr(addr);
163  }
164  return true;
165 }
166 
167 bool FA::changeDstAddresses(Flow* flow, bool useNeighbor) {
168  //Ask DA which IPC to use to reach dst App
170  if (ad == NULL) {
171  EV << "DifAllocator returned NULL for resolving " << flow->getDstApni().getApn() << endl;
172  return false;
173  }
174  Address addr = *ad;
175 
176  //...and destination addresses
177 
178  //If destination address does have neighbor then use first neighbor address
179  if (useNeighbor) {
180  const APNList* apnlist = DifAllocator->findApnNeigbors(addr.getIpcAddress());
181  if (apnlist)
182  addr.setIpcAddress(apnlist->front());
183  }
184 
185  flow->setDstAddr(addr);
186 
187  return true;
188 }
189 
190 //XXX: Vesely - Dirty! Needs refactoring...
192  Address adr = getAddressFromDa(flow->getSrcApni().getApn(), false, false);
193  if (adr.isUnspecified())
194  return false;
195  flow->setSrcAddr(adr);
196 
197  adr = getAddressFromDa(flow->getDstApni().getApn(), false, false);
198  if (adr.isUnspecified())
199  return false;
200  flow->setDstAddr(adr);
201  return true;
202 }
203 //XXX: Vesely - Dirty! Needs refactoring...
205  Address adr;
206  if (!flow->isManagementFlowLocalToIPCP()) {
207  adr = getAddressFromDa(flow->getSrcApni().getApn(), true, flow->isManagementFlowLocalToIPCP());
208  if (adr.isUnspecified())
209  return false;
210  flow->setSrcNeighbor(adr);
211  }
212 
213  adr = getAddressFromDa(flow->getDstApni().getApn(), true, flow->isManagementFlowLocalToIPCP());
214  if (adr.isUnspecified())
215  return false;
216  flow->setDstNeighbor(adr);
217  return true;
218 }
219 
221  Enter_Method("receiveAllocateRequest()");
222  EV << this->getFullPath() << " received AllocateRequest" << endl;
223 
224  //Insert new Flow into FAITable
225  N_flowTable->insertNew(flow);
226 
227  //Change allocation status to pending
229 
230  //Add source and destination address in case of data flow
233  setOriginalAddresses(flow);
234  setNeighborAddresses(flow);
235  //XXX: Vesely - Dirty! Needs refactoring...
236  flow->setSrcNeighbor(flow->getSrcAddr());
237  }
238 
239  //Are both Apps local? YES then Degenerate transfer
240  if ( DifAllocator->isAppLocal( flow->getDstApni().getApn() ) ) {
241  flow->setDdtFlag(true);
242  }
243 
244  //Check whether local IPCP is enrolled into DIF
245  //Successful enrollment implies existence of N-1 mgmt-flow, if not then
246  //FA needs to init allocation of N-1 mgmt-flow
247  if (!flow->isDdtFlag() && !Enrollment->isEnrolled(MyAddress.getApn())) {
248  EV << "IPCP not enrolled to DIF, thus executing enrollment!" << endl;
250  }
251 
252  //Is malformed?
253  if (isMalformedFlow(flow)){
255  //TODO: Vesely - What about special signal for errors????
256  //this->signalizeAllocateResponseNegative(fl);
257  return false;
258  }
259 
260  //Create FAI
261  FAI* fai = this->createFAI(flow);
262  fai->setDegenerateDataTransfer(flow->isDdtFlag());
263 
264  //Update flow object
265  flow->setSrcPortId(fai->getLocalPortId());
266  flow->getConnectionId().setSrcCepId(fai->getLocalCepId());
267 
268  //Postpone allocation request until management flow is ready
269  bool status;
270  if ( flow->isDdtFlag() || Enrollment->isEnrolled(MyAddress.getApn())
271  ){
272  status = fai->receiveAllocateRequest();
273  }
274  else
275  {
276  status = true;
277  EV << "Management flow is not ready!" << endl;
278  }
279 
280  //Potentially wait for response from RA, after this continue with X
281 
282  return status;
283 }
284 
286  bool status = true;
287  //If N-1 mgmt-flow not ready, then allocate
288  if (!RaModule->hasFlow(mgmtflow->getDstAddr().getApn().getName(), VAL_MGMTQOSID)) {
289  status = RaModule->bindNFlowToNM1Flow(mgmtflow);
290  }
291 
292  //If N-1 mgmt ready, then starting enrollment procedure
293  APNIPair* apnip = new APNIPair(mgmtflow->getSrcApni(), mgmtflow->getDstApni());
294  if (status) {
295  emit(sigFAAllocFinMgmt, apnip);
296  }
297 
298  return status;
299 }
300 
302  Enter_Method("receiveLocalMgmtAllocateRequest()");
303  EV << this->getFullPath() << " received LocalMgmtAllocateRequest" << endl;
304 
305  Flow* mgmtflow = new Flow(src, dst);
307  mgmtflow->setSrcAddr(Address(src.getApn()));
308  mgmtflow->setDstAddr(Address(dst.getApn()));
309  mgmtflow->setSrcNeighbor(Address(src.getApn()));
310  mgmtflow->setDstNeighbor(Address(dst.getApn()));
311 
312  bool status = true;
313  //If N-1 mgmt-flow not ready, then allocate
314  if (!RaModule->hasFlow(mgmtflow->getDstAddr().getApn().getName(), VAL_MGMTQOSID)) {
315  status = RaModule->bindNFlowToNM1Flow(mgmtflow);
316  }
317 
318  //If N-1 mgmt ready, then starting enrollment procedure
319  APNIPair* apnip = new APNIPair(mgmtflow->getSrcApni(), mgmtflow->getDstApni());
320  if (status) {
321  emit(sigFAAllocFinMgmt, apnip);
322  }
323 
324  return status;
325 }
326 
328  Enter_Method("receiveAllocFinishMgmt()");
329  scheduleAt(simTime(), new cMessage(TIM_FAPENDFLOWS) );
330  //TODO: Vesely - Fix unused return value
331  return true;
332 }
333 
335  Enter_Method("receiveCreateFlowRequest()");
336  EV << this->getFullPath() << " received CreateFlowRequest" << endl;
337 
338  bool status;
339 
340  //Is requested APP local?
341  if ( DifAllocator->isAppLocal(flow->getSrcApni().getApn()) ){
342  //Check for duplicity
343  if (!DifAllocator->isAppLocal(flow->getDstApni().getApn())
345  ) {
346  EV << "Duplicit M_CREATE received thus ignoring!" << endl;
347  return false;
348  }
349 
350  //Insert new Flow into FAITable
351  N_flowTable->insertNew(flow);
352 
353  //Change neighbor addresses
354  //if (!flow->isManagementFlowLocalToIPCP()) {
355  setNeighborAddresses(flow);
356  //XXX: Vesely - Dirty! Needs refactoring...
357  flow->setSrcNeighbor(flow->getSrcAddr());
358  //}
359 
360  EV << "Processing M_CREATE(flow)" << endl;
361  //Change allocation status to pending
363 
364  //Create FAI
365  FAI* fai = this->createFAI(flow);
366  if ( DifAllocator->isAppLocal( flow->getDstApni().getApn() ) ) {
367  fai->setDegenerateDataTransfer(true);
368  flow->setDdtFlag(true);
369  }
370  fai->setRemotePortId(flow->getDstPortId());
371  fai->setRemoteCepId(flow->getConId().getDstCepId());
372 
373  //Update flow object
374  flow->setSrcPortId(fai->getLocalPortId());
375  flow->getConnectionId().setSrcCepId(fai->getLocalCepId());
376 
377  //Pass the CreateRequest to newly created FAI
378  status = fai->receiveCreateRequest();
379 
380  }
381  //...if not then forward CreateRequest Flow to next neighbor
382  else {
383  EV << "Forwarding M_CREATE(flow)" << endl;
384 
385  //Before that reverse SRC-DST information back
386  flow->swapFlow();
387  //Insert new Flow into FAITable
388  N_flowTable->insertNew(flow);
389  //Change neighbor addresses
390  setNeighborAddresses(flow);
391  //Change status to forward
393 
394  //Decrement HopCount
395  flow->setHopCount(flow->getHopCount() - 1);
396  if (!flow->getHopCount()) {
397  //TODO: Vesely - More granular error
399  //Schedule M_Create_R(Flow)
401  return false;
402  }
403 
404  // bind this flow to a suitable (N-1)-flow
405  RABase* raModule = getRINAModule<RABase*>(this, 2, {MOD_RESALLOC, MOD_RA});
406  status = raModule->bindNFlowToNM1Flow(flow);
407 
408  //EV << "status: " << status << endl;
409  if (status == true) {
410  // flow is already allocated
411  receiveNM1FlowCreated(flow);
412  }
413  //else WAIT until allocation of N-1 flow is completed
414  else {
415  EV << "FA waits until N-1 IPC allocates auxilliary N-1 flow" << endl;
416  }
417  }
418  return status;
419 }
420 
422  Enter_Method("receiveDeallocateRequest()");
423  EV << this->getFullPath() << " received DeallocateRequest" << endl;
424 
425  //Check flow in table
427  if (fte && fte->getFai()) {
428  //Pass the request to appropriate FAI
429  FAIBase* fai = fte->getFai();
431 
433  return true;
434  }
435  else {
436  if (!fte)
437  EV << "Flow or FAI not found in FAITable!" << endl;
438  else if (fte->getAllocateStatus() != NFlowTableEntry::TRANSFER)
439  EV << "Cannot deallocate flow which is not in tranfer phase!" << endl;
440  return false;
441  }
442 }
443 
445  Enter_Method("receiveNM1FlowCreated()");
446  EV << "Continue M_CREATE(flow) forward!" << endl;
447 
448  Flow* tmpfl = flow->dup();
450  setNeighborAddresses(tmpfl);
451 
453 }
454 
456  return NFloReqPolicy->run(*flow);
457 }
458 
460  //@Vladimir: what about using ExternConsts.cc for this?
461  // find factory object
462  cModuleType *moduleType = cModuleType::get("rina.src.DIF.FA.FAI");
463 
464  //Prepare parameters
465  int portId = getEnvir()->getRNG(RANDOM_NUMBER_GENERATOR)->intRand(MAX_PORTID);
466  int cepId = getEnvir()->getRNG(RANDOM_NUMBER_GENERATOR)->intRand(MAX_CEPID);
467 
468  //Create a name
469  std::ostringstream ostr;
470  ostr << "fai_" << portId << "_" << cepId;
471 
472  //Instantiate module
473  cModule *module = moduleType->create(ostr.str().c_str(), this->getParentModule());
474  module->par(PAR_LOCALPORTID) = portId;
475  module->par(PAR_LOCALCEPID) = cepId;
476  //module->par(PAR_CREREQTIMEOUT) = par(PAR_CREREQTIMEOUT).doubleValue();
477  module->finalizeParameters();
478  module->buildInside();
479 
480  // create activation message
481  module->scheduleStart(simTime());
482  module->callInitialize();
483 
484  //Layouting
485  /*
486  module->getDisplayString().setTagArg("p", 0, "100");
487  std::ostringstream os;
488  os << (70 + N_flowTable->getSize() * 50);
489  module->getDisplayString().setTagArg("p", 1, os.str().c_str());
490  */
491 
492  //Prepare return pointer and setup internal FAI pointers
493  FAI* fai = dynamic_cast<FAI*>(module);
494  fai->postInitialize(this, flow, Efcp);
495 
496  //Change state in FAITable
497  N_flowTable->setFaiToFlow(fai, flow);
499 
500  return fai;
501 }
502 
505  //TODO: Vesely
506  //Prepare deinstantitation self-message
507 }
508 
510  emit(this->sigFACreReqFwd, flow);
511 }
512 
514  emit(this->sigFACreResNega, flow);
515 }
const DAP & getDifName() const
Getter of common DIF name.
Definition: Address.cc:73
const char * MOD_NEFFLOWREQPOLICY
Definition: FA.cc:29
Class representing flow object with attributes from specs.
Definition: Flow.h:45
void setQosRequirements(const QoSReq &qosReqs)
Sets QoS parameters wanted by flow initiator.
Definition: Flow.cc:323
void setIpcAddress(const APN &ipcAddress)
Setter of IPC Process address which should be unambiguous within DIF.
Definition: Address.cc:124
void signalizeCreateFlowResponseNegative(Flow *flow)
Definition: FA.cc:513
const char * MOD_RESALLOC
Definition: ExternConsts.cc:58
const APNamingInfo & getSrcApni() const
Gets read-only source APNamingInfo.
Definition: Flow.cc:134
NFlowTableEntry::EAllocateStatus getAllocateStatus() const
const char * MOD_DIFALLOC
Definition: ExternConsts.cc:34
const APNList * findApnNeigbors(const APN &apn)
Definition: DA.cc:27
virtual bool hasFlow(std::string addr, std::string qosId)=0
const char * SIG_FA_CreateFlowRequestForward
Definition: RINASignals.cc:96
virtual bool setOriginalAddresses(Flow *flow)
Definition: FA.cc:191
void setDstAddr(const Address &dstAddr)
Sets (end-point) destination Address.
Definition: Flow.cc:154
void setDegenerateDataTransfer(bool degenerateDataTransfer)
Definition: FAIBase.h:57
virtual bool receiveAllocateRequest()=0
void signalizeCreateFlowRequestForward(Flow *flow)
Definition: FA.cc:509
bool changeSrcAddress(Flow *flow, bool useNeighbor)
Definition: FA.cc:149
ConnectionId & getConnectionId()
Gets Flow's ConnectionId.
Definition: Flow.cc:209
int getLocalPortId() const
Definition: FAI.cc:616
Application Process Name class.
Definition: APN.h:36
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
Definition: Address.cc:83
void insertNew(Flow *flow)
Definition: NFlowTable.cc:136
const char * SIG_ENROLLMENT_Finished
Definition: RINASignals.cc:79
const char * MOD_EFCP
Definition: ExternConsts.cc:40
bool isMalformedFlow(Flow *flow)
Definition: FA.cc:122
const char * SIG_FA_MgmtFlowAllocated
Definition: RINASignals.cc:100
const char * MOD_ENROLLMENTTABLE
Definition: ExternConsts.cc:45
static const Address UNSPECIFIED_ADDRESS
Definition: Address.h:44
virtual void receiveNM1FlowCreated(Flow *flow)
Definition: FA.cc:444
FAIBase * getFai() const
bool isDdtFlag() const
Gets whether flow is for Degenerate Data Transfer.
Definition: Flow.cc:293
FAI * createFAI(Flow *flow)
Definition: FA.cc:459
long getAllocInvokeId() const
Gets allocation InvokeId Used inside M_CREATE(_R)(flow) messages.
Definition: Flow.cc:277
void setRemotePortId(int remotePortId)
Definition: FAI.cc:636
const Address & getSrcNeighbor() const
Gets neighbor source Address, which is the address of (interim) hop-by-hop source Used during flow al...
Definition: Flow.cc:348
NewFlowRequestBase * NFloReqPolicy
Definition: FA.h:100
simsignal_t sigFACreResNega
Definition: FA.h:79
void changeAllocStatus(Flow *flow, NFlowTableEntry::EAllocateStatus status)
Definition: NFlowTable.cc:173
const std::string VAL_MGMTQOSID
Definition: QoSCube.cc:37
std::list< APN > APNList
APNList represents the list of APNs.
Definition: APN.h:96
bool invokeNewFlowRequestPolicy(Flow *flow)
Definition: FA.cc:455
EFCP * Efcp
Definition: FA.h:97
FA()
Definition: FA.cc:33
const APN & getApn() const
Getter of APN.
Definition: APNamingInfo.h:142
virtual bool receiveMgmtAllocateRequest(Flow *mgmtflow)
Definition: FA.cc:285
void setHopCount(uint32_t hopCount)
Sets a new hop-count. Hop-count should be decremented each time message is forwarded within DIF...
Definition: Flow.cc:122
simsignal_t sigFAAllocFinMgmt
Definition: FA.h:81
void setSrcNeighbor(const Address &srcNeighbor)
Sets neighbor source Address.
Definition: Flow.cc:352
NFlowTableEntry * findEntryByInvokeId(long invId)
Definition: NFlowTable.cc:97
int getDstPortId() const
Gets destination PortId.
Definition: Flow.cc:110
APNamingInfo holds complete naming info for particular application process.
Definition: APNamingInfo.h:43
const Address & getSrcAddr() const
Gets source Address, which is the address of communication start-point.
Definition: Flow.cc:158
virtual ~FA()
Definition: FA.cc:37
int getLocalCepId() const
Definition: FAI.cc:608
LisFACreReq * lisCreReq
Definition: FA.h:88
NFlowTable * N_flowTable
Definition: FABase.h:59
virtual bool receiveMgmtAllocateFinish()
Definition: FA.cc:327
void setDdtFlag(bool ddtFlag)
Sets Degenerate Data Transfer flag.
Definition: Flow.cc:297
const char * SIG_FA_CreateFlowResponseNegative
Definition: RINASignals.cc:94
const Address & getDstNeighbor() const
Gets neighbor destination Address, which is the address of (interim) hop-by-hop destination Used duri...
Definition: Flow.cc:340
Definition: FAI.h:47
Address MyAddress
Definition: FABase.h:60
void setSrcAddr(const Address &srcAddr)
Sets (start-point) source Address.
Definition: Flow.cc:162
bool isAppLocal(const APN &apn)
Definition: DA.cc:119
virtual bool bindNFlowToNM1Flow(Flow *flow)=0
Define_Module(FA)
virtual bool receiveAllocateRequest()
Definition: FAI.cc:71
virtual bool receiveAllocateRequest(Flow *flow)
Definition: FA.cc:220
virtual bool setNeighborAddresses(Flow *flow)
Definition: FA.cc:204
const char * SIG_RIBD_CreateRequestFlow
Definition: RINASignals.cc:46
Definition: FA.h:56
virtual bool run(Flow &flow)
virtual bool receiveCreateRequest()
Definition: FAI.cc:184
int getDstCepId() const
Getter of destination Connection-Endpoint identifier.
Definition: ConnectionId.cc:34
const Address getAddressFromDa(const APN &apn, bool useNeighbor, bool isMgmtFlow)
Definition: FA.cc:93
virtual void deinstantiateFai(Flow *flow)
Definition: FA.cc:503
const int RANDOM_NUMBER_GENERATOR
Class representing Flow allocator component.
Definition: FA.cc:26
LisFACreFloPosi * lisCreFloPosi
Definition: FA.h:87
Definition: RABase.h:36
bool isUnspecified() const
Checks whether a given Address is unspecified which means that it has empty attributes.
Definition: Address.cc:114
virtual void handleMessage(cMessage *msg)
Definition: FA.cc:129
LisFAAllocFinMgmt * lisEnrollFin
Definition: FA.h:86
DA * DifAllocator
Definition: FA.h:98
void initMyAddress()
Definition: FABase.cc:40
void setRemoteCepId(int remoteCepId)
Definition: FAI.cc:628
void setFaiToFlow(FAIBase *fai, Flow *flow)
Definition: NFlowTable.cc:190
const char * SIG_FAI_AllocateResponsePositive
Definition: RINASignals.cc:108
const ConnectionId & getConId() const
Gets read-only Flow's ConnectionId.
Definition: Flow.cc:86
const int MAX_PORTID
Definition: FA.cc:27
const char * MOD_RA
Definition: ExternConsts.cc:55
RABase * RaModule
Definition: FA.h:99
void setSrcPortId(int srcPortId)
Sets source PortId.
Definition: Flow.cc:146
const char * PAR_LOCALPORTID
Definition: ExternConsts.cc:95
const char * PAR_LOCALCEPID
Definition: ExternConsts.cc:96
void initSignalsAndListeners()
Definition: FA.cc:51
bool changeDstAddresses(Flow *flow, bool useNeighbor)
Definition: FA.cc:167
const char * MOD_DA
Definition: ExternConsts.cc:33
std::list< Flow * > PendingFlows
Definition: FABase.h:39
const char * MOD_ENROLLMENT
Definition: ExternConsts.cc:43
const APN & getApn() const
Getter of unique APN which is initialized during object construction.
Definition: Address.cc:119
void setSrcCepId(int srcCepId)
Setter of source Connection-Endpoint identifier.
Definition: ConnectionId.cc:59
void setDstNeighbor(const Address &dstNeighbor)
Sets neighbor destination Address.
Definition: Flow.cc:344
const char * MOD_NFLOWTABLE
Definition: ExternConsts.cc:53
const char * TIM_FAPENDFLOWS
Definition: FABase.cc:26
void postInitialize(FABase *fa, Flow *fl, EFCP *efcp)
Definition: FAI.cc:64
virtual bool receiveCreateFlowRequestFromRibd(Flow *flow)
Definition: FA.cc:334
const Address & getDstAddr() const
Gets source Address, which is the address of communication end-point.
Definition: Flow.cc:150
const int MAX_CEPID
Definition: FA.cc:28
virtual bool receiveDeallocateRequest(Flow *flow)
Definition: FA.cc:421
simsignal_t sigFACreReqFwd
Definition: FA.h:78
APNList::const_iterator ApnCItem
APNList constant iterator.
Definition: APN.h:103
uint32_t getHopCount() const
Gets hop-count, which is number of allowed message forwards from this device towards destination By d...
Definition: Flow.cc:118
bool isManagementFlowLocalToIPCP() const
Definition: Flow.cc:370
void initPointers()
Definition: FA.cc:41
const std::string & getName() const
Gets APN string name representation.
Definition: APN.cc:40
virtual void initialize()
Definition: FA.cc:85
virtual Flow * dup() const
Flow object duplication method that creates copy with.
Definition: Flow.cc:182
virtual bool receiveDeallocateRequest()=0
Address class holds IPC Process identification.
Definition: Address.h:42
Flow & swapFlow()
Function that swaps relevant source and destination Flow parameters It is being used mainly for count...
Definition: Flow.cc:311
const APNamingInfo & getDstApni() const
Gets read-only destination APNamingInfo.
Definition: Flow.cc:102
const Address * resolveApnToBestAddress(const APN &apn)
Definition: DA.cc:31
NFlowTableEntry * findEntryByFlow(const Flow *flow)
Definition: NFlowTable.cc:155
static const QoSReq MANAGEMENT
Definition: QoSReq.h:152