Revision 5fafdf24 slirp/tcp_timer.c

b/slirp/tcp_timer.c
54 54
	register struct tcpcb *tp;
55 55

  
56 56
	DEBUG_CALL("tcp_fasttimo");
57
	
57

  
58 58
	so = tcb.so_next;
59 59
	if (so)
60 60
	for (; so != &tcb; so = so->so_next)
......
80 80
	register int i;
81 81

  
82 82
	DEBUG_CALL("tcp_slowtimo");
83
	
83

  
84 84
	tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl;
85 85
	/*
86 86
	 * Search through tcb's and update active timers.
......
139 139
	int timer;
140 140
{
141 141
	register int rexmt;
142
	
142

  
143 143
	DEBUG_CALL("tcp_timers");
144
	
144

  
145 145
	switch (timer) {
146 146

  
147 147
	/*
......
164 164
	 * to a longer retransmit interval and retransmit one segment.
165 165
	 */
166 166
	case TCPT_REXMT:
167
		
167
	
168 168
		/*
169 169
		 * XXXXX If a packet has timed out, then remove all the queued
170 170
		 * packets for that session.
171 171
		 */
172
		
172
	
173 173
		if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
174 174
			/*
175 175
			 * This is a hack to suit our terminal server here at the uni of canberra
......
178 178
			 * keep retransmitting it, it'll keep eating the zeroes, so we keep
179 179
			 * retransmitting, and eventually the connection dies...
180 180
			 * (this only happens on incoming data)
181
			 * 
181
			 *
182 182
			 * So, if we were gonna drop the connection from too many retransmits,
183 183
			 * don't... instead halve the t_maxseg, which might break up the NULLs and
184 184
			 * let them through
185
			 * 
185
			 *
186 186
			 * *sigh*
187 187
			 */
188
			
188
		
189 189
			tp->t_maxseg >>= 1;
190 190
			if (tp->t_maxseg < 32) {
191 191
				/*
......
197 197
				/* tp->t_softerror : ETIMEDOUT); */ /* XXX */
198 198
				return (tp); /* XXX */
199 199
			}
200
			
200
		
201 201
			/*
202 202
			 * Set rxtshift to 6, which is still at the maximum
203 203
			 * backoff time
......
240 240
		 * size increase exponentially with time.  If the
241 241
		 * window is larger than the path can handle, this
242 242
		 * exponential growth results in dropped packet(s)
243
		 * almost immediately.  To get more time between 
243
		 * almost immediately.  To get more time between
244 244
		 * drops but still "push" the network to take advantage
245 245
		 * of improving conditions, we switch from exponential
246 246
		 * to linear window opening at some threshold size.

Also available in: Unified diff