Switch to side-by-side view

--- a/src/DIF/FA/FA.h
+++ b/src/DIF/FA/FA.h
@@ -53,33 +53,35 @@
     FA();
     virtual ~FA();
 
-    virtual bool receiveAllocateRequest(cObject* obj);
-    virtual void receiveAllocateResponsePositive(cObject* obj);
-    virtual void receiveAllocateResponseNegative(cObject* obj);
-    virtual void receiveDeallocateRequest(cObject* obj);
-    virtual void receiveCreateFlowRequest(cObject* obj);
+    virtual bool receiveAllocateRequest(Flow* flow);
+    virtual void receiveCreateFlowPositive(Flow* flow);
+    virtual void receiveCreateResponseFlowPositiveFromRibd(Flow* flow);
+    virtual bool receiveDeallocateRequest(Flow* flow);
+    virtual bool receiveCreateFlowRequestFromRibd(Flow* flow);
 
     virtual void deinstantiateFai(Flow* flow);
+
+    virtual bool setOriginalAddresses(Flow* flow);
+    virtual bool setNeighborAddresses(Flow* flow);
+
 
     bool invokeNewFlowRequestPolicy(Flow* flow);
 
     //Signals
     //simsignal_t sigFAIAllocReq;
-    simsignal_t sigFAAllocResNega;
-    simsignal_t sigFAAllocResPosi;
+    //simsignal_t sigFAAllocResNega;
+    //simsignal_t sigFAAllocResPosi;
     simsignal_t sigFACreReqFwd;
     simsignal_t sigFACreResNega;
-    simsignal_t sigFACreResPosi;
+    //simsignal_t sigFACreResPosi;
+    simsignal_t sigFACreResPosiFwd;
 
     //Listeners
-    LisFAAllocReq* lisAllocReq;
-    LisFAAllocResPosi* lisAllocResPosi;
-    LisFAAllocResNega* lisAllocResNega;
-    LisFADeallocReq* lisDeallocReq;
-    LisFACreReq*  lisCreReq;
-    LisFACreRes* lisCreRes;
-    LisFADelReq*  lisDelReq;
-    LisFADelRes* lisDelRes;
+    LisFAAllocReq*      lisAllocReq;
+    LisFACreFloPosi*    lisCreFloPosi;
+    LisFADeallocReq*    lisDeallocReq;
+    LisFACreReq*        lisCreReq;
+    LisFACreRes*        lisCreResFloPosi;
 
   protected:
     //SimpleModule overloads
@@ -87,21 +89,27 @@
     virtual void handleMessage(cMessage *msg);
     void initPointers();
 
+
   private:
-    FAITable* FaiTable;
     EFCP* Efcp;
     RABase* ResourceAllocator;
     DA* DifAllocator;
 
     bool isMalformedFlow(Flow* flow);
-    bool isAppLocal(Flow* flow);
     FAI* createFAI(Flow* flow);
 
     void initSignalsAndListeners();
 
-    void signalizeAllocateResponseNegative(Flow* flow);
+    //void signalizeAllocateResponseNegative(Flow* flow);
     void signalizeCreateFlowRequestForward(Flow* flow);
     void signalizeCreateFlowResponseNegative(Flow* flow);
+    void signalizeCreateFlowResponsePositiveForward(Flow* flow);
+
+    const Address getAddressFromDa(const APN& apn, bool useNeighbor);
+
+    bool changeDstAddresses(Flow* flow, bool useNeighbor);
+    bool changeSrcAddress(Flow* flow, bool useNeighbor);
+
 };
 
 #endif /* FLOWALLOCATOR_H_ */