Index: kernel/generic/include/ipc/ipc.h
===================================================================
--- kernel/generic/include/ipc/ipc.h	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/include/ipc/ipc.h	(revision 8be8cfa20aad57a15e51e9a83cf62a49af0b59a4)
@@ -159,50 +159,10 @@
 #ifdef KERNEL
 
-#include <synch/waitq.h>
-#include <adt/list.h>
-
-#define IPC_MAX_PHONES  16
-
-typedef struct answerbox_s answerbox_t;
-typedef struct phone_s phone_t;
+#include <proc/task.h>
+
 typedef struct {
 	unative_t args[IPC_CALL_LEN];
 	phone_t *phone;
 } ipc_data_t;
-
-struct answerbox_s {
-	SPINLOCK_DECLARE(lock);
-
-	task_t *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. */
-};
-
-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) */
-struct phone_s {
-	SPINLOCK_DECLARE(lock);
-	link_t link;
-	answerbox_t *callee;
-	ipc_phone_state_t state;
-	atomic_t active_calls;
-};
 
 typedef struct {
Index: kernel/generic/include/ipc/irq.h
===================================================================
--- kernel/generic/include/ipc/irq.h	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/include/ipc/irq.h	(revision 8be8cfa20aad57a15e51e9a83cf62a49af0b59a4)
@@ -39,54 +39,8 @@
 #define IRQ_MAX_PROG_SIZE 10
 
-typedef enum {
-	CMD_MEM_READ_1 = 0,
-	CMD_MEM_READ_2,
-	CMD_MEM_READ_4,
-	CMD_MEM_READ_8,
-	CMD_MEM_WRITE_1,
-	CMD_MEM_WRITE_2,
-	CMD_MEM_WRITE_4,
-	CMD_MEM_WRITE_8,
-	CMD_PORT_READ_1,
-	CMD_PORT_WRITE_1,
-	CMD_IA64_GETCHAR,
-	CMD_PPC32_GETCHAR,
-	CMD_LAST
-} irq_cmd_type;
-
-typedef struct {
-	irq_cmd_type cmd;
-	void *addr;
-	unsigned long long value; 
-	int dstarg;
-} irq_cmd_t;
-
-typedef struct {
-	unsigned int cmdcount;
-	irq_cmd_t *cmds;
-} irq_code_t;
-
-#ifdef KERNEL
-
 #include <ipc/ipc.h>
-#include <typedefs.h>
+#include <ddi/irq.h>
 #include <arch/types.h>
 #include <adt/list.h>
-
-/** IPC notification config structure.
- *
- * Primarily, this structure is encapsulated in the irq_t structure.
- * It is protected by irq_t::lock.
- */
-struct ipc_notif_cfg {
-	bool notify;			/**< When false, notifications are not sent. */
-	answerbox_t *answerbox;		/**< Answerbox for notifications. */
-	unative_t method;		/**< Method to be used for the notification. */
-	irq_code_t *code;		/**< Top-half pseudocode. */
-	count_t counter;		/**< Counter. */
-	link_t link;			/**< Link between IRQs that are notifying the
-					     same answerbox. The list is protected by
-					     the answerbox irq_lock. */
-};
 
 extern int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno, unative_t method,
@@ -99,6 +53,4 @@
 #endif
 
-#endif
-
 /** @}
  */
Index: kernel/generic/include/ipc/sysipc.h
===================================================================
--- kernel/generic/include/ipc/sysipc.h	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/include/ipc/sysipc.h	(revision 8be8cfa20aad57a15e51e9a83cf62a49af0b59a4)
@@ -39,5 +39,4 @@
 #include <ipc/irq.h>
 #include <arch/types.h>
-#include <typedefs.h>
 
 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, 
