diff options
author | shin <shin@FreeBSD.org> | 2000-01-09 19:17:30 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-01-09 19:17:30 +0000 |
commit | 3bdc213839894a0b030b1dbcd75627552b53f9e0 (patch) | |
tree | 791258919d385ab19f9452b82289317ac87b7b82 /sys/netinet/tcp_timer.c | |
parent | 7db2a1ade5cd3959a2fb9d19a12f9791a6a31b66 (diff) | |
download | FreeBSD-src-3bdc213839894a0b030b1dbcd75627552b53f9e0.zip FreeBSD-src-3bdc213839894a0b030b1dbcd75627552b53f9e0.tar.gz |
tcp updates to support IPv6.
also a small patch to sys/nfs/nfs_socket.c, as max_hdr size change.
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r-- | sys/netinet/tcp_timer.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 591fb18..4555eac 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -35,6 +35,7 @@ */ #include "opt_compat.h" +#include "opt_inet6.h" #include "opt_tcpdebug.h" #include <sys/param.h> @@ -52,6 +53,9 @@ #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/in_pcb.h> +#ifdef INET6 +#include <netinet6/in6_pcb.h> +#endif #include <netinet/ip_var.h> #include <netinet/tcp.h> #include <netinet/tcp_fsm.h> @@ -209,7 +213,7 @@ tcp_timer_2msl(xtp) #ifdef TCPDEBUG if (tp && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) - tcp_trace(TA_USER, ostate, tp, (struct tcpiphdr *)0, + tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif splx(s); @@ -262,10 +266,12 @@ tcp_timer_keep(xtp) * The keepalive packet must have nonzero length * to get a 4.2 host to respond. */ - tcp_respond(tp, tp->t_template, (struct mbuf *)NULL, + tcp_respond(tp, tp->t_template->tt_ipgen, + &tp->t_template->tt_t, (struct mbuf *)NULL, tp->rcv_nxt - 1, tp->snd_una - 1, 0); #else - tcp_respond(tp, tp->t_template, (struct mbuf *)NULL, + tcp_respond(tp, tp->t_template->tt_ipgen, + &tp->t_template->tt_t, (struct mbuf *)NULL, tp->rcv_nxt, tp->snd_una - 1, 0); #endif callout_reset(tp->tt_keep, tcp_keepintvl, tcp_timer_keep, tp); @@ -274,7 +280,7 @@ tcp_timer_keep(xtp) #ifdef TCPDEBUG if (tp->t_inpcb->inp_socket->so_options & SO_DEBUG) - tcp_trace(TA_USER, ostate, tp, (struct tcpiphdr *)0, + tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif splx(s); @@ -286,7 +292,7 @@ dropit: #ifdef TCPDEBUG if (tp && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) - tcp_trace(TA_USER, ostate, tp, (struct tcpiphdr *)0, + tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif splx(s); @@ -336,7 +342,7 @@ tcp_timer_persist(xtp) out: #ifdef TCPDEBUG if (tp->t_inpcb->inp_socket->so_options & SO_DEBUG) - tcp_trace(TA_USER, ostate, tp, (struct tcpiphdr *)0, + tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif splx(s); @@ -399,6 +405,11 @@ tcp_timer_rexmt(xtp) * retransmit times until then. */ if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) { +#ifdef INET6 + if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0) + in6_losing(tp->t_inpcb); + else +#endif in_losing(tp->t_inpcb); tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT); tp->t_srtt = 0; @@ -449,7 +460,7 @@ tcp_timer_rexmt(xtp) out: #ifdef TCPDEBUG if (tp && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) - tcp_trace(TA_USER, ostate, tp, (struct tcpiphdr *)0, + tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif splx(s); |