|
INET Framework for OMNeT++/OMNEST
|
00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.2 from networklayer/ldp/LDPPacket.msg. 00003 // 00004 00005 #ifndef _LDPPACKET_M_H_ 00006 #define _LDPPACKET_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 00019 00020 #define LDP_BASEHEADER_BYTES 10 00021 00022 00023 00024 #define LDP_HEADER_BYTES (LDP_BASEHEADER_BYTES+20) 00025 // }} 00026 00027 00028 00049 enum LDP_MESSAGE_TYPES { 00050 NOTIFICATION = 10, 00051 HELLO = 11, 00052 INITIALIZATION = 12, 00053 KEEP_ALIVE = 13, 00054 ADDRESS = 14, 00055 ADDRESS_WITHDRAW = 15, 00056 LABEL_MAPPING = 16, 00057 LABEL_REQUEST = 17, 00058 LABEL_WITHDRAW = 18, 00059 LABEL_RELEASE = 19, 00060 UNKNOWN = 20 00061 }; 00062 00073 enum LDP_STATUS_TYPES { 00074 NO_ROUTE = 13 00075 }; 00076 00080 struct FEC_TLV 00081 { 00082 FEC_TLV(); 00083 IPAddress addr; 00084 int length; 00085 }; 00086 00087 void doPacking(cCommBuffer *b, FEC_TLV& a); 00088 void doUnpacking(cCommBuffer *b, FEC_TLV& a); 00089 00101 class LDPPacket : public ::cPacket 00102 { 00103 protected: 00104 int type_var; 00105 IPAddress senderAddress_var; 00106 IPAddress receiverAddress_var; 00107 00108 private: 00109 void copy(const LDPPacket& other); 00110 00111 protected: 00112 // protected and unimplemented operator==(), to prevent accidental usage 00113 bool operator==(const LDPPacket&); 00114 00115 public: 00116 LDPPacket(const char *name=NULL, int kind=0); 00117 LDPPacket(const LDPPacket& other); 00118 virtual ~LDPPacket(); 00119 LDPPacket& operator=(const LDPPacket& other); 00120 virtual LDPPacket *dup() const {return new LDPPacket(*this);} 00121 virtual void parsimPack(cCommBuffer *b); 00122 virtual void parsimUnpack(cCommBuffer *b); 00123 00124 // field getter/setter methods 00125 virtual int getType() const; 00126 virtual void setType(int type); 00127 virtual IPAddress& getSenderAddress(); 00128 virtual const IPAddress& getSenderAddress() const {return const_cast<LDPPacket*>(this)->getSenderAddress();} 00129 virtual void setSenderAddress(const IPAddress& senderAddress); 00130 virtual IPAddress& getReceiverAddress(); 00131 virtual const IPAddress& getReceiverAddress() const {return const_cast<LDPPacket*>(this)->getReceiverAddress();} 00132 virtual void setReceiverAddress(const IPAddress& receiverAddress); 00133 }; 00134 00135 inline void doPacking(cCommBuffer *b, LDPPacket& obj) {obj.parsimPack(b);} 00136 inline void doUnpacking(cCommBuffer *b, LDPPacket& obj) {obj.parsimUnpack(b);} 00137 00148 class LDPLabelMapping : public ::LDPPacket 00149 { 00150 protected: 00151 FEC_TLV fec_var; 00152 int label_var; 00153 00154 private: 00155 void copy(const LDPLabelMapping& other); 00156 00157 protected: 00158 // protected and unimplemented operator==(), to prevent accidental usage 00159 bool operator==(const LDPLabelMapping&); 00160 00161 public: 00162 LDPLabelMapping(const char *name=NULL, int kind=0); 00163 LDPLabelMapping(const LDPLabelMapping& other); 00164 virtual ~LDPLabelMapping(); 00165 LDPLabelMapping& operator=(const LDPLabelMapping& other); 00166 virtual LDPLabelMapping *dup() const {return new LDPLabelMapping(*this);} 00167 virtual void parsimPack(cCommBuffer *b); 00168 virtual void parsimUnpack(cCommBuffer *b); 00169 00170 // field getter/setter methods 00171 virtual FEC_TLV& getFec(); 00172 virtual const FEC_TLV& getFec() const {return const_cast<LDPLabelMapping*>(this)->getFec();} 00173 virtual void setFec(const FEC_TLV& fec); 00174 virtual int getLabel() const; 00175 virtual void setLabel(int label); 00176 }; 00177 00178 inline void doPacking(cCommBuffer *b, LDPLabelMapping& obj) {obj.parsimPack(b);} 00179 inline void doUnpacking(cCommBuffer *b, LDPLabelMapping& obj) {obj.parsimUnpack(b);} 00180 00190 class LDPLabelRequest : public ::LDPPacket 00191 { 00192 protected: 00193 FEC_TLV fec_var; 00194 00195 private: 00196 void copy(const LDPLabelRequest& other); 00197 00198 protected: 00199 // protected and unimplemented operator==(), to prevent accidental usage 00200 bool operator==(const LDPLabelRequest&); 00201 00202 public: 00203 LDPLabelRequest(const char *name=NULL, int kind=0); 00204 LDPLabelRequest(const LDPLabelRequest& other); 00205 virtual ~LDPLabelRequest(); 00206 LDPLabelRequest& operator=(const LDPLabelRequest& other); 00207 virtual LDPLabelRequest *dup() const {return new LDPLabelRequest(*this);} 00208 virtual void parsimPack(cCommBuffer *b); 00209 virtual void parsimUnpack(cCommBuffer *b); 00210 00211 // field getter/setter methods 00212 virtual FEC_TLV& getFec(); 00213 virtual const FEC_TLV& getFec() const {return const_cast<LDPLabelRequest*>(this)->getFec();} 00214 virtual void setFec(const FEC_TLV& fec); 00215 }; 00216 00217 inline void doPacking(cCommBuffer *b, LDPLabelRequest& obj) {obj.parsimPack(b);} 00218 inline void doUnpacking(cCommBuffer *b, LDPLabelRequest& obj) {obj.parsimUnpack(b);} 00219 00231 class LDPHello : public ::LDPPacket 00232 { 00233 protected: 00234 double holdTime_var; 00235 bool tbit_var; 00236 bool rbit_var; 00237 00238 private: 00239 void copy(const LDPHello& other); 00240 00241 protected: 00242 // protected and unimplemented operator==(), to prevent accidental usage 00243 bool operator==(const LDPHello&); 00244 00245 public: 00246 LDPHello(const char *name=NULL, int kind=0); 00247 LDPHello(const LDPHello& other); 00248 virtual ~LDPHello(); 00249 LDPHello& operator=(const LDPHello& other); 00250 virtual LDPHello *dup() const {return new LDPHello(*this);} 00251 virtual void parsimPack(cCommBuffer *b); 00252 virtual void parsimUnpack(cCommBuffer *b); 00253 00254 // field getter/setter methods 00255 virtual double getHoldTime() const; 00256 virtual void setHoldTime(double holdTime); 00257 virtual bool getTbit() const; 00258 virtual void setTbit(bool tbit); 00259 virtual bool getRbit() const; 00260 virtual void setRbit(bool rbit); 00261 }; 00262 00263 inline void doPacking(cCommBuffer *b, LDPHello& obj) {obj.parsimPack(b);} 00264 inline void doUnpacking(cCommBuffer *b, LDPHello& obj) {obj.parsimUnpack(b);} 00265 00276 class LDPNotify : public ::LDPPacket 00277 { 00278 protected: 00279 int status_var; 00280 FEC_TLV fec_var; 00281 00282 private: 00283 void copy(const LDPNotify& other); 00284 00285 protected: 00286 // protected and unimplemented operator==(), to prevent accidental usage 00287 bool operator==(const LDPNotify&); 00288 00289 public: 00290 LDPNotify(const char *name=NULL, int kind=0); 00291 LDPNotify(const LDPNotify& other); 00292 virtual ~LDPNotify(); 00293 LDPNotify& operator=(const LDPNotify& other); 00294 virtual LDPNotify *dup() const {return new LDPNotify(*this);} 00295 virtual void parsimPack(cCommBuffer *b); 00296 virtual void parsimUnpack(cCommBuffer *b); 00297 00298 // field getter/setter methods 00299 virtual int getStatus() const; 00300 virtual void setStatus(int status); 00301 virtual FEC_TLV& getFec(); 00302 virtual const FEC_TLV& getFec() const {return const_cast<LDPNotify*>(this)->getFec();} 00303 virtual void setFec(const FEC_TLV& fec); 00304 }; 00305 00306 inline void doPacking(cCommBuffer *b, LDPNotify& obj) {obj.parsimPack(b);} 00307 inline void doUnpacking(cCommBuffer *b, LDPNotify& obj) {obj.parsimUnpack(b);} 00308 00322 class LDPIni : public ::LDPPacket 00323 { 00324 protected: 00325 double keepAliveTime_var; 00326 bool abit_var; 00327 bool dbit_var; 00328 int pvLim_var; 00329 opp_string receiverLDPIdentifier_var; 00330 00331 private: 00332 void copy(const LDPIni& other); 00333 00334 protected: 00335 // protected and unimplemented operator==(), to prevent accidental usage 00336 bool operator==(const LDPIni&); 00337 00338 public: 00339 LDPIni(const char *name=NULL, int kind=0); 00340 LDPIni(const LDPIni& other); 00341 virtual ~LDPIni(); 00342 LDPIni& operator=(const LDPIni& other); 00343 virtual LDPIni *dup() const {return new LDPIni(*this);} 00344 virtual void parsimPack(cCommBuffer *b); 00345 virtual void parsimUnpack(cCommBuffer *b); 00346 00347 // field getter/setter methods 00348 virtual double getKeepAliveTime() const; 00349 virtual void setKeepAliveTime(double keepAliveTime); 00350 virtual bool getAbit() const; 00351 virtual void setAbit(bool abit); 00352 virtual bool getDbit() const; 00353 virtual void setDbit(bool dbit); 00354 virtual int getPvLim() const; 00355 virtual void setPvLim(int pvLim); 00356 virtual const char * getReceiverLDPIdentifier() const; 00357 virtual void setReceiverLDPIdentifier(const char * receiverLDPIdentifier); 00358 }; 00359 00360 inline void doPacking(cCommBuffer *b, LDPIni& obj) {obj.parsimPack(b);} 00361 inline void doUnpacking(cCommBuffer *b, LDPIni& obj) {obj.parsimUnpack(b);} 00362 00374 class LDPAddress : public ::LDPPacket 00375 { 00376 protected: 00377 bool isWithdraw_var; 00378 opp_string family_var; 00379 opp_string *addresses_var; // array ptr 00380 unsigned int addresses_arraysize; 00381 00382 private: 00383 void copy(const LDPAddress& other); 00384 00385 protected: 00386 // protected and unimplemented operator==(), to prevent accidental usage 00387 bool operator==(const LDPAddress&); 00388 00389 public: 00390 LDPAddress(const char *name=NULL, int kind=0); 00391 LDPAddress(const LDPAddress& other); 00392 virtual ~LDPAddress(); 00393 LDPAddress& operator=(const LDPAddress& other); 00394 virtual LDPAddress *dup() const {return new LDPAddress(*this);} 00395 virtual void parsimPack(cCommBuffer *b); 00396 virtual void parsimUnpack(cCommBuffer *b); 00397 00398 // field getter/setter methods 00399 virtual bool getIsWithdraw() const; 00400 virtual void setIsWithdraw(bool isWithdraw); 00401 virtual const char * getFamily() const; 00402 virtual void setFamily(const char * family); 00403 virtual void setAddressesArraySize(unsigned int size); 00404 virtual unsigned int getAddressesArraySize() const; 00405 virtual const char * getAddresses(unsigned int k) const; 00406 virtual void setAddresses(unsigned int k, const char * addresses); 00407 }; 00408 00409 inline void doPacking(cCommBuffer *b, LDPAddress& obj) {obj.parsimPack(b);} 00410 inline void doUnpacking(cCommBuffer *b, LDPAddress& obj) {obj.parsimUnpack(b);} 00411 00412 00413 #endif // _LDPPACKET_M_H_