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_RSVPPACKET_H 00017 #define __INET_RSVPPACKET_H 00018 00019 #include "RSVPPacket_m.h" 00020 00021 #define RSVP_TRAFFIC 2 00022 00029 class RSVPPacket : public RSVPPacket_Base 00030 { 00031 public: 00032 RSVPPacket(const char *name=NULL, int kind=0) : RSVPPacket_Base(name,RSVP_TRAFFIC) { this->rsvpKind_var = kind; } 00033 RSVPPacket(const RSVPPacket& other) : RSVPPacket_Base(other.getName()) {operator=(other);} 00034 RSVPPacket& operator=(const RSVPPacket& other) {RSVPPacket_Base::operator=(other); return *this;} 00035 virtual RSVPPacket *dup() const {return new RSVPPacket(*this);} 00036 00037 inline IPAddress getDestAddress() {return getSession().DestAddress;} 00038 inline int getTunnelId() {return getSession().Tunnel_Id;} 00039 inline int getExTunnelId() {return getSession().Extended_Tunnel_Id;} 00040 inline int getSetupPri() {return getSession().setupPri;} 00041 inline int getHoldingPri() {return getSession().holdingPri;} 00042 inline bool isInSession(SessionObj_t* s) { 00043 return getSession().DestAddress==s->DestAddress && 00044 getSession().Tunnel_Id==s->Tunnel_Id && 00045 getSession().Extended_Tunnel_Id==s->Extended_Tunnel_Id; 00046 } 00047 }; 00048 00049 #endif