#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 |
SCTPErrorChunk::SCTPErrorChunk | ( | const char * | name = NULL , |
|
int32 | kind = 0 | |||
) | [inline] |
SCTPErrorChunk::SCTPErrorChunk | ( | const SCTPErrorChunk & | other | ) | [inline] |
SCTPErrorChunk & SCTPErrorChunk::operator= | ( | const SCTPErrorChunk & | other | ) |
Referenced by SCTPErrorChunk().
00132 { 00133 SCTPErrorChunk_Base::operator=(other); 00134 00135 this->setBitLength(4*8); 00136 for (std::list<cPacket*>::const_iterator i=other.parameterList.begin(); i!=other.parameterList.end(); ++i) 00137 addParameters((cPacket *)(*i)->dup()); 00138 00139 return *this; 00140 }
virtual SCTPErrorChunk* SCTPErrorChunk::dup | ( | ) | const [inline, virtual] |
void SCTPErrorChunk::setParametersArraySize | ( | uint32 | size | ) | [virtual] |
uint32 SCTPErrorChunk::getParametersArraySize | ( | ) | const [virtual] |
void SCTPErrorChunk::setParameters | ( | uint32 | k, | |
const cPacketPtr & | parameters_var | |||
) | [virtual] |
cPacketPtr & SCTPErrorChunk::getParameters | ( | uint32 | k | ) | [virtual] |
Returns the kth parameter in this SCTP Reset Chunk
Referenced by TCPDumper::sctpDump().
00153 { 00154 std::list<cPacket*>::iterator i = parameterList.begin(); 00155 while (k>0 && i!=parameterList.end()) 00156 (++i, --k); 00157 return *i; 00158 }
void SCTPErrorChunk::addParameters | ( | cPacket * | msg | ) | [virtual] |
Adds a message object to the SCTP packet. The packet length will be adjusted
Referenced by operator=().
00168 { 00169 take(msg); 00170 00171 this->setBitLength(this->getBitLength()+ADD_PADDING(msg->getBitLength())); 00172 parameterList.push_back(msg); 00173 }
cPacket * SCTPErrorChunk::removeParameter | ( | ) | [virtual] |
Removes and returns the first message object in this SCTP packet.
00176 { 00177 if (parameterList.empty()) 00178 return NULL; 00179 00180 cPacket *msg = parameterList.front(); 00181 parameterList.pop_front(); 00182 drop(msg); 00183 this->setBitLength(this->getBitLength()-ADD_PADDING(msg->getBitLength()/8)*8); 00184 return msg; 00185 }
std::list<cPacket*> SCTPErrorChunk::parameterList [protected] |
Referenced by addParameters(), getParameters(), getParametersArraySize(), operator=(), and removeParameter().