RINASim  October 2016
Documentation of framework for OMNeT++
Enrollment.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 
32 #include "Enrollment.h"
33 
35 
36 const char* PAR_AUTH_TYPE = "authType";
37 const char* PAR_AUTH_NAME = "authName";
38 const char* PAR_AUTH_OTHER = "authOther";
39 const char* PAR_AUTH_PASS = "authPassword";
40 const char* PAR_CON_RETRIES = "maxConRetries";
41 const char* PAR_ISSELFENROL = "isSelfEnrolled";
42 
43 const char* MSG_CONREQ = "Connect/Auth";
44 const char* MSG_CONREQRETRY = "ConnectRetry/Auth";
45 const char* MSG_CONRESPOS = "Connect+/Auth";
46 const char* MSG_CONRESNEG = "Connect-/Auth";
47 const char* MSG_ENRLCON = "Enrol-Connect";
48 const char* MSG_ENRLREL = "Enrol-Release";
49 
50 const char* ELEM_PREENROL = "Preenrollment";
51 const char* ELEM_SIMTIME = "SimTime";
52 const char* ELEM_CONNECT = "Connect";
53 const char* ELEM_RELEASE = "Release";
54 const char* ATTR_TIME = "t";
55 
57  StateTable(NULL), RibDaemon(NULL)
58 {
59 }
60 
62  StateTable = NULL;
63  RibDaemon = NULL;
64 }
65 
67 {
68  //Parse XML config
69  parseConfig(par(PAR_CONFIGDATA).xmlValue());
70 
72  initPointers();
73 
74  //Perform self-enrollment
75  bool isSelfEnrol = par(PAR_ISSELFENROL).boolValue();
76  if (isSelfEnrol) {
83  }
84  else {
85  //TODO: Work more on checking of N-1 flow existence
88  else
90  }
91 
92  authType = par(PAR_AUTH_TYPE);
93  authName = this->par(PAR_AUTH_NAME).stringValue();
94  authPassword = this->par(PAR_AUTH_PASS).stringValue();
95  authOther = this->par(PAR_AUTH_OTHER).stringValue();
96 
97  maxConRetries = this->par(PAR_CON_RETRIES);
98 
99  WATCH_MAP(PreenrollConnects);
100  WATCH_MAP(PreenrollReleases);
101 }
102 
104  StateTable = getRINAModule<EnrollmentStateTable*>(this, 1, {MOD_ENROLLMENTTABLE});
105  RibDaemon = getRINAModule<RIBd*>(this, 2, {MOD_RIBDAEMON, MOD_RIBD});
106  FlowAlloc = getRINAModule<FABase*>(this, 2, {MOD_FLOWALLOC, MOD_FA});
107 }
108 
110  cModule* catcher1 = this->getModuleByPath("^.^");
111 
121 
125 
126  //lisEnrollmentGetFlowFromFaiCreResPosi = new LisEnrollmentGetFlowFromFaiCreResPosi(this);
127  //catcher1->subscribe(SIG_FAI_CreateFlowResponsePositive, lisEnrollmentGetFlowFromFaiCreResPosi);
128 
131 
134 
137 
140 
143 
146 
149 
152 
154  catcher1->subscribe(SIG_RIBD_ConnectionRequest, lisEnrollmentConReq);
155 }
156 
158  Enter_Method("startCACE()");
159 
161  StateTable->insert(entry);
162 
164 
165  authValue_t aValue;
166  aValue.authName = authName;
167  aValue.authPassword = authPassword;
168  aValue.authOther = authOther;
169 
170  auth_t auth;
171  auth.authType = authType;
172  auth.authValue = aValue;
173 
174  msg->setAuth(auth);
175  msg->setAbsSyntax(GPB);
176 
177  APNamingInfo src = APNamingInfo(entry.getLocal().getApn(),
178  entry.getLocal().getApinstance(),
179  entry.getLocal().getAename(),
180  entry.getLocal().getAeinstance());
181 
182  APNamingInfo dst = APNamingInfo(entry.getRemote().getApn(),
183  entry.getRemote().getApinstance(),
184  entry.getRemote().getAename(),
185  entry.getRemote().getAeinstance());
186  /*
187  * XXX: Vesely@Jerabek> Removing unnecessary *.msg ADT when there exists
188  * exactly the same ADT in RINASim source codes.
189  naming_t dst;
190  dst.AEInst = entry.getRemote().getAeinstance();
191  dst.AEName = entry.getRemote().getAename();
192  dst.ApInst = entry.getRemote().getApinstance();
193  dst.ApName = entry.getRemote().getApn().getName();
194  naming_t src;
195  src.AEInst = entry.getLocal().getAeinstance();
196  src.AEName = entry.getLocal().getAename();
197  src.ApInst = entry.getLocal().getApinstance();
198  src.ApName = entry.getLocal().getApn().getName();
199  */
200 
201  msg->setSrc(src);
202  msg->setDst(dst);
203 
204  msg->setSrcAddr(Address(entry.getLocal().getApn()));
205  msg->setDstAddr(Address(entry.getRemote().getApn()));
206 
207  //send data to ribd to send
209 }
210 
212  //insert only first flow created (management flow)
213  if(StateTable->findEntryByDstAPN(APN(flow->getDstAddr().getApn().getName().c_str())) != NULL) {
214  return;
215  }
217 }
218 
220  Enter_Method("receivePositiveConnectResponse()");
221 
222  CDAP_M_Connect_R* cmsg = check_and_cast<CDAP_M_Connect_R*>(msg);
224 
225  //check appropriate state
226  if (entry->getCACEConStatus() != EnrollmentStateTableEntry::CON_AUTHENTICATING) {
227  //TODO: send M_Release and invoke deallocate
228  return;
229  }
230 
232 
233  startEnrollment(entry);
234 }
235 
237  Enter_Method("receiveNegativeConnectResponse()");
238 
239  CDAP_M_Connect_R* cmsg = check_and_cast<CDAP_M_Connect_R*>(msg);
241 
242  //check appropriate state
243  if (entry->getCACEConStatus() != EnrollmentStateTableEntry::CON_AUTHENTICATING) {
244  //TODO: send M_Release and invoke deallocate
245  return;
246  }
247 
248  if (this->maxConRetries <= entry->getCurrentConnectRetries()) {
250  //TODO: send release and deallocate
251  return;
252  }
253 
254 
255  entry->setCACEConStatus(EnrollmentStateTableEntry::CON_CONNECTPENDING);
256  entry->increaseCurrentConnectRetries();
257  //create and send new connect retry
258  processNewConReq(entry);
259 }
260 
262  Enter_Method("receiveConnectRequest()");
263 
264  CDAP_M_Connect* cmsg = check_and_cast<CDAP_M_Connect*>(msg);
265 
266  auto ent = EnrollmentStateTableEntry(
268  StateTable->insert(ent);
269 
271 
272  if (!entry) {
273  EV << "Enrollment status not found for "
274  << cmsg->getSrc().getApn() << endl;
275  return;
276  }
277 
278  //check appropriate state
280  //TODO: send M_Release and invoke deallocate
281  return;
282  }
283 
284  //check if message is valid
285  if (cmsg->getAbsSyntax() != GPB) {
286  this->processConResNega(entry, cmsg);
287  return;
288  }
289 
291 
292  authenticate(entry, cmsg);
293 }
294 
295 /* enrollment initiator */
296 
298  Enter_Method("startEnrollment()");
299 
300  auto enrollObj = new EnrollmentObj(Address(entry->getLocal().getApn()), Address(entry->getRemote().getApn()));
301 
302  enrollObj->setAddress(APN(RibDaemon->getMyAddress().getIpcAddress().getName()));
303 
304  //TODO: add other necessary information
305 
306  //process enrollment object to ribd to send
308 
309  //set appropriate state
311 }
312 
314  Enter_Method("receiveStartEnrollmentResponse()");
315 
316  CDAP_M_Start_R* smsg = check_and_cast<CDAP_M_Start_R*>(msg);
317 
318  //not expected message
319  if (!smsg) {
320  //TODO: send release and deallocate
321  return;
322  }
323 
324  EnrollmentObj* enrollRec = (check_and_cast<EnrollmentObj*>(smsg->getObjectItem().objectVal))->dup();
326 
327  //check for appropriate state
329  //TODO: send release and deallocate
330  return;
331  }
332 
333  //assign new, received address
334  Address newAddr = RibDaemon->getMyAddress();
335  newAddr.setIpcAddress(APN(enrollRec->getAddress().getName().c_str()));
336  RibDaemon->setMyAddress(newAddr);
337 
338  //TODO: assign other received values
339 
340  //change state
342 
343  //TODO: wait for create messages and stop enrollment request
344 }
345 
347  Enter_Method("receiveStopEnrollmentRequest()");
348 
349 
350  CDAP_M_Stop* smsg = check_and_cast<CDAP_M_Stop*>(msg);
351 
352  //not expected message
353  if (!smsg) {
354  //TODO: send release and deallocate
355  return;
356  }
357 
358  EnrollmentObj* enrollRec = (check_and_cast<EnrollmentObj*>(smsg->getObjectItem().objectVal))->dup();
360 
361  //check for appropriate state
363  //TODO: send release and deallocate
364  return;
365  }
366 
367  //set immediate transition to operational state
368  entry->setIsImmediateEnrollment(enrollRec->getIsImmediate());
369 
370  //set appropriate state
372 
373  //TODO: send read requests, wait for responses, send Mstop enrollment
374  //for now send stop enrollment response
376 }
377 
379 
380  auto enrollObj = new EnrollmentObj(Address(entry->getLocal().getApn()), Address(entry->getRemote().getApn()));
381 
383 
384  if (entry->getIsImmediateEnrollment()) {
387  }
388  else {
390  //TODO: continue enrollment here
391  }
392 }
393 
395  Enter_Method("receiveStartOperationRequest()");
396 
397 }
398 
399 /* enrollment member */
400 
402  Enter_Method("receiveStartEnrollmentRequest()");
403 
404  CDAP_M_Start* smsg = check_and_cast<CDAP_M_Start*>(msg);
405 
406  //not expected message
407  if (!smsg) {
408  //TODO: send release and deallocate
409  return;
410  }
411 
412  EnrollmentObj* enrollRec = (check_and_cast<EnrollmentObj*>(smsg->getObjectItem().objectVal))->dup();
414 
415  //check for appropriate state
417  //TODO: send release and deallocate
418  return;
419  }
420 
421 
422  auto enrollObj = new EnrollmentObj(Address(entry->getLocal().getApn()), Address(entry->getRemote().getApn()));
423 
424  //TODO: repair this dummy address assign
425  enrollObj->setAddress(APN(enrollRec->getAddress().getName()));
426 
427  //TODO: add other necessary information
428 
429  //process enrollment object to ribd to send
431 
432  //TODO: send create messages, wait for responses, then send stop enrollment
433  //for now send stop enrollment
435 }
436 
438  Enter_Method("receiveStopEnrollmentResponse()");
439 
440  CDAP_M_Stop_R* smsg = check_and_cast<CDAP_M_Stop_R*>(msg);
441 
442  //not expected message
443  if (!smsg) {
444  //TODO: send release and deallocate
445  return;
446  }
447 
448  EnrollmentObj* enrollRec = (check_and_cast<EnrollmentObj*>(smsg->getObjectItem().objectVal))->dup();
450 
451  //check for appropriate state
453  //TODO: send release and deallocate
454  return;
455  }
456 
457  if (entry->getIsImmediateEnrollment()) {
459  //TODO: emit signal somewhere and probably send rib update ...
460  }
461  else {
462  //TODO: add appropriate state for read and wait operation
463  }
464 }
465 
467  Enter_Method("receiveStartOperationResponse()");
468 
469 }
470 
472  auto enrollObj = new EnrollmentObj(Address(entry->getLocal().getApn()), Address(entry->getRemote().getApn()));
473 
474  //set immediate
475  enrollObj->setIsImmediate(true);
476  entry->setIsImmediateEnrollment(true);
477 
478  //TODO: add other necessary information
479 
481 
483 }
484 
486  Enter_Method("authenticate()");
487 
488  //check and validate expected auth type
489  if (msg->getAuth().authType == authType) {
490  //none auth option
491  if (msg->getAuth().authType == AUTH_NONE) {
492  processConResPosi(entry, msg);
493  return;
494 
495  }
496  //passwd auth option
497  else if (msg->getAuth().authType == AUTH_PASSWD) {
498  //correct passwd
499  if (!strcmp(msg->getAuth().authValue.authPassword.c_str(), authPassword.c_str())) {
500  processConResPosi(entry, msg);
501  return;
502  }
503  }
504  //TODO: support for other options
505  }
506 
507  //not valid auth send negative response
508  processConResNega(entry, msg);
509 }
510 
512  Enter_Method("processNewConReq()");
513 
514  //TODO: probably change values, this is retry
515 
517 
518  authValue_t aValue;
519  aValue.authName = authName;
520  aValue.authPassword = authPassword;
521  aValue.authOther = authOther;
522 
523  auth_t auth;
524  auth.authType = authType;
525  auth.authValue = aValue;
526 
527  msg->setAuth(auth);
528  msg->setAbsSyntax(GPB);
529 
530  APNamingInfo src = APNamingInfo(entry->getLocal().getApn(),
531  entry->getLocal().getApinstance(),
532  entry->getLocal().getAename(),
533  entry->getLocal().getAeinstance());
534 
535  APNamingInfo dst = APNamingInfo(entry->getRemote().getApn(),
536  entry->getRemote().getApinstance(),
537  entry->getRemote().getAename(),
538  entry->getRemote().getAeinstance());
539 
540  msg->setSrc(src);
541  msg->setDst(dst);
542 
543  msg->setSrcAddr(Address(entry->getLocal().getApn()));
544  msg->setDstAddr(Address(entry->getRemote().getApn()));
545 
546  //send data to ribd to send
548 
549  //change state to auth after send retry
551 }
552 
555  CDAP_M_Connect* cmsg1 = check_and_cast<CDAP_M_Connect*>(cmsg);
556 
557  APNamingInfo src = APNamingInfo(entry->getLocal().getApn(),
558  entry->getLocal().getApinstance(),
559  entry->getLocal().getAename(),
560  entry->getLocal().getAeinstance());
561 
562  APNamingInfo dst = APNamingInfo(entry->getRemote().getApn(),
563  entry->getRemote().getApinstance(),
564  entry->getRemote().getAename(),
565  entry->getRemote().getAeinstance());
566 
567  result_t result;
568  result.resultValue = R_SUCCESS;
569 
570  auth_t auth;
571  auth.authType = cmsg1->getAuth().authType;
572  auth.authValue = cmsg1->getAuth().authValue;
573 
574  msg->setAbsSyntax(GPB);
575  msg->setResult(result);
576  msg->setAuth(auth);
577 
578  msg->setSrc(src);
579  msg->setDst(dst);
580 
581  msg->setSrcAddr(Address(entry->getLocal().getApn()));
582  msg->setDstAddr(Address(entry->getRemote().getApn()));
583 
584  //send data to ribd to send
586 
589 }
590 
593  CDAP_M_Connect* cmsg1 = check_and_cast<CDAP_M_Connect*>(cmsg);
594 
595  APNamingInfo src = APNamingInfo(entry->getLocal().getApn(),
596  entry->getLocal().getApinstance(),
597  entry->getLocal().getAename(),
598  entry->getLocal().getAeinstance());
599 
600  APNamingInfo dst = APNamingInfo(entry->getRemote().getApn(),
601  entry->getRemote().getApinstance(),
602  entry->getRemote().getAename(),
603  entry->getRemote().getAeinstance());
604 
605  result_t result;
606  result.resultValue = R_FAIL;
607 
608  auth_t auth;
609  auth.authType = cmsg1->getAuth().authType;
610  auth.authValue = cmsg1->getAuth().authValue;
611 
612  msg->setAbsSyntax(GPB);
613  msg->setResult(result);
614  msg->setAuth(auth);
615 
616  msg->setSrc(src);
617  msg->setDst(dst);
618 
619  msg->setSrcAddr(Address(entry->getLocal().getApn()));
620  msg->setDstAddr(Address(entry->getRemote().getApn()));
621 
622  //send data to send to ribd
624 
626 
627  //increase number of connects
629 }
630 
632  emit(sigEnrollmentCACESendData, cmsg);
633 }
634 
636  emit(sigEnrollmentStartEnrollReq, obj);
637 }
638 
640  emit(sigEnrollmentStartEnrollRes, obj);
641 }
642 
644  emit(sigEnrollmentStopEnrollReq, obj);
645 }
646 
648  emit(sigEnrollmentStopEnrollRes, obj);
649 }
650 
652  emit(sigEnrollmentStartOperReq, obj);
653 }
654 
656  emit(sigEnrollmentStartOperRes, obj);
657 }
658 
661  APNIPair* apnip = new APNIPair(entry->getLocal(), entry->getRemote());
662  emit(sigEnrollmentFinish, apnip);
663 }
664 
665 void Enrollment::parseConfig(cXMLElement* config) {
666  cXMLElement* mainTag = NULL;
667  if (config != NULL && config->hasChildren() && config->getFirstChildWithTag(ELEM_PREENROL))
668  mainTag = config->getFirstChildWithTag(ELEM_PREENROL);
669  else {
670  EV << "configData parameter not initialized!" << endl;
671  return;
672  }
673 
674  cXMLElementList enrll = mainTag->getChildrenByTagName(ELEM_SIMTIME);
675  for (cXMLElementList::const_iterator it = enrll.begin(); it != enrll.end(); ++it) {
676  cXMLElement* m = *it;
677 
678  if (!m->getAttribute(ATTR_TIME)) {
679  EV << "\nSimTime tag is missing time attribute!" << endl;
680  continue;
681  }
682 
683  simtime_t cas = atof(m->getAttribute(ATTR_TIME));
684 
685  if (m->getFirstChildWithTag(ELEM_CONNECT)) {
686  PreenrollConnects[cas] = new APNIPairs();
687  cMessage* cmsg = new cMessage(MSG_ENRLCON);
688  scheduleAt(cas, cmsg);
689  }
690 
691  if (m->getFirstChildWithTag(ELEM_RELEASE)) {
692  PreenrollReleases[cas] = new APNIPairs();
693  cMessage* cmsg = new cMessage(MSG_ENRLREL);
694  scheduleAt(cas, cmsg);
695  }
696 
697  cXMLElementList coms = m->getChildren();
698  for (cXMLElementList::const_iterator jt = coms.begin(); jt != coms.end(); ++jt) {
699  cXMLElement* n = *jt;
700 
701  if ( !( strcmp(n->getTagName(), ELEM_CONNECT) xor strcmp(n->getTagName(), ELEM_RELEASE) )
702  && !(n->getAttribute(ATTR_SRC))
703  && !(n->getAttribute(ATTR_DST))
704  ) {
705  EV << "\nError when parsing Connect/Release record" << endl;
706  continue;
707  }
708 
709  if ( !strcmp(n->getTagName(), ELEM_CONNECT) ) {
710  PreenrollConnects[cas]->push_back( APNIPair(n->getAttribute(ATTR_SRC), n->getAttribute(ATTR_DST)) );
711  //EV << "!!!!!!!!!!!!!" << PreenrollConnects[cas]->size() << endl;
712  }
713  else if ( !strcmp(n->getTagName(), ELEM_RELEASE) ) {
714  PreenrollReleases[cas]->push_back( APNIPair(n->getAttribute(ATTR_SRC), n->getAttribute(ATTR_DST)) );
715  }
716  }
717  }
718 }
719 
721  cModule* ipc = this->getModuleByPath("^.^");
722  std::string ico, col;
723  switch (status) {
724  case ENICON_ENROLLED: {ico="status/check"; col="green"; break;}
725  case ENICON_FLOWMIS: {ico="status/excl"; col="yellow";break;}
726  case ENICON_NOTENROLLED:
727  default: {ico="status/cross"; col="red"; break;}
728 
729  }
730  ipc->getDisplayString().setTagArg("i2", 0, ico.c_str());
731  ipc->getDisplayString().setTagArg("i2", 1, col.c_str());
732 }
733 
734 void Enrollment::handleMessage(cMessage *msg)
735 {
736  if (msg->isSelfMessage()) {
737  if ( !opp_strcmp(msg->getName(), MSG_ENRLCON) ) {
738  APNIPairs* apnip = PreenrollConnects[simTime()];
739  EV << "Preallocation at time " << simTime() << " has " << apnip->size() << " elements" << endl;
740  while (!apnip->empty())
741  {
742  APNIPair pair = apnip->front();
743  auto entry = StateTable->findEntryByDstAPN(pair.second.getApn());
744  if (!entry) {
746  }
747  apnip->pop_front();
748  }
749  }
750  else if ( !opp_strcmp(msg->getName(), MSG_ENRLREL) ) {
751  APNIPairs* apnip = PreenrollReleases[simTime()];
752  while (!apnip->empty())
753  {
754  APNIPair pair = apnip->front();
755  auto entry = StateTable->findEntryByDstAPN(pair.second.getApn());
756  if (entry && entry->getEnrollmentStatus() == EnrollmentStateTableEntry::ENROLL_ENROLLED ) {
757  //FIXME: Vesely->Jerabek: Here goes release part of Enrollment
758  }
759  apnip->pop_front();
760  }
761  }
762  delete msg;
763  }
764 }
simsignal_t sigEnrollmentFinish
Definition: Enrollment.h:129
virtual int32_t getAbsSyntax() const
FABase * FlowAlloc
Definition: Enrollment.h:109
EnrollCommands PreenrollConnects
Definition: Enrollment.h:111
Class representing flow object with attributes from specs.
Definition: Flow.h:45
void receiveStopEnrollmentResponse(CDAPMessage *msg)
Definition: Enrollment.cc:437
const char * SIG_RIBD_StartEnrollmentRequest
Definition: RINASignals.cc:57
const char * MSG_CONRESNEG
Definition: Enrollment.cc:46
const APN & getAddress() const
void setIpcAddress(const APN &ipcAddress)
Setter of IPC Process address which should be unambiguous within DIF.
Definition: Address.cc:124
simsignal_t sigEnrollmentSendData
Definition: Enrollment.h:122
const APNamingInfo & getSrcApni() const
Gets read-only source APNamingInfo.
Definition: Flow.cc:134
virtual void setAuth(const auth_t &auth)
const char * ATTR_TIME
Definition: Enrollment.cc:54
simsignal_t sigEnrollmentStartEnrollRes
Definition: Enrollment.h:124
const char * PAR_AUTH_PASS
Definition: Enrollment.cc:39
void receiveStartOperationResponse(CDAPMessage *msg)
Definition: Enrollment.cc:466
virtual void handleMessage(cMessage *msg)
Definition: Enrollment.cc:734
void setEnrollmentStatus(EnrollmentStateTableEntry::EnrollmentStatus status)
const char * SIG_ENROLLMENT_CACEDataSend
Definition: RINASignals.cc:72
void receiveStartOperationRequest(CDAPMessage *msg)
Definition: Enrollment.cc:394
virtual void setAuth(const auth_t &auth)
EnrollmentStateTable * StateTable
Definition: Enrollment.h:144
void initPointers()
Definition: Enrollment.cc:103
const char * SIG_RIBD_StartOperationResponse
Definition: RINASignals.cc:62
const char * SIG_RA_MgmtFlowAllocated
Definition: RINASignals.cc:120
void initSignalsAndListeners()
Definition: Enrollment.cc:109
int authType
Definition: Enrollment.h:114
Application Process Name class.
Definition: APN.h:36
void signalizeStartEnrollmentResponse(EnrollmentObj *obj)
Definition: Enrollment.cc:639
simsignal_t sigEnrollmentStartOperRes
Definition: Enrollment.h:128
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
Definition: Address.cc:83
APNamingInfo first
Definition: APNamingInfo.h:200
virtual APNamingInfo & getDst()
virtual bool receiveMgmtAllocateRequest(Flow *mgmtflow)=0
const char * SIG_ENROLLMENT_Finished
Definition: RINASignals.cc:79
RIBd * RibDaemon
Definition: Enrollment.h:145
const char * SIG_FA_MgmtFlowAllocated
Definition: RINASignals.cc:100
const char * MOD_ENROLLMENTTABLE
Definition: ExternConsts.cc:45
std::string authPassword
Definition: Enrollment.h:116
virtual void setSrcAddr(const Address &srcAddr)
const char * SIG_RIBD_StartEnrollmentResponse
Definition: RINASignals.cc:58
virtual EnrollmentObj * dup() const
virtual void setAbsSyntax(int32_t absSyntax)
Enrollment and CACE .
simsignal_t sigEnrollmentStartEnrollReq
Definition: Enrollment.h:123
const char * MSG_ENRLREL
Definition: Enrollment.cc:48
virtual void setDst(const APNamingInfo &dst)
virtual ~Enrollment()
Definition: Enrollment.cc:61
virtual void setAbsSyntax(int32_t absSyntax)
void insert(EnrollmentStateTableEntry entry)
const char * ATTR_SRC
const char * MSG_CONREQ
Definition: Enrollment.cc:43
void signalizeStopEnrollmentRequest(EnrollmentObj *obj)
Definition: Enrollment.cc:643
void processConResPosi(EnrollmentStateTableEntry *entry, CDAPMessage *cmsg)
Definition: Enrollment.cc:553
::omnetpp::opp_string authName
std::string authName
Definition: Enrollment.h:115
const char * MSG_CONRESPOS
Definition: Enrollment.cc:45
authValue_t authValue
void increaseCurrentConnectRetries()
const char * SIG_ENROLLMENT_StartEnrollmentRequest
Definition: RINASignals.cc:73
const char * PAR_CONFIGDATA
void setIsImmediateEnrollment(bool immediate)
const APNamingInfo & getLocal() const
const std::string & getAename() const
Getter of AE name.
Definition: APNamingInfo.h:110
EnrollmentStateTableEntry * findEntryByDstAPN(const APN &apn)
void processConResNega(EnrollmentStateTableEntry *entry, CDAPMessage *cmsg)
Definition: Enrollment.cc:591
const APN & getApn() const
Getter of APN.
Definition: APNamingInfo.h:142
void insertStateTableEntry(Flow *flow)
Definition: Enrollment.cc:211
unsigned char authType
void signalizeCACESendData(CDAPMessage *cmsg)
Definition: Enrollment.cc:631
void signalizeStartOperationResponse(OperationObj *obj)
Definition: Enrollment.cc:655
virtual void setDst(const APNamingInfo &dst)
EnrollCommands PreenrollReleases
Definition: Enrollment.h:112
void receiveStartEnrollmentResponse(CDAPMessage *msg)
Definition: Enrollment.cc:313
const char * MOD_RIBDAEMON
Definition: ExternConsts.cc:60
Define_Module(Enrollment)
APNamingInfo second
Definition: APNamingInfo.h:201
const char * SIG_RIBD_StopEnrollmentResponse
Definition: RINASignals.cc:60
LisEnrollmentStopEnrollRes * lisEnrollmentStopEnrollRes
Definition: Enrollment.h:137
APNamingInfo holds complete naming info for particular application process.
Definition: APNamingInfo.h:43
void processNewConReq(EnrollmentStateTableEntry *entry)
Definition: Enrollment.cc:511
void signalizeEnrollmentFinished(EnrollmentStateTableEntry *entry)
Definition: Enrollment.cc:659
void receiveNegativeConnectResponse(CDAPMessage *msg)
Definition: Enrollment.cc:236
LisEnrollmentStartEnrollReq * lisEnrollmentStartEnrollReq
Definition: Enrollment.h:134
void startEnrollment(EnrollmentStateTableEntry *entry)
Definition: Enrollment.cc:297
LisEnrollmentAllResPosi * lisEnrollmentAllResPosi
Definition: Enrollment.h:131
std::list< APNIPair > APNIPairs
Definition: DAFEnrollment.h:69
virtual auth_t & getAuth()
const Address & getMyAddress() const
Definition: RIBdBase.cc:37
simsignal_t sigEnrollmentStartOperReq
Definition: Enrollment.h:127
const char * MSG_ENRLCON
Definition: Enrollment.cc:47
bool isEnrolled(const APN &myApn)
const APNamingInfo & getRemote() const
virtual object_t & getObjectItem()
const char * SIG_RIBD_StopEnrollmentRequest
Definition: RINASignals.cc:59
const char * SIG_ENROLLMENT_DataSend
Definition: RINASignals.cc:71
void parseConfig(cXMLElement *config)
Definition: Enrollment.cc:665
void processStopEnrollmentImmediate(EnrollmentStateTableEntry *entry)
Definition: Enrollment.cc:471
void setCACEConStatus(EnrollmentStateTableEntry::CACEConnectionStatus status)
LisEnrollmentStopOperationReq * lisEnrollmentStartOperationReq
Definition: Enrollment.h:138
const char * MOD_FLOWALLOC
Definition: ExternConsts.cc:47
virtual object_t & getObjectItem()
const char * ELEM_PREENROL
Definition: Enrollment.cc:50
LisEnrollmentConReq * lisEnrollmentConReq
Definition: Enrollment.h:142
void signalizeStartOperationRequest(OperationObj *obj)
Definition: Enrollment.cc:651
const char * MSG_CONREQRETRY
Definition: Enrollment.cc:44
LisEnrollmentStartEnrollRes * lisEnrollmentStartEnrollRes
Definition: Enrollment.h:135
const char * SIG_ENROLLMENT_StartOperationRequest
Definition: RINASignals.cc:77
const std::string & getAeinstance() const
Getter of AE-instance attribute.
Definition: APNamingInfo.h:94
void receiveStartEnrollmentRequest(CDAPMessage *msg)
Definition: Enrollment.cc:401
const char * SIG_RIBD_ConnectionResponsePositive
Definition: RINASignals.cc:64
void processStopEnrollmentResponse(EnrollmentStateTableEntry *entry)
Definition: Enrollment.cc:378
const char * SIG_ENROLLMENT_StartEnrollmentResponse
Definition: RINASignals.cc:74
const std::string & getApinstance() const
Getter of AP-instance id.
Definition: APNamingInfo.h:126
const Address & getMyAddress() const
Definition: FABase.cc:54
const char * ELEM_SIMTIME
Definition: Enrollment.cc:51
bool getIsImmediateEnrollment()
void setMyAddress(const Address &addr)
Definition: RIBdBase.cc:33
const char * ELEM_CONNECT
Definition: Enrollment.cc:52
const char * MOD_RIBD
Definition: ExternConsts.cc:59
LisEnrollmentStartOperationRes * lisEnrollmentStartOperationRes
Definition: Enrollment.h:139
EnrollmentStateTableEntry::CACEConnectionStatus getCACEConStatus() const
void receiveStopEnrollmentRequest(CDAPMessage *msg)
Definition: Enrollment.cc:346
virtual APNamingInfo & getSrc()
const char * SIG_ENROLLMENT_StartOperationResponse
Definition: RINASignals.cc:78
LisEnrollmentStopEnrollReq * lisEnrollmentStopEnrollReq
Definition: Enrollment.h:136
const char * SIG_RIBD_ConnectionRequest
Definition: RINASignals.cc:66
ObjectPtr objectVal
const char * PAR_CON_RETRIES
Definition: Enrollment.cc:40
virtual void setDstAddr(const Address &dstAddr)
const char * PAR_AUTH_TYPE
Definition: Enrollment.cc:36
const char * SIG_ENROLLMENT_StopEnrollmentResponse
Definition: RINASignals.cc:76
LisEnrollmentConResNega * lisEnrollmentConResNega
Definition: Enrollment.h:141
const APN & getApn() const
Getter of unique APN which is initialized during object construction.
Definition: Address.cc:119
virtual void setSrc(const APNamingInfo &src)
int maxConRetries
Definition: Enrollment.h:118
void startCACE(APNIPair *apnip)
Definition: Enrollment.cc:157
const char * SIG_RIBD_ConnectionResponseNegative
Definition: RINASignals.cc:65
const char * SIG_ENROLLMENT_StopEnrollmentRequest
Definition: RINASignals.cc:75
virtual void setSrc(const APNamingInfo &src)
::omnetpp::opp_string authPassword
void updateEnrollmentDisplay(Enrollment::IconEnrolStatus status)
Definition: Enrollment.cc:720
std::string authOther
Definition: Enrollment.h:117
const char * PAR_AUTH_OTHER
Definition: Enrollment.cc:38
const Address & getDstAddr() const
Gets source Address, which is the address of communication end-point.
Definition: Flow.cc:150
int32_t resultValue
const char * SIG_RIBD_StartOperationRequest
Definition: RINASignals.cc:61
virtual object_t & getObjectItem()
::omnetpp::opp_string authOther
void signalizeStopEnrollmentResponse(EnrollmentObj *obj)
Definition: Enrollment.cc:647
const char * PAR_AUTH_NAME
Definition: Enrollment.cc:37
const std::string & getName() const
Gets APN string name representation.
Definition: APN.cc:40
virtual APNamingInfo & getSrc()
const Address & getSrcAddress() const
bool getIsImmediate() const
void authenticate(EnrollmentStateTableEntry *entry, CDAP_M_Connect *msg)
Definition: Enrollment.cc:485
simsignal_t sigEnrollmentCACESendData
Definition: Enrollment.h:121
simsignal_t sigEnrollmentStopEnrollReq
Definition: Enrollment.h:125
void receivePositiveConnectResponse(CDAPMessage *msg)
Definition: Enrollment.cc:219
virtual void setResult(const result_t &result)
LisEnrollmentConResPosi * lisEnrollmentConResPosi
Definition: Enrollment.h:140
const char * MOD_FA
Definition: ExternConsts.cc:46
const char * ELEM_RELEASE
Definition: Enrollment.cc:53
Address class holds IPC Process identification.
Definition: Address.h:42
const APNamingInfo & getDstApni() const
Gets read-only destination APNamingInfo.
Definition: Flow.cc:102
simsignal_t sigEnrollmentStopEnrollRes
Definition: Enrollment.h:126
virtual object_t & getObjectItem()
const char * PAR_ISSELFENROL
Definition: Enrollment.cc:41
const char * ATTR_DST
EnrollmentStateTableEntry::EnrollmentStatus getEnrollmentStatus() const
void signalizeStartEnrollmentRequest(EnrollmentObj *obj)
Definition: Enrollment.cc:635
virtual void initialize()
Definition: Enrollment.cc:66
void receiveConnectRequest(CDAPMessage *msg)
Definition: Enrollment.cc:261