aboutsummaryrefslogtreecommitdiff
path: root/tcp_timer.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-06-24 14:42:29 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 08:52:46 -0500
commitd89b93db4f609ff4a4728465fe9066b1027bf077 (patch)
tree56059827a90fbbefac6388842404a43454b44d83 /tcp_timer.c
parentdfae34b4a7c99e25a3deb4c9ca51ea41ffa974c9 (diff)
downloadslirp-d89b93db4f609ff4a4728465fe9066b1027bf077.zip
slirp-d89b93db4f609ff4a4728465fe9066b1027bf077.tar.gz
slirp-d89b93db4f609ff4a4728465fe9066b1027bf077.tar.bz2
slirp: Drop dead code
After all its years inside the qemu tree, there is no point in keeping the dead code paths of slirp. This patch is a first round of removing usually commented out code parts. More cleanups need to follow (and maybe finally a proper reindention). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'tcp_timer.c')
-rw-r--r--tcp_timer.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/tcp_timer.c b/tcp_timer.c
index 8942ca4..8044172 100644
--- a/tcp_timer.c
+++ b/tcp_timer.c
@@ -99,10 +99,6 @@ void tcp_slowtimo(void)
tpgone:;
}
tcp_iss += TCP_ISSINCR / PR_SLOWHZ; /* increment iss */
-#ifdef TCP_COMPAT_42
- if ((int)tcp_iss < 0)
- tcp_iss = 0; /* XXX */
-#endif
tcp_now++; /* for timestamps */
}
@@ -203,7 +199,6 @@ static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer)
* retransmit times until then.
*/
if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
- /* in_losing(tp->t_inpcb); */
tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
tp->t_srtt = 0;
}
@@ -268,7 +263,6 @@ static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer)
if (tp->t_state < TCPS_ESTABLISHED)
goto dropit;
- /* if (tp->t_socket->so_options & SO_KEEPALIVE && */
if ((SO_OPTIONS) && tp->t_state <= TCPS_CLOSE_WAIT) {
if (tp->t_idle >= TCPTV_KEEP_IDLE + TCP_MAXIDLE)
goto dropit;
@@ -285,17 +279,8 @@ static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer)
* correspondent TCP to respond.
*/
STAT(tcpstat.tcps_keepprobe++);
-#ifdef TCP_COMPAT_42
- /*
- * The keepalive packet must have nonzero length
- * to get a 4.2 host to respond.
- */
- tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL,
- tp->rcv_nxt - 1, tp->snd_una - 1, 0);
-#else
tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL, tp->rcv_nxt,
tp->snd_una - 1, 0);
-#endif
tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL;
} else
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE;
@@ -303,7 +288,7 @@ static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer)
dropit:
STAT(tcpstat.tcps_keepdrops++);
- tp = tcp_drop(tp, 0); /* ETIMEDOUT); */
+ tp = tcp_drop(tp, 0);
break;
}