Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __INET_MPLSMODULE_H
00017 #define __INET_MPLSMODULE_H
00018
00019 #include <vector>
00020 #include <omnetpp.h>
00021
00022 #include "MPLSPacket.h"
00023 #include "IPDatagram.h"
00024 #include "ConstType.h"
00025
00026 #include "LIBTable.h"
00027 #include "IInterfaceTable.h"
00028
00029 #include "IClassifier.h"
00030
00031
00035 class INET_API MPLS : public cSimpleModule
00036 {
00037 protected:
00038 simtime_t delay1;
00039
00040
00041
00042
00043 LIBTable *lt;
00044 IInterfaceTable *ift;
00045 IClassifier *pct;
00046
00047 protected:
00048 virtual void initialize(int stage);
00049 virtual int numInitStages() const {return 5;}
00050 virtual void handleMessage(cMessage *msg);
00051
00052 protected:
00053 virtual void processPacketFromL3(cMessage *msg);
00054 virtual void processPacketFromL2(cMessage *msg);
00055 virtual void processMPLSPacketFromL2(MPLSPacket *mplsPacket);
00056
00057 virtual bool tryLabelAndForwardIPDatagram(IPDatagram *ipdatagram);
00058 virtual void labelAndForwardIPDatagram(IPDatagram *ipdatagram);
00059
00060 virtual void sendToL2(cMessage *msg, int gateIndex);
00061 virtual void doStackOps(MPLSPacket *mplsPacket, const LabelOpVector& outLabel);
00062 };
00063
00064 #endif
00065