00001 /* 00002 * Copyright (c) Xerox Corporation 1998. All rights reserved. 00003 * 00004 * This program is free software; you can redistribute it and/or modify it 00005 * under the terms of the GNU General Public License as published by the 00006 * Free Software Foundation; either version 2 of the License, or (at your 00007 * option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License along 00015 * with this program; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00017 * 00018 * Linking this file statically or dynamically with other modules is making 00019 * a combined work based on this file. Thus, the terms and conditions of 00020 * the GNU General Public License cover the whole combination. 00021 * 00022 * In addition, as a special exception, the copyright holders of this file 00023 * give you permission to combine this file with free software programs or 00024 * libraries that are released under the GNU LGPL and with code included in 00025 * the standard release of ns-2 under the Apache 2.0 license or under 00026 * otherwise-compatible licenses with advertising requirements (or modified 00027 * versions of such code, with unchanged license). You may copy and 00028 * distribute such a system following the terms of the GNU GPL for this 00029 * file and the licenses of the other code concerned, provided that you 00030 * include the source code of that other code when and as the GNU GPL 00031 * requires distribution of source code. 00032 * 00033 * Note that people who make modified versions of this file are not 00034 * obligated to grant this special exception for their modified versions; 00035 * it is their choice whether to do so. The GNU General Public License 00036 * gives permission to release a modified version without this exception; 00037 * this exception also makes it possible to release a modified version 00038 * which carries forward this exception. 00039 * 00040 * $Header: /cvsroot/nsnam/ns-2/webcache/tcp-simple.h,v 1.10 2005/08/26 05:05:32 tomh Exp $ 00041 */ 00042 // 00043 // Simple TCP only preserves: 00044 // (1) FullTcp::advance-bytes, 00045 // 00046 00047 #ifndef ns_tcp_simple_h 00048 #define ns_tcp_simple_h 00049 00050 #include "tcp.h" 00051 00052 class SimpleTcpAgent : public TcpAgent { 00053 public: 00054 SimpleTcpAgent(); 00055 00056 virtual void sendmsg(int nbytes, const char *flags); 00057 virtual void recv(Packet *pkt, Handler *); 00058 virtual int command(int argc, const char*const* argv); 00059 00060 // To make base Tcp happy 00061 virtual void timeout(int) {} 00062 virtual void timeout_nonrtx(int) {} 00063 00064 protected: 00065 int seqno_; 00066 }; 00067 00068 #endif // ns_tcp_simple_h