plan 9 kernel history: overview | file list | diff list

1991/1126/port/tcpif.c (diff list | history)

1991/1126/sys/src/9/port/tcpif.c:23,341991/12171/sys/src/9/port/tcpif.c:23,34 (short | long | prev | next)
1991/0424    
		return; 
 
	switch(newstate) { 
	case CLOSED: 
1991/12171    
	case Closed: 
1991/0424    
		s->psrc = 0; 
		s->pdst = 0; 
		s->dst = 0; 
1991/1126    
		/* NO break */ 
1991/0424    
	case CLOSE_WAIT:		/* Remote closes */ 
1991/12171    
	case Close_wait:		/* Remote closes */ 
1991/0424    
		if(s->readq == 0) 
			break; 
1991/1120    
 
1991/1126/sys/src/9/port/tcpif.c:53,591991/12171/sys/src/9/port/tcpif.c:53,59
1991/0424    
{ 
	Tcpctl *tcb = &s->tcpctl; 
 
	if(tcb->state != CLOSED) 
1991/12171    
	if(tcb->state != Closed) 
1991/0424    
		return; 
 
	init_tcpctl(s); 
1991/1126/sys/src/9/port/tcpif.c:64,701991/12171/sys/src/9/port/tcpif.c:64,70
1991/0424    
	switch(mode){ 
	case TCP_PASSIVE: 
		tcb->flags |= CLONE; 
		setstate(s, LISTEN); 
1991/12171    
		setstate(s, Listen); 
1991/0424    
		break; 
	case TCP_ACTIVE: 
		/* Send SYN, go into SYN_SENT state */ 
1991/1126/sys/src/9/port/tcpif.c:71,771991/12171/sys/src/9/port/tcpif.c:71,77
1991/0424    
		tcb->flags |= ACTIVE; 
		qlock(tcb); 
		send_syn(tcb); 
		setstate(s, SYN_SENT); 
1991/12171    
		setstate(s, Syn_sent); 
1991/0424    
		tcp_output(s); 
		qunlock(tcb); 
		break; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)