|
INET Framework for OMNeT++/OMNEST
|
00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.2 from networklayer/contract/IPControlInfo.msg. 00003 // 00004 00005 #ifndef _IPCONTROLINFO_M_H_ 00006 #define _IPCONTROLINFO_M_H_ 00007 00008 #include <omnetpp.h> 00009 00010 // opp_msgc version check 00011 #define MSGC_VERSION 0x0402 00012 #if (MSGC_VERSION!=OMNETPP_VERSION) 00013 # error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help. 00014 #endif 00015 00016 // cplusplus {{ 00017 #include "IPAddress.h" 00018 #include "IPProtocolId_m.h" 00019 // }} 00020 00021 00022 00064 class IPControlInfo_Base : public ::cObject 00065 { 00066 protected: 00067 IPAddress destAddr_var; 00068 IPAddress srcAddr_var; 00069 int interfaceId_var; 00070 short protocol_var; 00071 unsigned char diffServCodePoint_var; 00072 short timeToLive_var; 00073 bool dontFragment_var; 00074 00075 private: 00076 void copy(const IPControlInfo_Base& other); 00077 00078 protected: 00079 // protected and unimplemented operator==(), to prevent accidental usage 00080 bool operator==(const IPControlInfo_Base&); 00081 // make constructors protected to avoid instantiation 00082 IPControlInfo_Base(); 00083 IPControlInfo_Base(const IPControlInfo_Base& other); 00084 // make assignment operator protected to force the user override it 00085 IPControlInfo_Base& operator=(const IPControlInfo_Base& other); 00086 00087 public: 00088 virtual ~IPControlInfo_Base(); 00089 virtual IPControlInfo_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class IPControlInfo");} 00090 virtual void parsimPack(cCommBuffer *b); 00091 virtual void parsimUnpack(cCommBuffer *b); 00092 00093 // field getter/setter methods 00094 virtual IPAddress& getDestAddr(); 00095 virtual const IPAddress& getDestAddr() const {return const_cast<IPControlInfo_Base*>(this)->getDestAddr();} 00096 virtual void setDestAddr(const IPAddress& destAddr); 00097 virtual IPAddress& getSrcAddr(); 00098 virtual const IPAddress& getSrcAddr() const {return const_cast<IPControlInfo_Base*>(this)->getSrcAddr();} 00099 virtual void setSrcAddr(const IPAddress& srcAddr); 00100 virtual int getInterfaceId() const; 00101 virtual void setInterfaceId(int interfaceId); 00102 virtual short getProtocol() const; 00103 virtual void setProtocol(short protocol); 00104 virtual unsigned char getDiffServCodePoint() const; 00105 virtual void setDiffServCodePoint(unsigned char diffServCodePoint); 00106 virtual short getTimeToLive() const; 00107 virtual void setTimeToLive(short timeToLive); 00108 virtual bool getDontFragment() const; 00109 virtual void setDontFragment(bool dontFragment); 00110 }; 00111 00122 class IPRoutingDecision : public ::cObject 00123 { 00124 protected: 00125 int interfaceId_var; 00126 IPAddress nextHopAddr_var; 00127 00128 private: 00129 void copy(const IPRoutingDecision& other); 00130 00131 protected: 00132 // protected and unimplemented operator==(), to prevent accidental usage 00133 bool operator==(const IPRoutingDecision&); 00134 00135 public: 00136 IPRoutingDecision(); 00137 IPRoutingDecision(const IPRoutingDecision& other); 00138 virtual ~IPRoutingDecision(); 00139 IPRoutingDecision& operator=(const IPRoutingDecision& other); 00140 virtual IPRoutingDecision *dup() const {return new IPRoutingDecision(*this);} 00141 virtual void parsimPack(cCommBuffer *b); 00142 virtual void parsimUnpack(cCommBuffer *b); 00143 00144 // field getter/setter methods 00145 virtual int getInterfaceId() const; 00146 virtual void setInterfaceId(int interfaceId); 00147 virtual IPAddress& getNextHopAddr(); 00148 virtual const IPAddress& getNextHopAddr() const {return const_cast<IPRoutingDecision*>(this)->getNextHopAddr();} 00149 virtual void setNextHopAddr(const IPAddress& nextHopAddr); 00150 }; 00151 00152 inline void doPacking(cCommBuffer *b, IPRoutingDecision& obj) {obj.parsimPack(b);} 00153 inline void doUnpacking(cCommBuffer *b, IPRoutingDecision& obj) {obj.parsimUnpack(b);} 00154 00155 00156 #endif // _IPCONTROLINFO_M_H_