IT++ Logo
tcp.h
Go to the documentation of this file.
1
32#ifndef TCP_H
33#define TCP_H
34
35#include <itpp/base/vec.h>
36
37#if (defined(_MSC_VER) && defined(ITPP_SHARED_LIB) && !(defined(itpp_EXPORTS) || defined(itpp_debug_EXPORTS)))
38
39#ifndef ITPP_PROTOCOL_EXCLUDED
40#define ITPP_PROTOCOL_EXCLUDED
41#pragma message( "PROTOCOL definitions are not available for MSVC shared builds" )
42#endif
43
44#else
45
49
50
51namespace itpp
52{
53
55
56
72{
73public:
79 Sequence_Number &operator=(const Sequence_Number &n) { seq = n.seq; return *this; }
81 Sequence_Number &operator=(const int &rep) { seq = rep; return *this; }
82
83 //relational operators
85 bool operator==(const Sequence_Number &n) const { return seq == n.seq; }
87 bool operator!=(const Sequence_Number &n) const { return seq != n.seq; }
89 bool operator>(const Sequence_Number &n) const { return (seq - n.seq) > 0; }
91 bool operator>=(const Sequence_Number &n) const { return (seq - n.seq) >= 0; }
93 bool operator<(const Sequence_Number &n) const { return (seq - n.seq) < 0; }
95 bool operator<=(const Sequence_Number &n) const { return (seq - n.seq) <= 0; }
96
97 //addition and subtraction
99 Sequence_Number operator+(const int n) const { return Sequence_Number(seq + n); }
101 Sequence_Number &operator+=(const int n) { seq += n; return *this; }
103 Sequence_Number operator-(const int n) const { return Sequence_Number(seq - n); }
105 Sequence_Number &operator-=(const int n) { seq -= n; return *this; }
107 int operator-(const Sequence_Number &n) const { return seq - n.seq; }
108
110 int value() const { return seq; }
111
113 friend Sequence_Number operator+(const int n1, const Sequence_Number &n2) { return Sequence_Number(n1 + n2.seq); }
115 friend std::ostream &operator<<(std::ostream &os, const Sequence_Number &n) { os << n.seq; return os; }
116
117protected:
119 Sequence_Number(int n) : seq(n) {}
121 int seq;
122};
123
125inline const Sequence_Number & min(const Sequence_Number &n1, const Sequence_Number &n2) { return (n1 < n2) ? n1 : n2; }
127inline const Sequence_Number & max(const Sequence_Number &n1, const Sequence_Number &n2) { return (n1 > n2) ? n1 : n2; }
128
129
130
146{
147public:
151 TCP_Segment(const Sequence_Number &sn_begin, const Sequence_Number &sn_end);
153 TCP_Segment(const TCP_Segment &segment);
154
155 //modification
159 void set_begin(const Sequence_Number &sn);
161 void set_end(const Sequence_Number &sn);
163 void combine(const TCP_Segment &segment);
164
165 //query
167 bool operator==(const TCP_Segment &segment) const;
169 bool operator!=(const TCP_Segment &segment) const;
171 bool can_be_combined(const TCP_Segment &segment) const;
173 bool is_contained(const TCP_Segment &segment) const;
175 unsigned length() const;
177 Sequence_Number begin() const { return seq_begin; }
179 Sequence_Number end() const { return seq_end; }
180
182 friend std::ostream & operator<<(std::ostream &os, const TCP_Segment &segment);
183
184protected:
187};
188
189
212{
213public:
217 TCP_Packet(const TCP_Packet &packet);
219 virtual ~TCP_Packet();
221 virtual TCP_Packet &clone() const;
222
223 //TCP window mechanism
225 void set_segment(const TCP_Segment &seg) { fSegment = seg; }
227 TCP_Segment get_segment() const { return fSegment; }
229 void set_wnd(unsigned val) { fWnd = val; }
231 unsigned get_wnd() const { return fWnd; }
233 void set_ACK(Sequence_Number val) { fACK = val; }
235 Sequence_Number get_ACK() const { return fACK; }
236
237 //session control
239 void set_session_id(int val) { fSessionId = val; }
241 int get_session_id() const { return fSessionId; }
242
243 //debugging support
245 void set_destination_port(unsigned val) { fDestinationPort = val; }
247 unsigned get_destination_port() const { return fDestinationPort; }
249 void set_source_port(unsigned val) { fSourcePort = val; }
251 unsigned get_source_port() const { return fSourcePort; }
253 void set_info(unsigned ssThresh, unsigned recWnd, unsigned cWnd, double estRTT, Sequence_Number sndUna, Sequence_Number sndNxt, bool isRtx);
255 virtual void print_header(std::ostream &) const;
256
257protected:
261 unsigned fSourcePort;
262
265 unsigned fWnd;
268 //Tracing
269
280
283
285 friend std::ostream & operator<<(std::ostream &, TCP_Packet &);
286};
287
288
324{
325public:
327 TCP_Sender(int label);
328
330 virtual ~TCP_Sender();
331
332 //connection control
334 virtual void setup();
336 virtual void release(std::string trace_filename = "");
337
339 virtual void print_item(std::ostream &, const std::string &);
340
342 virtual void set_debug(const bool enable_debug = true);
344 virtual void set_debug(bool enable_debug, bool enable_signal_debug);
346 virtual void set_trace(const bool enable_trace = true);
348 virtual void save_trace(std::string filename);
349
358
359
360 //Signal<itpp::Packet*> TcpSendSignal;
361 //Slot<TCP_Sender, itpp::Packet*> TcpRecvAckSlot;
362 //Slot<TCP_Sender, itpp::Packet*> SocketWriteSlot;
363 //Slot<TCP_Sender, string> ReleaseSlot;
364
365private:
366 std::queue<itpp::Packet*> SocketWriteQueue;
367
368 virtual void InitStatistics();
369 virtual void HandleACK(TCP_Packet &);
370 virtual void SendNewData(bool skipSWSA = false);
371 virtual void UnaRetransmit();
372 virtual void FinishFastRecovery();
373 virtual void ReduceSSThresh();
374 virtual void SendMsg(TCP_Packet & msg);
375 virtual void HandleRtxTimeout(Ttype);
376 virtual void IdleCheck();
377 virtual void HandleSWSATimeout(Ttype);
378 virtual unsigned GetNextSegmentSize(const Sequence_Number & begin);
379 virtual unsigned SendWindow() const;
380 virtual double CalcRTOValue() const;
381 virtual void SetRtxTimer();
382 virtual void UpdateRTTVariables(double sampleRTT);
383 virtual void TraceCWnd();
384 virtual void TraceSentSeqNo(const Sequence_Number sn);
385 virtual void TraceACKedSeqNo(const Sequence_Number sn);
386 virtual void TraceRTTVariables(double sampleRTT);
387 virtual void TraceSSThresh();
388 virtual std::string GenerateFilename();
389
390 void StopTransientPhase();
392 enum eTCPVersion {kTahoe, kReno, kNewReno};
393
394 virtual void set_label(int label);
395
396 //socket variables
397 unsigned fLabel; // end point identification also used at receiver
398
399 //message handling
400 virtual void HandleUserMessageIndication(itpp::Packet *user_data);
401 virtual void ReceiveMessageFromNet(itpp::Packet *msg);
402
403 //parameters parsed from input file
404 eTCPVersion fTCPVersion; // one of Reno, Tahoe, NewReno
405 unsigned fMSS; // maximum segment size
406 unsigned fTCPIPHeaderLength;
407 double fInitialRTT;
408 unsigned fInitialCWnd;
409 unsigned fInitialSSThresh;
410 unsigned fMaxCWnd;
411 unsigned fDupACKThreshold;
412 double fTimerGranularity;
413 double fMaxRTO; // max value of retransmission TO
414 unsigned fMaxBackoff;
415 bool fImmediateBackoffReset;
416 bool fKarn;
417 bool fGoBackN;
418 bool fFlightSizeRecovery;// use flight size on fast rec. exit
419 bool fRenoConservation;
420 bool fCarefulSSThreshReduction;
421 bool fIgnoreDupACKOnTORecovery;
422 bool fCarefulMulFastRtxAvoidance;
423 bool fNagle;
424 double fSWSATimerValue;
425 bool fRestartAfterIdle;
426 bool fTraceCWnd; // print CWnd trace to cout
427 bool fTraceSentSeqNo;
428 bool fTraceACKedSeqNo;
429 bool fDebug; // print additional information to cout
430 bool fTrace; // store trace info in vectors
431
432 //session identification
433 int fSessionId;
435 //TCP flow control (RFC 793)
436 Sequence_Number fSndUna; // lowest unacknowledged sn
437 Sequence_Number fSndNxt; // next byte to be sent
438 Sequence_Number fSndMax;
439 unsigned fRecWnd; // receiver advertised window
440 unsigned fMaxRecWnd;
441 Sequence_Number fUserNxt; // next byte to be received from user
442
443 //TCP congestion avoidance (RFC 2581, RFC 2001, RFC 2582)
444 unsigned fCWnd; // congestion window
445 unsigned fSSThresh;
446 unsigned fDupACKCnt;
447 Sequence_Number fRecoveryDupACK;
448 Sequence_Number fRecoveryTO;
450 //TCP timers
451 TTimer<TCP_Sender> fRtxTimer;
452 Sequence_Number fTimUna;
453 TTimer<TCP_Sender> fSWSATimer;
454 int fBackoff;
455 bool fPendingBackoffReset;
456 Ttype fLastSendTime;
458 //round trip time measurement (RTTM)
459 double fSRTT;
460 double fRTTVar;
461 double fRTTEstimate;
462 Sequence_Number fRTTMByte;
463 bool fRTTMPending;
464 double fRTTMStartTime;
466 //statistic counters
467 unsigned long fNumberOfTimeouts;
468 unsigned long fNumberOfFastRetransmits;
469 unsigned long fNumberOfRTTMeasurements;
470 unsigned long fNumberOfReceivedACKs;
471 unsigned long fNumberOfIdleTimeouts;
472
473 vec CWnd_val;
474 vec CWnd_time;
475 int CWnd_index;
476
477 vec SSThresh_val;
478 vec SSThresh_time;
479 int SSThresh_index;
480
481 ivec sent_seq_num_val;
482 vec sent_seq_num_time;
483 int sent_seq_num_index;
484
485 ivec sender_recv_ack_seq_num_val;
486 vec sender_recv_ack_seq_num_time;
487 int sender_recv_ack_seq_num_index;
488
489 vec RTTEstimate_val;
490 vec RTTEstimate_time;
491 int RTTEstimate_index;
492
493 vec RTTsample_val;
494 vec RTTsample_time;
495 int RTTsample_index;
496};
497
498
520{
521public:
528
529 void reset();
531 void write(TCP_Segment newBlock);
532 void read(unsigned noOfBytes);
534 unsigned first_block_size() const;
536 Sequence_Number last_byte() const;
539 unsigned window() const;
540
541 std::ostream &info(std::ostream &os, int detail = 0) const;
543protected:
547 std::list <TCP_Segment> fBufList;
548};
549
550
551
552
583{
584public:
585
587 TCP_Receiver(int label);
589 virtual ~TCP_Receiver();
590
591 //name connection control
593 virtual void setup();
595 virtual void release(std::string trace_filename = "");
596
597 //message handling
602 virtual void set_debug(const bool enable_debug = true);
604 virtual void set_debug(bool enable_debug, bool enable_signal_debug);
606 virtual void set_trace(const bool enable_trace = true);
608 virtual void save_trace(std::string filename);
609
617
618private:
619 void IndicateUserMessage();
620 virtual void ReceiveMessageFromNet(itpp::Packet* msg);
622 virtual void ReceiveDataPacket(TCP_Packet & packet);
623 virtual void SendACK(bool);
624 virtual void ScheduleACKMessage();
625 virtual void SendACKMessage(Ttype);
626 virtual void DelayedACKHandler(Ttype);
627 virtual void PeriodicACKHandler(Ttype);
628 virtual void HandleEndOfProcessing(Ttype);
629 virtual void TraceReceivedSeqNo(const Sequence_Number &sn);
630 virtual std::string GenerateFilename();
631
632 //basic variables
633 TCP_Receiver_Buffer fReceiverBuffer;
634 unsigned fLabel;
635
636 //parameters read by the parser
637 unsigned fTCPIPHeaderLength;
638 unsigned fMSS;
639 unsigned fBufferSize;
640 bool fDelayedACK;
641 Ttype fACKDelayTime;
642 bool fSendPeriodicACKs;
643 bool fStrictPeriodicACKs;
644 Ttype fPeriodicACKInterval;// interval after which an ACK is repeated
645 Ttype fACKSchedulingDelay;
646 bool fACKOnBufferWrite;
647 bool fACKOnBufferRead;
648 unsigned fMaxUserBlockSize;
649 unsigned fMinUserBlockSize;
650 double fUserBlockProcDelay;
651 bool fTrace;
652 bool fDebug;
654 //specific TCP variables
655 Sequence_Number fAdvRcvNxt;
656 unsigned fAdvRcvWnd;
658 //session management
659 int fSessionId;
661 //ACK timers
662 TTimer<TCP_Receiver> fDelayedACKTimer;
663 TTimer<TCP_Receiver> fPeriodicACKTimer;
664 TTimer<TCP_Receiver> fACKSchedulingTimer;
665 TCP_Packet * fWaitingACKMsg;
666
667 //user data delivery
668 Packet * fUserMessage;
669 TTimer<TCP_Receiver> fUserBlockProcTimer;
670
671
672 //statistic counters
673 ivec received_seq_num_val;
674 vec received_seq_num_time;
675 int received_seq_num_index;
676
677};
678
679
680
681// ------------------------------- Inline definitions ---------------------------------------------
682
683
684
686{
687 return fFirstByte;
688}
689
690
692{
693 if (fBufList.empty()) {
694 return fFirstByte;
695 }
696 else {
697 return fBufList.back().end();
698 }
699}
700
701
706
707
709{
710 seq_begin = sn;
711
712 it_assert(seq_begin <= seq_end, "TCP_Segment::begin, end byte " + to_str(seq_end.value()) + " < begin byte " + to_str(seq_begin.value()));
713}
714
715
717{
718 seq_end = sn;
719
720 it_assert(seq_begin <= seq_end, "TCP_Segment::set_begin, end byte " + to_str(seq_end.value()) + " < begin byte " + to_str(seq_begin.value()));
721}
722
723
724inline bool TCP_Segment::operator==(const TCP_Segment &segment) const
725{
726 return (this->seq_begin == segment.seq_begin) && (this->seq_end == segment.seq_end);
727}
728
729
730inline bool TCP_Segment::operator!=(const TCP_Segment &segment) const
731{
732 return (this->seq_begin != segment.seq_begin) || (this->seq_end != segment.seq_end);
733}
734
735
736inline bool TCP_Segment::can_be_combined(const TCP_Segment &segment) const
737{
738 return (this->seq_begin <= segment.seq_end) && (segment.seq_begin <= this->seq_end);
739}
740
741
742inline bool TCP_Segment::is_contained(const TCP_Segment &segment) const
743{
744 return (segment.seq_begin <= this->seq_begin) && (this->seq_end <= segment.seq_end);
745}
746
747
748inline unsigned TCP_Segment::length() const
749{
750 return seq_end - seq_begin;
751}
752
754
755
756} // namespace itpp
757
758#endif
759
760#endif // #ifndef TCP_H
761
friend Sequence_Number operator+(const int n1, const Sequence_Number &n2)
ADD DOCUMENTATION HERE.
Definition tcp.h:113
int value() const
Access to internal representation.
Definition tcp.h:110
Sequence_Number operator+(const int n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:99
Sequence_Number()
Default constructor.
Definition tcp.h:75
int seq
ADD DOCUMENTATION HERE.
Definition tcp.h:121
Sequence_Number & operator=(const int &rep)
ADD DOCUMENTATION HERE.
Definition tcp.h:81
Sequence_Number & operator-=(const int n)
ADD DOCUMENTATION HERE.
Definition tcp.h:105
int operator-(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:107
Sequence_Number & operator=(const Sequence_Number &n)
ADD DOCUMENTATION HERE.
Definition tcp.h:79
friend std::ostream & operator<<(std::ostream &os, const Sequence_Number &n)
ADD DOCUMENTATION HERE.
Definition tcp.h:115
Sequence_Number(int n)
ADD DOCUMENTATION HERE.
Definition tcp.h:119
bool operator<=(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:95
bool operator==(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:85
bool operator!=(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:87
bool operator>(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:89
Sequence_Number(const Sequence_Number &n)
ADD DOCUMENTATION HERE.
Definition tcp.h:77
Sequence_Number operator-(const int n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:103
Sequence_Number & operator+=(const int n)
ADD DOCUMENTATION HERE.
Definition tcp.h:101
bool operator<(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:93
bool operator>=(const Sequence_Number &n) const
ADD DOCUMENTATION HERE.
Definition tcp.h:91
Signals and slots.
Slot Class.
void set_segment(const TCP_Segment &seg)
ADD DOCUMENTATION HERE.
Definition tcp.h:225
virtual ~TCP_Packet()
ADD DOCUMENTATION HERE.
int fSessionId
session identifier
Definition tcp.h:266
unsigned get_source_port() const
ADD DOCUMENTATION HERE.
Definition tcp.h:251
TCP_Segment fSegment
data segment to be transmitted
Definition tcp.h:263
TDebugInfo * fInfo
ADD DOCUMENTATION HERE.
Definition tcp.h:282
virtual TCP_Packet & clone() const
ADD DOCUMENTATION HERE.
unsigned fWnd
window size (advertised by receiver)
Definition tcp.h:265
void set_destination_port(unsigned val)
ADD DOCUMENTATION HERE.
Definition tcp.h:245
TCP_Packet(const TCP_Packet &packet)
ADD DOCUMENTATION HERE.
unsigned get_destination_port() const
ADD DOCUMENTATION HERE.
Definition tcp.h:247
unsigned fDestinationPort
ADD DOCUMENTATION HERE.
Definition tcp.h:259
void set_ACK(Sequence_Number val)
ADD DOCUMENTATION HERE.
Definition tcp.h:233
void set_session_id(int val)
ADD DOCUMENTATION HERE.
Definition tcp.h:239
void set_wnd(unsigned val)
ADD DOCUMENTATION HERE.
Definition tcp.h:229
TCP_Packet()
ADD DOCUMENTATION HERE.
Sequence_Number get_ACK() const
ADD DOCUMENTATION HERE.
Definition tcp.h:235
void set_info(unsigned ssThresh, unsigned recWnd, unsigned cWnd, double estRTT, Sequence_Number sndUna, Sequence_Number sndNxt, bool isRtx)
ADD DOCUMENTATION HERE.
TCP_Segment get_segment() const
ADD DOCUMENTATION HERE.
Definition tcp.h:227
friend std::ostream & operator<<(std::ostream &, TCP_Packet &)
ADD DOCUMENTATION HERE.
void set_source_port(unsigned val)
ADD DOCUMENTATION HERE.
Definition tcp.h:249
unsigned fSourcePort
ADD DOCUMENTATION HERE.
Definition tcp.h:261
unsigned get_wnd() const
ADD DOCUMENTATION HERE.
Definition tcp.h:231
Sequence_Number fACK
acknowledgment (next expected sn)
Definition tcp.h:264
int get_session_id() const
ADD DOCUMENTATION HERE.
Definition tcp.h:241
virtual void print_header(std::ostream &) const
ADD DOCUMENTATION HERE.
unsigned first_block_size() const
size of first complete block
void read(unsigned noOfBytes)
read up to "noOfBytes" bytes from queue
Sequence_Number fFirstByte
first byte stored or missing
Definition tcp.h:544
Sequence_Number next_expected() const
first byte missing
Definition tcp.h:702
TCP_Receiver_Buffer()
ADD DOCUMENTATION HERE.
~TCP_Receiver_Buffer()
ADD DOCUMENTATION HERE.
std::ostream & info(std::ostream &os, int detail=0) const
print info
Sequence_Number first_byte() const
first byte stored or missing
Definition tcp.h:685
Sequence_Number last_byte() const
highest byte received (+1)
Definition tcp.h:691
TCP_Receiver_Buffer(const TCP_Receiver_Buffer &)
ADD DOCUMENTATION HERE.
unsigned window() const
ADD DOCUMENTATION HERE.
std::list< TCP_Segment > fBufList
ADD DOCUMENTATION HERE.
Definition tcp.h:547
void reset()
clears internal list structure
void write(TCP_Segment newBlock)
add segment to the queue
virtual void release(std::string trace_filename="")
ADD DOCUMENTATION HERE.
TCP_Receiver(int label)
ADD DOCUMENTATION HERE.
Signal< itpp::Packet * > tcp_send_ack
ADD DOCUMENTATION HERE.
Definition tcp.h:611
virtual void setup()
ADD DOCUMENTATION HERE.
Slot< TCP_Receiver, itpp::Packet * > tcp_receive
ADD DOCUMENTATION HERE.
Definition tcp.h:613
itpp::Packet & get_user_message()
called by higher layer
virtual void save_trace(std::string filename)
ADD DOCUMENTATION HERE.
bool is_user_message_available()
called by higher layer
virtual ~TCP_Receiver()
ADD DOCUMENTATION HERE.
Slot< TCP_Receiver, std::string > tcp_release
ADD DOCUMENTATION HERE.
Definition tcp.h:616
Signal< int > tcp_new_data
indicate new data to higher layer
Definition tcp.h:614
virtual void set_trace(const bool enable_trace=true)
ADD DOCUMENTATION HERE.
virtual void set_debug(bool enable_debug, bool enable_signal_debug)
ADD DOCUMENTATION HERE.
virtual void set_debug(const bool enable_debug=true)
ADD DOCUMENTATION HERE.
friend std::ostream & operator<<(std::ostream &os, const TCP_Segment &segment)
ADD DOCUMENTATION HERE.
Sequence_Number begin() const
ADD DOCUMENTATION HERE.
Definition tcp.h:177
Sequence_Number seq_end
no. of last byte of segment + 1
Definition tcp.h:186
bool operator!=(const TCP_Segment &segment) const
ADD DOCUMENTATION HERE.
Definition tcp.h:730
Sequence_Number end() const
ADD DOCUMENTATION HERE.
Definition tcp.h:179
unsigned length() const
ADD DOCUMENTATION HERE.
Definition tcp.h:748
TCP_Segment(const TCP_Segment &segment)
ADD DOCUMENTATION HERE.
Sequence_Number seq_begin
no. of first byte of segment
Definition tcp.h:185
void combine(const TCP_Segment &segment)
ADD DOCUMENTATION HERE.
TCP_Segment(const Sequence_Number &sn_begin, const Sequence_Number &sn_end)
ADD DOCUMENTATION HERE.
bool operator==(const TCP_Segment &segment) const
ADD DOCUMENTATION HERE.
Definition tcp.h:724
bool is_contained(const TCP_Segment &segment) const
ADD DOCUMENTATION HERE.
Definition tcp.h:742
TCP_Segment()
ADD DOCUMENTATION HERE.
TCP_Segment & operator=(const TCP_Segment &segment)
ADD DOCUMENTATION HERE.
void set_end(const Sequence_Number &sn)
ADD DOCUMENTATION HERE.
Definition tcp.h:716
void set_begin(const Sequence_Number &sn)
ADD DOCUMENTATION HERE.
Definition tcp.h:708
bool can_be_combined(const TCP_Segment &segment) const
ADD DOCUMENTATION HERE.
Definition tcp.h:736
TCP_Sender(int label)
ADD DOCUMENTATION HERE.
virtual void set_trace(const bool enable_trace=true)
ADD DOCUMENTATION HERE.
virtual void release(std::string trace_filename="")
ADD DOCUMENTATION HERE.
Slot< TCP_Sender, std::string > tcp_release
ADD DOCUMENTATION HERE.
Definition tcp.h:357
Slot< TCP_Sender, itpp::Packet * > tcp_receive_ack
ADD DOCUMENTATION HERE.
Definition tcp.h:353
Slot< TCP_Sender, itpp::Packet * > tcp_socket_write
ADD DOCUMENTATION HERE.
Definition tcp.h:355
virtual ~TCP_Sender()
ADD DOCUMENTATION HERE.
virtual void set_debug(bool enable_debug, bool enable_signal_debug)
ADD DOCUMENTATION HERE.
virtual void setup()
ADD DOCUMENTATION HERE.
virtual void set_debug(const bool enable_debug=true)
ADD DOCUMENTATION HERE.
Signal< itpp::Packet * > tcp_send
ADD DOCUMENTATION HERE.
Definition tcp.h:351
virtual void print_item(std::ostream &, const std::string &)
Print support.
virtual void save_trace(std::string filename)
ADD DOCUMENTATION HERE.
Definitions of converters between different vector and matrix types.
Definitions of an event-based simulation class.
#define it_assert(t, s)
Abort if t is not true.
Definition itassert.h:94
T min(const Vec< T > &in)
Minimum value of vector.
Definition min_max.h:125
T max(const Vec< T > &v)
Maximum value of vector.
Definition min_max.h:45
itpp namespace
Definition itmex.h:37
double Ttype
64-bit floating point time
Definition events.h:54
std::string to_str(const T &i)
Convert anything to string.
Definition converters.h:444
Definition of a Packet class.
ADD DOCUMENTATION HERE.
Definition tcp.h:271
bool fRtxFlag
ADD DOCUMENTATION HERE.
Definition tcp.h:278
unsigned fCWnd
ADD DOCUMENTATION HERE.
Definition tcp.h:274
unsigned fRecWnd
ADD DOCUMENTATION HERE.
Definition tcp.h:273
double fRTTEstimate
ADD DOCUMENTATION HERE.
Definition tcp.h:275
Sequence_Number fSndNxt
ADD DOCUMENTATION HERE.
Definition tcp.h:277
Sequence_Number fSndUna
ADD DOCUMENTATION HERE.
Definition tcp.h:276
unsigned fSSThresh
ADD DOCUMENTATION HERE.
Definition tcp.h:272
Templated Vector Class Definitions.
SourceForge Logo

Generated on Mon Apr 7 2025 07:53:18 for IT++ by Doxygen 1.11.0