This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / sys / netinet / tcp_timer.h
index 5ce5871..a00048f 100644 (file)
  * SUCH DAMAGE.
  *
  *     from: @(#)tcp_timer.h   7.8 (Berkeley) 6/28/90
  * SUCH DAMAGE.
  *
  *     from: @(#)tcp_timer.h   7.8 (Berkeley) 6/28/90
- *     $Id$
+ *     $Id: tcp_timer.h,v 1.3 1993/11/07 17:48:10 wollman Exp $
  */
 
  */
 
+#ifndef _NETINET_TCP_TIMER_H_
+#define _NETINET_TCP_TIMER_H_ 1
+
 /*
  * Definitions of the TCP timers.  These timers are counted
  * down PR_SLOWHZ times a second.
 /*
  * Definitions of the TCP timers.  These timers are counted
  * down PR_SLOWHZ times a second.
 #define        TCP_MAXRXTSHIFT 12                      /* maximum retransmits */
 
 #ifdef TCPTIMERS
 #define        TCP_MAXRXTSHIFT 12                      /* maximum retransmits */
 
 #ifdef TCPTIMERS
-char *tcptimers[] =
+const char *tcptimers[] =
     { "REXMT", "PERSIST", "KEEP", "2MSL" };
 #endif
 
     { "REXMT", "PERSIST", "KEEP", "2MSL" };
 #endif
 
@@ -115,9 +118,9 @@ char *tcptimers[] =
  */
 #define        TCPT_RANGESET(tv, value, tvmin, tvmax) { \
        (tv) = (value); \
  */
 #define        TCPT_RANGESET(tv, value, tvmin, tvmax) { \
        (tv) = (value); \
-       if ((tv) < (tvmin)) \
+       if ((u_long)(tv) < (u_long)(tvmin)) \
                (tv) = (tvmin); \
                (tv) = (tvmin); \
-       else if ((tv) > (tvmax)) \
+       else if ((u_long)(tv) > (u_long)(tvmax)) \
                (tv) = (tvmax); \
 }
 
                (tv) = (tvmax); \
 }
 
@@ -128,3 +131,4 @@ extern int tcp_maxidle;                     /* time to drop after starting probes */
 extern int tcp_ttl;                    /* time to live for TCP segs */
 extern int tcp_backoff[];
 #endif
 extern int tcp_ttl;                    /* time to live for TCP segs */
 extern int tcp_backoff[];
 #endif
+#endif /* _NETINET_TCP_TIMER_H_ */