sctp-mfrHbAfterRto.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-mfrHbAfterRto.h,v 1.2 2007/06/17 21:44:41 tom_henderson Exp $ (UD/PEL)
  38.  */
  39. /* This extension combines MultipleFastRtx and HbAfterRto extensions.
  40.  *
  41.  * MultipleFastRtx extension implements the Caro Multiple Fast Retransmit
  42.  * Algorithm. Caro's Algorithm introduces a fastRtxRecover state variable
  43.  * per TSN in the send buffer. Any time a TSN is retransmitted, its
  44.  * fastRtxRecover is set to the highest TSN outstanding at the time of
  45.  * retransmit. That way, only missing reports triggered by TSNs beyond
  46.  * fastRtxRecover may trigger yet another fast retransmit.
  47.  *
  48.  * HbAfterRto extension sends a heartbeat immediately after timeout
  49.  * retransmission. The idea is to give the destinations a chance to get an
  50.  * RTT measurement after their RTO is backed off. The hope is to avoid
  51.  * unnecessarily large RTOs (especially on the alternate destinations).
  52.  */
  53. #ifndef ns_sctp_mfrHbAfterRto_h
  54. #define ns_sctp_mfrHbAfterRto_h
  55. #include "sctp-multipleFastRtx.h"
  56. class MfrHbAfterRtoSctpAgent : public virtual MultipleFastRtxSctpAgent 
  57. {
  58. public:
  59.   MfrHbAfterRtoSctpAgent();
  60.   virtual void  Timeout(SctpChunkType_E, SctpDest_S *);
  61. protected:
  62.   virtual void  delay_bind_init_all();
  63.   virtual int   delay_bind_dispatch(const char *varName, const char *localName,
  64.     TclObject *tracer);
  65. };
  66. #endif