Index: kernel/generic/include/ipc/ipc.h
===================================================================
--- kernel/generic/include/ipc/ipc.h	(revision 0c1a5d8afc92defd6f72d5e63c28c60152e3d46b)
+++ kernel/generic/include/ipc/ipc.h	(revision fa8e7d2eafc95dcfd4435b0ca55cbfb76b7b11b5)
@@ -159,5 +159,45 @@
 #ifdef KERNEL
 
-#include <proc/task.h>
+#define IPC_MAX_PHONES  16
+
+#include <synch/waitq.h>
+
+struct answerbox;
+struct task;
+
+typedef enum {
+	IPC_PHONE_FREE = 0,     /**< Phone is free and can be allocated */
+	IPC_PHONE_CONNECTING,   /**< Phone is connecting somewhere */
+	IPC_PHONE_CONNECTED,    /**< Phone is connected */
+	IPC_PHONE_HUNGUP,  	/**< Phone is hung up, waiting for answers to come */
+	IPC_PHONE_SLAMMED       /**< Phone was hungup from server */
+} ipc_phone_state_t;
+
+/** Structure identifying phone (in TASK structure) */
+typedef struct {
+	SPINLOCK_DECLARE(lock);
+	link_t link;
+	struct answerbox *callee;
+	ipc_phone_state_t state;
+	atomic_t active_calls;
+} phone_t;
+
+typedef struct answerbox {
+	SPINLOCK_DECLARE(lock);
+
+	struct task *task;
+
+	waitq_t wq;
+
+	link_t connected_phones;	/**< Phones connected to this answerbox */
+	link_t calls;			/**< Received calls */
+	link_t dispatched_calls;	/* Should be hash table in the future */
+
+	link_t answers;			/**< Answered calls */
+
+	SPINLOCK_DECLARE(irq_lock);
+	link_t irq_notifs;       	/**< Notifications from IRQ handlers */
+	link_t irq_head;		/**< IRQs with notifications to this answerbox. */
+} answerbox_t;
 
 typedef struct {
@@ -172,5 +212,5 @@
 
 	/* Identification of the caller */
-	task_t *sender;
+	struct task *sender;
 	/* The caller box is different from sender->answerbox
 	 * for synchronous calls
