~kris/9p

9hist

b5f24a866e8fa64b39fd150b267d69a4b56e076c — David du Colombier 27 years ago c8bec28
Plan 9 from Bell Labs 1998-12-04
1 files changed, 18 insertions(+), 0 deletions(-)

M ip/tcp.c
M ip/tcp.c => ip/tcp.c +18 -0
@@ 933,6 933,10 @@ tcpincoming(Conv *s, Tcp *segp, uchar *src, uchar *dst)
	tcb->timer.state = TimerOFF;
	tcb->acktimer.arg = new;
	tcb->acktimer.state = TimerOFF;
	tcb->katimer.arg = new;
	tcb->katimer.state = TimerOFF;
	tcb->rtt_timer.arg = new;
	tcb->rtt_timer.state = TimerOFF;

	h = &tcb->protohdr;
	memset(h, 0, sizeof(*h));


@@ 1293,6 1297,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp)
		netlog(f, Logtcp, "tcp len < 0, %lux\n", seg.seq);
		update(s, &seg);
		if(tcb->sndcnt == 0 && tcb->state == Closing) {
			tcphalt(tpriv, &tcb->rtt_timer);
			tcphalt(tpriv, &tcb->acktimer);
			tcphalt(tpriv, &tcb->katimer);
			tcpsetstate(s, Time_wait);
			tcb->timer.start = MSL2*(1000 / MSPTICK);
			tcpgo(tpriv, &tcb->timer);


@@ 1353,6 1360,8 @@ tcpiput(Proto *tcp, uchar*, Block *bp)
		case Finwait1:
			update(s, &seg);
			if(tcb->sndcnt == 0){
				tcphalt(tpriv, &tcb->rtt_timer);
				tcphalt(tpriv, &tcb->acktimer);
				tcb->kacounter = MAXBACKOFF;
				tcpsetstate(s, Finwait2);
				tcb->katimer.start = MSL2 * (1000 / MSPTICK);


@@ 1365,6 1374,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp)
		case Closing:
			update(s, &seg);
			if(tcb->sndcnt == 0) {
				tcphalt(tpriv, &tcb->rtt_timer);
				tcphalt(tpriv, &tcb->acktimer);
				tcphalt(tpriv, &tcb->katimer);
				tcpsetstate(s, Time_wait);
				tcb->timer.start = MSL2*(1000 / MSPTICK);
				tcpgo(tpriv, &tcb->timer);


@@ 1454,6 1466,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp)
			case Finwait1:
				tcb->rcv.nxt++;
				if(tcb->sndcnt == 0) {
					tcphalt(tpriv, &tcb->rtt_timer);
					tcphalt(tpriv, &tcb->acktimer);
					tcphalt(tpriv, &tcb->katimer);
					tcpsetstate(s, Time_wait);
					tcb->timer.start = MSL2*(1000/MSPTICK);
					tcpgo(tpriv, &tcb->timer);


@@ 1463,6 1478,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp)
				break;
			case Finwait2:
				tcb->rcv.nxt++;
				tcphalt(tpriv, &tcb->rtt_timer);
				tcphalt(tpriv, &tcb->acktimer);
				tcphalt(tpriv, &tcb->katimer);
				tcpsetstate(s, Time_wait);
				tcb->timer.start = MSL2 * (1000/MSPTICK);
				tcpgo(tpriv, &tcb->timer);