Use the monotonically increasing slow timer timestamp provided by
the protocol dispatch layer for TCP timers. This saves having to modify a potentially large number of timer values (which were shorts, and expanded to ... a lot of code on the Alpha).
This commit is contained in:
parent
1ffa60ac01
commit
34e34c985a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_timer.h,v 1.7 1998/02/10 01:27:16 perry Exp $ */
|
||||
/* $NetBSD: tcp_timer.h,v 1.8 1998/05/06 01:24:38 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -113,6 +113,22 @@ char *tcptimers[] =
|
|||
{ "REXMT", "PERSIST", "KEEP", "2MSL" };
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Arm, disarm, and test TCP timers.
|
||||
*/
|
||||
#define TCP_TIMER_ARM(tp, timer, nticks) \
|
||||
PRT_SLOW_ARM((tp)->t_timer[(timer)], (nticks))
|
||||
|
||||
#define TCP_TIMER_DISARM(tp, timer) \
|
||||
(tp)->t_timer[(timer)] = 0
|
||||
|
||||
#define TCP_TIMER_ISARMED(tp, timer) \
|
||||
((tp)->t_timer[(timer)] != 0)
|
||||
|
||||
#define TCP_TIMER_ISFIRING(tp, timer) \
|
||||
(TCP_TIMER_ISARMED((tp), (timer)) && \
|
||||
PRT_SLOW_ISEXPIRED((tp)->t_timer[(timer)]))
|
||||
|
||||
/*
|
||||
* Force a time value to be in a certain range.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_var.h,v 1.47 1998/05/02 04:21:59 thorpej Exp $ */
|
||||
/* $NetBSD: tcp_var.h,v 1.48 1998/05/06 01:24:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -84,8 +84,8 @@
|
|||
*/
|
||||
struct tcpcb {
|
||||
struct ipqehead segq; /* sequencing queue */
|
||||
u_int t_timer[TCPT_NTIMERS]; /* tcp timers */
|
||||
short t_state; /* state of this connection */
|
||||
short t_timer[TCPT_NTIMERS]; /* tcp timers */
|
||||
short t_rxtshift; /* log(2) of rexmt exp. backoff */
|
||||
short t_rxtcur; /* current retransmit value */
|
||||
short t_dupacks; /* consecutive dup acks recd */
|
||||
|
|
Loading…
Reference in New Issue