| 
				
			 | 
			
			
				
				@@ -64,18 +64,11 @@ size_t tcp_buflen = UIP_BUFSIZE - ( 40 + UIP_LLH_LEN ); 
			 | 
		
		
	
		
			
			| 
				64
			 | 
			
				64
			 | 
			
			
				
				  * Open a TCP connection 
			 | 
		
		
	
		
			
			| 
				65
			 | 
			
				65
			 | 
			
			
				
				  * 
			 | 
		
		
	
		
			
			| 
				66
			 | 
			
				66
			 | 
			
			
				
				  * @v conn	TCP connection 
			 | 
		
		
	
		
			
			| 
				67
			 | 
			
				
			 | 
			
			
				
				- * @ret 0	Success 
			 | 
		
		
	
		
			
			| 
				68
			 | 
			
				
			 | 
			
			
				
				- * @ret <0	Failure 
			 | 
		
		
	
		
			
			| 
				69
			 | 
			
				67
			 | 
			
			
				
				  *  
			 | 
		
		
	
		
			
			| 
				70
			 | 
			
				68
			 | 
			
			
				
				  * This sets up a new TCP connection to the remote host specified in 
			 | 
		
		
	
		
			
			| 
				71
			 | 
			
				
			 | 
			
			
				
				- * tcp_connection::sin.  The actual SYN packet will not be sent out 
			 | 
		
		
	
		
			
			| 
				72
			 | 
			
				
			 | 
			
			
				
				- * until run_tcpip() is called for the first time. 
			 | 
		
		
	
		
			
			| 
				73
			 | 
			
				
			 | 
			
			
				
				- * 
			 | 
		
		
	
		
			
			| 
				74
			 | 
			
				
			 | 
			
			
				
				- * @todo Use linked lists instead of a static buffer, and thereby 
			 | 
		
		
	
		
			
			| 
				75
			 | 
			
				
			 | 
			
			
				
				- *       remove the only potential failure case, giving this function 
			 | 
		
		
	
		
			
			| 
				76
			 | 
			
				
			 | 
			
			
				
				- *       a void return type. 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				69
			 | 
			
			
				
				+ * tcp_connection::sin. 
			 | 
		
		
	
		
			
			| 
				77
			 | 
			
				70
			 | 
			
			
				
				  */ 
			 | 
		
		
	
		
			
			| 
				78
			 | 
			
				
			 | 
			
			
				
				-int tcp_connect ( struct tcp_connection *conn ) { 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				71
			 | 
			
			
				
				+void tcp_connect ( struct tcp_connection *conn ) { 
			 | 
		
		
	
		
			
			| 
				79
			 | 
			
				72
			 | 
			
			
				
				 	struct uip_conn *uip_conn; 
			 | 
		
		
	
		
			
			| 
				80
			 | 
			
				73
			 | 
			
			
				
				 	u16_t ipaddr[2]; 
			 | 
		
		
	
		
			
			| 
				81
			 | 
			
				74
			 | 
			
			
				
				  
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -86,11 +79,9 @@ int tcp_connect ( struct tcp_connection *conn ) { 
			 | 
		
		
	
		
			
			| 
				86
			 | 
			
				79
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				87
			 | 
			
				80
			 | 
			
			
				
				 	* ( ( uint32_t * ) ipaddr ) = conn->sin.sin_addr.s_addr; 
			 | 
		
		
	
		
			
			| 
				88
			 | 
			
				81
			 | 
			
			
				
				 	uip_conn = uip_connect ( ipaddr, conn->sin.sin_port ); 
			 | 
		
		
	
		
			
			| 
				89
			 | 
			
				
			 | 
			
			
				
				-	if ( ! uip_conn ) 
			 | 
		
		
	
		
			
			| 
				90
			 | 
			
				
			 | 
			
			
				
				-		return -1; 
			 | 
		
		
	
		
			
			| 
				91
			 | 
			
				
			 | 
			
			
				
				- 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				82
			 | 
			
			
				
				+#warning "Use linked lists so that uip_connect() cannot fail" 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				83
			 | 
			
			
				
				+	assert ( uip_conn != NULL ); 
			 | 
		
		
	
		
			
			| 
				92
			 | 
			
				84
			 | 
			
			
				
				 	*( ( void ** ) uip_conn->appstate ) = conn; 
			 | 
		
		
	
		
			
			| 
				93
			 | 
			
				
			 | 
			
			
				
				-	return 0; 
			 | 
		
		
	
		
			
			| 
				94
			 | 
			
				85
			 | 
			
			
				
				 } 
			 | 
		
		
	
		
			
			| 
				95
			 | 
			
				86
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				96
			 | 
			
				87
			 | 
			
			
				
				 /** 
			 |