sctp-newreno.h
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:3k
源码类别:

通讯编程

开发平台:

Visual C++

  1. /*
  2.  * Copyright (c) 2006-2007 by the Protocol Engineering Lab, U of Delaware
  3.  * All rights reserved.
  4.  * 
  5.  * Protocol Engineering Lab web page : http://pel.cis.udel.edu/
  6.  *
  7.  * Paul D. Amer        <amer@@cis,udel,edu>
  8.  * Armando L. Caro Jr. <acaro@@cis,udel,edu>
  9.  *
  10.  * Redistribution and use in source and binary forms, with or without
  11.  * modification, are permitted provided that the following conditions
  12.  * are met:
  13.  *
  14.  * 1. Redistributions of source code must retain the above copyright
  15.  *    notice, this list of conditions and the following disclaimer.
  16.  *
  17.  * 2. Redistributions in binary form must reproduce the above copyright
  18.  *    notice, this list of conditions and the following disclaimer in the
  19.  *    documentation and/or other materials provided with the distribution.
  20.  *
  21.  * 3. Neither the name of the University nor of the Laboratory may be used
  22.  *    to endorse or promote products derived from this software without
  23.  *    specific prior written permission.
  24.  *
  25.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  26.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  28.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  29.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  31.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  32.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  33.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  34.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  35.  * SUCH DAMAGE.
  36.  *
  37.  * @(#) $Header: /cvsroot/nsnam/ns-2/sctp/sctp-newreno.h,v 1.2 2007/06/17 21:44:41 tom_henderson Exp $ (UD/PEL)
  38.  */
  39. /* NewReno extension introduces a recover state variable per destination
  40.  * similar to avoid multiple cwnd cuts in a single window (ie, round
  41.  * trip). The concept is borrowed from TCP NewReno.
  42.  */
  43. #ifndef ns_sctp_newreno_h
  44. #define ns_sctp_newreno_h
  45. #include "sctp.h"
  46. class NewRenoSctpAgent : public virtual SctpAgent 
  47. {
  48. public:
  49.   NewRenoSctpAgent();
  50. protected:
  51.   virtual void  delay_bind_init_all();
  52.   virtual int   delay_bind_dispatch(const char *varName, const char *localName,
  53.     TclObject *tracer);
  54.   /* initialization stuff
  55.    */
  56.   virtual void   OptionReset();
  57.   /* sending functions
  58.    */
  59.   virtual void  SendBufferDequeueUpTo(u_int);
  60.   virtual void FastRtx();
  61.   /* processing functions
  62.    */
  63.   virtual Boolean_E  ProcessGapAckBlocks(u_char *, Boolean_E);
  64.   virtual void       ProcessSackChunk(u_char *);
  65.   u_int            uiRecover;
  66.   u_int            uiHighestTsnNewlyAcked;  /* global now for NewReno's HTNA */
  67. };
  68. #endif