52 cModule* catcher3 = this->getModuleByPath(
"^.^.^");
53 cModule* catcher2 = this->getModuleByPath(
"^.^");
99 EV <<
"DifAllocator returned NULL for resolving " << apn << endl;
110 for (
ApnCItem it = apnlist->begin(); it != apnlist->end(); ++it) {
130 if ( msg->isSelfMessage() && !opp_strcmp(msg->getName(),
TIM_FAPENDFLOWS) ) {
133 if (fte && fte->
getFai()) {
141 cancelAndDelete(msg);
145 EV <<
"Unsupported message received by FA " << getFullName() << endl;
158 EV <<
"DifAllocator returned NULL for resolving " << flow->
getSrcApni().
getApn() << endl;
171 EV <<
"DifAllocator returned NULL for resolving " << flow->
getDstApni().
getApn() << endl;
221 Enter_Method(
"receiveAllocateRequest()");
222 EV << this->getFullPath() <<
" received AllocateRequest" << endl;
248 EV <<
"IPCP not enrolled to DIF, thus executing enrollment!" << endl;
277 EV <<
"Management flow is not ready!" << endl;
302 Enter_Method(
"receiveLocalMgmtAllocateRequest()");
303 EV << this->getFullPath() <<
" received LocalMgmtAllocateRequest" << endl;
305 Flow* mgmtflow =
new Flow(src, dst);
328 Enter_Method(
"receiveAllocFinishMgmt()");
335 Enter_Method(
"receiveCreateFlowRequest()");
336 EV << this->getFullPath() <<
" received CreateFlowRequest" << endl;
346 EV <<
"Duplicit M_CREATE received thus ignoring!" << endl;
360 EV <<
"Processing M_CREATE(flow)" << endl;
383 EV <<
"Forwarding M_CREATE(flow)" << endl;
409 if (status ==
true) {
415 EV <<
"FA waits until N-1 IPC allocates auxilliary N-1 flow" << endl;
422 Enter_Method(
"receiveDeallocateRequest()");
423 EV << this->getFullPath() <<
" received DeallocateRequest" << endl;
427 if (fte && fte->
getFai()) {
437 EV <<
"Flow or FAI not found in FAITable!" << endl;
439 EV <<
"Cannot deallocate flow which is not in tranfer phase!" << endl;
445 Enter_Method(
"receiveNM1FlowCreated()");
446 EV <<
"Continue M_CREATE(flow) forward!" << endl;
462 cModuleType *moduleType = cModuleType::get(
"rina.src.DIF.FA.FAI");
469 std::ostringstream ostr;
470 ostr <<
"fai_" << portId <<
"_" << cepId;
473 cModule *module = moduleType->create(ostr.str().c_str(), this->getParentModule());
477 module->finalizeParameters();
478 module->buildInside();
481 module->scheduleStart(simTime());
482 module->callInitialize();
493 FAI* fai =
dynamic_cast<FAI*
>(module);
const DAP & getDifName() const
Getter of common DIF name.
const char * MOD_NEFFLOWREQPOLICY
Class representing flow object with attributes from specs.
void setQosRequirements(const QoSReq &qosReqs)
Sets QoS parameters wanted by flow initiator.
void setIpcAddress(const APN &ipcAddress)
Setter of IPC Process address which should be unambiguous within DIF.
void signalizeCreateFlowResponseNegative(Flow *flow)
const char * MOD_RESALLOC
const APNamingInfo & getSrcApni() const
Gets read-only source APNamingInfo.
NFlowTableEntry::EAllocateStatus getAllocateStatus() const
const char * MOD_DIFALLOC
const APNList * findApnNeigbors(const APN &apn)
virtual bool hasFlow(std::string addr, std::string qosId)=0
const char * SIG_FA_CreateFlowRequestForward
virtual bool setOriginalAddresses(Flow *flow)
void setDstAddr(const Address &dstAddr)
Sets (end-point) destination Address.
void setDegenerateDataTransfer(bool degenerateDataTransfer)
virtual bool receiveAllocateRequest()=0
void signalizeCreateFlowRequestForward(Flow *flow)
bool changeSrcAddress(Flow *flow, bool useNeighbor)
ConnectionId & getConnectionId()
Gets Flow's ConnectionId.
int getLocalPortId() const
Application Process Name class.
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
void insertNew(Flow *flow)
const char * SIG_ENROLLMENT_Finished
bool isMalformedFlow(Flow *flow)
const char * SIG_FA_MgmtFlowAllocated
const char * MOD_ENROLLMENTTABLE
static const Address UNSPECIFIED_ADDRESS
virtual void receiveNM1FlowCreated(Flow *flow)
bool isDdtFlag() const
Gets whether flow is for Degenerate Data Transfer.
FAI * createFAI(Flow *flow)
long getAllocInvokeId() const
Gets allocation InvokeId Used inside M_CREATE(_R)(flow) messages.
void setRemotePortId(int remotePortId)
const Address & getSrcNeighbor() const
Gets neighbor source Address, which is the address of (interim) hop-by-hop source Used during flow al...
NewFlowRequestBase * NFloReqPolicy
simsignal_t sigFACreResNega
void changeAllocStatus(Flow *flow, NFlowTableEntry::EAllocateStatus status)
const std::string VAL_MGMTQOSID
std::list< APN > APNList
APNList represents the list of APNs.
bool invokeNewFlowRequestPolicy(Flow *flow)
const APN & getApn() const
Getter of APN.
virtual bool receiveMgmtAllocateRequest(Flow *mgmtflow)
void setHopCount(uint32_t hopCount)
Sets a new hop-count. Hop-count should be decremented each time message is forwarded within DIF...
simsignal_t sigFAAllocFinMgmt
void setSrcNeighbor(const Address &srcNeighbor)
Sets neighbor source Address.
NFlowTableEntry * findEntryByInvokeId(long invId)
int getDstPortId() const
Gets destination PortId.
APNamingInfo holds complete naming info for particular application process.
const Address & getSrcAddr() const
Gets source Address, which is the address of communication start-point.
int getLocalCepId() const
virtual bool receiveMgmtAllocateFinish()
void setDdtFlag(bool ddtFlag)
Sets Degenerate Data Transfer flag.
const char * SIG_FA_CreateFlowResponseNegative
const Address & getDstNeighbor() const
Gets neighbor destination Address, which is the address of (interim) hop-by-hop destination Used duri...
void setSrcAddr(const Address &srcAddr)
Sets (start-point) source Address.
bool isAppLocal(const APN &apn)
virtual bool bindNFlowToNM1Flow(Flow *flow)=0
virtual bool receiveAllocateRequest()
virtual bool receiveAllocateRequest(Flow *flow)
virtual bool setNeighborAddresses(Flow *flow)
const char * SIG_RIBD_CreateRequestFlow
virtual bool run(Flow &flow)
virtual bool receiveCreateRequest()
int getDstCepId() const
Getter of destination Connection-Endpoint identifier.
const Address getAddressFromDa(const APN &apn, bool useNeighbor, bool isMgmtFlow)
virtual void deinstantiateFai(Flow *flow)
const int RANDOM_NUMBER_GENERATOR
Class representing Flow allocator component.
LisFACreFloPosi * lisCreFloPosi
bool isUnspecified() const
Checks whether a given Address is unspecified which means that it has empty attributes.
virtual void handleMessage(cMessage *msg)
LisFAAllocFinMgmt * lisEnrollFin
void setRemoteCepId(int remoteCepId)
void setFaiToFlow(FAIBase *fai, Flow *flow)
const char * SIG_FAI_AllocateResponsePositive
const ConnectionId & getConId() const
Gets read-only Flow's ConnectionId.
void setSrcPortId(int srcPortId)
Sets source PortId.
const char * PAR_LOCALPORTID
const char * PAR_LOCALCEPID
void initSignalsAndListeners()
bool changeDstAddresses(Flow *flow, bool useNeighbor)
std::list< Flow * > PendingFlows
const char * MOD_ENROLLMENT
const APN & getApn() const
Getter of unique APN which is initialized during object construction.
void setSrcCepId(int srcCepId)
Setter of source Connection-Endpoint identifier.
void setDstNeighbor(const Address &dstNeighbor)
Sets neighbor destination Address.
const char * MOD_NFLOWTABLE
const char * TIM_FAPENDFLOWS
void postInitialize(FABase *fa, Flow *fl, EFCP *efcp)
virtual bool receiveCreateFlowRequestFromRibd(Flow *flow)
const Address & getDstAddr() const
Gets source Address, which is the address of communication end-point.
virtual bool receiveDeallocateRequest(Flow *flow)
simsignal_t sigFACreReqFwd
APNList::const_iterator ApnCItem
APNList constant iterator.
uint32_t getHopCount() const
Gets hop-count, which is number of allowed message forwards from this device towards destination By d...
bool isManagementFlowLocalToIPCP() const
const std::string & getName() const
Gets APN string name representation.
virtual void initialize()
virtual Flow * dup() const
Flow object duplication method that creates copy with.
virtual bool receiveDeallocateRequest()=0
Address class holds IPC Process identification.
Flow & swapFlow()
Function that swaps relevant source and destination Flow parameters It is being used mainly for count...
const APNamingInfo & getDstApni() const
Gets read-only destination APNamingInfo.
const Address * resolveApnToBestAddress(const APN &apn)
NFlowTableEntry * findEntryByFlow(const Flow *flow)
static const QoSReq MANAGEMENT