RINASim  October 2016
Documentation of framework for OMNeT++
DAFEnrollment.h
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 
31 #ifndef __RINA_DAFENROLLMENT_H_
32 #define __RINA_DAFENROLLMENT_H_
33 
34 #include <omnetpp.h>
35 #include "RINASignals.h"
36 #include "Flow.h"
37 #include "CDAPMessage_m.h"
38 #include "ConnectionTable.h"
39 #include "ExternConsts.h"
40 #include "DAFEnrollmentListeners.h"
42 #include "DAFEnrollmentNotifier.h"
43 #include "Address.h"
44 #include "AEMgmt.h"
45 #include "DAFEnrollmentObj.h"
46 #include "DAFOperationObj.h"
47 #include "FABase.h"
48 #include "IRM.h"
49 #include "DAFEnrollmentBase.h"
50 #include "CACEMgmt.h"
51 
52 extern const char* DAF_MSG_ENRLCON;
53 extern const char* DAF_MSG_ENRLREL;
54 
68 
69 class CACEMgmt;
70 typedef std::list<APNIPair> APNIPairs;
71 typedef std::map<simtime_t, APNIPairs*> DAFEnrollCommands;
72 
74 {
75  friend class CACEMgmt;
76  public:
78 
79  DAFEnrollment();
80  virtual ~DAFEnrollment();
81  void startCACE(Flow* flow);
83  void insertStateTableEntry(Flow* flow);
87 
94 
97 
98  void createBindings(Flow *flow, DAFEnrollmentNotifier* module);
99 
100  void checkEnrolled(APNIPair* apnip);
101 
102 
105  protected:
106  void initPointers();
108  virtual void initialize();
109 
111 
112  void parseConfig(cXMLElement* config);
113 
120  void createFlow(APNIPair* apnip);
122 
124 
127 
128  int authType;
129  std::string apName;
130  std::string apInstance;
131  std::string authName;
132  std::string authPassword;
133  std::string authOther;
137 
150 
153 
165 
167 
176  void signalizeEnrolled();
177 
178 
181 
182  virtual void handleMessage(cMessage *msg);
183 };
184 
185 #endif
LisDAFEnrollmentStopOperationReq * lisDAFEnrollmentStartOperationReq
Class representing flow object with attributes from specs.
Definition: Flow.h:45
simsignal_t sigDAFEnrollmentStartEnrollReq
LisDAFEnrollmentStartOperationRes * lisDAFEnrollmentStartOperationRes
simsignal_t sigDAFEnrollmentStopEnrollReq
simsignal_t sigDAFEnrollmentStartEnrollRes
void processConResPosi(DAFEnrollmentStateTableEntry *entry, CDAPMessage *cmsg)
void insertStateTableEntry(Flow *flow)
LisDAFEnrollmentStopEnrollReq * lisDAFEnrollmentStopEnrollReq
LisDAFEnrollmentConReq * lisDAFEnrollmentConReq
Operation object .
simsignal_t sigDAFEnrollmentStartOperReq
const char * DAF_MSG_ENRLREL
Kind of a Notification Board for DAF .
void signalizeStartEnrollmentResponse(DAFEnrollmentObj *obj)
void signalizeStopEnrollmentRequest(DAFEnrollmentObj *obj)
std::string apName
simsignal_t sigDAFEnrollmentAllocResNega
simsignal_t sigDAFEnrollmentAllocResPosi
void signalizeStopEnrollmentResponse(DAFEnrollmentObj *obj)
Definition: IRM.h:41
void startCACE(Flow *flow)
std::map< simtime_t, APNIPairs * > DAFEnrollCommands
Definition: DAFEnrollment.h:71
void receiveStopEnrollmentResponse(CDAPMessage *msg)
LisDAFEnrollmentStartEnrollRes * lisDAFEnrollmentStartEnrollRes
std::string authOther
simsignal_t sigDAFEnrollmentSendData
void receiveConnectRequest(CDAPMessage *msg)
void signalizeAllocateResponseNegative(Flow *flow)
DAFEnrollment object .
DAFEnrollCommands PreenrollConnects
LisDAFEnrollmentAllResPosi * lisDAFEnrollmentAllResPosi
void createBindings(Flow *flow, DAFEnrollmentNotifier *module)
void receiveAllocationResponsePositive(Flow *flow)
void receiveNegativeConnectResponse(CDAPMessage *msg)
virtual ~DAFEnrollment()
void parseConfig(cXMLElement *config)
DAFEnrollmentStateTable * StateTable
void signalizeStartEnrollmentRequest(DAFEnrollmentObj *obj)
void initSignalsAndListeners()
void receiveAllocationRequestFromFAI(Flow *flow)
FABase * FlowAlloc
LisDAFEnrollmentStopEnrollRes * lisDAFEnrollmentStopEnrollRes
LisDAFEnrollmentConResPosi * lisDAFEnrollmentConResPosi
LisDAFEnrollmentConResNega * lisDAFEnrollmentConResNega
const char * DAF_MSG_ENRLCON
std::string authName
std::list< APNIPair > APNIPairs
Definition: DAFEnrollment.h:69
DAFEnrollmentNotifier * createMgmtAE(Flow *flow)
DAFEnrollCommands PreenrollReleases
void signalizeEnrolled()
void checkEnrolled(APNIPair *apnip)
LisDAFEnrollmentRequest * lisDAFEnrollmentRequest
simsignal_t sigDAFEnrollmentStartOperRes
void createFlow(APNIPair *apnip)
void receiveStopEnrollmentRequest(CDAPMessage *msg)
void authenticate(DAFEnrollmentStateTableEntry *entry, CDAP_M_Connect *msg)
simsignal_t sigDAFEnrollmentEnrollPosi
simsignal_t sigDAFEnrollmentStopEnrollRes
void receiveStartEnrollmentResponse(CDAPMessage *msg)
void receiveStartOperationResponse(CDAPMessage *msg)
DAFEnrollment and CACE Base .
void signalizeEnrollmentFinished(DAFEnrollmentStateTableEntry *entry)
void receiveStartEnrollmentRequest(CDAPMessage *msg)
void signalizeStartOperationRequest(DAFOperationObj *obj)
void updateEnrollmentDisplay(DAFEnrollment::IconEnrolStatus status)
void processConResNega(DAFEnrollmentStateTableEntry *entry, CDAPMessage *cmsg)
virtual void handleMessage(cMessage *msg)
DAFEnrollment state table .
void receiveStartOperationRequest(CDAPMessage *msg)
std::string apInstance
int currentMgmtAEInstanceId
LisDAFEnrollmentStartEnrollReq * lisDAFEnrollmentStartEnrollReq
void processStopEnrollmentResponse(DAFEnrollmentStateTableEntry *entry)
std::string authPassword
void signalizeAllocateResponsePositive(Flow *flow)
void processStopEnrollmentImmediate(DAFEnrollmentStateTableEntry *entry)
simsignal_t sigDAFEnrollmentFinish
void receivePositiveConnectResponse(CDAPMessage *msg)
simsignal_t sigDAFEnrollmentCACESendData
void signalizeStartOperationResponse(DAFOperationObj *obj)
void signalizeCACESendData(CDAPMessage *cmsg)
Definition: FABase.h:33
LisDAFEnrollmentAllReqFromFai * lisDAFEnrollmentAllReqFromFai
DAFEnrollment and CACE listeners .
CACEMgmt * cace
void processNewConReq(DAFEnrollmentStateTableEntry *entry)
void startEnrollment(DAFEnrollmentStateTableEntry *entry)
virtual void initialize()
LisDAFEnrollmentGetFlowFromFaiCreResPosi * lisDAFEnrollmentGetFlowFromFaiCreResPosi