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 __SCTPQUEUE_H
00020 #define __SCTPQUEUE_H
00021
00022 #include <omnetpp.h>
00023 #include "INETDefs.h"
00024 #include "IPvXAddress.h"
00025 #include "SCTP.h"
00026
00027
00028 class SCTPDataVariables;
00029 class SCTPAssociation;
00030
00031
00049 class INET_API SCTPQueue : public cPolymorphic
00050 {
00051 public:
00055 SCTPQueue();
00056
00060 ~SCTPQueue();
00061
00062 bool checkAndInsertChunk(const uint32 key, SCTPDataVariables* chunk);
00063
00064
00065 SCTPDataVariables* getAndExtractChunk(const uint32 tsn);
00066 SCTPDataVariables* extractMessage();
00067
00068 void printQueue() const;
00069
00070 uint32 getQueueSize() const;
00071
00072 SCTPDataVariables* getFirstChunk() const;
00073
00074 cMessage* getMsg(const uint32 key) const;
00075
00076 SCTPDataVariables* getChunk(const uint32 key) const;
00077
00078 SCTPDataVariables* getChunkFast(const uint32 tsn, bool& firstTime);
00079
00080 void removeMsg(const uint32 key);
00081
00082 bool deleteMsg(const uint32 tsn);
00083
00084 int32 getNumBytes() const;
00085
00086 SCTPDataVariables* dequeueChunkBySSN(const uint16 ssn);
00087
00088
00089 public:
00090 typedef std::map<uint32, SCTPDataVariables*> PayloadQueue;
00091 PayloadQueue payloadQueue;
00092
00093 protected:
00094 SCTPAssociation* assoc;
00095
00096 private:
00097 PayloadQueue::iterator GetChunkFastIterator;
00098 };
00099
00100 #endif