|
INET Framework for OMNeT++/OMNEST
|
00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.2 from networklayer/ipv6/IPv6Datagram.msg. 00003 // 00004 00005 #ifndef _IPV6DATAGRAM_M_H_ 00006 #define _IPV6DATAGRAM_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 <iostream> 00018 #include "IPv6Address.h" 00019 #include "IPProtocolId_m.h" 00020 class IPv6ExtensionHeader; 00021 typedef IPv6ExtensionHeader *IPv6ExtensionHeaderPtr; 00022 std::ostream& operator<<(std::ostream& os, IPv6ExtensionHeaderPtr eh); 00023 // }} 00024 00025 00026 00069 class IPv6Datagram_Base : public ::cPacket 00070 { 00071 protected: 00072 IPv6Address srcAddress_var; 00073 IPv6Address destAddress_var; 00074 unsigned int trafficClass_var; 00075 unsigned int flowLabel_var; 00076 short hopLimit_var; 00077 int transportProtocol_var; 00078 IPv6ExtensionHeaderPtr *extensionHeader_var; // array ptr 00079 unsigned int extensionHeader_arraysize; 00080 00081 private: 00082 void copy(const IPv6Datagram_Base& other); 00083 00084 protected: 00085 // protected and unimplemented operator==(), to prevent accidental usage 00086 bool operator==(const IPv6Datagram_Base&); 00087 // make constructors protected to avoid instantiation 00088 IPv6Datagram_Base(const char *name=NULL, int kind=0); 00089 IPv6Datagram_Base(const IPv6Datagram_Base& other); 00090 // make assignment operator protected to force the user override it 00091 IPv6Datagram_Base& operator=(const IPv6Datagram_Base& other); 00092 00093 public: 00094 virtual ~IPv6Datagram_Base(); 00095 virtual IPv6Datagram_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class IPv6Datagram");} 00096 virtual void parsimPack(cCommBuffer *b); 00097 virtual void parsimUnpack(cCommBuffer *b); 00098 00099 // field getter/setter methods 00100 virtual IPv6Address& getSrcAddress(); 00101 virtual const IPv6Address& getSrcAddress() const {return const_cast<IPv6Datagram_Base*>(this)->getSrcAddress();} 00102 virtual void setSrcAddress(const IPv6Address& srcAddress); 00103 virtual IPv6Address& getDestAddress(); 00104 virtual const IPv6Address& getDestAddress() const {return const_cast<IPv6Datagram_Base*>(this)->getDestAddress();} 00105 virtual void setDestAddress(const IPv6Address& destAddress); 00106 virtual unsigned int getTrafficClass() const; 00107 virtual void setTrafficClass(unsigned int trafficClass); 00108 virtual unsigned int getFlowLabel() const; 00109 virtual void setFlowLabel(unsigned int flowLabel); 00110 virtual short getHopLimit() const; 00111 virtual void setHopLimit(short hopLimit); 00112 virtual int getTransportProtocol() const; 00113 virtual void setTransportProtocol(int transportProtocol); 00114 virtual void setExtensionHeaderArraySize(unsigned int size); 00115 virtual unsigned int getExtensionHeaderArraySize() const; 00116 virtual IPv6ExtensionHeaderPtr& getExtensionHeader(unsigned int k); 00117 virtual const IPv6ExtensionHeaderPtr& getExtensionHeader(unsigned int k) const {return const_cast<IPv6Datagram_Base*>(this)->getExtensionHeader(k);} 00118 virtual void setExtensionHeader(unsigned int k, const IPv6ExtensionHeaderPtr& extensionHeader); 00119 }; 00120 00154 class IPv6ExtensionHeader_Base : public ::cObject 00155 { 00156 protected: 00157 00158 private: 00159 void copy(const IPv6ExtensionHeader_Base& other); 00160 00161 protected: 00162 // protected and unimplemented operator==(), to prevent accidental usage 00163 bool operator==(const IPv6ExtensionHeader_Base&); 00164 // make constructors protected to avoid instantiation 00165 IPv6ExtensionHeader_Base(); 00166 IPv6ExtensionHeader_Base(const IPv6ExtensionHeader_Base& other); 00167 // make assignment operator protected to force the user override it 00168 IPv6ExtensionHeader_Base& operator=(const IPv6ExtensionHeader_Base& other); 00169 00170 public: 00171 virtual ~IPv6ExtensionHeader_Base(); 00172 virtual IPv6ExtensionHeader_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class IPv6ExtensionHeader");} 00173 virtual void parsimPack(cCommBuffer *b); 00174 virtual void parsimUnpack(cCommBuffer *b); 00175 00176 // field getter/setter methods 00177 }; 00178 00179 00180 #endif // _IPV6DATAGRAM_M_H_