Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __INET_TCP_NSC_QUEUES_H
00020 #define __INET_TCP_NSC_QUEUES_H
00021
00022 #include <omnetpp.h>
00023
00024 #include "TCPSegment.h"
00025
00026
00027 class TCP_NSC_Connection;
00028
00082 class INET_API TCP_NSC_SendQueue : public cPolymorphic
00083 {
00084 public:
00088 TCP_NSC_SendQueue() : connM(NULL) {}
00089
00093 virtual ~TCP_NSC_SendQueue() {}
00094
00098 virtual void setConnection(TCP_NSC_Connection *connP) {connM = connP; }
00099
00108 virtual void enqueueAppData(cPacket *msgP) = 0;
00109
00117 virtual int getNscMsg(void* bufferP, int bufferLengthP) = 0;
00118
00127 virtual void dequeueNscMsg(int msgLengthP) = 0;
00128
00132 virtual ulong getBytesAvailable() = 0;
00133
00144 virtual TCPSegment * createSegmentWithBytes(const void* tcpDataP, int tcpLengthP) = 0;
00145
00150 virtual void discardUpTo(uint32 seqNumP) = 0;
00151
00152 protected:
00153 TCP_NSC_Connection *connM;
00154 };
00155
00156 class INET_API TCP_NSC_ReceiveQueue : public cPolymorphic
00157 {
00158 public:
00162 TCP_NSC_ReceiveQueue() : connM(NULL) {};
00163
00167 virtual ~TCP_NSC_ReceiveQueue() {}
00168
00172 virtual void setConnection(TCP_NSC_Connection *connP) { connM = connP; }
00173
00185 virtual uint32 insertBytesFromSegment(const TCPSegment *tcpsegP, void* bufferP, size_t bufferLengthP) = 0;
00186
00192 virtual void enqueueNscData(void* dataP, int dataLengthP) = 0;
00193
00202 virtual cPacket *extractBytesUpTo() = 0;
00203
00207 virtual uint32 getAmountOfBufferedBytes() = 0;
00208
00212 virtual uint32 getQueueLength() = 0;
00213
00217 virtual void getQueueStatus() = 0;
00218
00225 virtual void notifyAboutSending(const TCPSegment *tcpsegP) = 0;
00226
00227 protected:
00228 TCP_NSC_Connection *connM;
00229 };
00230
00231 #endif