# 2.11BSD#431 - /usr/src/sys/netns/spp_timer.h

##### Variables

    spptimers         X

##### Macros

    SPPTV_KEEP        X
    SPPTV_MAXIDLE     X
    SPPTV_MIN         X
    SPPTV_MSL         X
    SPPTV_PERSMAX     X
    SPPTV_PERSMIN     X
    SPPTV_REXMTMAX    X
    SPPTV_SRTTBASE    X
    SPPTV_SRTTDFLT    X
    SPPT_2MSL         X
    SPPT_KEEP         X
    SPPT_NTIMERS      X
    SPPT_PERSIST      X
    SPPT_RANGESET     X
    SPPT_REXMT        X
    SPP_LINGERTIME    X
    SPP_MAXRXTSHIFT   X
    SPP_TTL           X

       1: /*
       2:  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that this notice is preserved and that due credit is given
       7:  * to the University of California at Berkeley. The name of the University
       8:  * may not be used to endorse or promote products derived from this
       9:  * software without specific prior written permission. This software
      10:  * is provided ``as is'' without express or implied warranty.
      11:  *
      12:  *	@(#)spp_timer.h	7.1 (Berkeley) 3/12/88
      13:  */
      14:
      15: /*
      16:  * Definitions of the SPP timers.  These timers are counted
      17:  * down PR_SLOWHZ times a second.
      18:  */
      19: #define SPPT_NTIMERS    4
      20:
      21: #define SPPT_REXMT  0       /* retransmit */
      22: #define SPPT_PERSIST    1       /* retransmit persistance */
      23: #define SPPT_KEEP   2       /* keep alive */
      24: #define SPPT_2MSL   3       /* 2*msl quiet time timer */
      25:
      26: /*
      27:  * The SPPT_REXMT timer is used to force retransmissions.
      28:  * The SPP has the SPPT_REXMT timer set whenever segments
      29:  * have been sent for which ACKs are expected but not yet
      30:  * received.  If an ACK is received which advances tp->snd_una,
      31:  * then the retransmit timer is cleared (if there are no more
      32:  * outstanding segments) or reset to the base value (if there
      33:  * are more ACKs expected).  Whenever the retransmit timer goes off,
      34:  * we retransmit one unacknowledged segment, and do a backoff
      35:  * on the retransmit timer.
      36:  *
      37:  * The SPPT_PERSIST timer is used to keep window size information
      38:  * flowing even if the window goes shut.  If all previous transmissions
      39:  * have been acknowledged (so that there are no retransmissions in progress),
      40:  * and the window is too small to bother sending anything, then we start
      41:  * the SPPT_PERSIST timer.  When it expires, if the window is nonzero,
      42:  * we go to transmit state.  Otherwise, at intervals send a single byte
      43:  * into the peer's window to force him to update our window information.
      44:  * We do this at most as often as SPPT_PERSMIN time intervals,
      45:  * but no more frequently than the current estimate of round-trip
      46:  * packet time.  The SPPT_PERSIST timer is cleared whenever we receive
      47:  * a window update from the peer.
      48:  *
      49:  * The SPPT_KEEP timer is used to keep connections alive.  If an
      50:  * connection is idle (no segments received) for SPPTV_KEEP amount of time,
      51:  * but not yet established, then we drop the connection.  If the connection
      52:  * is established, then we force the peer to send us a segment by sending:
      53:  *	<SEQ=SND.UNA-1><ACK=RCV.NXT><CTL=ACK>
      54:  * This segment is (deliberately) outside the window, and should elicit
      55:  * an ack segment in response from the peer.  If, despite the SPPT_KEEP
      56:  * initiated segments we cannot elicit a response from a peer in SPPT_MAXIDLE
      57:  * amount of time, then we drop the connection.
      58:  */
      59:
      60: #define SPP_TTL     30      /* default time to live for SPP segs */
      61: /*
      62:  * Time constants.
      63:  */
      64: #define SPPTV_MSL   ( 15*PR_SLOWHZ)     /* max seg lifetime */
      65: #define SPPTV_SRTTBASE  0           /* base roundtrip time;
      66: 						   if 0, no idea yet */
      67: #define SPPTV_SRTTDFLT  (  3*PR_SLOWHZ)     /* assumed RTT if no info */
      68:
      69: #define SPPTV_PERSMIN   (  5*PR_SLOWHZ)     /* retransmit persistance */
      70: #define SPPTV_PERSMAX   ( 60*PR_SLOWHZ)     /* maximum persist interval */
      71:
      72: #define SPPTV_KEEP  ( 75*PR_SLOWHZ)     /* keep alive - 75 secs */
      73: #define SPPTV_MAXIDLE   (  8*SPPTV_KEEP)    /* maximum allowable idle
      74: 						   time before drop conn */
      75:
      76: #define SPPTV_MIN   (  1*PR_SLOWHZ)     /* minimum allowable value */
      77: #define SPPTV_REXMTMAX  ( 64*PR_SLOWHZ)     /* max allowable REXMT value */
      78:
      79: #define SPP_LINGERTIME  120         /* linger at most 2 minutes */
      80:
      81: #define SPP_MAXRXTSHIFT 12          /* maximum retransmits */
      82:
      83: #ifdef  SPPTIMERS
      84: char *spptimers[] =
      85:     { "REXMT", "PERSIST", "KEEP", "2MSL" };
      86: #endif
      87:
      88: /*
      89:  * Force a time value to be in a certain range.
      90:  */
      91: #define SPPT_RANGESET(tv, value, tvmin, tvmax) { \
      92:     (tv) = (value); \
      93:     if ((tv) < (tvmin)) \
      94:         (tv) = (tvmin); \
      95:     else if ((tv) > (tvmax)) \
      96:         (tv) = (tvmax); \
      97: }
      98:
      99: #ifdef SUPERVISOR
     100: extern int spp_backoff[];
     101: #endif

#### Defined variables

spptimers defined in line 84; used 2 times

- in /usr/src/sys/netns/spp_debug.c line 59, 134

#### Defined macros

SPPTV_KEEP defined in line 72; used 7 times

- in line 73
- in /usr/src/sys/netns/spp_usrreq.c line 128, 173, 190, 1297-1298(2), 1700

SPPTV_MAXIDLE defined in line 73; used 1 times

- in /usr/src/sys/netns/spp_usrreq.c line 1694

SPPTV_MIN defined in line 76; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 226, 361, 1251, 1645

SPPTV_MSL defined in line 64; never used
SPPTV_PERSMAX defined in line 70; used 1 times

- in /usr/src/sys/netns/spp_usrreq.c line 1055

SPPTV_PERSMIN defined in line 69; used 1 times

- in /usr/src/sys/netns/spp_usrreq.c line 1055

SPPTV_REXMTMAX defined in line 77; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 226, 361, 1251, 1645

SPPTV_SRTTBASE defined in line 65; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 1247-1250(2)

SPPTV_SRTTDFLT defined in line 67; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 1248-1250(2)

SPPT_2MSL defined in line 24; never used
SPPT_KEEP defined in line 23; used 6 times

- in /usr/src/sys/netns/spp_usrreq.c line 128, 171-173(2), 190, 1297, 1700

SPPT_NTIMERS defined in line 19; used 1 times

- in /usr/src/sys/netns/spp_usrreq.c line 1589

SPPT_PERSIST defined in line 22; used 9 times

- in /usr/src/sys/netns/spp_usrreq.c line 372, 783-785(2), 862, 953-954(2), 977-978(2), 1053

SPPT_RANGESET defined in line 91; used 5 times

- in /usr/src/sys/netns/spp_usrreq.c line 224, 359, 1053, 1249, 1645

SPPT_REXMT defined in line 21; used 14 times

- in /usr/src/sys/netns/spp_usrreq.c line 189, 216, 308-310(2), 370-373(2), 803, 861, 974-976(2), 988-989(2), 1048, 1646

SPP_LINGERTIME defined in line 79; never used
SPP_MAXRXTSHIFT defined in line 81; used 5 times

- in /usr/src/sys/netns/spp_usrreq.c line 1056, 1540, 1636-1637(2), 1654

SPP_TTL defined in line 60; never used

#### Usage of this include

spp_timer.h used 3 times

- in /usr/src/sys/netns/spp_debug.c line 35
- in /usr/src/sys/netns/spp_usrreq.c line 36
- in /usr/src/ucb/netstat/ns.c line 39

Last modified: 1988-04-28 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 643 |