diff options
author | 2002-01-14 03:11:55 +0000 | |
---|---|---|
committer | 2002-01-14 03:11:55 +0000 | |
commit | 2522fca3eed3d1a22111ca037864b55c9f89029c (patch) | |
tree | f9eb55ce289b3e46681883f0a2bbc1f7e125c458 /sys/netinet/tcp_subr.c | |
parent | The return value of lcsplx is used in locore. however at some point (diff) | |
download | wireguard-openbsd-2522fca3eed3d1a22111ca037864b55c9f89029c.tar.xz wireguard-openbsd-2522fca3eed3d1a22111ca037864b55c9f89029c.zip |
use macros to manage tcp timers; based on netbsd
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 26835ef897d..d3a5aeeacbd 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.52 2001/07/21 09:26:06 itojun Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.53 2002/01/14 03:11:55 provos Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -446,10 +446,10 @@ tcp_respond(tp, template, m, ack, seq, flags) * protocol control block. */ struct tcpcb * -tcp_newtcpcb(inp) - struct inpcb *inp; +tcp_newtcpcb(struct inpcb *inp) { - register struct tcpcb *tp; + struct tcpcb *tp; + int i; tp = malloc(sizeof(*tp), M_PCB, M_NOWAIT); if (tp == NULL) @@ -458,7 +458,10 @@ tcp_newtcpcb(inp) LIST_INIT(&tp->segq); tp->t_maxseg = tcp_mssdflt; tp->t_maxopd = 0; - + + for (i = 0; i < TCPT_NTIMERS; i++) + TCP_TIMER_INIT(tp, i); + #ifdef TCP_SACK tp->sack_disable = tcp_do_sack ? 0 : 1; #endif |