INET Framework for OMNeT++/OMNEST
inet::tcp::Sack Class Reference

#include <TCPSegment.h>

Inheritance diagram for inet::tcp::Sack:
inet::tcp::Sack_Base inet::tcp::SackItem

Public Member Functions

 Sack ()
 
 Sack (unsigned int start_par, unsigned int end_par)
 
 Sack (const Sack &other)
 
Sackoperator= (const Sack &other)
 
virtual Sackdup () const override
 
virtual bool empty () const
 
virtual bool contains (const Sack &other) const
 
virtual void clear ()
 
virtual void setSegment (unsigned int start_par, unsigned int end_par)
 
virtual std::string str () const override
 
- Public Member Functions inherited from inet::tcp::Sack_Base
virtual ~Sack_Base ()
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
- Public Member Functions inherited from inet::tcp::SackItem
 SackItem ()
 
 SackItem (const SackItem &other)
 
virtual ~SackItem ()
 
SackItemoperator= (const SackItem &other)
 
virtual unsigned int getStart () const
 
virtual void setStart (unsigned int start)
 
virtual unsigned int getEnd () const
 
virtual void setEnd (unsigned int end)
 

Additional Inherited Members

- Protected Member Functions inherited from inet::tcp::Sack_Base
bool operator== (const Sack_Base &)
 
 Sack_Base ()
 
 Sack_Base (const Sack_Base &other)
 
Sack_Baseoperator= (const Sack_Base &other)
 
- Protected Member Functions inherited from inet::tcp::SackItem
bool operator== (const SackItem &)
 
- Protected Attributes inherited from inet::tcp::SackItem
unsigned int start
 
unsigned int end
 

Constructor & Destructor Documentation

inet::tcp::Sack::Sack ( )
inline
inet::tcp::Sack::Sack ( unsigned int  start_par,
unsigned int  end_par 
)
inline
44 { setSegment(start_par, end_par); }
virtual void setSegment(unsigned int start_par, unsigned int end_par)
Definition: TCPSegment.cc:41
inet::tcp::Sack::Sack ( const Sack other)
inline
45 : Sack_Base(other) {}

Member Function Documentation

void inet::tcp::Sack::clear ( )
virtual
37 {
38  start = end = 0;
39 }
unsigned int end
Definition: TCPSegment_m.h:138
unsigned int start
Definition: TCPSegment_m.h:137
bool inet::tcp::Sack::contains ( const Sack other) const
virtual
32 {
33  return seqLE(start, other.start) && seqLE(other.end, end);
34 }
unsigned int end
Definition: TCPSegment_m.h:138
bool seqLE(uint32 a, uint32 b)
Definition: TCPSegment.h:33
unsigned int start
Definition: TCPSegment_m.h:137
virtual Sack* inet::tcp::Sack::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::tcp::Sack_Base.

47 { return new Sack(*this); }
Sack()
Definition: TCPSegment.h:43
bool inet::tcp::Sack::empty ( ) const
virtual
27 {
28  return start == 0 && end == 0;
29 }
unsigned int end
Definition: TCPSegment_m.h:138
unsigned int start
Definition: TCPSegment_m.h:137
Sack& inet::tcp::Sack::operator= ( const Sack other)
inline
46 { Sack_Base::operator=(other); return *this; }
Sack_Base & operator=(const Sack_Base &other)
void inet::tcp::Sack::setSegment ( unsigned int  start_par,
unsigned int  end_par 
)
virtual
42 {
43  setStart(start_par);
44  setEnd(end_par);
45 }
virtual void setEnd(unsigned int end)
virtual void setStart(unsigned int start)
std::string inet::tcp::Sack::str ( ) const
overridevirtual

Referenced by inet::tcp::TCPConnection::addSacks(), and inet::tcp::TCPConnection::processSACKOption().

48 {
49  std::stringstream out;
50 
51  out << "[" << start << ".." << end << ")";
52  return out.str();
53 }
unsigned int end
Definition: TCPSegment_m.h:138
unsigned int start
Definition: TCPSegment_m.h:137

The documentation for this class was generated from the following files: