Index: uspace/lib/c/generic/net/icmp_api.c
===================================================================
--- uspace/lib/c/generic/net/icmp_api.c	(revision bf1728257878be61830ed8a583f39ba76e6d3b18)
+++ uspace/lib/c/generic/net/icmp_api.c	(revision 54a7a20fb2c85e3874490c693ec3062e4e2daed1)
@@ -42,5 +42,4 @@
 #include <net/ip_codes.h>
 #include <async.h>
-#include <async_obsolete.h>
 #include <sys/types.h>
 #include <sys/time.h>
@@ -55,5 +54,5 @@
  * timeout occurs.
  *
- * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
+ * @param[in] sess The ICMP session.
  * @param[in] size	The message data length in bytes.
  * @param[in] timeout	The timeout in milliseconds.
@@ -74,5 +73,5 @@
  */
 int
-icmp_echo_msg(int icmp_phone, size_t size, mseconds_t timeout, ip_ttl_t ttl,
+icmp_echo_msg(async_sess_t *sess, size_t size, mseconds_t timeout, ip_ttl_t ttl,
     ip_tos_t tos, int dont_fragment, const struct sockaddr *addr,
     socklen_t addrlen)
@@ -83,10 +82,14 @@
 	if (addrlen <= 0)
 		return EINVAL;
-
-	message_id = async_obsolete_send_5(icmp_phone, NET_ICMP_ECHO, size, timeout, ttl,
+	
+	async_exch_t *exch = async_exchange_begin(sess);
+	
+	message_id = async_send_5(exch, NET_ICMP_ECHO, size, timeout, ttl,
 	    tos, (sysarg_t) dont_fragment, NULL);
-
+	
 	/* Send the address */
-	async_obsolete_data_write_start(icmp_phone, addr, (size_t) addrlen);
+	async_data_write_start(exch, addr, (size_t) addrlen);
+	
+	async_exchange_end(exch);
 
 	async_wait_for(message_id, &result);
Index: uspace/lib/c/generic/net/icmp_common.c
===================================================================
--- uspace/lib/c/generic/net/icmp_common.c	(revision bf1728257878be61830ed8a583f39ba76e6d3b18)
+++ uspace/lib/c/generic/net/icmp_common.c	(revision 54a7a20fb2c85e3874490c693ec3062e4e2daed1)
@@ -45,8 +45,8 @@
 /** Connect to the ICMP module.
  *
- * @return ICMP module phone on success.
+ * @return ICMP module session.
  *
  */
-int icmp_connect_module(void)
+async_sess_t *icmp_connect_module(void)
 {
 	return connect_to_service(SERVICE_ICMP);
Index: uspace/lib/c/generic/net/modules.c
===================================================================
--- uspace/lib/c/generic/net/modules.c	(revision bf1728257878be61830ed8a583f39ba76e6d3b18)
+++ uspace/lib/c/generic/net/modules.c	(revision 54a7a20fb2c85e3874490c693ec3062e4e2daed1)
@@ -40,5 +40,4 @@
 
 #include <async.h>
-#include <async_obsolete.h>
 #include <malloc.h>
 #include <errno.h>
@@ -47,8 +46,4 @@
 #include <net/modules.h>
 #include <ns.h>
-#include <ns_obsolete.h>
-
-/** The time between connect requests in microseconds. */
-#define MODULE_WAIT_TIME  (10 * 1000)
 
 /** Answer a call.
@@ -98,55 +93,65 @@
 }
 
-/** Create bidirectional connection with the needed module service and registers
+/** Create bidirectional connection with the needed module service and register
  * the message receiver.
  *
- * @param[in] need	The needed module service.
- * @param[in] arg1	The first parameter.
- * @param[in] arg2	The second parameter.
- * @param[in] arg3	The third parameter.
- * @param[in] client_receiver The message receiver.
- *
- * @return		The phone of the needed service.
- * @return		Other error codes as defined for the ipc_connect_to_me()
- *			function.
- */
-int bind_service(services_t need, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
-    async_client_conn_t client_receiver)
+ * @param[in] need            Needed module service.
+ * @param[in] arg1            First parameter.
+ * @param[in] arg2            Second parameter.
+ * @param[in] arg3            Third parameter.
+ * @param[in] client_receiver Message receiver.
+ *
+ * @return Session to the needed service.
+ * @return Other error codes as defined for the async_connect_to_me()
+ *         function.
+ *
+ */
+async_sess_t *bind_service(services_t need, sysarg_t arg1, sysarg_t arg2,
+    sysarg_t arg3, async_client_conn_t client_receiver)
 {
 	/* Connect to the needed service */
-	int phone = connect_to_service(need);
-	if (phone >= 0) {
+	async_sess_t *sess = connect_to_service(need);
+	if (sess != NULL) {
 		/* Request the bidirectional connection */
-		int rc = async_obsolete_connect_to_me(phone, arg1, arg2, arg3,
+		async_exch_t *exch = async_exchange_begin(sess);
+		int rc = async_connect_to_me(exch, arg1, arg2, arg3,
 		    client_receiver, NULL);
+		async_exchange_end(exch);
+		
 		if (rc != EOK) {
-			async_obsolete_hangup(phone);
-			return rc;
+			async_hangup(sess);
+			errno = rc;
+			return NULL;
 		}
 	}
 	
-	return phone;
-}
-
-/** Connects to the needed module.
- *
- * @param[in] need	The needed module service.
- * @return		The phone of the needed service.
- */
-int connect_to_service(services_t need)
-{
-	return service_obsolete_connect_blocking(need, 0, 0);
-}
-
-/** Replies the data to the other party.
- *
- * @param[in] data	The data buffer to be sent.
+	return sess;
+}
+
+/** Connect to the needed module.
+ *
+ * @param[in] need Needed module service.
+ *
+ * @return Session to the needed service.
+ * @return NULL if the connection timeouted.
+ *
+ */
+async_sess_t *connect_to_service(services_t need)
+{
+	return service_connect_blocking(EXCHANGE_SERIALIZE, need, 0, 0);
+}
+
+/** Reply the data to the other party.
+ *
+ * @param[in] data        The data buffer to be sent.
  * @param[in] data_length The buffer length.
- * @return		EOK on success.
- * @return		EINVAL if the client does not expect the data.
- * @return		EOVERFLOW if the client does not expect all the data.
- *			Only partial data are transfered.
- * @return		Other error codes as defined for the
- *			async_data_read_finalize() function.
+ *
+ * @return EOK on success.
+ * @return EINVAL if the client does not expect the data.
+ * @return EOVERFLOW if the client does not expect all the data.
+ *         Only partial data are transfered.
+ * @return Other error codes as defined for the
+ *         async_data_read_finalize() function.
+ *
  */
 int data_reply(void *data, size_t data_length)
@@ -154,9 +159,9 @@
 	size_t length;
 	ipc_callid_t callid;
-
+	
 	/* Fetch the request */
 	if (!async_data_read_receive(&callid, &length))
 		return EINVAL;
-
+	
 	/* Check the requested data size */
 	if (length < data_length) {
@@ -164,5 +169,5 @@
 		return EOVERFLOW;
 	}
-
+	
 	/* Send the data */
 	return async_data_read_finalize(callid, data, data_length);
Index: uspace/lib/c/generic/net/socket_client.c
===================================================================
--- uspace/lib/c/generic/net/socket_client.c	(revision bf1728257878be61830ed8a583f39ba76e6d3b18)
+++ uspace/lib/c/generic/net/socket_client.c	(revision 54a7a20fb2c85e3874490c693ec3062e4e2daed1)
@@ -39,5 +39,4 @@
 #include <assert.h>
 #include <async.h>
-#include <async_obsolete.h>
 #include <fibril_synch.h>
 #include <stdint.h>
@@ -84,6 +83,6 @@
 	/** Socket identifier. */
 	int socket_id;
-	/** Parent module phone. */
-	int phone;
+	/** Parent module session. */
+	async_sess_t *sess;
 	/** Parent module service. */
 	services_t service;
@@ -144,12 +143,8 @@
 /** Socket client library global data. */
 static struct socket_client_globals {
-	/** TCP module phone. */
-	int tcp_phone;
-	/** UDP module phone. */
-	int udp_phone;
-
-//	/** The last socket identifier.
-//	 */
-//	int last_id;
+	/** TCP module session. */
+	async_sess_t *tcp_sess;
+	/** UDP module session. */
+	async_sess_t *udp_sess;
 
 	/** Active sockets. */
@@ -164,7 +159,6 @@
 	fibril_rwlock_t lock;
 } socket_globals = {
-	.tcp_phone = -1,
-	.udp_phone = -1,
-//	.last_id = 0,
+	.tcp_sess = NULL,
+	.udp_sess = NULL,
 	.sockets = NULL,
 	.lock = FIBRIL_RWLOCK_INITIALIZER(socket_globals.lock)
@@ -280,38 +274,36 @@
 }
 
-/** Returns the TCP module phone.
- *
- * Connects to the TCP module if necessary.
- *
- * @return		The TCP module phone.
- * @return		Other error codes as defined for the
- *			bind_service() function.
- */
-static int socket_get_tcp_phone(void)
-{
-	if (socket_globals.tcp_phone < 0) {
-		socket_globals.tcp_phone = bind_service(SERVICE_TCP,
+/** Return the TCP module session.
+ *
+ * Connect to the TCP module if necessary.
+ *
+ * @return The TCP module session.
+ *
+ */
+static async_sess_t *socket_get_tcp_sess(void)
+{
+	if (socket_globals.tcp_sess == NULL) {
+		socket_globals.tcp_sess = bind_service(SERVICE_TCP,
 		    0, 0, SERVICE_TCP, socket_connection);
 	}
 
-	return socket_globals.tcp_phone;
-}
-
-/** Returns the UDP module phone.
- *
- * Connects to the UDP module if necessary.
- *
- * @return		The UDP module phone.
- * @return		Other error codes as defined for the
- *			bind_service() function.
- */
-static int socket_get_udp_phone(void)
-{
-	if (socket_globals.udp_phone < 0) {
-		socket_globals.udp_phone = bind_service(SERVICE_UDP,
+	return socket_globals.tcp_sess;
+}
+
+/** Return the UDP module session.
+ *
+ * Connect to the UDP module if necessary.
+ *
+ * @return The UDP module session.
+ *
+ */
+static async_sess_t *socket_get_udp_sess(void)
+{
+	if (socket_globals.udp_sess == NULL) {
+		socket_globals.udp_sess = bind_service(SERVICE_UDP,
 		    0, 0, SERVICE_UDP, socket_connection);
 	}
 
-	return socket_globals.udp_phone;
+	return socket_globals.udp_sess;
 }
 
@@ -329,5 +321,4 @@
 	sockets = socket_get_sockets();
 	count = 0;
-//	socket_id = socket_globals.last_id;
 
 	do {
@@ -342,14 +333,10 @@
 			if (socket_id < INT_MAX) {
 				++socket_id;
-/*			} else if(socket_globals.last_id) {
- *				socket_globals.last_id = 0;
- *				socket_id = 1;
- */			} else {
+			} else {
 				return ELIMIT;
 			}
 		}
 	} while (sockets_find(sockets, socket_id));
-
-//	last_id = socket_id
+	
 	return socket_id;
 }
@@ -358,14 +345,13 @@
  *
  * @param[in,out] socket The socket to be initialized.
- * @param[in] socket_id	The new socket identifier.
- * @param[in] phone	The parent module phone.
- * @param[in] service	The parent module service.
- */
-static void
-socket_initialize(socket_t *socket, int socket_id, int phone,
-    services_t service)
+ * @param[in] socket_id  The new socket identifier.
+ * @param[in] sess       The parent module session.
+ * @param[in] service    The parent module service.
+ */
+static void socket_initialize(socket_t *socket, int socket_id,
+    async_sess_t *sess, services_t service)
 {
 	socket->socket_id = socket_id;
-	socket->phone = phone;
+	socket->sess = sess;
 	socket->service = service;
 	dyn_fifo_initialize(&socket->received, SOCKET_INITIAL_RECEIVED_SIZE);
@@ -397,5 +383,5 @@
 {
 	socket_t *socket;
-	int phone;
+	async_sess_t *sess;
 	int socket_id;
 	services_t service;
@@ -414,5 +400,5 @@
 			switch (protocol) {
 			case IPPROTO_TCP:
-				phone = socket_get_tcp_phone();
+				sess = socket_get_tcp_sess();
 				service = SERVICE_TCP;
 				break;
@@ -429,5 +415,5 @@
 			switch (protocol) {
 			case IPPROTO_UDP:
-				phone = socket_get_udp_phone();
+				sess = socket_get_udp_sess();
 				service = SERVICE_UDP;
 				break;
@@ -450,6 +436,6 @@
 	}
 
-	if (phone < 0)
-		return phone;
+	if (sess == NULL)
+		return ENOENT;
 
 	/* Create a new socket structure */
@@ -468,7 +454,10 @@
 		return socket_id;
 	}
-
-	rc = (int) async_obsolete_req_3_3(phone, NET_SOCKET, socket_id, 0, service, NULL,
+	
+	async_exch_t *exch = async_exchange_begin(sess);
+	rc = (int) async_req_3_3(exch, NET_SOCKET, socket_id, 0, service, NULL,
 	    &fragment_size, &header_size);
+	async_exchange_end(exch);
+	
 	if (rc != EOK) {
 		fibril_rwlock_write_unlock(&socket_globals.lock);
@@ -481,5 +470,5 @@
 
 	/* Finish the new socket initialization */
-	socket_initialize(socket, socket_id, phone, service);
+	socket_initialize(socket, socket_id, sess, service);
 	/* Store the new socket */
 	rc = sockets_add(socket_get_sockets(), socket_id, socket);
@@ -490,6 +479,10 @@
 		dyn_fifo_destroy(&socket->accepted);
 		free(socket);
-		async_obsolete_msg_3(phone, NET_SOCKET_CLOSE, (sysarg_t) socket_id, 0,
+		
+		exch = async_exchange_begin(sess);
+		async_msg_3(exch, NET_SOCKET_CLOSE, (sysarg_t) socket_id, 0,
 		    service);
+		async_exchange_end(exch);
+		
 		return rc;
 	}
@@ -535,8 +528,10 @@
 
 	/* Request the message */
-	message_id = async_obsolete_send_3(socket->phone, message,
+	async_exch_t *exch = async_exchange_begin(socket->sess);
+	message_id = async_send_3(exch, message,
 	    (sysarg_t) socket->socket_id, arg2, socket->service, NULL);
 	/* Send the address */
-	async_obsolete_data_write_start(socket->phone, data, datalength);
+	async_data_write_start(exch, data, datalength);
+	async_exchange_end(exch);
 
 	fibril_rwlock_read_unlock(&socket_globals.lock);
@@ -595,6 +590,8 @@
 
 	/* Request listen backlog change */
-	result = (int) async_obsolete_req_3_0(socket->phone, NET_SOCKET_LISTEN,
+	async_exch_t *exch = async_exchange_begin(socket->sess);
+	result = (int) async_req_3_0(exch, NET_SOCKET_LISTEN,
 	    (sysarg_t) socket->socket_id, (sysarg_t) backlog, socket->service);
+	async_exchange_end(exch);
 
 	fibril_rwlock_read_unlock(&socket_globals.lock);
@@ -666,5 +663,5 @@
 		return socket_id;
 	}
-	socket_initialize(new_socket, socket_id, socket->phone,
+	socket_initialize(new_socket, socket_id, socket->sess,
 	    socket->service);
 	result = sockets_add(socket_get_sockets(), new_socket->socket_id,
@@ -678,10 +675,13 @@
 
 	/* Request accept */
-	message_id = async_obsolete_send_5(socket->phone, NET_SOCKET_ACCEPT,
+	async_exch_t *exch = async_exchange_begin(socket->sess);
+	message_id = async_send_5(exch, NET_SOCKET_ACCEPT,
 	    (sysarg_t) socket->socket_id, 0, socket->service, 0,
 	    new_socket->socket_id, &answer);
 
 	/* Read address */
-	async_obsolete_data_read_start(socket->phone, cliaddr, *addrlen);
+	async_data_read_start(exch, cliaddr, *addrlen);
+	async_exchange_end(exch);
+	
 	fibril_rwlock_write_unlock(&socket_globals.lock);
 	async_wait_for(message_id, &ipc_result);
@@ -777,6 +777,9 @@
 
 	/* Request close */
-	rc = (int) async_obsolete_req_3_0(socket->phone, NET_SOCKET_CLOSE,
+	async_exch_t *exch = async_exchange_begin(socket->sess);
+	rc = (int) async_req_3_0(exch, NET_SOCKET_CLOSE,
 	    (sysarg_t) socket->socket_id, 0, socket->service);
+	async_exchange_end(exch);
+	
 	if (rc != EOK) {
 		fibril_rwlock_write_unlock(&socket_globals.lock);
@@ -850,5 +853,7 @@
 
 	/* Request send */
-	message_id = async_obsolete_send_5(socket->phone, message,
+	async_exch_t *exch = async_exchange_begin(socket->sess);
+	
+	message_id = async_send_5(exch, message,
 	    (sysarg_t) socket->socket_id,
 	    (fragments == 1 ? datalength : socket->data_fragment_size),
@@ -857,11 +862,11 @@
 	/* Send the address if given */
 	if (!toaddr ||
-	    (async_obsolete_data_write_start(socket->phone, toaddr, addrlen) == EOK)) {
+	    (async_data_write_start(exch, toaddr, addrlen) == EOK)) {
 		if (fragments == 1) {
 			/* Send all if only one fragment */
-			async_obsolete_data_write_start(socket->phone, data, datalength);
+			async_data_write_start(exch, data, datalength);
 		} else {
 			/* Send the first fragment */
-			async_obsolete_data_write_start(socket->phone, data,
+			async_data_write_start(exch, data,
 			    socket->data_fragment_size - socket->header_size);
 			data = ((const uint8_t *) data) +
@@ -870,5 +875,5 @@
 			/* Send the middle fragments */
 			while (--fragments > 1) {
-				async_obsolete_data_write_start(socket->phone, data,
+				async_data_write_start(exch, data,
 				    socket->data_fragment_size);
 				data = ((const uint8_t *) data) +
@@ -877,9 +882,11 @@
 
 			/* Send the last fragment */
-			async_obsolete_data_write_start(socket->phone, data,
+			async_data_write_start(exch, data,
 			    (datalength + socket->header_size) %
 			    socket->data_fragment_size);
 		}
 	}
+	
+	async_exchange_end(exch);
 
 	async_wait_for(message_id, &result);
@@ -1023,4 +1030,6 @@
 		return 0;
 	}
+	
+	async_exch_t *exch = async_exchange_begin(socket->sess);
 
 	/* Prepare lengths if more fragments */
@@ -1035,5 +1044,5 @@
 
 		/* Request packet data */
-		message_id = async_obsolete_send_4(socket->phone, message,
+		message_id = async_send_4(exch, message,
 		    (sysarg_t) socket->socket_id, 0, socket->service,
 		    (sysarg_t) flags, &answer);
@@ -1041,8 +1050,8 @@
 		/* Read the address if desired */
 		if(!fromaddr ||
-		    (async_obsolete_data_read_start(socket->phone, fromaddr,
+		    (async_data_read_start(exch, fromaddr,
 		    *addrlen) == EOK)) {
 			/* Read the fragment lengths */
-			if (async_obsolete_data_read_start(socket->phone, lengths,
+			if (async_data_read_start(exch, lengths,
 			    sizeof(int) * (fragments + 1)) == EOK) {
 				if (lengths[fragments] <= datalength) {
@@ -1051,6 +1060,5 @@
 					for (index = 0; index < fragments;
 					    ++index) {
-						async_obsolete_data_read_start(
-						    socket->phone, data,
+						async_data_read_start(exch, data,
 						    lengths[index]);
 						data = ((uint8_t *) data) +
@@ -1064,5 +1072,5 @@
 	} else { /* fragments == 1 */
 		/* Request packet data */
-		message_id = async_obsolete_send_4(socket->phone, message,
+		message_id = async_send_4(exch, message,
 		    (sysarg_t) socket->socket_id, 0, socket->service,
 		    (sysarg_t) flags, &answer);
@@ -1070,10 +1078,11 @@
 		/* Read the address if desired */
 		if (!fromaddr ||
-		    (async_obsolete_data_read_start(socket->phone, fromaddr,
-		        *addrlen) == EOK)) {
+		    (async_data_read_start(exch, fromaddr, *addrlen) == EOK)) {
 			/* Read all if only one fragment */
-			async_obsolete_data_read_start(socket->phone, data, datalength);
+			async_data_read_start(exch, data, datalength);
 		}
 	}
+	
+	async_exchange_end(exch);
 
 	async_wait_for(message_id, &ipc_result);
@@ -1187,14 +1196,18 @@
 
 	/* Request option value */
-	message_id = async_obsolete_send_3(socket->phone, NET_SOCKET_GETSOCKOPT,
+	async_exch_t *exch = async_exchange_begin(socket->sess);
+	
+	message_id = async_send_3(exch, NET_SOCKET_GETSOCKOPT,
 	    (sysarg_t) socket->socket_id, (sysarg_t) optname, socket->service,
 	    NULL);
 
 	/* Read the length */
-	if (async_obsolete_data_read_start(socket->phone, optlen,
+	if (async_data_read_start(exch, optlen,
 	    sizeof(*optlen)) == EOK) {
 		/* Read the value */
-		async_obsolete_data_read_start(socket->phone, value, *optlen);
-	}
+		async_data_read_start(exch, value, *optlen);
+	}
+	
+	async_exchange_end(exch);
 
 	fibril_rwlock_read_unlock(&socket_globals.lock);
