00001 // 00002 // (C) 2005 Vojtech Janota 00003 // (C) 2003 Xuan Thang Nguyen 00004 // 00005 // This library is free software, you can redistribute it 00006 // and/or modify 00007 // it under the terms of the GNU Lesser General Public License 00008 // as published by the Free Software Foundation; 00009 // either version 2 of the License, or any later version. 00010 // The library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 // See the GNU Lesser General Public License for more details. 00014 // 00015 00016 #ifndef __INET_RSVPPATHMSG_H 00017 #define __INET_RSVPPATHMSG_H 00018 00019 #include "RSVPPathMsg_m.h" 00020 00021 00028 class RSVPPathMsg : public RSVPPathMsg_Base 00029 { 00030 public: 00031 RSVPPathMsg(const char *name=NULL, int kind=PATH_MESSAGE) : RSVPPathMsg_Base(name,kind) {} 00032 RSVPPathMsg(const RSVPPathMsg& other) : RSVPPathMsg_Base(other.getName()) {operator=(other);} 00033 RSVPPathMsg& operator=(const RSVPPathMsg& other) {RSVPPathMsg_Base::operator=(other); return *this;} 00034 virtual RSVPPathMsg *dup() const {return new RSVPPathMsg(*this);} 00035 00036 inline IPAddress getSrcAddress() {return getSender_descriptor().Sender_Template_Object.SrcAddress;} 00037 inline int getLspId() {return getSender_descriptor().Sender_Template_Object.Lsp_Id;} 00038 inline IPAddress getNHOP() {return getHop().Next_Hop_Address;} 00039 inline IPAddress getLIH() {return getHop().Logical_Interface_Handle;} 00040 inline double getBW() {return getSender_descriptor().Sender_Tspec_Object.req_bandwidth;} 00041 inline SenderTemplateObj_t& getSenderTemplate() {return getSender_descriptor().Sender_Template_Object;} 00042 inline void setSenderTemplate(const SenderTemplateObj_t& s) {getSender_descriptor().Sender_Template_Object = s;} 00043 inline SenderTspecObj_t& getSenderTspec() {return getSender_descriptor().Sender_Tspec_Object;} 00044 inline void setSenderTspec(const SenderTspecObj_t& s) {getSender_descriptor().Sender_Tspec_Object = s;} 00045 }; 00046 00047 00054 class RSVPPathTear : public RSVPPathTear_Base 00055 { 00056 public: 00057 RSVPPathTear(const char *name=NULL, int kind=PTEAR_MESSAGE) : RSVPPathTear_Base(name,kind) {} 00058 RSVPPathTear(const RSVPPathTear& other) : RSVPPathTear_Base(other.getName()) {operator=(other);} 00059 RSVPPathTear& operator=(const RSVPPathTear& other) {RSVPPathTear_Base::operator=(other); return *this;} 00060 virtual RSVPPathTear *dup() const {return new RSVPPathTear(*this);} 00061 00062 inline IPAddress getNHOP() {return getHop().Next_Hop_Address;} 00063 inline IPAddress getLIH() {return getHop().Logical_Interface_Handle;} 00064 inline IPAddress getSrcAddress() {return getSenderTemplate().SrcAddress;} 00065 inline int getLspId() {return getSenderTemplate().Lsp_Id;} 00066 }; 00067 00068 00075 class RSVPPathError : public RSVPPathError_Base 00076 { 00077 public: 00078 RSVPPathError(const char *name=NULL, int kind=PERROR_MESSAGE) : RSVPPathError_Base(name,kind) {} 00079 RSVPPathError(const RSVPPathError& other) : RSVPPathError_Base(other.getName()) {operator=(other);} 00080 RSVPPathError& operator=(const RSVPPathError& other) {RSVPPathError_Base::operator=(other); return *this;} 00081 virtual RSVPPathError *dup() const {return new RSVPPathError(*this);} 00082 00083 inline IPAddress getSrcAddress() {return getSender_descriptor().Sender_Template_Object.SrcAddress;} 00084 inline int getLspId() {return getSender_descriptor().Sender_Template_Object.Lsp_Id;} 00085 inline double getBW() {return getSender_descriptor().Sender_Tspec_Object.req_bandwidth;} 00086 00087 inline SenderTemplateObj_t& getSenderTemplate() {return getSender_descriptor().Sender_Template_Object;} 00088 inline void setSenderTemplate(const SenderTemplateObj_t& s) {getSender_descriptor().Sender_Template_Object = s;} 00089 inline SenderTspecObj_t& getSenderTspec() {return getSender_descriptor().Sender_Tspec_Object;} 00090 inline void setSenderTspec(const SenderTspecObj_t& s) {getSender_descriptor().Sender_Tspec_Object = s;} 00091 }; 00092 00093 #endif 00094 00095 00096