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

#include <SCTPMessage.h>

Inheritance diagram for inet::sctp::SCTPAsconfChunk:
inet::sctp::SCTPAsconfChunk_Base inet::sctp::SCTPChunk

Public Member Functions

 SCTPAsconfChunk (const char *name=nullptr, int32 kind=0)
 
 SCTPAsconfChunk (const SCTPAsconfChunk &other)
 
SCTPAsconfChunkoperator= (const SCTPAsconfChunk &other)
 
virtual SCTPAsconfChunkdup () const override
 
virtual void setAsconfParamsArraySize (const uint32 size) override
 
virtual uint32 getAsconfParamsArraySize () const override
 
virtual void setAsconfParams (const uint32 k, const cPacketPtr &parameters_var) override
 Generated but unused method, should not be called. More...
 
virtual cPacketPtrgetAsconfParams (uint32 k) override
 Returns the kth parameter in this SCTP Reset Chunk. More...
 
virtual void addAsconfParam (cPacket *msg)
 Adds a message object to the SCTP packet. More...
 
virtual cPacket * removeAsconfParam ()
 Removes and returns the first message object in this SCTP packet. More...
 
- Public Member Functions inherited from inet::sctp::SCTPAsconfChunk_Base
virtual ~SCTPAsconfChunk_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 L3AddressgetAddressParam ()
 
virtual const L3AddressgetAddressParam () const
 
virtual void setAddressParam (const L3Address &addressParam)
 
virtual uint32_t getPeerVTag () const
 
virtual void setPeerVTag (uint32_t peerVTag)
 
virtual void setAsconfParamsArraySize (unsigned int size)=0
 
virtual cPacketPtrgetAsconfParams (unsigned int k)=0
 
virtual const cPacketPtrgetAsconfParams (unsigned int k) const
 
virtual void setAsconfParams (unsigned int k, const cPacketPtr &asconfParams)=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::SCTPAsconfChunk_Base
uint32_t serialNumber
 
L3Address addressParam
 
uint32_t peerVTag
 
- Protected Attributes inherited from inet::sctp::SCTPChunk
uint8_t chunkType
 
uint32_t flags
 

Additional Inherited Members

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

Constructor & Destructor Documentation

inet::sctp::SCTPAsconfChunk::SCTPAsconfChunk ( const char *  name = nullptr,
int32  kind = 0 
)
inline
164 : SCTPAsconfChunk_Base(name, kind) {};
SCTPAsconfChunk_Base(const char *name=nullptr, short kind=0)
inet::sctp::SCTPAsconfChunk::SCTPAsconfChunk ( const SCTPAsconfChunk other)
inline
165 : SCTPAsconfChunk_Base(other.getName()) { operator=(other); };
SCTPAsconfChunk & operator=(const SCTPAsconfChunk &other)
Definition: SCTPMessage.cc:314
SCTPAsconfChunk_Base(const char *name=nullptr, short kind=0)

Member Function Documentation

void inet::sctp::SCTPAsconfChunk::addAsconfParam ( 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::sendAsconf().

347 {
348  take(msg);
349  this->setByteLength(this->getByteLength() + ADD_PADDING(msg->getByteLength()));
350  parameterList.push_back(msg);
351 }
#define ADD_PADDING(x)
Definition: SCTPAssociation.h:261
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:161
virtual SCTPAsconfChunk* inet::sctp::SCTPAsconfChunk::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::sctp::SCTPAsconfChunk_Base.

Referenced by inet::sctp::SCTPAssociation::processAsconfAckArrived(), inet::sctp::SCTPAssociation::retransmitAsconf(), and inet::sctp::SCTPAssociation::sendAsconf().

168 { return new SCTPAsconfChunk(*this); };
SCTPAsconfChunk(const char *name=nullptr, int32 kind=0)
Definition: SCTPMessage.h:164
cPacketPtr & inet::sctp::SCTPAsconfChunk::getAsconfParams ( uint32  k)
overridevirtual

Returns the kth parameter in this SCTP Reset Chunk.

Referenced by inet::serializer::SCTPSerializer::deserialize().

337 {
338  return parameterList.at(k);
339 }
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:161
const double k
Definition: QAM16Modulation.cc:24
uint32 inet::sctp::SCTPAsconfChunk::getAsconfParamsArraySize ( ) const
overridevirtual
SCTPAsconfChunk & inet::sctp::SCTPAsconfChunk::operator= ( const SCTPAsconfChunk other)
315 {
317 
318  this->setByteLength(SCTP_ADD_IP_CHUNK_LENGTH + 8);
319  this->setAddressParam(other.getAddressParam());
320  for (const auto & elem : other.parameterList)
321  addAsconfParam((cPacket *)(elem)->dup());
322 
323  return *this;
324 }
virtual void setAddressParam(const L3Address &addressParam)
SCTPAsconfChunk_Base & operator=(const SCTPAsconfChunk_Base &other)
virtual void addAsconfParam(cPacket *msg)
Adds a message object to the SCTP packet.
Definition: SCTPMessage.cc:346
#define SCTP_ADD_IP_CHUNK_LENGTH
Definition: SCTPAssociation.h:231
virtual SCTPAsconfChunk * dup() const override
Definition: SCTPMessage.h:168
cPacket * inet::sctp::SCTPAsconfChunk::removeAsconfParam ( )
virtual

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

Referenced by inet::sctp::SCTPAssociation::processAsconfAckArrived(), and inet::sctp::SCTPAssociation::processAsconfArrived().

354 {
355  if (parameterList.empty())
356  return nullptr;
357 
358  cPacket *msg = parameterList.front();
359  parameterList.erase(parameterList.begin());
360  drop(msg);
361  this->setByteLength(this->getByteLength() + ADD_PADDING(msg->getByteLength()));
362  return msg;
363 }
#define ADD_PADDING(x)
Definition: SCTPAssociation.h:261
std::vector< cPacket * > parameterList
Definition: SCTPMessage.h:161
void inet::sctp::SCTPAsconfChunk::setAsconfParams ( const uint32  k,
const cPacketPtr parameters_var 
)
overridevirtual

Generated but unused method, should not be called.

342 {
343  throw new cException(this, "setAsconfParams() not supported, use addAsconfParam()");
344 }
void inet::sctp::SCTPAsconfChunk::setAsconfParamsArraySize ( const uint32  size)
overridevirtual
327 {
328  throw new cException(this, "setAsconfParamsArraySize() not supported, use addAsconfParam()");
329 }

Member Data Documentation

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

Referenced by operator=().


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