Index: uspace/srv/net/Makefile
===================================================================
--- uspace/srv/net/Makefile	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/Makefile	(revision aa85487c600b0fee35e8be1a6edd9b5b1a9a0646)
@@ -31,5 +31,4 @@
 DIRS = \
 	netif/lo \
-	netif/dp8390 \
 	nil/eth \
 	nil/nildummy \
@@ -48,4 +47,8 @@
 		tl/udp \
 		tl/tcp \
+
+ifeq ($(CONFIG_NETIF_DP8390),y)
+	DIRS += netif/dp8390
+endif
 
 DIRS_ALL = $(DIRS) $(DIRS_MODULAR)
Index: uspace/srv/net/include/socket.h
===================================================================
--- uspace/srv/net/include/socket.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/include/socket.h	(revision aa85487c600b0fee35e8be1a6edd9b5b1a9a0646)
@@ -61,4 +61,5 @@
  *  @returns EPROTONOSUPPORT if the protocol is not supported.
  *  @returns ENOMEM if there is not enough memory left.
+ *  @returns ELIMIT if there was not a free socket identifier found this time.
  *  @returns Other error codes as defined for the NET_SOCKET message.
  *  @returns Other error codes as defined for the bind_service_timeout() function.
Index: uspace/srv/net/module.c
===================================================================
--- uspace/srv/net/module.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/module.c	(revision aa85487c600b0fee35e8be1a6edd9b5b1a9a0646)
@@ -110,5 +110,7 @@
 		res = module_message( callid, & call, & answer, & answer_count );
 
-		if( IPC_GET_METHOD( call ) == IPC_M_PHONE_HUNGUP ) return;
+		if(( IPC_GET_METHOD( call ) == IPC_M_PHONE_HUNGUP ) || ( res == EHANGUP )){
+			return;
+		}
 
 		answer_call( callid, res, & answer, answer_count );
Index: uspace/srv/net/tl/icmp/icmp.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/tl/icmp/icmp.c	(revision aa85487c600b0fee35e8be1a6edd9b5b1a9a0646)
@@ -658,4 +658,5 @@
 	ipc_callid_t			data_callid;
 	icmp_echo_ref			echo_data;
+	int						res;
 
 	/*
@@ -663,5 +664,6 @@
 	 *  - Answer the first NET_ICMP_INIT call.
 	 */
-	ipc_answer_0( callid, EOK );
+	res = EOK;
+	answer_count = 0;
 
 //	fibril_rwlock_initialize( & lock );
@@ -669,35 +671,43 @@
 	echo_data = ( icmp_echo_ref ) malloc( sizeof( * echo_data ));
 	if( ! echo_data ) return ENOMEM;
+
 	// assign a new identifier
 	fibril_rwlock_write_lock( & icmp_globals.lock );
-	ERROR_CODE = icmp_bind_free_id( echo_data );
+	res = icmp_bind_free_id( echo_data );
 	fibril_rwlock_write_unlock( & icmp_globals.lock );
-	if( ERROR_CODE < 0 ){
+	if( res < 0 ){
 		free( echo_data );
-		return ERROR_CODE;
+		return res;
 	}
 
 	while( keep_on_going ){
+
+		// answer the call
+		answer_call( callid, res, & answer, answer_count );
+
+		// refresh data
 		refresh_answer( & answer, & answer_count );
 
+		// get the next call
 		callid = async_get_call( & call );
 
+		// process the call
 		switch( IPC_GET_METHOD( call )){
 			case IPC_M_PHONE_HUNGUP:
 				keep_on_going = false;
-				ERROR_CODE = EOK;
+				res = EHANGUP;
 				break;
 			case NET_ICMP_ECHO:
 //				fibril_rwlock_write_lock( & lock );
 				if( ! async_data_write_receive( & data_callid, & length )){
-					ERROR_CODE = EINVAL;
+					res = EINVAL;
 				}else{
 					addr = malloc( length );
 					if( ! addr ){
-						ERROR_CODE = ENOMEM;
+						res = ENOMEM;
 					}else{
 						if( ! ERROR_OCCURRED( async_data_write_finalize( data_callid, addr, length ))){
 							fibril_rwlock_write_lock( & icmp_globals.lock );
-							ERROR_CODE = icmp_echo( echo_data->identifier, echo_data->sequence_number, ICMP_GET_SIZE( call ), ICMP_GET_TIMEOUT( call ), ICMP_GET_TTL( call ), ICMP_GET_TOS( call ), ICMP_GET_DONT_FRAGMENT( call ), addr, ( socklen_t ) length );
+							res = icmp_echo( echo_data->identifier, echo_data->sequence_number, ICMP_GET_SIZE( call ), ICMP_GET_TIMEOUT( call ), ICMP_GET_TTL( call ), ICMP_GET_TOS( call ), ICMP_GET_DONT_FRAGMENT( call ), addr, ( socklen_t ) length );
 							fibril_rwlock_write_unlock( & icmp_globals.lock );
 							free( addr );
@@ -707,4 +717,6 @@
 								echo_data->sequence_number = 0;
 							}
+						}else{
+							res = ERROR_CODE;
 						}
 					}
@@ -713,8 +725,6 @@
 				break;
 			default:
-				ERROR_CODE = icmp_process_message( & call );
+				res = icmp_process_message( & call );
 		}
-
-		answer_call( callid, ERROR_CODE, & answer, answer_count );
 	}
 
@@ -723,5 +733,5 @@
 	icmp_echo_data_exclude( & icmp_globals.echo_data, echo_data->identifier );
 	fibril_rwlock_write_unlock( & icmp_globals.lock );
-	return EOK;
+	return res;
 }
 
Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision aa85487c600b0fee35e8be1a6edd9b5b1a9a0646)
@@ -1070,5 +1070,6 @@
 	 *  - Answer the first IPC_M_CONNECT_ME_TO call.
 	 */
-	ipc_answer_0( callid, EOK );
+	res = EOK;
+	answer_count = 0;
 
 	socket_cores_initialize( & local_sockets );
@@ -1076,14 +1077,19 @@
 
 	while( keep_on_going ){
+
+		// answer the call
+		answer_call( callid, res, & answer, answer_count );
+
 		// refresh data
 		refresh_answer( & answer, & answer_count );
 
+		// get the next call
 		callid = async_get_call( & call );
-//		printf( "message %d\n", IPC_GET_METHOD( * call ));
-
+
+		// process the call
 		switch( IPC_GET_METHOD( call )){
 			case IPC_M_PHONE_HUNGUP:
 				keep_on_going = false;
-				res = EOK;
+				res = EHANGUP;
 				break;
 			case NET_SOCKET:
@@ -1231,8 +1237,4 @@
 				break;
 		}
-
-//		printf( "res = %d\n", res );
-
-		answer_call( callid, res, & answer, answer_count );
 	}
 
@@ -1273,8 +1275,8 @@
 					// TODO release as connection lost
 					//tcp_refresh_socket_data( socket_data );
-				}
-				// retransmit
-				// TODO enable retransmit
-				//tcp_retransmit_packet( socket, socket_data, timeout->sequence_number );
+				}else{
+					// retransmit
+					tcp_retransmit_packet( socket, socket_data, timeout->sequence_number );
+				}
 				fibril_rwlock_write_unlock( socket_data->local_lock );
 			}else{
Index: uspace/srv/net/tl/udp/udp.c
===================================================================
--- uspace/srv/net/tl/udp/udp.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/tl/udp/udp.c	(revision aa85487c600b0fee35e8be1a6edd9b5b1a9a0646)
@@ -390,7 +390,5 @@
 	fibril_rwlock_write_unlock( & udp_globals.lock );
 	async_msg_5( socket->phone, NET_SOCKET_RECEIVED, ( ipcarg_t ) socket->socket_id, packet_dimension->content, 0, 0, ( ipcarg_t ) fragments );
-/*	fibril_rwlock_write_unlock( & udp_globals.lock );
-	async_msg_5( socket->phone, NET_SOCKET_RECEIVED, ( ipcarg_t ) socket->socket_id, 0, 0, 0, ( ipcarg_t ) fragments );
-*/	return EOK;
+	return EOK;
 }
 
@@ -429,5 +427,6 @@
 	 *  - Answer the first IPC_M_CONNECT_TO_ME call.
 	 */
-	ipc_answer_0( callid, EOK );
+	res = EOK;
+	answer_count = 0;
 
 	// The client connection is only in one fibril and therefore no additional locks are needed.
@@ -437,14 +436,19 @@
 
 	while( keep_on_going ){
+
+		// answer the call
+		answer_call( callid, res, & answer, answer_count );
+
 		// refresh data
 		refresh_answer( & answer, & answer_count );
 
+		// get the next call
 		callid = async_get_call( & call );
-//		printf( "message %d\n", IPC_GET_METHOD( * call ));
-
+
+		// process the call
 		switch( IPC_GET_METHOD( call )){
 			case IPC_M_PHONE_HUNGUP:
 				keep_on_going = false;
-				res = EOK;
+				res = EHANGUP;
 				break;
 			case NET_SOCKET:
@@ -514,8 +518,4 @@
 				break;
 		}
-
-//		printf( "res = %d\n", res );
-
-		answer_call( callid, res, & answer, answer_count );
 	}
 
@@ -523,5 +523,5 @@
 	socket_cores_release( udp_globals.net_phone, & local_sockets, & udp_globals.sockets, NULL );
 
-	return EOK;
+	return res;
 }
 
@@ -618,11 +618,10 @@
 	header->checksum = 0;
 	if( udp_globals.checksum_computing ){
-//		if( ERROR_OCCURRED( ip_get_route_req( udp_globals.ip_phone, IPPROTO_UDP, addr, addrlen, & device_id, & ip_header, & headerlen ))){
-//			return udp_release_and_return( packet, ERROR_CODE );
-//		}
-		if( ERROR_OCCURRED( ip_client_set_pseudo_header_data_length( ip_header, headerlen, total_length + UDP_HEADER_SIZE))){
+		// update the pseudo header
+		if( ERROR_OCCURRED( ip_client_set_pseudo_header_data_length( ip_header, headerlen, total_length + UDP_HEADER_SIZE ))){
 			free( ip_header );
 			return udp_release_and_return( packet, ERROR_CODE );
 		}
+		// finish the checksum computation
 		checksum = compute_checksum( checksum, ip_header, headerlen );
 		checksum = compute_checksum( checksum, ( uint8_t * ) header, sizeof( * header ));
