tcp_timer.c (16099) | tcp_timer.c (17096) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95 |
34 * $Id: tcp_timer.c,v 1.16 1996/04/15 03:46:33 davidg Exp $ | 34 * $Id: tcp_timer.c,v 1.17 1996/06/03 15:37:52 jdp Exp $ |
35 */ 36 37#ifndef TUBA_INCLUDE 38#include <sys/param.h> 39#include <sys/queue.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/sysctl.h> --- 74 unchanged lines hidden (view full) --- 117 */ 118void 119tcp_slowtimo() 120{ 121 register struct inpcb *ip, *ipnxt; 122 register struct tcpcb *tp; 123 register int i; 124 int s; | 35 */ 36 37#ifndef TUBA_INCLUDE 38#include <sys/param.h> 39#include <sys/queue.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/sysctl.h> --- 74 unchanged lines hidden (view full) --- 117 */ 118void 119tcp_slowtimo() 120{ 121 register struct inpcb *ip, *ipnxt; 122 register struct tcpcb *tp; 123 register int i; 124 int s; |
125#ifdef TCPDEBUG 126 int ostate; 127#endif |
|
125 126 s = splnet(); 127 128 tcp_maxidle = tcp_keepcnt * tcp_keepintvl; 129 130 ip = tcb.lh_first; 131 if (ip == NULL) { 132 splx(s); --- 4 unchanged lines hidden (view full) --- 137 */ 138 for (; ip != NULL; ip = ipnxt) { 139 ipnxt = ip->inp_list.le_next; 140 tp = intotcpcb(ip); 141 if (tp == 0 || tp->t_state == TCPS_LISTEN) 142 continue; 143 for (i = 0; i < TCPT_NTIMERS; i++) { 144 if (tp->t_timer[i] && --tp->t_timer[i] == 0) { | 128 129 s = splnet(); 130 131 tcp_maxidle = tcp_keepcnt * tcp_keepintvl; 132 133 ip = tcb.lh_first; 134 if (ip == NULL) { 135 splx(s); --- 4 unchanged lines hidden (view full) --- 140 */ 141 for (; ip != NULL; ip = ipnxt) { 142 ipnxt = ip->inp_list.le_next; 143 tp = intotcpcb(ip); 144 if (tp == 0 || tp->t_state == TCPS_LISTEN) 145 continue; 146 for (i = 0; i < TCPT_NTIMERS; i++) { 147 if (tp->t_timer[i] && --tp->t_timer[i] == 0) { |
145 if (tcp_usrreq(tp->t_inpcb->inp_socket, 146 PRU_SLOWTIMO, (struct mbuf *)0, 147 (struct mbuf *)i, (struct mbuf *)0) == NULL) | 148#ifdef TCPDEBUG 149 ostate = tp->t_state; 150#endif 151 tp = tcp_timers(tp, i); 152 if (tp == NULL) |
148 goto tpgone; | 153 goto tpgone; |
154#ifdef TCPDEBUG 155 if (tp->t_inpcb->inp_socket->so_options 156 & SO_DEBUG) 157 tcp_trace(TA_USER, ostate, tp, 158 (struct tcpiphdr *)0, 159 PRU_SLOWTIMO); 160#endif |
|
149 } 150 } 151 tp->t_idle++; 152 tp->t_duration++; 153 if (tp->t_rtt) 154 tp->t_rtt++; 155tpgone: 156 ; --- 210 unchanged lines hidden --- | 161 } 162 } 163 tp->t_idle++; 164 tp->t_duration++; 165 if (tp->t_rtt) 166 tp->t_rtt++; 167tpgone: 168 ; --- 210 unchanged lines hidden --- |