|
INET Framework for OMNeT++/OMNEST
|
#include <TCPSegment_m.h>
Public Member Functions | |
| virtual | ~TCPSegment_Base () |
| virtual TCPSegment_Base * | dup () const |
| virtual void | parsimPack (cCommBuffer *b) |
| virtual void | parsimUnpack (cCommBuffer *b) |
| virtual unsigned short | getSrcPort () const |
| virtual void | setSrcPort (unsigned short srcPort) |
| virtual unsigned short | getDestPort () const |
| virtual void | setDestPort (unsigned short destPort) |
| virtual unsigned int | getSequenceNo () const |
| virtual void | setSequenceNo (unsigned int sequenceNo) |
| virtual unsigned int | getAckNo () const |
| virtual void | setAckNo (unsigned int ackNo) |
| virtual unsigned short | getHeaderLength () const |
| virtual void | setHeaderLength (unsigned short headerLength) |
| virtual bool | getUrgBit () const |
| virtual void | setUrgBit (bool urgBit) |
| virtual bool | getAckBit () const |
| virtual void | setAckBit (bool ackBit) |
| virtual bool | getPshBit () const |
| virtual void | setPshBit (bool pshBit) |
| virtual bool | getRstBit () const |
| virtual void | setRstBit (bool rstBit) |
| virtual bool | getSynBit () const |
| virtual void | setSynBit (bool synBit) |
| virtual bool | getFinBit () const |
| virtual void | setFinBit (bool finBit) |
| virtual unsigned short | getWindow () const |
| virtual void | setWindow (unsigned short window) |
| virtual unsigned short | getUrgentPointer () const |
| virtual void | setUrgentPointer (unsigned short urgentPointer) |
| virtual void | setOptionsArraySize (unsigned int size) |
| virtual unsigned int | getOptionsArraySize () const |
| virtual TCPOption & | getOptions (unsigned int k) |
| virtual const TCPOption & | getOptions (unsigned int k) const |
| virtual void | setOptions (unsigned int k, const TCPOption &options) |
| virtual unsigned long | getPayloadLength () const |
| virtual void | setPayloadLength (unsigned long payloadLength) |
| virtual void | setPayloadArraySize (unsigned int size)=0 |
| virtual unsigned int | getPayloadArraySize () const =0 |
| virtual TCPPayloadMessage & | getPayload (unsigned int k)=0 |
| virtual const TCPPayloadMessage & | getPayload (unsigned int k) const |
| virtual void | setPayload (unsigned int k, const TCPPayloadMessage &payload)=0 |
Protected Member Functions | |
| bool | operator== (const TCPSegment_Base &) |
| TCPSegment_Base (const char *name=NULL, int kind=0) | |
| TCPSegment_Base (const TCPSegment_Base &other) | |
| TCPSegment_Base & | operator= (const TCPSegment_Base &other) |
Protected Attributes | |
| unsigned short | srcPort_var |
| unsigned short | destPort_var |
| unsigned int | sequenceNo_var |
| unsigned int | ackNo_var |
| unsigned short | headerLength_var |
| bool | urgBit_var |
| bool | ackBit_var |
| bool | pshBit_var |
| bool | rstBit_var |
| bool | synBit_var |
| bool | finBit_var |
| unsigned short | window_var |
| unsigned short | urgentPointer_var |
| TCPOption * | options_var |
| unsigned int | options_arraysize |
| unsigned long | payloadLength_var |
Private Member Functions | |
| void | copy (const TCPSegment_Base &other) |
Class generated from transport/tcp/TCPSegment.msg by opp_msgc.
packet TCPSegment { (true);
unsigned short srcPort;
unsigned short destPort;
unsigned int sequenceNo;
unsigned int ackNo;
unsigned short headerLength = TCP_HEADER_OCTETS;
bool urgBit;
bool ackBit;
bool pshBit;
bool rstBit;
bool synBit;
bool finBit;unsigned short window;
unsigned short urgentPointer;
TCPOption options[];
unsigned long payloadLength;
abstract TCPPayloadMessage payload[]; }
TCPSegment_Base is only useful if it gets subclassed, and TCPSegment is derived from it. The minimum code to be written for TCPSegment is the following:
class TCPSegment : public TCPSegment_Base { private: void copy(const TCPSegment& other) { ... }
public:
TCPSegment(const char *name=NULL, int kind=0) : TCPSegment_Base(name,kind) {}
TCPSegment(const TCPSegment& other) : TCPSegment_Base(other) {copy(other);}
TCPSegment& operator=(const TCPSegment& other) {if (this==&other) return *this; TCPSegment_Base::operator=(other); copy(other); return *this;}
virtual TCPSegment *dup() const {return new TCPSegment(*this);}
// ADD CODE HERE to redefine and implement pure virtual functions from TCPSegment_Base
};
The following should go into a .cc (.cpp) file:
Register_Class(TCPSegment);
Definition at line 290 of file TCPSegment_m.h.
| TCPSegment_Base::TCPSegment_Base | ( | const char * | name = NULL, |
| int | kind = 0 |
||
| ) | [protected] |
| TCPSegment_Base::TCPSegment_Base | ( | const TCPSegment_Base & | other | ) | [protected] |
| virtual TCPSegment_Base::~TCPSegment_Base | ( | ) | [virtual] |
| void TCPSegment_Base::copy | ( | const TCPSegment_Base & | other | ) | [private] |
| virtual TCPSegment_Base* TCPSegment_Base::dup | ( | ) | const [inline, virtual] |
Reimplemented in TCPSegment.
Definition at line 324 of file TCPSegment_m.h.
{throw cRuntimeError("You forgot to manually add a dup() function to class TCPSegment");}
| virtual bool TCPSegment_Base::getAckBit | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), TCPSerializer::serialize(), TCPDumper::tcpDump(), TCPConnection::updateWndInfo(), and TCPConnection::writeHeaderOptions().
| virtual unsigned int TCPSegment_Base::getAckNo | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::process_RCV_SEGMENT(), TCPConnection::process_RCV_SEGMENT(), tcp_old::TCPConnection::processAckInEstabEtc(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSACKOption(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), tcp_old::TCPConnection::sendToIP(), TCPConnection::sendToIP(), TCPSerializer::serialize(), TCPDumper::tcpDump(), and TCPConnection::updateWndInfo().
| virtual unsigned short TCPSegment_Base::getDestPort | ( | ) | const [virtual] |
Referenced by WeightedFairQueue::enqueue(), TCP::findConnForSegment(), tcp_old::TCP::findConnForSegment(), DscpTtlCorrector::handleMessage(), ANSAQOS::Flow::parseFromMsg(), tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), acl::processPacket(), AclContainer::processPacket(), MPLS::processPacketFromL3(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), tcp_old::TCPConnection::processTCPSegment(), TCPConnection::processTCPSegment(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual bool TCPSegment_Base::getFinBit | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual unsigned short TCPSegment_Base::getHeaderLength | ( | ) | const [virtual] |
Referenced by TCPSerializer::parse(), TCPConnection::printSegmentBrief(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInSynSent(), TCPConnection::sendSegment(), TCPConnection::sendToIP(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual TCPOption& TCPSegment_Base::getOptions | ( | unsigned int | k | ) | [virtual] |
| virtual const TCPOption& TCPSegment_Base::getOptions | ( | unsigned int | k | ) | const [inline, virtual] |
Definition at line 358 of file TCPSegment_m.h.
Referenced by getOptions().
{return const_cast<TCPSegment_Base*>(this)->getOptions(k);}
| virtual unsigned int TCPSegment_Base::getOptionsArraySize | ( | ) | const [virtual] |
Referenced by TCPConnection::addSacks(), TCPConnection::getTSecr(), TCPConnection::getTSval(), TCPSerializer::parse(), TCPConnection::printSegmentBrief(), TCPConnection::readHeaderOptions(), TCPConnection::sendSegment(), TCPSerializer::serialize(), TCPDumper::tcpDump(), and TCPConnection::writeHeaderOptions().
| virtual TCPPayloadMessage& TCPSegment_Base::getPayload | ( | unsigned int | k | ) | [pure virtual] |
Implemented in TCPSegment.
| virtual const TCPPayloadMessage& TCPSegment_Base::getPayload | ( | unsigned int | k | ) | const [inline, virtual] |
Definition at line 365 of file TCPSegment_m.h.
Referenced by getPayload().
{return const_cast<TCPSegment_Base*>(this)->getPayload(k);}
| virtual unsigned int TCPSegment_Base::getPayloadArraySize | ( | ) | const [pure virtual] |
Implemented in TCPSegment.
| virtual unsigned long TCPSegment_Base::getPayloadLength | ( | ) | const [virtual] |
Referenced by TCPVirtualDataRcvQueue::insertBytesFromSegment(), tcp_old::TCPVirtualDataRcvQueue::insertBytesFromSegment(), tcp_old::TCPConnection::isSegmentAcceptable(), TCPConnection::isSegmentAcceptable(), tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processAckInEstabEtc(), TCPConnection::processAckInEstabEtc(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), tcp_old::TCPConnection::sendSegment(), TCPConnection::sendSegment(), tcp_old::TCPConnection::sendToIP(), TCPConnection::sendToIP(), and TCPDumper::tcpDump().
| virtual bool TCPSegment_Base::getPshBit | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual bool TCPSegment_Base::getRstBit | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual unsigned int TCPSegment_Base::getSequenceNo | ( | ) | const [virtual] |
Referenced by TCPVirtualDataRcvQueue::insertBytesFromSegment(), tcp_old::TCPVirtualDataRcvQueue::insertBytesFromSegment(), tcp_old::TCPConnection::isSegmentAcceptable(), TCPConnection::isSegmentAcceptable(), tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::process_RCV_SEGMENT(), TCPConnection::process_RCV_SEGMENT(), tcp_old::TCPConnection::processAckInEstabEtc(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), TCPConnection::processTSOption(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), tcp_old::TCPConnection::sendToIP(), TCPConnection::sendToIP(), TCPSerializer::serialize(), TCPDumper::tcpDump(), and TCPConnection::updateWndInfo().
| virtual unsigned short TCPSegment_Base::getSrcPort | ( | ) | const [virtual] |
Referenced by WeightedFairQueue::enqueue(), TCP::findConnForSegment(), tcp_old::TCP::findConnForSegment(), DscpTtlCorrector::handleMessage(), ANSAQOS::Flow::parseFromMsg(), tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), acl::processPacket(), AclContainer::processPacket(), MPLS::processPacketFromL3(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), tcp_old::TCPConnection::processTCPSegment(), TCPConnection::processTCPSegment(), tcp_old::TCPConnection::segmentArrivalWhileClosed(), TCPConnection::segmentArrivalWhileClosed(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual bool TCPSegment_Base::getSynBit | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), TCPSerializer::serialize(), TCPDumper::tcpDump(), TCPConnection::updateWndInfo(), and TCPConnection::writeHeaderOptions().
| virtual bool TCPSegment_Base::getUrgBit | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processSegment1stThru8th(), TCPConnection::processSegment1stThru8th(), tcp_old::TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPConnection::processSegmentInSynSent(), TCPSerializer::serialize(), and TCPDumper::tcpDump().
| virtual unsigned short TCPSegment_Base::getUrgentPointer | ( | ) | const [virtual] |
| virtual unsigned short TCPSegment_Base::getWindow | ( | ) | const [virtual] |
Referenced by tcp_old::TCPConnection::printSegmentBrief(), TCPConnection::printSegmentBrief(), tcp_old::TCPConnection::processAckInEstabEtc(), tcp_old::TCPConnection::processSegmentInListen(), tcp_old::TCPConnection::processSegmentInSynSent(), TCPSerializer::serialize(), TCPDumper::tcpDump(), and TCPConnection::updateWndInfo().
| TCPSegment_Base& TCPSegment_Base::operator= | ( | const TCPSegment_Base & | other | ) | [protected] |
Referenced by TCPSegment::TCPSegment().
| bool TCPSegment_Base::operator== | ( | const TCPSegment_Base & | ) | [protected] |
| virtual void TCPSegment_Base::parsimPack | ( | cCommBuffer * | b | ) | [virtual] |
Reimplemented in TCPSegment.
| virtual void TCPSegment_Base::parsimUnpack | ( | cCommBuffer * | b | ) | [virtual] |
Reimplemented in TCPSegment.
| virtual void TCPSegment_Base::setAckBit | ( | bool | ackBit | ) | [virtual] |
Referenced by TCPSerializer::parse(), tcp_old::TCPConnection::sendAck(), TCPConnection::sendAck(), tcp_old::TCPConnection::sendFin(), TCPConnection::sendFin(), tcp_old::TCPConnection::sendRstAck(), TCPConnection::sendRstAck(), tcp_old::TCPConnection::sendSegment(), TCPConnection::sendSegment(), tcp_old::TCPConnection::sendSynAck(), and TCPConnection::sendSynAck().
| virtual void TCPSegment_Base::setAckNo | ( | unsigned int | ackNo | ) | [virtual] |
Referenced by TCPSerializer::parse(), tcp_old::TCPConnection::sendAck(), TCPConnection::sendAck(), tcp_old::TCPConnection::sendFin(), TCPConnection::sendFin(), tcp_old::TCPConnection::sendRstAck(), TCPConnection::sendRstAck(), tcp_old::TCPConnection::sendSegment(), TCPConnection::sendSegment(), tcp_old::TCPConnection::sendSynAck(), and TCPConnection::sendSynAck().
| virtual void TCPSegment_Base::setDestPort | ( | unsigned short | destPort | ) | [virtual] |
| virtual void TCPSegment_Base::setFinBit | ( | bool | finBit | ) | [virtual] |
| virtual void TCPSegment_Base::setHeaderLength | ( | unsigned short | headerLength | ) | [virtual] |
Referenced by TCPSerializer::parse(), TCPConnection::sendSegment(), and TCPConnection::writeHeaderOptions().
| virtual void TCPSegment_Base::setOptions | ( | unsigned int | k, |
| const TCPOption & | options | ||
| ) | [virtual] |
| virtual void TCPSegment_Base::setOptionsArraySize | ( | unsigned int | size | ) | [virtual] |
| virtual void TCPSegment_Base::setPayload | ( | unsigned int | k, |
| const TCPPayloadMessage & | payload | ||
| ) | [pure virtual] |
Implemented in TCPSegment.
| virtual void TCPSegment_Base::setPayloadArraySize | ( | unsigned int | size | ) | [pure virtual] |
Implemented in TCPSegment.
| virtual void TCPSegment_Base::setPayloadLength | ( | unsigned long | payloadLength | ) | [virtual] |
| virtual void TCPSegment_Base::setPshBit | ( | bool | pshBit | ) | [virtual] |
Referenced by TCPSerializer::parse().
| virtual void TCPSegment_Base::setRstBit | ( | bool | rstBit | ) | [virtual] |
| virtual void TCPSegment_Base::setSequenceNo | ( | unsigned int | sequenceNo | ) | [virtual] |
Referenced by TCPVirtualDataSendQueue::createSegmentWithBytes(), tcp_old::TCPVirtualDataSendQueue::createSegmentWithBytes(), TCPMsgBasedSendQueue::createSegmentWithBytes(), tcp_old::TCPMsgBasedSendQueue::createSegmentWithBytes(), TCPSerializer::parse(), tcp_old::TCPConnection::sendAck(), TCPConnection::sendAck(), tcp_old::TCPConnection::sendFin(), TCPConnection::sendFin(), tcp_old::TCPConnection::sendRst(), TCPConnection::sendRst(), tcp_old::TCPConnection::sendRstAck(), TCPConnection::sendRstAck(), TCPSpoof::sendSpoofPacket(), tcp_old::TCPConnection::sendSyn(), TCPConnection::sendSyn(), tcp_old::TCPConnection::sendSynAck(), and TCPConnection::sendSynAck().
| virtual void TCPSegment_Base::setSrcPort | ( | unsigned short | srcPort | ) | [virtual] |
| virtual void TCPSegment_Base::setSynBit | ( | bool | synBit | ) | [virtual] |
| virtual void TCPSegment_Base::setUrgBit | ( | bool | urgBit | ) | [virtual] |
Referenced by TCPSerializer::parse().
| virtual void TCPSegment_Base::setUrgentPointer | ( | unsigned short | urgentPointer | ) | [virtual] |
Referenced by TCPSerializer::parse().
| virtual void TCPSegment_Base::setWindow | ( | unsigned short | window | ) | [virtual] |
Referenced by TCPSerializer::parse(), tcp_old::TCPConnection::sendAck(), TCPConnection::sendAck(), tcp_old::TCPConnection::sendFin(), TCPConnection::sendFin(), tcp_old::TCPConnection::sendSegment(), TCPConnection::sendSegment(), TCPSpoof::sendSpoofPacket(), tcp_old::TCPConnection::sendSyn(), TCPConnection::sendSyn(), tcp_old::TCPConnection::sendSynAck(), and TCPConnection::sendSynAck().
bool TCPSegment_Base::ackBit_var [protected] |
Definition at line 299 of file TCPSegment_m.h.
unsigned int TCPSegment_Base::ackNo_var [protected] |
Definition at line 296 of file TCPSegment_m.h.
unsigned short TCPSegment_Base::destPort_var [protected] |
Definition at line 294 of file TCPSegment_m.h.
bool TCPSegment_Base::finBit_var [protected] |
Definition at line 303 of file TCPSegment_m.h.
unsigned short TCPSegment_Base::headerLength_var [protected] |
Definition at line 297 of file TCPSegment_m.h.
unsigned int TCPSegment_Base::options_arraysize [protected] |
Definition at line 307 of file TCPSegment_m.h.
TCPOption* TCPSegment_Base::options_var [protected] |
Definition at line 306 of file TCPSegment_m.h.
unsigned long TCPSegment_Base::payloadLength_var [protected] |
Definition at line 308 of file TCPSegment_m.h.
Referenced by TCPSegment::truncateSegment().
bool TCPSegment_Base::pshBit_var [protected] |
Definition at line 300 of file TCPSegment_m.h.
bool TCPSegment_Base::rstBit_var [protected] |
Definition at line 301 of file TCPSegment_m.h.
unsigned int TCPSegment_Base::sequenceNo_var [protected] |
Definition at line 295 of file TCPSegment_m.h.
Referenced by TCPSegment::truncateSegment().
unsigned short TCPSegment_Base::srcPort_var [protected] |
Definition at line 293 of file TCPSegment_m.h.
bool TCPSegment_Base::synBit_var [protected] |
Definition at line 302 of file TCPSegment_m.h.
bool TCPSegment_Base::urgBit_var [protected] |
Definition at line 298 of file TCPSegment_m.h.
unsigned short TCPSegment_Base::urgentPointer_var [protected] |
Definition at line 305 of file TCPSegment_m.h.
unsigned short TCPSegment_Base::window_var [protected] |
Definition at line 304 of file TCPSegment_m.h.