Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

qsagent.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001 University of Southern California.
00003  * All rights reserved.                                            
00004  *                                                                
00005  * Redistribution and use in source and binary forms are permitted
00006  * provided that the above copyright notice and this paragraph are
00007  * duplicated in all such forms and that any documentation, advertising
00008  * materials, and other materials related to such distribution and use
00009  * acknowledge that the software was developed by the University of
00010  * Southern California, Information Sciences Institute.  The name of the
00011  * University may not be used to endorse or promote products derived from
00012  * this software without specific prior written permission.
00013  * 
00014  * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
00015  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00016  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017  *
00018  **
00019  * Quick Start for TCP and IP.
00020  * A scheme for transport protocols to dynamically determine initial 
00021  * congestion window size.
00022  *
00023  * http://www.ietf.org/internet-drafts/draft-amit-quick-start-02.ps
00024  *
00025  * This defines the Class for the Quick Start agent. "Agent/QSAgent"
00026  * 
00027  * qsagent.h
00028  *
00029  * Srikanth Sundarrajan, 2002
00030  * sundarra@usc.edu
00031  */
00032 
00033 #ifndef _QSAGENT_H
00034 #define _QSAGENT_H
00035 
00036 #include <stdarg.h>
00037 
00038 #include "object.h"
00039 #include "agent.h"
00040 #include "packet.h"
00041 #include "hdr_qs.h"
00042 #include "timer-handler.h"
00043 #include "lib/bsd-list.h"
00044 
00045 class QSAgent;
00046 
00047 class QSTimer: public TimerHandler {
00048 public:
00049         QSTimer(QSAgent * qs_handle) : TimerHandler() { qs_handle_ = qs_handle; }
00050         virtual void expire(Event * e);
00051 
00052 protected:
00053         QSAgent * qs_handle_;
00054 };
00055 
00056 class Agent;
00057 class QSAgent : public Agent{
00058 public:
00059 
00060         virtual int command(int argc, const char*const* argv);
00061         virtual void recv(Packet*, Handler* callback = 0);
00062 
00063         TclObject * old_classifier_;
00064 
00065         int qs_enabled_;
00066 
00067         double state_delay_;
00068         double alloc_rate_;
00069         int max_rate_;
00070         int mss_;
00071 
00072         QSTimer qs_timer_;
00073 
00074         QSAgent();
00075         ~QSAgent();
00076 
00077         long aggr_approval_;
00078         long prev_int_aggr_;
00079 };
00080 
00081 #endif // _QSAGENT_H

Generated on Tue Apr 20 12:14:28 2004 for NS2.26SourcesOriginal by doxygen 1.3.3