• Home
  • Raw
  • Download

Lines Matching refs:tp

41 static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer);
50 register struct tcpcb *tp; in tcp_fasttimo() local
57 if ((tp = (struct tcpcb *)so->so_tcpcb) && in tcp_fasttimo()
58 (tp->t_flags & TF_DELACK)) { in tcp_fasttimo()
59 tp->t_flags &= ~TF_DELACK; in tcp_fasttimo()
60 tp->t_flags |= TF_ACKNOW; in tcp_fasttimo()
62 (void) tcp_output(tp); in tcp_fasttimo()
75 register struct tcpcb *tp; in tcp_slowtimo() local
88 tp = sototcpcb(ip); in tcp_slowtimo()
89 if (tp == 0) in tcp_slowtimo()
92 if (tp->t_timer[i] && --tp->t_timer[i] == 0) { in tcp_slowtimo()
93 tcp_timers(tp,i); in tcp_slowtimo()
98 tp->t_idle++; in tcp_slowtimo()
99 if (tp->t_rtt) in tcp_slowtimo()
100 tp->t_rtt++; in tcp_slowtimo()
116 tcp_canceltimers(struct tcpcb *tp) in tcp_canceltimers() argument
121 tp->t_timer[i] = 0; in tcp_canceltimers()
131 tcp_timers(register struct tcpcb *tp, int timer) in tcp_timers() argument
146 if (tp->t_state != TCPS_TIME_WAIT && in tcp_timers()
147 tp->t_idle <= TCP_MAXIDLE) in tcp_timers()
148 tp->t_timer[TCPT_2MSL] = TCPTV_KEEPINTVL; in tcp_timers()
150 tp = tcp_close(tp); in tcp_timers()
165 if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) { in tcp_timers()
181 tp->t_maxseg >>= 1; in tcp_timers()
182 if (tp->t_maxseg < 32) { in tcp_timers()
186 tp->t_rxtshift = TCP_MAXRXTSHIFT; in tcp_timers()
188 tp = tcp_drop(tp, tp->t_softerror); in tcp_timers()
190 return (tp); /* XXX */ in tcp_timers()
197 tp->t_rxtshift = 6; in tcp_timers()
200 rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift]; in tcp_timers()
201 TCPT_RANGESET(tp->t_rxtcur, rexmt, in tcp_timers()
202 (short)tp->t_rttmin, TCPTV_REXMTMAX); /* XXX */ in tcp_timers()
203 tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; in tcp_timers()
212 if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) { in tcp_timers()
214 tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT); in tcp_timers()
215 tp->t_srtt = 0; in tcp_timers()
217 tp->snd_nxt = tp->snd_una; in tcp_timers()
221 tp->t_rtt = 0; in tcp_timers()
247 u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; in tcp_timers()
250 tp->snd_cwnd = tp->t_maxseg; in tcp_timers()
251 tp->snd_ssthresh = win * tp->t_maxseg; in tcp_timers()
252 tp->t_dupacks = 0; in tcp_timers()
254 (void) tcp_output(tp); in tcp_timers()
263 tcp_setpersist(tp); in tcp_timers()
264 tp->t_force = 1; in tcp_timers()
265 (void) tcp_output(tp); in tcp_timers()
266 tp->t_force = 0; in tcp_timers()
275 if (tp->t_state < TCPS_ESTABLISHED) in tcp_timers()
279 if ((SO_OPTIONS) && tp->t_state <= TCPS_CLOSE_WAIT) { in tcp_timers()
280 if (tp->t_idle >= TCPTV_KEEP_IDLE + TCP_MAXIDLE) in tcp_timers()
300 tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL, in tcp_timers()
301 tp->rcv_nxt - 1, tp->snd_una - 1, 0); in tcp_timers()
303 tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL, in tcp_timers()
304 tp->rcv_nxt, tp->snd_una - 1, 0); in tcp_timers()
306 tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL; in tcp_timers()
308 tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE; in tcp_timers()
313 tp = tcp_drop(tp, 0); /* ETIMEDOUT); */ in tcp_timers()
317 return (tp); in tcp_timers()