|
INET Framework for OMNeT++/OMNEST
|
#include <SCTPMessage_m.h>
Public Member Functions | |
| virtual | ~SCTPMessage_Base () |
| virtual SCTPMessage_Base * | dup () const |
| virtual void | parsimPack (cCommBuffer *b) |
| virtual void | parsimUnpack (cCommBuffer *b) |
| virtual uint16 | getSrcPort () const |
| virtual void | setSrcPort (uint16 srcPort) |
| virtual uint16 | getDestPort () const |
| virtual void | setDestPort (uint16 destPort) |
| virtual uint32 | getTag () const |
| virtual void | setTag (uint32 tag) |
| virtual bool | getChecksumOk () const |
| virtual void | setChecksumOk (bool checksumOk) |
| virtual void | setChunksArraySize (unsigned int size)=0 |
| virtual unsigned int | getChunksArraySize () const =0 |
| virtual cPacketPtr & | getChunks (unsigned int k)=0 |
| virtual const cPacketPtr & | getChunks (unsigned int k) const |
| virtual void | setChunks (unsigned int k, const cPacketPtr &chunks)=0 |
Protected Member Functions | |
| bool | operator== (const SCTPMessage_Base &) |
| SCTPMessage_Base (const char *name=NULL, int kind=0) | |
| SCTPMessage_Base (const SCTPMessage_Base &other) | |
| SCTPMessage_Base & | operator= (const SCTPMessage_Base &other) |
Protected Attributes | |
| uint16 | srcPort_var |
| uint16 | destPort_var |
| uint32 | tag_var |
| bool | checksumOk_var |
Private Member Functions | |
| void | copy (const SCTPMessage_Base &other) |
Class generated from transport/sctp/SCTPMessage.msg by opp_msgc.
message SCTPMessage extends cPacket { (true);
uint16 srcPort;
uint16 destPort;
uint32 tag;
bool checksumOk;
abstract cPacketPtr chunks[];
}
SCTPMessage_Base is only useful if it gets subclassed, and SCTPMessage is derived from it. The minimum code to be written for SCTPMessage is the following:
class SCTPMessage : public SCTPMessage_Base { private: void copy(const SCTPMessage& other) { ... }
public:
SCTPMessage(const char *name=NULL, int kind=0) : SCTPMessage_Base(name,kind) {}
SCTPMessage(const SCTPMessage& other) : SCTPMessage_Base(other) {copy(other);}
SCTPMessage& operator=(const SCTPMessage& other) {if (this==&other) return *this; SCTPMessage_Base::operator=(other); copy(other); return *this;}
virtual SCTPMessage *dup() const {return new SCTPMessage(*this);}
// ADD CODE HERE to redefine and implement pure virtual functions from SCTPMessage_Base
};
The following should go into a .cc (.cpp) file:
Register_Class(SCTPMessage);
Definition at line 120 of file SCTPMessage_m.h.
| SCTPMessage_Base::SCTPMessage_Base | ( | const char * | name = NULL, |
| int | kind = 0 |
||
| ) | [protected] |
| SCTPMessage_Base::SCTPMessage_Base | ( | const SCTPMessage_Base & | other | ) | [protected] |
| virtual SCTPMessage_Base::~SCTPMessage_Base | ( | ) | [virtual] |
| void SCTPMessage_Base::copy | ( | const SCTPMessage_Base & | other | ) | [private] |
| virtual SCTPMessage_Base* SCTPMessage_Base::dup | ( | ) | const [inline, virtual] |
Reimplemented in SCTPMessage.
Definition at line 142 of file SCTPMessage_m.h.
{throw cRuntimeError("You forgot to manually add a dup() function to class SCTPMessage");}
| virtual bool SCTPMessage_Base::getChecksumOk | ( | ) | const [virtual] |
Referenced by SCTP::handleMessage(), SCTPSerializer::parse(), and SCTPAssociation::process_RCV_Message().
| virtual cPacketPtr& SCTPMessage_Base::getChunks | ( | unsigned int | k | ) | [pure virtual] |
| virtual const cPacketPtr& SCTPMessage_Base::getChunks | ( | unsigned int | k | ) | const [inline, virtual] |
Definition at line 158 of file SCTPMessage_m.h.
Referenced by getChunks().
{return const_cast<SCTPMessage_Base*>(this)->getChunks(k);}
| virtual unsigned int SCTPMessage_Base::getChunksArraySize | ( | ) | const [pure virtual] |
Implemented in SCTPMessage.
| virtual uint16 SCTPMessage_Base::getDestPort | ( | ) | const [virtual] |
| virtual uint16 SCTPMessage_Base::getSrcPort | ( | ) | const [virtual] |
| virtual uint32 SCTPMessage_Base::getTag | ( | ) | const [virtual] |
Referenced by SCTP::handleMessage(), SCTPMessage::operator=(), SCTPAssociation::printSegmentBrief(), SCTPAssociation::process_RCV_Message(), TCPDumper::sctpDump(), SCTP::sendAbortFromMain(), SCTPAssociation::sendInitAck(), SCTP::sendShutdownCompleteFromMain(), SCTPAssociation::sendToIP(), and SCTPSerializer::serialize().
| SCTPMessage_Base& SCTPMessage_Base::operator= | ( | const SCTPMessage_Base & | other | ) | [protected] |
Referenced by SCTPMessage::SCTPMessage().
| bool SCTPMessage_Base::operator== | ( | const SCTPMessage_Base & | ) | [protected] |
| virtual void SCTPMessage_Base::parsimPack | ( | cCommBuffer * | b | ) | [virtual] |
| virtual void SCTPMessage_Base::parsimUnpack | ( | cCommBuffer * | b | ) | [virtual] |
| virtual void SCTPMessage_Base::setChecksumOk | ( | bool | checksumOk | ) | [virtual] |
| virtual void SCTPMessage_Base::setChunks | ( | unsigned int | k, |
| const cPacketPtr & | chunks | ||
| ) | [pure virtual] |
| virtual void SCTPMessage_Base::setChunksArraySize | ( | unsigned int | size | ) | [pure virtual] |
| virtual void SCTPMessage_Base::setDestPort | ( | uint16 | destPort | ) | [virtual] |
Referenced by SCTPSerializer::parse(), SCTPAssociation::sendAbort(), SCTP::sendAbortFromMain(), SCTPAssociation::sendCookieAck(), SCTPAssociation::sendCookieEcho(), SCTPAssociation::sendHeartbeat(), SCTPAssociation::sendHeartbeatAck(), SCTPAssociation::sendInitAck(), SCTPAssociation::sendShutdown(), SCTPAssociation::sendShutdownAck(), SCTPAssociation::sendShutdownComplete(), SCTP::sendShutdownCompleteFromMain(), and SCTPAssociation::sendToIP().
| virtual void SCTPMessage_Base::setSrcPort | ( | uint16 | srcPort | ) | [virtual] |
Referenced by SCTPSerializer::parse(), SCTPAssociation::sendAbort(), SCTP::sendAbortFromMain(), SCTPAssociation::sendCookieAck(), SCTPAssociation::sendCookieEcho(), SCTPAssociation::sendHeartbeat(), SCTPAssociation::sendHeartbeatAck(), SCTPAssociation::sendInitAck(), SCTPAssociation::sendShutdown(), SCTPAssociation::sendShutdownAck(), SCTPAssociation::sendShutdownComplete(), SCTP::sendShutdownCompleteFromMain(), and SCTPAssociation::sendToIP().
| virtual void SCTPMessage_Base::setTag | ( | uint32 | tag | ) | [virtual] |
bool SCTPMessage_Base::checksumOk_var [protected] |
Definition at line 126 of file SCTPMessage_m.h.
uint16 SCTPMessage_Base::destPort_var [protected] |
Definition at line 124 of file SCTPMessage_m.h.
uint16 SCTPMessage_Base::srcPort_var [protected] |
Definition at line 123 of file SCTPMessage_m.h.
uint32 SCTPMessage_Base::tag_var [protected] |
Definition at line 125 of file SCTPMessage_m.h.