00001 /* 00002 * Copyright (c) 1999 International Computer Science Institute 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. All advertising materials mentioning features or use of this software 00014 * must display the following acknowledgement: 00015 * This product includes software developed by ACIRI, the AT&T 00016 * Center for Internet Research at ICSI (the International Computer 00017 * Science Institute). 00018 * 4. Neither the name of ACIRI nor of ICSI may be used 00019 * to endorse or promote products derived from this software without 00020 * specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY ICSI AND CONTRIBUTORS ``AS IS'' AND 00023 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00024 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00025 * ARE DISCLAIMED. IN NO EVENT SHALL ICSI OR CONTRIBUTORS BE LIABLE 00026 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00027 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00028 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00029 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00030 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00031 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00032 * SUCH DAMAGE. 00033 */ 00034 00035 #ifndef ns_tcp_rfc793edu_h 00036 #define ns_tcp_rfc793edu_h 00037 00038 #include "tcp.h" 00039 00040 // Original code contributed by Fernando Cela Diaz, 00041 // <fcela@ce.chalmers.se>. 00042 // For more information, see the following: 00043 // URL "http://www.ce.chalmers.se/~fcela/tcp-tour.html" 00044 00045 /* RFC793edu TCP -- 19990821, fcela@acm.org */ 00046 class RFC793eduTcpAgent : public virtual TcpAgent { 00047 public: 00048 RFC793eduTcpAgent(); 00049 virtual void rtt_backoff(); 00050 virtual void rtt_update(double tao); 00051 virtual void recv(Packet*, Handler*); 00052 virtual void opencwnd(); 00053 virtual void output(int seqno, int reason = 0); 00054 void reset(); 00055 virtual void recv_newack_helper(Packet*); 00056 void newack(Packet*); 00057 00058 00059 protected: 00060 virtual void delay_bind_init_all(); 00061 virtual int delay_bind_dispatch(const char *varName, const char *localName, TclObject *tracer); 00062 00063 int add793expbackoff_; /* Add Karn's exp. backoff to rfc793 tcp */ 00064 int add793jacobsonrtt_; /* Add Jacobson/Karels RTT estimation */ 00065 int add793fastrtx_; /* Add the Fast-Retransmit Algorithm */ 00066 int add793slowstart_; /* Add Slow Start with Congestion Avoidance */ 00067 int add793additiveinc_; /* Add Congestion Avoidance, without 00068 * Slow-Start (Additive 00069 * Increase/Multiplicative Decrease) 00070 */ 00071 int add793karnrtt_; /* Add Karn Algorithm for RTT sampling */ 00072 int add793exponinc_; /* Add Multiplicative 00073 * Increase/Multiplicative Decrease */ 00074 double rto_; /* Current value of the retx timer IN TICKS */ 00075 }; 00076 00077 #endif 00078 00079 00080 00081