|
a |
|
b/src/DIF/RIB/RIBdBase.h |
|
|
1 |
//
|
|
|
2 |
// This program is free software: you can redistribute it and/or modify
|
|
|
3 |
// it under the terms of the GNU Lesser General Public License as published by
|
|
|
4 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
5 |
// (at your option) any later version.
|
|
|
6 |
//
|
|
|
7 |
// This program is distributed in the hope that it will be useful,
|
|
|
8 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
9 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
10 |
// GNU Lesser General Public License for more details.
|
|
|
11 |
//
|
|
|
12 |
// You should have received a copy of the GNU Lesser General Public License
|
|
|
13 |
// along with this program. If not, see http://www.gnu.org/licenses/.
|
|
|
14 |
//
|
|
|
15 |
|
|
|
16 |
#ifndef RIBDBASE_H_
|
|
|
17 |
#define RIBDBASE_H_
|
|
|
18 |
|
|
|
19 |
//Standard libraries
|
|
|
20 |
#include <omnetpp.h>
|
|
|
21 |
//RINASim libraries
|
|
|
22 |
#include "ExternConsts.h"
|
|
|
23 |
#include "Flow.h"
|
|
|
24 |
#include "CDAPMessage_m.h"
|
|
|
25 |
|
|
|
26 |
class RIBdBase : public cSimpleModule {
|
|
|
27 |
public:
|
|
|
28 |
RIBdBase();
|
|
|
29 |
virtual ~RIBdBase();
|
|
|
30 |
|
|
|
31 |
virtual void sendCreateRequestFlow(Flow* flow) = 0;
|
|
|
32 |
virtual void sendCreateResponseNegative(Flow* flow) = 0;
|
|
|
33 |
virtual void sendCreateResponsePostive(Flow* flow) = 0;
|
|
|
34 |
virtual void sendDeleteRequestFlow(Flow* flow) = 0;
|
|
|
35 |
virtual void sendDeleteResponseFlow(Flow* flow) = 0;
|
|
|
36 |
virtual void receiveData(CDAPMessage* flow) = 0;
|
|
|
37 |
virtual void receiveAllocationRequestFromFai(Flow* flow) = 0;
|
|
|
38 |
virtual void receiveCreateFlowPositiveFromRa(Flow* flow) = 0;
|
|
|
39 |
virtual void receiveCreateFlowNegativeFromRa(Flow* flow) = 0;
|
|
|
40 |
|
|
|
41 |
const Address& getMyAddress() const;
|
|
|
42 |
|
|
|
43 |
protected:
|
|
|
44 |
Address MyAddress;
|
|
|
45 |
|
|
|
46 |
//SimpleModule overloads
|
|
|
47 |
virtual void initialize() = 0;
|
|
|
48 |
virtual void handleMessage(cMessage *msg) = 0;
|
|
|
49 |
|
|
|
50 |
void initMyAddress();
|
|
|
51 |
|
|
|
52 |
};
|
|
|
53 |
|
|
|
54 |
#endif /* RIBDBASE_H_ */
|