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