Revision 460fec67 slirp/tcp_timer.c
b/slirp/tcp_timer.c | ||
---|---|---|
32 | 32 |
|
33 | 33 |
#include <slirp.h> |
34 | 34 |
|
35 |
u_int32_t tcp_now; /* for RFC 1323 timestamps */ |
|
36 |
|
|
37 | 35 |
static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer); |
38 | 36 |
|
39 | 37 |
/* |
40 | 38 |
* Fast timeout routine for processing delayed acks |
41 | 39 |
*/ |
42 | 40 |
void |
43 |
tcp_fasttimo(void)
|
|
41 |
tcp_fasttimo(Slirp *slirp)
|
|
44 | 42 |
{ |
45 | 43 |
register struct socket *so; |
46 | 44 |
register struct tcpcb *tp; |
47 | 45 |
|
48 | 46 |
DEBUG_CALL("tcp_fasttimo"); |
49 | 47 |
|
50 |
so = tcb.so_next; |
|
48 |
so = slirp->tcb.so_next;
|
|
51 | 49 |
if (so) |
52 |
for (; so != &tcb; so = so->so_next) |
|
50 |
for (; so != &slirp->tcb; so = so->so_next)
|
|
53 | 51 |
if ((tp = (struct tcpcb *)so->so_tcpcb) && |
54 | 52 |
(tp->t_flags & TF_DELACK)) { |
55 | 53 |
tp->t_flags &= ~TF_DELACK; |
... | ... | |
64 | 62 |
* causes finite state machine actions if timers expire. |
65 | 63 |
*/ |
66 | 64 |
void |
67 |
tcp_slowtimo(void)
|
|
65 |
tcp_slowtimo(Slirp *slirp)
|
|
68 | 66 |
{ |
69 | 67 |
register struct socket *ip, *ipnxt; |
70 | 68 |
register struct tcpcb *tp; |
... | ... | |
75 | 73 |
/* |
76 | 74 |
* Search through tcb's and update active timers. |
77 | 75 |
*/ |
78 |
ip = tcb.so_next; |
|
76 |
ip = slirp->tcb.so_next;
|
|
79 | 77 |
if (ip == 0) |
80 | 78 |
return; |
81 |
for (; ip != &tcb; ip = ipnxt) { |
|
79 |
for (; ip != &slirp->tcb; ip = ipnxt) {
|
|
82 | 80 |
ipnxt = ip->so_next; |
83 | 81 |
tp = sototcpcb(ip); |
84 | 82 |
if (tp == 0) |
... | ... | |
96 | 94 |
tpgone: |
97 | 95 |
; |
98 | 96 |
} |
99 |
tcp_iss += TCP_ISSINCR/PR_SLOWHZ; /* increment iss */
|
|
100 |
tcp_now++; /* for timestamps */
|
|
97 |
slirp->tcp_iss += TCP_ISSINCR/PR_SLOWHZ; /* increment iss */
|
|
98 |
slirp->tcp_now++; /* for timestamps */
|
|
101 | 99 |
} |
102 | 100 |
|
103 | 101 |
/* |
Also available in: Unified diff