--- a/src/DIF/FA/FA.h
+++ b/src/DIF/FA/FA.h
@@ -1,19 +1,24 @@
+// The MIT License (MIT)
//
-// Copyright Š 2014 PRISTINE Consortium (http://ict-pristine.eu)
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see http://www.gnu.org/licenses/.
-//
+// Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
/**
* @brief Class representing Flow allocator component
@@ -32,20 +37,21 @@
#include "FAListeners.h"
#include "FAI.h"
#include "Flow.h"
-#include "FAITable.h"
+#include "NFlowTable.h"
#include "RINASignals.h"
-#include "ModuleAccess.h"
#include "EFCP.h"
#include "ExternConsts.h"
#include "DA.h"
+#include "RABase.h"
#include "NewFlowRequestBase.h"
+#include "EnrollmentStateTable.h"
//Constants
extern const int RANDOM_NUMBER_GENERATOR;
extern const int MAX_PORTID;
extern const int MAX_CEPID;
-extern const char* MOD_NEFFLOWREQPOLICY;
+extern const char* MOD_NEWFLOWREQPOLICY;
class FA : public FABase
{
@@ -54,6 +60,9 @@
virtual ~FA();
virtual bool receiveAllocateRequest(Flow* flow);
+ virtual bool receiveMgmtAllocateRequest(Flow* mgmtflow);
+ virtual bool receiveMgmtAllocateRequest(APNamingInfo src, APNamingInfo dst);
+ virtual bool receiveMgmtAllocateFinish();
virtual void receiveNM1FlowCreated(Flow* flow);
virtual bool receiveDeallocateRequest(Flow* flow);
virtual bool receiveCreateFlowRequestFromRibd(Flow* flow);
@@ -69,9 +78,11 @@
simsignal_t sigFACreReqFwd;
simsignal_t sigFACreResNega;
simsignal_t sigFACreResPosiFwd;
+ simsignal_t sigFAAllocFinMgmt;
//Listeners
LisFAAllocReq* lisAllocReq;
+ LisFAAllocFinMgmt* lisEnrollFin;
LisFACreFloPosi* lisCreFloPosi;
LisFADeallocReq* lisDeallocReq;
LisFACreReq* lisCreReq;
@@ -85,7 +96,9 @@
private:
EFCP* Efcp;
DA* DifAllocator;
+ RABase* RaModule;
NewFlowRequestBase* NFloReqPolicy;
+ EnrollmentStateTable* Enrollment;
bool isMalformedFlow(Flow* flow);
FAI* createFAI(Flow* flow);
@@ -95,7 +108,7 @@
void signalizeCreateFlowRequestForward(Flow* flow);
void signalizeCreateFlowResponseNegative(Flow* flow);
- const Address getAddressFromDa(const APN& apn, bool useNeighbor);
+ const Address getAddressFromDa(const APN& apn, bool useNeighbor, bool isMgmtFlow);
bool changeDstAddresses(Flow* flow, bool useNeighbor);
bool changeSrcAddress(Flow* flow, bool useNeighbor);