Index: kbd/Makefile
===================================================================
--- kbd/Makefile	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ kbd/Makefile	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -31,11 +31,10 @@
 
 LIBC_PREFIX = ../libc
-LIBIPC_PREFIX = ../libipc
 SOFTINT_PREFIX = ../softint
 include $(LIBC_PREFIX)/Makefile.toolchain 
 
-CFLAGS += -Iinclude -I../libipc/include -I../libadt/include
+CFLAGS += -Iinclude -I../libadt/include
 
-LIBS = $(LIBIPC_PREFIX)/libipc.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBC_PREFIX)/libc.a
 
 ## Sources
Index: kbd/generic/kbd.c
===================================================================
--- kbd/generic/kbd.c	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ kbd/generic/kbd.c	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -27,10 +27,10 @@
  */
 
-#include <ipc.h>
-#include <services.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <ns.h>
+#include <ipc/ns.h>
 #include <errno.h>
 #include <arch/kbd.h>
Index: libc/generic/ipc.c
===================================================================
--- libc/generic/ipc.c	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ libc/generic/ipc.c	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -27,9 +27,9 @@
  */ 
 
-#include <ipc.h>
+#include <ipc/ipc.h>
 #include <libc.h>
 #include <malloc.h>
 #include <errno.h>
-#include <list.h>
+#include <libadt/list.h>
 #include <stdio.h>
 #include <unistd.h>
Index: libc/include/ipc/ipc.h
===================================================================
--- libc/include/ipc/ipc.h	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
+++ libc/include/ipc/ipc.h	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2006 Ondrej Palkovsky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */ 
+
+#ifndef __LIBIPC_IPC_H__
+#define __LIBIPC_IPC_H__
+
+#include <kernel/ipc/ipc.h>
+#include <kernel/ipc/irq.h>
+#include <libc.h>
+#include <types.h>
+
+typedef sysarg_t ipcarg_t;
+typedef struct {
+	ipcarg_t args[IPC_CALL_LEN];
+	ipcarg_t in_phone_hash;
+} ipc_call_t ;
+typedef sysarg_t ipc_callid_t;
+
+typedef void (* ipc_async_callback_t)(void *private, int retval,
+				      ipc_call_t *data);
+
+#define ipc_call_sync_2(phoneid, method, arg1, arg2, res1, res2) ipc_call_sync_3((phoneid), (method), (arg1), (arg2), 0, (res1), (res2), 0)
+extern int ipc_call_sync_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
+			   ipcarg_t arg2, ipcarg_t arg3,
+			   ipcarg_t *result1, ipcarg_t *result2, 
+			   ipcarg_t *result3);
+
+
+extern int ipc_call_sync(int phoneid, ipcarg_t method, ipcarg_t arg1,
+			 ipcarg_t *result);
+extern ipc_callid_t ipc_wait_for_call(ipc_call_t *data, int flags);
+extern ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
+			   ipcarg_t arg2);
+extern ipcarg_t ipc_answer(ipc_callid_t callid, ipc_call_t *call);
+
+#define ipc_call_async(phoneid,method,arg1,private, callback) (ipc_call_async_2(phoneid, method, arg1, 0, private, callback))
+extern void ipc_call_async_2(int phoneid, ipcarg_t method, ipcarg_t arg1,
+		      ipcarg_t arg2, void *private,
+		      ipc_async_callback_t callback);
+extern int ipc_connect_to_me(int phoneid, int arg1, int arg2, ipcarg_t *phone);
+extern int ipc_connect_me_to(int phoneid, int arg1, int arg2);
+extern int ipc_hangup(int phoneid);
+extern int ipc_register_irq(int irq, irq_code_t *code);
+extern int ipc_unregister_irq(int irq);
+extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method, ipcarg_t arg1);
+extern void _ipc_init(void);
+
+#endif
Index: libc/include/ipc/ns.h
===================================================================
--- libc/include/ipc/ns.h	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
+++ libc/include/ipc/ns.h	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2006 Ondrej Palkovsky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __LIBIPC__NS_H__
+#define __LIBIPC__NS_H__
+
+#define NS_PING      1024
+#define NS_PING_SVC  1025
+#define NS_HANGUP    1026
+
+#endif
Index: libc/include/ipc/services.h
===================================================================
--- libc/include/ipc/services.h	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
+++ libc/include/ipc/services.h	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2006 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file	services.h
+ * @brief	List of all known services and their codes.
+ */
+
+#ifndef __LIBIPC__SERVICES_H__
+#define __LIBIPC__SERVICES_H__
+
+#define SERVICE_PCI		1
+#define SERVICE_FRAME_BUFFER	2
+#define SERVICE_KEYBOARD	3
+
+#endif
Index: bc/include/libipc/ipc.h
===================================================================
--- libc/include/libipc/ipc.h	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Copyright (C) 2006 Ondrej Palkovsky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */ 
-
-#ifndef __LIBIPC_IPC_H__
-#define __LIBIPC_IPC_H__
-
-#include <kernel/ipc/ipc.h>
-#include <kernel/ipc/irq.h>
-#include <libc.h>
-#include <types.h>
-
-typedef sysarg_t ipcarg_t;
-typedef struct {
-	ipcarg_t args[IPC_CALL_LEN];
-	ipcarg_t in_phone_hash;
-} ipc_call_t ;
-typedef sysarg_t ipc_callid_t;
-
-typedef void (* ipc_async_callback_t)(void *private, int retval,
-				      ipc_call_t *data);
-
-#define ipc_call_sync_2(phoneid, method, arg1, arg2, res1, res2) ipc_call_sync_3((phoneid), (method), (arg1), (arg2), 0, (res1), (res2), 0)
-extern int ipc_call_sync_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
-			   ipcarg_t arg2, ipcarg_t arg3,
-			   ipcarg_t *result1, ipcarg_t *result2, 
-			   ipcarg_t *result3);
-
-
-extern int ipc_call_sync(int phoneid, ipcarg_t method, ipcarg_t arg1,
-			 ipcarg_t *result);
-extern ipc_callid_t ipc_wait_for_call(ipc_call_t *data, int flags);
-extern ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
-			   ipcarg_t arg2);
-extern ipcarg_t ipc_answer(ipc_callid_t callid, ipc_call_t *call);
-
-#define ipc_call_async(phoneid,method,arg1,private, callback) (ipc_call_async_2(phoneid, method, arg1, 0, private, callback))
-extern void ipc_call_async_2(int phoneid, ipcarg_t method, ipcarg_t arg1,
-		      ipcarg_t arg2, void *private,
-		      ipc_async_callback_t callback);
-extern int ipc_connect_to_me(int phoneid, int arg1, int arg2, ipcarg_t *phone);
-extern int ipc_connect_me_to(int phoneid, int arg1, int arg2);
-extern int ipc_hangup(int phoneid);
-extern int ipc_register_irq(int irq, irq_code_t *code);
-extern int ipc_unregister_irq(int irq);
-extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method, ipcarg_t arg1);
-extern void _ipc_init(void);
-
-#endif
Index: bc/include/libipc/ns.h
===================================================================
--- libc/include/libipc/ns.h	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/*
- * Copyright (C) 2006 Ondrej Palkovsky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __LIBIPC__NS_H__
-#define __LIBIPC__NS_H__
-
-#define NS_PING      1024
-#define NS_PING_SVC  1025
-#define NS_HANGUP    1026
-
-#endif
Index: bc/include/libipc/services.h
===================================================================
--- libc/include/libipc/services.h	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * Copyright (C) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file	services.h
- * @brief	List of all known services and their codes.
- */
-
-#ifndef __LIBIPC__SERVICES_H__
-#define __LIBIPC__SERVICES_H__
-
-#define SERVICE_PCI		1
-#define SERVICE_FRAME_BUFFER	2
-#define SERVICE_KEYBOARD	3
-
-#endif
Index: pci/Makefile
===================================================================
--- pci/Makefile	(revision 450cd3a5ceb1c9d0d3b430b9ba52787108cbe473)
+++ pci/Makefile	(revision 7ee6affdecac3b628077c014c4bf06aaa720f1b9)
@@ -31,11 +31,9 @@
 
 LIBC_PREFIX = ../libc
-LIBIPC_PREFIX = ../libipc
 SOFTINT_PREFIX = ../softint
 include $(LIBC_PREFIX)/Makefile.toolchain
 
-CFLAGS += -I../libipc/include
 
-LIBS = libpci/libpci.a $(LIBIPC_PREFIX)/libipc.a $(LIBC_PREFIX)/libc.a
+LIBS = libpci/libpci.a $(LIBC_PREFIX)/libc.a
 
 ## Sources
