INET Framework for OMNeT++/OMNEST
inet::sctp::SCTPAsconfAckChunk Class Reference

#include <SCTPMessage.h>

Inheritance diagram for inet::sctp::SCTPAsconfAckChunk:
inet::sctp::SCTPAsconfAckChunk_Base inet::sctp::SCTPChunk

Public Member Functions

 SCTPAsconfAckChunk (const char *name=nullptr, int32 kind=0)
 
 SCTPAsconfAckChunk (const SCTPAsconfAckChunk &other)
 
SCTPAsconfAckChunkoperator= (const SCTPAsconfAckChunk &other)
 
virtual SCTPAsconfAckChunkdup () const override
 
virtual void setAsconfResponseArraySize (const uint32 size) override
 
virtual uint32 getAsconfResponseArraySize () const override
 
virtual void setAsconfResponse (const uint32 k, const cPacketPtr &parameters_var) override
 Generated but unused method, should not be called. More...
 
virtual cPacketPtrgetAsconfResponse (uint32 k) override
 Returns the kth parameter in this SCTP Reset Chunk. More...
 
virtual void addAsconfResponse (cPacket *msg)
 Adds a message object to the SCTP packet. More...
 
virtual cPacket * removeAsconfResponse ()
 Removes and returns the first message object in this SCTP packet. More...
 
- Public Member Functions inherited from inet::sctp::SCTPAsconfAckChunk_Base
virtual ~SCTPAsconfAckChunk_Base ()
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual uint32_t getSerialNumber () const
 
virtual void setSerialNumber (uint32_t serialNumber)
 
virtual void setAsconfResponseArraySize (unsigned int size)=0
 
virtual cPacketPtrgetAsconfResponse (unsigned int k)=0
 
virtual const cPacketPtrgetAsconfResponse (unsigned int k) const
 
virtual void setAsconfResponse (unsigned int k, const cPacketPtr &asconfResponse)=0
 
- Public Member Functions inherited from inet::sctp::SCTPChunk
 SCTPChunk (const char *name=nullptr, short kind=0)
 
 SCTPChunk (const SCTPChunk &other)
 
virtual ~SCTPChunk ()
 
SCTPChunkoperator= (const SCTPChunk &other)
 
virtual uint8_t getChunkType () const
 
virtual void setChunkType (uint8_t chunkType)
 
virtual uint32_t getFlags () const
 
virtual void setFlags (uint32_t flags)
 

Protected Attributes

std::vector< cPacket * > parameterList
 
- Protected Attributes inherited from inet::sctp::SCTPAsconfAckChunk_Base
uint32_t serialNumber
 
- Protected Attributes inherited from inet::sctp::SCTPChunk
uint8_t chunkType
 
uint32_t flags
 

Additional Inherited Members

- Protected Member Functions inherited from inet::sctp::SCTPAsconfAckChunk_Base
bool operator== (const SCTPAsconfAckChunk_Base &)
 
 SCTPAsconfAckChunk_Base (const char *name=nullptr, short kind=0)
 
 SCTPAsconfAckChunk_Base (const SCTPAsconfAckChunk_Base &other)
 
SCTPAsconfAckChunk_Baseoperator= (const SCTPAsconfAckChunk_Base &other)
 
- Protected Member Functions inherited from inet::sctp::SCTPChunk
bool operator== (const SCTPChunk &)
 

Constructor & Destructor Documentation

inet::sctp::SCTPAsconfAckChunk::SCTPAsconfAckChunk ( const char *  name = nullptr,
int32  kind = 0 
)
inline
209 : SCTPAsconfAckChunk_Base(name, kind) {};
SCTPAsconfAckChunk_Base(const char *name=nullptr, short kind=0)
inet::sctp::SCTPAsconfAckChunk::SCTPAsconfAckChunk ( const SCTPAsconfAckChunk other)
inline
210 : SCTPAsconfAckChunk_Base(other.getName()) { operator=(other); };
SCTPAsconfAckChunk_Base(const char *name=nullptr, short kind=0)
SCTPAsconfAckChunk & operator=(const SCTPAsconfAckChunk &other)
Definition: SCTPMessage.cc:367

Member Function Documentation

void inet::sctp::SCTPAsconfAckChunk::addAsconfResponse ( cPacket *  msg)
virtual

Adds a message object to the SCTP packet.

The packet length will be adjusted

Referenced by inet::serializer::SCTPSerializer::parse(), and inet::sctp::SCTPAssociation::processAsconfArrived().

399 {
400  take(msg);
401  this->setByteLength(this->getByteLength() + ADD_PADDING(msg->getByteLength()));
402  parameterList.push_back(msg);
403 }
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:206
#define ADD_PADDING(x)
Definition: SCTPAssociation.h:261
virtual SCTPAsconfAckChunk* inet::sctp::SCTPAsconfAckChunk::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::sctp::SCTPAsconfAckChunk_Base.

213 { return new SCTPAsconfAckChunk(*this); }
SCTPAsconfAckChunk(const char *name=nullptr, int32 kind=0)
Definition: SCTPMessage.h:209
cPacketPtr & inet::sctp::SCTPAsconfAckChunk::getAsconfResponse ( uint32  k)
overridevirtual

Returns the kth parameter in this SCTP Reset Chunk.

Referenced by inet::serializer::SCTPSerializer::deserialize(), and inet::sctp::SCTPAssociation::processAsconfAckArrived().

389 {
390  return parameterList.at(k);
391 }
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:206
const double k
Definition: QAM16Modulation.cc:24
uint32 inet::sctp::SCTPAsconfAckChunk::getAsconfResponseArraySize ( ) const
overridevirtual

Implements inet::sctp::SCTPAsconfAckChunk_Base.

Referenced by inet::serializer::SCTPSerializer::deserialize(), and inet::sctp::SCTPAssociation::processAsconfAckArrived().

384 {
385  return parameterList.size();
386 }
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:206
SCTPAsconfAckChunk & inet::sctp::SCTPAsconfAckChunk::operator= ( const SCTPAsconfAckChunk other)
368 {
370 
371  this->setByteLength(SCTP_ADD_IP_CHUNK_LENGTH);
372  for (const auto & elem : other.parameterList)
373  addAsconfResponse((cPacket *)(elem)->dup());
374 
375  return *this;
376 }
virtual void addAsconfResponse(cPacket *msg)
Adds a message object to the SCTP packet.
Definition: SCTPMessage.cc:398
SCTPAsconfAckChunk_Base & operator=(const SCTPAsconfAckChunk_Base &other)
virtual SCTPAsconfAckChunk * dup() const override
Definition: SCTPMessage.h:213
#define SCTP_ADD_IP_CHUNK_LENGTH
Definition: SCTPAssociation.h:231
cPacket * inet::sctp::SCTPAsconfAckChunk::removeAsconfResponse ( )
virtual

Removes and returns the first message object in this SCTP packet.

406 {
407  if (parameterList.empty())
408  return nullptr;
409 
410  cPacket *msg = parameterList.front();
411  parameterList.erase(parameterList.begin());
412  drop(msg);
413  this->setByteLength(this->getByteLength() + ADD_PADDING(msg->getByteLength()));
414  return msg;
415 }
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:206
#define ADD_PADDING(x)
Definition: SCTPAssociation.h:261
void inet::sctp::SCTPAsconfAckChunk::setAsconfResponse ( const uint32  k,
const cPacketPtr parameters_var 
)
overridevirtual

Generated but unused method, should not be called.

394 {
395  throw new cException(this, "setAsconfresponse() not supported, use addAsconfResponse()");
396 }
void inet::sctp::SCTPAsconfAckChunk::setAsconfResponseArraySize ( const uint32  size)
overridevirtual
379 {
380  throw new cException(this, "setAsconfResponseArraySize() not supported, use addAsconfResponse()");
381 }

Member Data Documentation

std::vector<cPacket *> inet::sctp::SCTPAsconfAckChunk::parameterList
protected

Referenced by operator=().


The documentation for this class was generated from the following files: