INET Framework for OMNeT++/OMNEST
|
Class generated from inet/transportlayer/tcp_common/TCPSegment.msg:202
by nedtool.
More...
#include <TCPSegment_m.h>
Public Member Functions | |
virtual | ~TCPSegment_Base () |
virtual TCPSegment_Base * | dup () const override |
virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
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 | setHeaderOptionArraySize (unsigned int size)=0 |
virtual unsigned int | getHeaderOptionArraySize () const =0 |
virtual TCPOptionPtr & | getHeaderOption (unsigned int k)=0 |
virtual const TCPOptionPtr & | getHeaderOption (unsigned int k) const |
virtual void | setHeaderOption (unsigned int k, const TCPOptionPtr &headerOption)=0 |
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 |
virtual ByteArray & | getByteArray () |
virtual const ByteArray & | getByteArray () const |
virtual void | setByteArray (const ByteArray &byteArray) |
Protected Member Functions | |
bool | operator== (const TCPSegment_Base &) |
TCPSegment_Base (const char *name=nullptr, short kind=0) | |
TCPSegment_Base (const TCPSegment_Base &other) | |
TCPSegment_Base & | operator= (const TCPSegment_Base &other) |
Protected Attributes | |
unsigned short | srcPort |
unsigned short | destPort |
unsigned int | sequenceNo |
unsigned int | ackNo |
unsigned short | headerLength |
bool | urgBit |
bool | ackBit |
bool | pshBit |
bool | rstBit |
bool | synBit |
bool | finBit |
unsigned short | window |
unsigned short | urgentPointer |
unsigned long | payloadLength |
ByteArray | byteArray |
Private Member Functions | |
void | copy (const TCPSegment_Base &other) |
Class generated from inet/transportlayer/tcp_common/TCPSegment.msg:202
by nedtool.
// // Represents a TCP segment, to be used with the ~TCP module. // // TCP header fields not explicitly modelled: work on going // - Data Offset (number of 32 bit words in the header): represented // by cMessage::length(). // - Reserved (reserved for future use) // - Checksum (header checksum): modelled by cMessage::hasBitError() // - Header Options: Currently only EOL, NOP, MSS, WS, SACK_PERMITTED, SACK and TS are implemented // - Padding // // cMessage::getKind() may be set to an arbitrary value: TCP entities will // ignore it and use only the header fields (synBit, ackBit, rstBit). // packet TCPSegment { @customize(true);
// Source Port unsigned short srcPort;
// Destination Port unsigned short destPort;
// Sequence Number: first sequence number of the first data octet // in the respective segment (except if SYN is set; then the the // seq. number is the initial seq. number (ISS) and the first data // octet is ISS + 1) unsigned int sequenceNo;
// Acknowledgement Number: if ACK flag is set, this field contains // the next sequence number the sender of this segment is expecting // to receive unsigned int ackNo;
// TCP Header Length - default: 20 bytes // if header options are used the headerLength is greater than 20 bytes (default) unsigned short headerLength = TCP_HEADER_OCTETS; // TCP_HEADER_OCTETS = 20
bool urgBit; // URG: urgent pointer field significant if set bool ackBit; // ACK: ackNo significant if set bool pshBit; // PSH: push function bool rstBit; // RST: reset the connection bool synBit; // SYN: synchronize seq. numbers bool finBit; // FIN: finish - no more data from sender
// Window Size: the number of data octets beginning with the one indicated // in the acknowledgement field which the sender of this segment is // willing to accept unsigned short window;
// Urgent Pointer: communicates the current value of the urgent pointer // as a positive offset from the sequence number in this segment. The // urgent pointer points to the sequence number of the octet following // the urgent data. This field is only be interpreted in segments with // the URG control bit set. unsigned short urgentPointer;
// Header options (optional) // Currently only EOL, NOP, MSS, WS, SACK_PERMITTED, SACK and TS are implemented abstract TCPOptionPtr headerOption[];
// Payload length in octets (not an actual TCP header field). // This may not always be the same as encapsulatedPacket()->getByteLength(); // e.g. when simulating a virtual data stream there's no encapsulated // packet at all. unsigned long payloadLength;
// Message objects (cMessages) that travel in this segment as data. // This field is used only when the ~TCPDataTransferMode is TCP_TRANSFER_OBJECT. // Every message object is put into the TCPSegment that would (in real life) // carry its first octet. That is, if message object 'msg' with length=100 bytes // occupies stream offset number range 10000..10099, it will travel in the // TCPSegment which carries the octet 10000. This way it is easily achieved // that the receiving TCP passes up the message object to its client // when the last byte of the message has arrived. abstract TCPPayloadMessage payload[];
// Message bytes that travel in this segment as data. // This field is used only when the ~TCPDataTransferMode is TCP_TRANSFER_BYTESTREAM. ByteArray byteArray; }
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 INET_API TCPSegment : public TCPSegment_Base { private: void copy(const TCPSegment& other) { ... }
public: TCPSegment(const char *name=nullptr, short 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 override {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)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented in inet::tcp::TCPSegment.
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::PacketDrillApp::compareDatagram(), inet::PacketDrillApp::compareTcpPacket(), inet::tcp::TcpLwipVirtualDataSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCP_NSC_ByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipMsgBasedSendQueue::createSegmentWithBytes(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_lwIP::handleIpInputMessage(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TcpLwipConnection::Stats::recordReceive(), inet::tcp::TcpLwipConnection::Stats::recordSend(), inet::tcp::TCPConnection::segmentArrivalWhileClosed(), inet::tcp::TCP_NSC::sendToIP(), inet::PacketDump::tcpDump(), inet::tcp::TCPConnection::updateWndInfo(), and inet::tcp::TCPConnection::writeHeaderOptions().
|
virtual |
Referenced by inet::PacketDrillApp::compareTcpPacket(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_NSC::handleIpInputMessage(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::isSegmentAcceptable(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::process_RCV_SEGMENT(), inet::tcp::TCPConnection::processAckInEstabEtc(), inet::tcp::TCPConnection::processSACKOption(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TcpLwipConnection::Stats::recordReceive(), inet::tcp::TcpLwipConnection::Stats::recordSend(), inet::PacketDrillApp::runEvent(), inet::tcp::TCPConnection::segmentArrivalWhileClosed(), inet::tcp::TCP_NSC::sendToIP(), inet::tcp::TCPConnection::sendToIP(), inet::PacketDump::tcpDump(), and inet::tcp::TCPConnection::updateWndInfo().
|
virtual |
Referenced by inet::tcp::TCPByteStreamRcvQueue::createRegionFromSegment(), inet::tcp::TCP_NSC_ByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCPByteStreamSendQueue::createSegmentWithBytes(), and inet::serializer::TCPSerializer::deserialize().
|
inlinevirtual |
Referenced by getByteArray().
|
virtual |
Referenced by inet::PacketDrillApp::compareTcpPacket(), inet::tcp::TCP::findConnForSegment(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCPSegment::getDestinationPort(), inet::ExampleQoSClassifier::getUserPriority(), inet::tcp::TCP_NSC::handleIpInputMessage(), inet::tcp::TCP_lwIP::handleIpInputMessage(), inet::MultiFieldClassifier::Filter::matches(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::MPLS::processPacketFromL3(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCPConnection::processTCPSegment(), inet::tcp::TCPConnection::segmentArrivalWhileClosed(), and inet::PacketDump::tcpDump().
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::PacketDrillApp::compareTcpPacket(), inet::tcp::TcpLwipVirtualDataSendQueue::createSegmentWithBytes(), inet::tcp::TCP_NSC_ByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipMsgBasedSendQueue::createSegmentWithBytes(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCP_NSC::sendToIP(), and inet::PacketDump::tcpDump().
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::tcp::TCPConnection::printSegmentBrief(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCPConnection::sendSegment(), inet::tcp::TCPConnection::sendToIP(), and inet::PacketDump::tcpDump().
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
inlinevirtual |
Reimplemented in inet::tcp::TCPSegment.
Referenced by getHeaderOption().
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
inlinevirtual |
Referenced by getPayload().
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
virtual |
Referenced by inet::tcp::TCPByteStreamRcvQueue::createRegionFromSegment(), inet::tcp::TCPVirtualDataRcvQueue::createRegionFromSegment(), inet::tcp::TcpLwipVirtualDataSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCP_NSC_ByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipMsgBasedSendQueue::createSegmentWithBytes(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCPConnection::hasEnoughSpaceForSegmentInReceiveQueue(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::isSegmentAcceptable(), inet::tcp::TCP_lwIP::notifyAboutIncomingSegmentProcessing(), inet::tcp::TcpLwipMsgBasedReceiveQueue::notifyAboutIncomingSegmentProcessing(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processAckInEstabEtc(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCPConnection::sendSegment(), inet::tcp::TCP_NSC::sendToIP(), inet::tcp::TCPConnection::sendToIP(), and inet::PacketDump::tcpDump().
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::PacketDrillApp::compareTcpPacket(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCP_NSC::sendToIP(), and inet::PacketDump::tcpDump().
|
virtual |
Referenced by inet::PacketDrillApp::compareTcpPacket(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCPConnection::segmentArrivalWhileClosed(), inet::tcp::TCP_NSC::sendToIP(), and inet::PacketDump::tcpDump().
|
virtual |
Referenced by inet::PacketDrillApp::compareDatagram(), inet::PacketDrillApp::compareTcpPacket(), inet::tcp::TCPByteStreamRcvQueue::createRegionFromSegment(), inet::tcp::TCPVirtualDataRcvQueue::createRegionFromSegment(), inet::tcp::TcpLwipMsgBasedSendQueue::createSegmentWithBytes(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_NSC::handleIpInputMessage(), inet::tcp::TCPConnection::hasEnoughSpaceForSegmentInReceiveQueue(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::isSegmentAcceptable(), inet::tcp::TcpLwipMsgBasedReceiveQueue::notifyAboutIncomingSegmentProcessing(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::process_RCV_SEGMENT(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCPConnection::processTSOption(), inet::tcp::TcpLwipConnection::Stats::recordReceive(), inet::tcp::TcpLwipConnection::Stats::recordSend(), inet::tcp::TCPConnection::segmentArrivalWhileClosed(), inet::tcp::TCP_NSC::sendToIP(), inet::tcp::TCPConnection::sendToIP(), inet::PacketDump::tcpDump(), and inet::tcp::TCPConnection::updateWndInfo().
|
virtual |
Referenced by inet::PacketDrillApp::compareTcpPacket(), inet::tcp::TCP::findConnForSegment(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCPSegment::getSourcePort(), inet::ExampleQoSClassifier::getUserPriority(), inet::tcp::TCP_NSC::handleIpInputMessage(), inet::tcp::TCP_lwIP::handleIpInputMessage(), inet::MultiFieldClassifier::Filter::matches(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::MPLS::processPacketFromL3(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCPConnection::processTCPSegment(), inet::tcp::TCPConnection::segmentArrivalWhileClosed(), and inet::PacketDump::tcpDump().
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::PacketDrillApp::compareDatagram(), inet::PacketDrillApp::compareTcpPacket(), inet::tcp::TcpLwipVirtualDataSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCP_NSC_ByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipMsgBasedSendQueue::createSegmentWithBytes(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_lwIP::handleIpInputMessage(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCP_NSC::sendToIP(), inet::PacketDump::tcpDump(), inet::tcp::TCPConnection::updateWndInfo(), and inet::tcp::TCPConnection::writeHeaderOptions().
|
virtual |
Referenced by inet::PacketDrillApp::compareTcpPacket(), inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCP_lwIP::ip_output(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPConnection::processSegmentInListen(), inet::tcp::TCPConnection::processSegmentInSynSent(), inet::tcp::TCP_NSC::sendToIP(), and inet::PacketDump::tcpDump().
|
virtual |
|
virtual |
Referenced by inet::InetPacketPrinter2::formatTCPPacket(), inet::tcp::TCPConnection::printSegmentBrief(), inet::InetPacketPrinter::printTCPPacket(), inet::tcp::TcpLwipConnection::Stats::recordReceive(), inet::tcp::TcpLwipConnection::Stats::recordSend(), inet::PacketDump::tcpDump(), and inet::tcp::TCPConnection::updateWndInfo().
|
protected |
Referenced by inet::tcp::TCPSegment::operator=().
|
protected |
|
overridevirtual |
Referenced by inet::tcp::TCPSegment::parsimPack().
|
overridevirtual |
Referenced by inet::tcp::TCPSegment::parsimUnpack().
|
virtual |
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::serializer::TCPSerializer::deserialize(), inet::PacketDrillApp::runEvent(), inet::tcp::TCPConnection::sendAck(), inet::tcp::TCPConnection::sendFin(), inet::tcp::TCPConnection::sendRstAck(), inet::tcp::TCPConnection::sendSegment(), and inet::tcp::TCPConnection::sendSynAck().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
pure virtual |
Implemented in inet::tcp::TCPSegment.
|
virtual |
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), and inet::serializer::TCPSerializer::deserialize().
|
virtual |
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::tcp::TCPByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCPVirtualDataSendQueue::createSegmentWithBytes(), inet::tcp::TCPMsgBasedSendQueue::createSegmentWithBytes(), inet::serializer::TCPSerializer::deserialize(), inet::tcp::TCPConnection::sendAck(), inet::tcp::TCPConnection::sendFin(), inet::tcp::TCPConnection::sendRst(), inet::tcp::TCPConnection::sendRstAck(), inet::tcp::TCPSpoof::sendSpoofPacket(), inet::tcp::TCPConnection::sendSyn(), and inet::tcp::TCPConnection::sendSynAck().
|
virtual |
|
virtual |
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), and inet::serializer::TCPSerializer::deserialize().
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), and inet::serializer::TCPSerializer::deserialize().
|
virtual |
Referenced by PacketDrill::buildTCPPacket(), inet::serializer::TCPSerializer::deserialize(), inet::tcp::TCPConnection::sendAck(), inet::tcp::TCPConnection::sendFin(), inet::tcp::TCPConnection::sendSegment(), inet::tcp::TCPSpoof::sendSpoofPacket(), inet::tcp::TCPConnection::sendSyn(), and inet::tcp::TCPConnection::sendSynAck().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |