#include <MPLSPacket.h>
Public Member Functions | |
MPLSPacket (const char *name=NULL) | |
MPLSPacket (const MPLSPacket &p) | |
virtual MPLSPacket & | operator= (const MPLSPacket &p) |
virtual cObject * | dup () const |
void | swapLabel (int newLabel) |
void | pushLabel (int newLabel) |
void | popLabel () |
bool | hasLabel () |
int | topLabel () |
Private Types | |
typedef std::stack< int > | LabelStack |
Private Attributes | |
LabelStack | labels |
|
|
|
00021 : cMessage(name) 00022 { 00023 }
|
|
00026 { 00027 setName(p.name()); 00028 operator=(p); 00029 }
|
|
cloning function 00043 {return new MPLSPacket(*this);}
|
|
Returns true if the label stack is not empty 00063 {return !labels.empty();}
|
|
00033 { 00034 cMessage::operator=(p); 00035 return *this; 00036 }
|
|
Pops the top label 00058 {labels.pop();addLength(-32);}
|
|
Pushes new label on the label stack 00053 {labels.push(newLabel);addLength(32);}
|
|
Swap Label operation 00048 {labels.top()=newLabel;}
|
|
Returns the top label 00068 {return labels.top();}
|
|
|