#include <SCTPMessage.h>
Public Member Functions | |
SCTPErrorChunk (const char *name=NULL, int32 kind=0) | |
SCTPErrorChunk (const SCTPErrorChunk &other) | |
SCTPErrorChunk & | operator= (const SCTPErrorChunk &other) |
virtual SCTPErrorChunk * | dup () const |
virtual void | setParametersArraySize (uint32 size) |
virtual uint32 | getParametersArraySize () const |
virtual void | setParameters (uint32 k, const cPacketPtr ¶meters_var) |
virtual cPacketPtr & | getParameters (uint32 k) |
virtual void | addParameters (cPacket *msg) |
virtual cPacket * | removeParameter () |
Protected Attributes | |
std::list< cPacket * > | parameterList |
Definition at line 98 of file SCTPMessage.h.
SCTPErrorChunk::SCTPErrorChunk | ( | const char * | name = NULL , |
|
int32 | kind = 0 | |||
) | [inline] |
Definition at line 104 of file SCTPMessage.h.
: SCTPErrorChunk_Base(name, kind) {};
SCTPErrorChunk::SCTPErrorChunk | ( | const SCTPErrorChunk & | other | ) | [inline] |
Definition at line 105 of file SCTPMessage.h.
: SCTPErrorChunk_Base(other.getName()) {operator=(other);};
void SCTPErrorChunk::addParameters | ( | cPacket * | msg | ) | [virtual] |
Adds a message object to the SCTP packet. The packet length will be adjusted
Definition at line 169 of file SCTPMessage.cc.
Referenced by operator=().
{ take(msg); this->setBitLength(this->getBitLength()+ADD_PADDING(msg->getBitLength())); parameterList.push_back(msg); }
virtual SCTPErrorChunk* SCTPErrorChunk::dup | ( | ) | const [inline, virtual] |
Definition at line 108 of file SCTPMessage.h.
{return new SCTPErrorChunk(*this);}
cPacketPtr & SCTPErrorChunk::getParameters | ( | uint32 | k | ) | [virtual] |
Returns the kth parameter in this SCTP Reset Chunk
Definition at line 156 of file SCTPMessage.cc.
Referenced by TCPDumper::sctpDump().
{ std::list<cPacket*>::iterator i = parameterList.begin(); while (k>0 && i!=parameterList.end()) (++i, --k); return *i; }
uint32 SCTPErrorChunk::getParametersArraySize | ( | ) | const [virtual] |
Definition at line 151 of file SCTPMessage.cc.
Referenced by TCPDumper::sctpDump().
{ return parameterList.size(); }
SCTPErrorChunk & SCTPErrorChunk::operator= | ( | const SCTPErrorChunk & | other | ) |
Definition at line 135 of file SCTPMessage.cc.
{ SCTPErrorChunk_Base::operator=(other); this->setBitLength(4*8); for (std::list<cPacket*>::const_iterator i=other.parameterList.begin(); i!=other.parameterList.end(); ++i) addParameters((cPacket *)(*i)->dup()); return *this; }
cPacket * SCTPErrorChunk::removeParameter | ( | ) | [virtual] |
Removes and returns the first message object in this SCTP packet.
Definition at line 177 of file SCTPMessage.cc.
{ if (parameterList.empty()) return NULL; cPacket *msg = parameterList.front(); parameterList.pop_front(); drop(msg); this->setBitLength(this->getBitLength()-ADD_PADDING(msg->getBitLength()/8)*8); return msg; }
void SCTPErrorChunk::setParameters | ( | uint32 | k, | |
const cPacketPtr & | parameters_var | |||
) | [virtual] |
Generated but unused method, should not be called.
Definition at line 164 of file SCTPMessage.cc.
{ throw new cException(this, "setParameter() not supported, use addParameter()"); }
void SCTPErrorChunk::setParametersArraySize | ( | uint32 | size | ) | [virtual] |
Definition at line 146 of file SCTPMessage.cc.
{ throw new cException(this, "setParametersArraySize() not supported, use addParameter()"); }
std::list<cPacket*> SCTPErrorChunk::parameterList [protected] |
Definition at line 101 of file SCTPMessage.h.
Referenced by addParameters(), getParameters(), getParametersArraySize(), operator=(), and removeParameter().