INET Framework for OMNeT++/OMNEST
inet::sctp::SctpSendStream Class Reference

#include <SctpSendStream.h>

Inheritance diagram for inet::sctp::SctpSendStream:

Public Member Functions

 SctpSendStream (SctpAssociation *assoc, const uint16_t id)
 
 ~SctpSendStream ()
 
cPacketQueue * getStreamQ () const
 
cPacketQueue * getUnorderedStreamQ () const
 
uint32_t getNextStreamSeqNum ()
 
uint32_t getBytesInFlight () const
 
void setNextStreamSeqNum (const uint16_t num)
 
void setBytesInFlight (const uint32_t bytes)
 
bool getFragInProgress () const
 
void setFragInProgress (const bool frag)
 
uint16_t getStreamId () const
 
void setStreamId (const uint16_t id)
 
void deleteQueue ()
 

Protected Attributes

SctpAssociationassoc
 
uint16_t streamId
 
uint16_t nextStreamSeqNum
 
uint32_t bytesInFlight
 
bool resetRequested
 
bool fragInProgress
 
cPacketQueue * streamQ
 
cPacketQueue * uStreamQ
 

Constructor & Destructor Documentation

◆ SctpSendStream()

inet::sctp::SctpSendStream::SctpSendStream ( SctpAssociation assoc,
const uint16_t  id 
)
17 {
18  assoc = assoc_;
19  streamId = id;
20  nextStreamSeqNum = 0;
21  bytesInFlight = 0;
22  resetRequested = false;
23  fragInProgress = false;
24 
25  char queueName[64];
26  snprintf(queueName, sizeof(queueName), "OrderedSendQueue ID %d", id);
27  streamQ = new cPacketQueue(queueName);
28  snprintf(queueName, sizeof(queueName), "UnorderedSendQueue ID %d", id);
29  uStreamQ = new cPacketQueue(queueName);
30 }

◆ ~SctpSendStream()

inet::sctp::SctpSendStream::~SctpSendStream ( )
33 {
34  deleteQueue();
35 }

Member Function Documentation

◆ deleteQueue()

void inet::sctp::SctpSendStream::deleteQueue ( )
38 {
39  SctpDataMsg *datMsg;
40  SctpSimpleMessage *smsg;
41  int32_t count = streamQ->getLength();
42  while (!streamQ->isEmpty()) {
43  datMsg = check_and_cast<SctpDataMsg *>(streamQ->pop());
44  smsg = check_and_cast<SctpSimpleMessage *>(datMsg->decapsulate());
45  delete smsg;
46  delete datMsg;
47  count--;
48  }
49  while (!uStreamQ->isEmpty()) {
50  datMsg = check_and_cast<SctpDataMsg *>(uStreamQ->pop());
51  smsg = check_and_cast<SctpSimpleMessage *>(datMsg->decapsulate());
52  delete smsg;
53  delete datMsg;
54  }
55  delete streamQ;
56  delete uStreamQ;
57 }

Referenced by ~SctpSendStream().

◆ getBytesInFlight()

uint32_t inet::sctp::SctpSendStream::getBytesInFlight ( ) const
inline

◆ getFragInProgress()

bool inet::sctp::SctpSendStream::getFragInProgress ( ) const
inline
49 { return fragInProgress; };

◆ getNextStreamSeqNum()

uint32_t inet::sctp::SctpSendStream::getNextStreamSeqNum ( )

◆ getStreamId()

uint16_t inet::sctp::SctpSendStream::getStreamId ( ) const
inline
51 { return streamId; };

◆ getStreamQ()

◆ getUnorderedStreamQ()

◆ setBytesInFlight()

void inet::sctp::SctpSendStream::setBytesInFlight ( const uint32_t  bytes)
inline

◆ setFragInProgress()

void inet::sctp::SctpSendStream::setFragInProgress ( const bool  frag)
inline
50 { fragInProgress = frag; }

◆ setNextStreamSeqNum()

void inet::sctp::SctpSendStream::setNextStreamSeqNum ( const uint16_t  num)

◆ setStreamId()

void inet::sctp::SctpSendStream::setStreamId ( const uint16_t  id)
inline
52 { streamId = id; }

Member Data Documentation

◆ assoc

SctpAssociation* inet::sctp::SctpSendStream::assoc
protected

Referenced by SctpSendStream().

◆ bytesInFlight

uint32_t inet::sctp::SctpSendStream::bytesInFlight
protected

Referenced by SctpSendStream().

◆ fragInProgress

bool inet::sctp::SctpSendStream::fragInProgress
protected

Referenced by SctpSendStream().

◆ nextStreamSeqNum

uint16_t inet::sctp::SctpSendStream::nextStreamSeqNum
protected

◆ resetRequested

bool inet::sctp::SctpSendStream::resetRequested
protected

Referenced by SctpSendStream().

◆ streamId

uint16_t inet::sctp::SctpSendStream::streamId
protected

Referenced by SctpSendStream().

◆ streamQ

cPacketQueue* inet::sctp::SctpSendStream::streamQ
protected

Referenced by deleteQueue(), and SctpSendStream().

◆ uStreamQ

cPacketQueue* inet::sctp::SctpSendStream::uStreamQ
protected

Referenced by deleteQueue(), and SctpSendStream().


The documentation for this class was generated from the following files:
inet::sctp::SctpSendStream::assoc
SctpAssociation * assoc
Definition: SctpSendStream.h:29
inet::sctp::SctpSendStream::streamId
uint16_t streamId
Definition: SctpSendStream.h:30
inet::count
int count(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:54
inet::sctp::SctpSendStream::nextStreamSeqNum
uint16_t nextStreamSeqNum
Definition: SctpSendStream.h:31
inet::sctp::SctpSendStream::streamQ
cPacketQueue * streamQ
Definition: SctpSendStream.h:35
inet::sctp::SctpSendStream::deleteQueue
void deleteQueue()
Definition: SctpSendStream.cc:37
inet::sctp::SctpSendStream::fragInProgress
bool fragInProgress
Definition: SctpSendStream.h:34
inet::sctp::SctpSendStream::uStreamQ
cPacketQueue * uStreamQ
Definition: SctpSendStream.h:36
inet::sctp::SctpSendStream::resetRequested
bool resetRequested
Definition: SctpSendStream.h:33
inet::sctp::SctpSendStream::bytesInFlight
uint32_t bytesInFlight
Definition: SctpSendStream.h:32