Index: uspace/lib/hound/include/hound/protocol.h
===================================================================
--- uspace/lib/hound/include/hound/protocol.h	(revision 904b1bc3e43b98f81bec9e9296b154371c383776)
+++ uspace/lib/hound/include/hound/protocol.h	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
@@ -56,5 +56,7 @@
 
 typedef async_sess_t hound_sess_t;
-typedef cap_call_handle_t hound_context_id_t;
+
+typedef struct {
+} *hound_context_id_t;
 
 hound_sess_t *hound_service_connect(const char *service);
@@ -125,7 +127,6 @@
 } hound_server_iface_t;
 
-void hound_service_set_server_iface(const hound_server_iface_t *iface);
-
-void hound_connection_handler(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg);
+extern void hound_service_set_server_iface(const hound_server_iface_t *);
+extern void hound_connection_handler(ipc_call_t *, void *);
 
 #endif
Index: uspace/lib/hound/src/protocol.c
===================================================================
--- uspace/lib/hound/src/protocol.c	(revision 904b1bc3e43b98f81bec9e9296b154371c383776)
+++ uspace/lib/hound/src/protocol.c	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
@@ -142,5 +142,5 @@
 	async_exchange_end(exch);
 	if (ret == EOK) {
-		*id = (hound_context_id_t)IPC_GET_ARG1(call);
+		*id = (hound_context_id_t) IPC_GET_ARG1(call);
 	}
 
@@ -384,12 +384,11 @@
 /** Server side implementation of the hound protocol. IPC connection handler.
  *
- * @param icall_handle   Initial call handle
- * @param icall          Pointer to initial call structure.
- * @param arg            (unused)
- */
-void hound_connection_handler(cap_call_handle_t icall_handle, ipc_call_t *icall,
-    void *arg)
-{
-	hound_context_id_t id;
+ * @param icall Pointer to initial call structure.
+ * @param arg   (unused)
+ *
+ */
+void hound_connection_handler(ipc_call_t *icall, void *arg)
+{
+	hound_context_id_t context;
 	errno_t ret;
 	int flags;
@@ -399,7 +398,7 @@
 	/* Accept connection if there is a valid iface*/
 	if (server_iface) {
-		async_answer_0(icall_handle, EOK);
+		async_answer_0(icall, EOK);
 	} else {
-		async_answer_0(icall_handle, ENOTSUP);
+		async_answer_0(icall, ENOTSUP);
 		return;
 	}
@@ -407,10 +406,11 @@
 	while (true) {
 		ipc_call_t call;
-		cap_call_handle_t chandle = async_get_call(&call);
+		async_get_call(&call);
+
 		switch (IPC_GET_IMETHOD(call)) {
 		case IPC_M_HOUND_CONTEXT_REGISTER:
 			/* check interface functions */
 			if (!server_iface || !server_iface->add_context) {
-				async_answer_0(chandle, ENOTSUP);
+				async_answer_0(&call, ENOTSUP);
 				break;
 			}
@@ -421,17 +421,17 @@
 			ret = async_data_write_accept(&name, true, 0, 0, 0, 0);
 			if (ret != EOK) {
-				async_answer_0(chandle, ret);
-				break;
-			}
-
-			id = 0;
+				async_answer_0(&call, ret);
+				break;
+			}
+
+			context = 0;
 			ret = server_iface->add_context(server_iface->server,
-			    &id, name, record);
+			    &context, name, record);
 			/** new context should create a copy */
 			free(name);
 			if (ret != EOK) {
-				async_answer_0(chandle, ret);
+				async_answer_0(&call, ret);
 			} else {
-				async_answer_1(chandle, EOK, CAP_HANDLE_RAW(id));
+				async_answer_1(&call, EOK, CAP_HANDLE_RAW(context));
 			}
 			break;
@@ -439,18 +439,18 @@
 			/* check interface functions */
 			if (!server_iface || !server_iface->rem_context) {
-				async_answer_0(chandle, ENOTSUP);
+				async_answer_0(&call, ENOTSUP);
 				break;
 			}
 
 			/* get id, 1st param */
-			id = (cap_handle_t) IPC_GET_ARG1(call);
+			context = (hound_context_id_t) IPC_GET_ARG1(call);
 			ret = server_iface->rem_context(server_iface->server,
-			    id);
-			async_answer_0(chandle, ret);
+			    context);
+			async_answer_0(&call, ret);
 			break;
 		case IPC_M_HOUND_GET_LIST:
 			/* check interface functions */
 			if (!server_iface || !server_iface->get_list) {
-				async_answer_0(chandle, ENOTSUP);
+				async_answer_0(&call, ENOTSUP);
 				break;
 			}
@@ -480,5 +480,5 @@
 			if (count && !sizes)
 				ret = ENOMEM;
-			async_answer_1(chandle, ret, count);
+			async_answer_1(&call, ret, count);
 
 			/* We are done */
@@ -491,7 +491,7 @@
 
 			/* Send sizes table */
-			cap_call_handle_t id;
+			ipc_call_t id;
 			if (async_data_read_receive(&id, NULL)) {
-				ret = async_data_read_finalize(id, sizes,
+				ret = async_data_read_finalize(&id, sizes,
 				    count * sizeof(size_t));
 			}
@@ -501,8 +501,8 @@
 			for (unsigned i = 0; i < count; ++i) {
 				size_t size = str_size(list[i]);
-				cap_call_handle_t id;
+				ipc_call_t id;
 				if (ret == EOK &&
 				    async_data_read_receive(&id, NULL)) {
-					ret = async_data_read_finalize(id,
+					ret = async_data_read_finalize(&id,
 					    list[i], size);
 				}
@@ -514,5 +514,5 @@
 			/* check interface functions */
 			if (!server_iface || !server_iface->connect) {
-				async_answer_0(chandle, ENOTSUP);
+				async_answer_0(&call, ENOTSUP);
 				break;
 			}
@@ -534,10 +534,10 @@
 			free(source);
 			free(sink);
-			async_answer_0(chandle, ret);
+			async_answer_0(&call, ret);
 			break;
 		case IPC_M_HOUND_DISCONNECT:
 			/* check interface functions */
 			if (!server_iface || !server_iface->disconnect) {
-				async_answer_0(chandle, ENOTSUP);
+				async_answer_0(&call, ENOTSUP);
 				break;
 			}
@@ -558,5 +558,5 @@
 			free(source);
 			free(sink);
-			async_answer_0(chandle, ret);
+			async_answer_0(&call, ret);
 			break;
 		case IPC_M_HOUND_STREAM_ENTER:
@@ -565,10 +565,10 @@
 			    !server_iface->add_stream ||
 			    !server_iface->rem_stream) {
-				async_answer_0(chandle, ENOTSUP);
+				async_answer_0(&call, ENOTSUP);
 				break;
 			}
 
 			/* get parameters */
-			id = (cap_handle_t) IPC_GET_ARG1(call);
+			context = (hound_context_id_t) IPC_GET_ARG1(call);
 			flags = IPC_GET_ARG2(call);
 			const format_convert_t c = { .arg = IPC_GET_ARG3(call) };
@@ -582,14 +582,14 @@
 			void *stream;
 			ret = server_iface->add_stream(server_iface->server,
-			    id, flags, f, bsize, &stream);
+			    context, flags, f, bsize, &stream);
 			if (ret != EOK) {
-				async_answer_0(chandle, ret);
+				async_answer_0(&call, ret);
 				break;
 			}
 			const bool rec = server_iface->is_record_context(
-			    server_iface->server, id);
+			    server_iface->server, context);
 			if (rec) {
 				if (server_iface->stream_data_read) {
-					async_answer_0(chandle, EOK);
+					async_answer_0(&call, EOK);
 					/* start answering read calls */
 					hound_server_write_data(stream);
@@ -597,9 +597,9 @@
 					    server_iface->server, stream);
 				} else {
-					async_answer_0(chandle, ENOTSUP);
+					async_answer_0(&call, ENOTSUP);
 				}
 			} else {
 				if (server_iface->stream_data_write) {
-					async_answer_0(chandle, EOK);
+					async_answer_0(&call, EOK);
 					/* accept write calls */
 					hound_server_read_data(stream);
@@ -607,5 +607,5 @@
 					    server_iface->server, stream);
 				} else {
-					async_answer_0(chandle, ENOTSUP);
+					async_answer_0(&call, ENOTSUP);
 				}
 			}
@@ -614,8 +614,8 @@
 		case IPC_M_HOUND_STREAM_DRAIN:
 			/* Stream exit/drain is only allowed in stream context*/
-			async_answer_0(chandle, EINVAL);
+			async_answer_0(&call, EINVAL);
 			break;
 		default:
-			async_answer_0(chandle, ENOTSUP);
+			async_answer_0(&call, ENOTSUP);
 			return;
 		}
@@ -629,10 +629,10 @@
 static void hound_server_read_data(void *stream)
 {
-	cap_call_handle_t chandle;
 	ipc_call_t call;
 	size_t size = 0;
 	errno_t ret_answer = EOK;
+
 	/* accept data write or drain */
-	while (async_data_write_receive_call(&chandle, &call, &size) ||
+	while (async_data_write_receive(&call, &size) ||
 	    (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN)) {
 		/* check drain first */
@@ -641,5 +641,5 @@
 			if (server_iface->drain_stream)
 				ret = server_iface->drain_stream(stream);
-			async_answer_0(chandle, ret);
+			async_answer_0(&call, ret);
 			continue;
 		}
@@ -647,5 +647,5 @@
 		/* there was an error last time */
 		if (ret_answer != EOK) {
-			async_answer_0(chandle, ret_answer);
+			async_answer_0(&call, ret_answer);
 			continue;
 		}
@@ -653,8 +653,8 @@
 		char *buffer = malloc(size);
 		if (!buffer) {
-			async_answer_0(chandle, ENOMEM);
+			async_answer_0(&call, ENOMEM);
 			continue;
 		}
-		const errno_t ret = async_data_write_finalize(chandle, buffer, size);
+		const errno_t ret = async_data_write_finalize(&call, buffer, size);
 		if (ret == EOK) {
 			/* push data to stream */
@@ -666,5 +666,5 @@
 	    EOK : EINVAL;
 
-	async_answer_0(chandle, ret);
+	async_answer_0(&call, ret);
 }
 
@@ -676,10 +676,10 @@
 {
 
-	cap_call_handle_t chandle;
 	ipc_call_t call;
 	size_t size = 0;
 	errno_t ret_answer = EOK;
+
 	/* accept data read and drain */
-	while (async_data_read_receive_call(&chandle, &call, &size) ||
+	while (async_data_read_receive(&call, &size) ||
 	    (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN)) {
 		/* drain does not make much sense but it is allowed */
@@ -688,15 +688,15 @@
 			if (server_iface->drain_stream)
 				ret = server_iface->drain_stream(stream);
-			async_answer_0(chandle, ret);
+			async_answer_0(&call, ret);
 			continue;
 		}
 		/* there was an error last time */
 		if (ret_answer != EOK) {
-			async_answer_0(chandle, ret_answer);
+			async_answer_0(&call, ret_answer);
 			continue;
 		}
 		char *buffer = malloc(size);
 		if (!buffer) {
-			async_answer_0(chandle, ENOMEM);
+			async_answer_0(&call, ENOMEM);
 			continue;
 		}
@@ -704,5 +704,5 @@
 		if (ret == EOK) {
 			ret_answer =
-			    async_data_read_finalize(chandle, buffer, size);
+			    async_data_read_finalize(&call, buffer, size);
 		}
 	}
@@ -710,5 +710,5 @@
 	    EOK : EINVAL;
 
-	async_answer_0(chandle, ret);
+	async_answer_0(&call, ret);
 }
 
