RINASim  October 2016
Documentation of framework for OMNeT++
NM1FlowTable.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 
23 #ifndef __RINA_FLOWTABLE_H_
24 #define __RINA_FLOWTABLE_H_
25 
26 #include <omnetpp.h>
27 
28 #include "NM1FlowTableItem.h"
29 
30 typedef std::list<NM1FlowTableItem> FlTable;
31 typedef FlTable::iterator FlTableIter;
32 
33 class NM1FlowTable : public cSimpleModule
34 {
35  public:
36  void insert(const NM1FlowTableItem* entry);
37  void insert(Flow* flow, FABase* fa, RMTPort* port, std::string gateName);
38  void remove(Flow* flow);
39  NM1FlowTableItem* findFlowByDstApni(const std::string& addr,
40  const std::string& qosId);
41  NM1FlowTableItem* findFlowByDstAddr(const std::string& addr,
42  const std::string& qosId);
44 
45  protected:
46  virtual void initialize();
47  virtual void handleMessage(cMessage *msg);
48 
49  private:
51 };
52 
53 #endif
Class representing flow object with attributes from specs.
Definition: Flow.h:45
void insert(const NM1FlowTableItem *entry)
Definition: NM1FlowTable.cc:37
virtual void initialize()
Definition: NM1FlowTable.cc:27
NM1FlowTableItem * findFlowByDstAddr(const std::string &addr, const std::string &qosId)
Definition: NM1FlowTable.cc:74
std::list< NM1FlowTableItem > FlTable
Definition: NM1FlowTable.h:30
NM1FlowTableItem * findFlowByDstApni(const std::string &addr, const std::string &qosId)
Definition: NM1FlowTable.cc:60
FlTable flows
Definition: NM1FlowTable.h:50
FlTable::iterator FlTableIter
Definition: NM1FlowTable.h:31
Definition: FABase.h:33
NM1FlowTableItem * lookup(Flow *flow)
Definition: NM1FlowTable.cc:48
virtual void handleMessage(cMessage *msg)
Definition: NM1FlowTable.cc:32