SCTPReceiveStream.h

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2008 Irene Ruengeler
00003 // Copyright (C) 2010 Thomas Dreibholz
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, see <http://www.gnu.org/licenses/>.
00017 //
00018 
00019 #ifndef __SCTPRECEIVESTREAM_H
00020 #define __SCTPRECEIVESTREAM_H
00021 
00022 #include <omnetpp.h>
00023 #include "SCTPQueue.h"
00024 
00025 
00026 class INET_API SCTPReceiveStream : public cPolymorphic
00027 {
00028   protected:
00029     uint16 streamId;
00030     int32 expectedStreamSeqNum;
00031     SCTPQueue* deliveryQ;
00032     SCTPQueue* orderedQ;
00033     SCTPQueue* unorderedQ;
00034     uint32 reassemble(SCTPQueue* queue, uint32 tsn);
00035   public:
00036     uint32 enqueueNewDataChunk(SCTPDataVariables* dchunk);
00040     SCTPReceiveStream();
00041 
00045     ~SCTPReceiveStream();
00046     inline SCTPQueue* getDeliveryQ() const { return deliveryQ; };
00047     inline SCTPQueue* getOrderedQ() const { return orderedQ; };
00048     inline SCTPQueue* getUnorderedQ() const { return unorderedQ; };
00049     inline int32 getExpectedStreamSeqNum() const { return expectedStreamSeqNum; };
00050     inline int32 getStreamId() const { return streamId; };
00051     inline void setExpectedStreamSeqNum(const int32 num) { expectedStreamSeqNum = num; };
00052     inline void setStreamId(const uint16 id) { streamId = id; };
00053 };
00054 
00055 #endif