Index: uspace/srv/net/il/arp/Makefile
===================================================================
--- uspace/srv/net/il/arp/Makefile	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/arp/Makefile	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -28,20 +28,12 @@
 #
 
-NET_BASE = ../..
 USPACE_PREFIX = ../../../..
+LIBS = $(LIBNET_PREFIX)/libnet.a $(LIBSOCKET_PREFIX)/libsocket.a
+EXTRA_CFLAGS = -I$(LIBNET_PREFIX)/include -I$(LIBSOCKET_PREFIX)/include
 BINARY = arp
 
 SOURCES = \
 	arp.c \
-	arp_module.c \
-	$(NET_BASE)/module.c \
-	$(NET_BASE)/modules.c \
-	$(NET_BASE)/net/net_remote.c \
-	$(NET_BASE)/nil/nil_remote.c \
-	$(NET_BASE)/structures/char_map.c \
-	$(NET_BASE)/structures/measured_strings.c \
-	$(NET_BASE)/structures/packet/packet.c \
-	$(NET_BASE)/structures/packet/packet_client.c \
-	$(NET_BASE)/structures/packet/packet_remote.c
+	arp_module.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/arp/arp.c	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -43,23 +43,20 @@
 #include <str.h>
 #include <task.h>
-
 #include <ipc/ipc.h>
 #include <ipc/services.h>
 
-#include "../../err.h"
-#include "../../messages.h"
-#include "../../modules.h"
-
-#include "../../include/byteorder.h"
-#include "../../include/device.h"
-#include "../../include/arp_interface.h"
-#include "../../include/nil_interface.h"
-#include "../../include/protocol_map.h"
-
-#include "../../structures/measured_strings.h"
-#include "../../structures/packet/packet.h"
-#include "../../structures/packet/packet_client.h"
-
-#include "../il_messages.h"
+#include <net_err.h>
+#include <net_messages.h>
+#include <net_modules.h>
+#include <net_byteorder.h>
+#include <net_device.h>
+#include <arp_interface.h>
+#include <nil_interface.h>
+#include <protocol_map.h>
+#include <adt/measured_strings.h>
+#include <packet/packet.h>
+#include <packet/packet_client.h>
+#include <il_messages.h>
+#include <arp_messages.h>
 
 #include "arp.h"
@@ -67,5 +64,9 @@
 #include "arp_oc.h"
 #include "arp_module.h"
-#include "arp_messages.h"
+
+
+/** ARP module name.
+ */
+#define NAME	"ARP protocol"
 
 /** ARP global data.
@@ -618,4 +619,72 @@
 }
 
+#ifdef CONFIG_NETWORKING_modular
+
+#include <il_standalone.h>
+
+/** Default thread for new connections.
+ *
+ *  @param[in] iid The initial message identifier.
+ *  @param[in] icall The initial message call structure.
+ *
+ */
+static void il_client_connection(ipc_callid_t iid, ipc_call_t * icall)
+{
+	/*
+	 * Accept the connection
+	 *  - Answer the first IPC_M_CONNECT_ME_TO call.
+	 */
+	ipc_answer_0(iid, EOK);
+	
+	while(true) {
+		ipc_call_t answer;
+		int answer_count;
+		
+		/* Clear the answer structure */
+		refresh_answer(&answer, &answer_count);
+		
+		/* Fetch the next message */
+		ipc_call_t call;
+		ipc_callid_t callid = async_get_call(&call);
+		
+		/* Process the message */
+		int res = il_module_message(callid, &call, &answer, &answer_count);
+		
+		/* End if said to either by the message or the processing result */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+			return;
+		
+		/* Answer the message */
+		answer_call(callid, res, &answer, answer_count);
+	}
+}
+
+/** Starts the module.
+ *
+ *  @param argc The count of the command line arguments. Ignored parameter.
+ *  @param argv The command line parameters. Ignored parameter.
+ *
+ *  @returns EOK on success.
+ *  @returns Other error codes as defined for each specific module start function.
+ *
+ */
+int main(int argc, char *argv[])
+{
+	ERROR_DECLARE;
+	
+	/* Print the module label */
+	printf("Task %d - %s\n", task_get_id(), NAME);
+	
+	/* Start the module */
+	if (ERROR_OCCURRED(il_module_start(il_client_connection))) {
+		printf(" - ERROR %i\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+	
+	return EOK;
+}
+
+#endif /* CONFIG_NETWORKING_modular */
+
 /** @}
  */
Index: uspace/srv/net/il/arp/arp.h
===================================================================
--- uspace/srv/net/il/arp/arp.h	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/arp/arp.h	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -43,10 +43,9 @@
 #include <ipc/services.h>
 
-#include "../../include/device.h"
-#include "../../include/hardware.h"
-
-#include "../../structures/generic_char_map.h"
-#include "../../structures/int_map.h"
-#include "../../structures/measured_strings.h"
+#include <net_device.h>
+#include <net_hardware.h>
+#include <adt/generic_char_map.h>
+#include <adt/int_map.h>
+#include <adt/measured_strings.h>
 
 
Index: uspace/srv/net/il/arp/arp_messages.h
===================================================================
--- uspace/srv/net/il/arp/arp_messages.h	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup arp
- *  @{
- */
-
-/** @file
- *  ARP module messages.
- *  @see arp_interface.h
- */
-
-#ifndef __NET_ARP_MESSAGES__
-#define __NET_ARP_MESSAGES__
-
-#include <ipc/ipc.h>
-
-#include "../../messages.h"
-
-/** ARP module messages.
- */
-typedef enum{
-	/** Clean cache message.
-	 *  @see arp_clean_cache()
-	 */
-	NET_ARP_CLEAN_CACHE = NET_ARP_FIRST,
-	/** Clear address cache message.
-	 *  @see arp_clear_address_msg()
-	 */
-	NET_ARP_CLEAR_ADDRESS,
-	/** Clear device cache message.
-	 *  @see arp_clear_device_req()
-	 */
-	NET_ARP_CLEAR_DEVICE,
-	/** New device message.
-	 *  @see arp_device_req()
-	 */
-	NET_ARP_DEVICE,
-	/** Address translation message.
-	 *  @see arp_translate_req()
-	 */
-	NET_ARP_TRANSLATE
-} arp_messages;
-
-/** @name ARP specific message parameters definitions
- */
-/*@{*/
-
-/** Returns the protocol service message parameter.
- *  @param[in] call The message call structure.
- */
-#define ARP_GET_NETIF(call) \
-	({services_t service = (services_t) IPC_GET_ARG2(*call); service;})
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/il/arp/arp_module.c
===================================================================
--- uspace/srv/net/il/arp/arp_module.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/arp/arp_module.c	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -44,17 +44,12 @@
 #include <ipc/services.h>
 
-#include "../../err.h"
-#include "../../modules.h"
-
-#include "../../include/net_interface.h"
-
-#include "../../structures/packet/packet.h"
+#include <net_err.h>
+#include <net_modules.h>
+#include <net_interface.h>
+#include <packet/packet.h>
+#include <il_standalone.h>
 
 #include "arp.h"
 #include "arp_module.h"
-
-/** ARP module name.
- */
-#define NAME	"ARP protocol"
 
 /** ARP module global data.
@@ -70,10 +65,7 @@
  *  @returns Other error codes as defined for the arp_message() function.
  */
-int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
-
-/** Prints the module name.
- *  @see NAME
- */
-void module_print_name(void);
+int il_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+	return arp_message(callid, call, answer, answer_count);
+}
 
 /** Starts the ARP module.
@@ -84,15 +76,5 @@
  *  @returns Other error codes as defined for the REGISTER_ME() macro function.
  */
-int module_start(async_client_conn_t client_connection);
-
-int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
-	return arp_message(callid, call, answer, answer_count);
-}
-
-void module_print_name(void){
-	printf("%s", NAME);
-}
-
-int module_start(async_client_conn_t client_connection){
+int il_module_start(async_client_conn_t client_connection){
 	ERROR_DECLARE;
 
Index: uspace/srv/net/il/arp/arp_remote.c
===================================================================
--- uspace/srv/net/il/arp/arp_remote.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup arp
- *  @{
- */
-
-/** @file
- *  ARP interface implementation for standalone remote modules.
- *  @see arp_interface.h
- */
-
-#include <async.h>
-#include <errno.h>
-
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-
-#include "../../messages.h"
-#include "../../modules.h"
-
-#include "../../include/device.h"
-#include "../../include/arp_interface.h"
-
-#include "../../structures/measured_strings.h"
-
-#include "arp_messages.h"
-
-int arp_connect_module(services_t service){
-	if(service != SERVICE_ARP){
-		return EINVAL;
-	}
-	return connect_to_service(SERVICE_ARP);
-}
-
-int arp_clean_cache_req(int arp_phone){
-	return (int) async_req_0_0(arp_phone, NET_ARP_CLEAN_CACHE);
-}
-
-int arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address){
-	aid_t message_id;
-	ipcarg_t result;
-
-	message_id = async_send_2(arp_phone, NET_ARP_CLEAR_ADDRESS, (ipcarg_t) device_id, protocol, NULL);
-	measured_strings_send(arp_phone, address, 1);
-	async_wait_for(message_id, &result);
-	return (int) result;
-}
-
-int arp_clear_device_req(int arp_phone, device_id_t device_id){
-	return (int) async_req_1_0(arp_phone, NET_ARP_CLEAR_DEVICE, (ipcarg_t) device_id);
-}
-
-int arp_device_req(int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address){
-	aid_t message_id;
-	ipcarg_t result;
-
-	message_id = async_send_3(arp_phone, NET_ARP_DEVICE, (ipcarg_t) device_id, protocol, netif, NULL);
-	measured_strings_send(arp_phone, address, 1);
-	async_wait_for(message_id, &result);
-	return (int) result;
-}
-
-task_id_t arp_task_get_id(void){
-	return 0;
-}
-
-int arp_translate_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data){
-	return generic_translate_req(arp_phone, NET_ARP_TRANSLATE, device_id, protocol, address, 1, translation, data);
-}
-
-/** @}
- */
Index: uspace/srv/net/il/il_messages.h
===================================================================
--- uspace/srv/net/il/il_messages.h	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup net_il
- *  @{
- */
-
-/** @file
- *  Internetwork layer modules messages.
- *  @see il_interface.h
- *  @see ip_interface.h
- */
-
-#ifndef __NET_IL_MESSAGES_H__
-#define __NET_IL_MESSAGES_H__
-
-#include <ipc/ipc.h>
-
-/** Internet layer modules messages.
- */
-typedef enum{
-	/** New device message.
-	 *  @see ip_device_req()
-	 */
-	NET_IL_DEVICE = NET_IL_FIRST,
-	/** Device state changed message.
-	 *  @see il_device_state_msg()
-	 */
-	NET_IL_DEVICE_STATE,
-	/** Device MTU changed message.
-	 *  @see il_mtu_changed_msg()
-	 */
-	NET_IL_MTU_CHANGED,
-	/** Packet size message.
-	 *  @see il_packet_size_req()
-	 */
-	NET_IL_PACKET_SPACE,
-	/** Packet received message.
-	 *  @see il_received_msg()
-	 */
-	NET_IL_RECEIVED,
-	/** Packet send message.
-	 *  @see il_send_msg()
-	 */
-	NET_IL_SEND
-} il_messages;
-
-/** @name Internetwork layer specific message parameters definitions
- */
-/*@{*/
-
-/** Returns the protocol number message parameter.
- *  @param[in] call The message call structure.
- */
-#define IL_GET_PROTO(call)		(int) IPC_GET_ARG1(*call)
-
-/** Returns the registering service message parameter.
- *  @param[in] call The message call structure.
- */
-#define IL_GET_SERVICE(call)	(services_t) IPC_GET_ARG2(*call)
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/il/ip/Makefile
===================================================================
--- uspace/srv/net/il/ip/Makefile	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/ip/Makefile	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -28,28 +28,12 @@
 #
 
-NET_BASE = ../..
 USPACE_PREFIX = ../../../..
+LIBS = $(LIBNET_PREFIX)/libnet.a $(LIBSOCKET_PREFIX)/libsocket.a
+EXTRA_CFLAGS = -I$(LIBNET_PREFIX)/include -I$(LIBSOCKET_PREFIX)/include
 BINARY = ip
 
 SOURCES = \
 	ip.c \
-	ip_client.c \
-	ip_module.c \
-	$(NET_BASE)/checksum.c \
-	$(NET_BASE)/inet.c \
-	$(NET_BASE)/module.c \
-	$(NET_BASE)/modules.c \
-	$(NET_BASE)/il/arp/arp_remote.c \
-	$(NET_BASE)/nil/nil_remote.c \
-	$(NET_BASE)/net/net_remote.c \
-	$(NET_BASE)/tl/icmp/icmp_client.c \
-	$(NET_BASE)/tl/icmp/icmp_common.c \
-	$(NET_BASE)/tl/icmp/icmp_remote.c \
-	$(NET_BASE)/structures/char_map.c \
-	$(NET_BASE)/structures/measured_strings.c \
-	$(NET_BASE)/structures/module_map.c \
-	$(NET_BASE)/structures/packet/packet.c \
-	$(NET_BASE)/structures/packet/packet_client.c \
-	$(NET_BASE)/structures/packet/packet_remote.c
+	ip_module.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/ip/ip.c	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -41,39 +41,34 @@
 #include <stdio.h>
 #include <str.h>
-
 #include <ipc/ipc.h>
 #include <ipc/services.h>
-
 #include <sys/types.h>
 
-#include "../../err.h"
-#include "../../messages.h"
-#include "../../modules.h"
-
-#include "../../include/arp_interface.h"
-#include "../../include/byteorder.h"
-#include "../../include/checksum.h"
-#include "../../include/device.h"
-#include "../../include/icmp_client.h"
-#include "../../include/icmp_codes.h"
-#include "../../include/icmp_interface.h"
-#include "../../include/il_interface.h"
-#include "../../include/in.h"
-#include "../../include/in6.h"
-#include "../../include/inet.h"
-#include "../../include/ip_client.h"
-#include "../../include/ip_interface.h"
-#include "../../include/net_interface.h"
-#include "../../include/nil_interface.h"
-#include "../../include/tl_interface.h"
-#include "../../include/socket_codes.h"
-#include "../../include/socket_errno.h"
-#include "../../structures/measured_strings.h"
-#include "../../structures/module_map.h"
-#include "../../structures/packet/packet_client.h"
-
-#include "../../nil/nil_messages.h"
-
-#include "../il_messages.h"
+#include <net_err.h>
+#include <net_messages.h>
+#include <net_modules.h>
+#include <arp_interface.h>
+#include <net_byteorder.h>
+#include <net_checksum.h>
+#include <net_device.h>
+#include <icmp_client.h>
+#include <icmp_codes.h>
+#include <icmp_interface.h>
+#include <il_interface.h>
+#include <in.h>
+#include <in6.h>
+#include <inet.h>
+#include <ip_client.h>
+#include <ip_interface.h>
+#include <net_interface.h>
+#include <nil_interface.h>
+#include <tl_interface.h>
+#include <socket_codes.h>
+#include <socket_errno.h>
+#include <adt/measured_strings.h>
+#include <adt/module_map.h>
+#include <packet/packet_client.h>
+#include <nil_messages.h>
+#include <il_messages.h>
 
 #include "ip.h"
@@ -81,4 +76,8 @@
 #include "ip_messages.h"
 #include "ip_module.h"
+
+/** IP module name.
+ */
+#define NAME	"IP protocol"
 
 /** IP version 4.
@@ -1624,4 +1623,72 @@
 }
 
+#ifdef CONFIG_NETWORKING_modular
+
+#include <il_standalone.h>
+
+/** Default thread for new connections.
+ *
+ *  @param[in] iid The initial message identifier.
+ *  @param[in] icall The initial message call structure.
+ *
+ */
+static void il_client_connection(ipc_callid_t iid, ipc_call_t * icall)
+{
+	/*
+	 * Accept the connection
+	 *  - Answer the first IPC_M_CONNECT_ME_TO call.
+	 */
+	ipc_answer_0(iid, EOK);
+	
+	while(true) {
+		ipc_call_t answer;
+		int answer_count;
+		
+		/* Clear the answer structure */
+		refresh_answer(&answer, &answer_count);
+		
+		/* Fetch the next message */
+		ipc_call_t call;
+		ipc_callid_t callid = async_get_call(&call);
+		
+		/* Process the message */
+		int res = il_module_message(callid, &call, &answer, &answer_count);
+		
+		/* End if said to either by the message or the processing result */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+			return;
+		
+		/* Answer the message */
+		answer_call(callid, res, &answer, answer_count);
+	}
+}
+
+/** Starts the module.
+ *
+ *  @param argc The count of the command line arguments. Ignored parameter.
+ *  @param argv The command line parameters. Ignored parameter.
+ *
+ *  @returns EOK on success.
+ *  @returns Other error codes as defined for each specific module start function.
+ *
+ */
+int main(int argc, char *argv[])
+{
+	ERROR_DECLARE;
+	
+	/* Print the module label */
+	printf("Task %d - %s\n", task_get_id(), NAME);
+	
+	/* Start the module */
+	if (ERROR_OCCURRED(il_module_start(il_client_connection))) {
+		printf(" - ERROR %i\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+	
+	return EOK;
+}
+
+#endif /* CONFIG_NETWORKING_modular */
+
 /** @}
  */
Index: uspace/srv/net/il/ip/ip.h
===================================================================
--- uspace/srv/net/il/ip/ip.h	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/ip/ip.h	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -39,15 +39,13 @@
 
 #include <fibril_synch.h>
-
 #include <ipc/ipc.h>
 #include <ipc/services.h>
 
-#include "../../include/device.h"
-#include "../../include/inet.h"
-#include "../../include/ip_interface.h"
-
-#include "../../structures/int_map.h"
-#include "../../structures/generic_field.h"
-#include "../../structures/module_map.h"
+#include <net_device.h>
+#include <inet.h>
+#include <ip_interface.h>
+#include <adt/int_map.h>
+#include <adt/generic_field.h>
+#include <adt/module_map.h>
 
 /** Type definition of the IP global data.
Index: uspace/srv/net/il/ip/ip_client.c
===================================================================
--- uspace/srv/net/il/ip/ip_client.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,187 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup ip
- *  @{
- */
-
-/** @file
- *  IP client interface implementation.
- *  @see ip_client.h
- */
-
-#include <errno.h>
-
-#include <sys/types.h>
-
-#include "../../include/ip_client.h"
-#include "../../include/socket_errno.h"
-
-#include "../../structures/packet/packet.h"
-#include "../../structures/packet/packet_client.h"
-
-#include "ip_header.h"
-
-size_t ip_client_header_length(packet_t packet){
-	ip_header_ref header;
-
-	header = (ip_header_ref) packet_get_data(packet);
-	if((! header)
-		|| (packet_get_data_length(packet) < sizeof(ip_header_t))){
-		return 0;
-	}
-	return IP_HEADER_LENGTH(header);
-}
-
-int ip_client_get_pseudo_header(ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen){
-	ipv4_pseudo_header_ref header_in;
-	struct sockaddr_in * address_in;
-
-	if(!(header && headerlen)){
-		return EBADMEM;
-	}
-	if(!(src && dest && (srclen > 0) && ((size_t) srclen >= sizeof(struct sockaddr)) && (srclen == destlen) && (src->sa_family == dest->sa_family))){
-		return EINVAL;
-	}
-
-	switch(src->sa_family){
-		case AF_INET:
-			if(srclen != sizeof(struct sockaddr_in)){
-				return EINVAL;
-			}
-			*headerlen = sizeof(*header_in);
-			header_in = (ipv4_pseudo_header_ref) malloc(*headerlen);
-			if(! header_in){
-				return ENOMEM;
-			}
-			bzero(header_in, * headerlen);
-			address_in = (struct sockaddr_in *) dest;
-			header_in->destination_address = address_in->sin_addr.s_addr;
-			address_in = (struct sockaddr_in *) src;
-			header_in->source_address = address_in->sin_addr.s_addr;
-			header_in->protocol = protocol;
-			header_in->data_length = htons(data_length);
-			*header = (ip_pseudo_header_ref) header_in;
-			return EOK;
-		// TODO IPv6
-/*		case AF_INET6:
-			if(addrlen != sizeof(struct sockaddr_in6)){
-				return EINVAL;
-			}
-			address_in6 = (struct sockaddr_in6 *) addr;
-			return EOK;
-*/		default:
-			return EAFNOSUPPORT;
-	}
-}
-
-int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length){
-	ip_header_ref header;
-	uint8_t * data;
-	size_t padding;
-
-	// compute the padding if IP options are set
-	// multiple of 4 bytes
-	padding =  ipopt_length % 4;
-	if(padding){
-		padding = 4 - padding;
-		ipopt_length += padding;
-	}
-
-	// prefix the header
-	data = (uint8_t *) packet_prefix(packet, sizeof(ip_header_t) + padding);
-	if(! data){
-		return ENOMEM;
-	}
-
-	// add the padding
-	while(padding --){
-		data[sizeof(ip_header_t) + padding] = IPOPT_NOOP;
-	}
-
-	// set the header
-	header = (ip_header_ref) data;
-	header->header_length = IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) + ipopt_length);
-	header->ttl = (ttl ? ttl : IPDEFTTL); //(((ttl) <= MAXTTL) ? ttl : MAXTTL) : IPDEFTTL;
-	header->tos = tos;
-	header->protocol = protocol;
-
-	if(dont_fragment){
-		header->flags = IPFLAG_DONT_FRAGMENT;
-	}
-	return EOK;
-}
-
-int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length){
-	ip_header_ref header;
-
-	header = (ip_header_ref) packet_get_data(packet);
-	if((! header)
-		|| (packet_get_data_length(packet) < sizeof(ip_header_t))){
-		return ENOMEM;
-	}
-
-	if(protocol){
-		*protocol = header->protocol;
-	}
-	if(ttl){
-		*ttl = header->ttl;
-	}
-	if(tos){
-		*tos = header->tos;
-	}
-	if(dont_fragment){
-		*dont_fragment = header->flags &IPFLAG_DONT_FRAGMENT;
-	}
-	if(ipopt_length){
-		*ipopt_length = IP_HEADER_LENGTH(header) - sizeof(ip_header_t);
-		return sizeof(ip_header_t);
-	}else{
-		return IP_HEADER_LENGTH(header);
-	}
-}
-
-int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length){
-	ipv4_pseudo_header_ref header_in;
-
-	if(! header){
-		return EBADMEM;
-	}
-
-	if(headerlen == sizeof(ipv4_pseudo_header_t)){
-		header_in = (ipv4_pseudo_header_ref) header;
-		header_in->data_length = htons(data_length);
-		return EOK;
-	// TODO IPv6
-	}else{
-		return EINVAL;
-	}
-}
-
-/** @}
- */
Index: uspace/srv/net/il/ip/ip_header.h
===================================================================
--- uspace/srv/net/il/ip/ip_header.h	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,282 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup ip
- *  @{
- */
-
-/** @file
- *  IP header and options definitions.
- *  Based on the RFC~791.
- */
-
-#ifndef __NET_IP_HEADER_H__
-#define __NET_IP_HEADER_H__
-
-#include <byteorder.h>
-#include <sys/types.h>
-
-/** Returns the fragment offest high bits.
- *  @param[in] length The prefixed data total length.
- */
-#define IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length) ((((length) / 8u) &0x1F00) >> 8)
-
-/** Returns the fragment offest low bits.
- *  @param[in] length The prefixed data total length.
- */
-#define IP_COMPUTE_FRAGMENT_OFFSET_LOW(length) (((length) / 8u) &0xFF)
-
-/** Returns the IP header length.
- *  @param[in] length The IP header length in bytes.
- */
-#define IP_COMPUTE_HEADER_LENGTH(length)		((uint8_t) ((length) / 4u))
-
-/** Returns the fragment offest.
- *  @param[in] header The IP packet header.
- */
-#define IP_FRAGMENT_OFFSET(header) ((((header)->fragment_offset_high << 8) + (header)->fragment_offset_low) * 8u)
-
-/** Returns the IP packet header checksum.
- *  @param[in] header The IP packet header.
- */
-#define IP_HEADER_CHECKSUM(header)	(htons(ip_checksum((uint8_t *)(header), IP_HEADER_LENGTH(header))))
-
-/** Returns the actual IP packet data length.
- *  @param[in] header The IP packet header.
- */
-#define IP_HEADER_DATA_LENGTH(header)	(IP_TOTAL_LENGTH(header) - IP_HEADER_LENGTH(header))
-
-/** Returns the actual IP header length in bytes.
- *  @param[in] header The IP packet header.
- */
-#define IP_HEADER_LENGTH(header)		((header)->header_length * 4u)
-
-/** Returns the actual IP packet total length.
- *  @param[in] header The IP packet header.
- */
-#define IP_TOTAL_LENGTH(header)		ntohs((header)->total_length)
-
-/** @name IP flags definitions
- */
-/*@{*/
-
-/** Fragment flag field shift.
- */
-#define IPFLAG_FRAGMENT_SHIFT		1
-
-/** Fragmented flag field shift.
- */
-#define IPFLAG_FRAGMENTED_SHIFT		0
-
-/** Don't fragment flag value.
- *  Permits the packet fragmentation.
- */
-#define IPFLAG_DONT_FRAGMENT		(0x1 << IPFLAG_FRAGMENT_SHIFT)
-
-/** Last fragment flag value.
- *  Indicates the last packet fragment.
- */
-#define IPFLAG_LAST_FRAGMENT		(0x0 << IPFLAG_FRAGMENTED_SHIFT)
-
-/** May fragment flag value.
- *  Allows the packet fragmentation.
- */
-#define IPFLAG_MAY_FRAGMENT			(0x0 << IPFLAG_FRAGMENT_SHIFT)
-
-/** More fragments flag value.
- *  Indicates that more packet fragments follow.
- */
-#define IPFLAG_MORE_FRAGMENTS		(0x1 << IPFLAG_FRAGMENTED_SHIFT)
-
-/*@}*/
-
-/** Type definition of the internet header.
- *  @see ip_header
- */
-typedef struct ip_header	ip_header_t;
-
-/** Type definition of the internet header pointer.
- *  @see ip_header
- */
-typedef ip_header_t *		ip_header_ref;
-
-/** Type definition of the internet option header.
- *  @see ip_header
- */
-typedef struct ip_option	ip_option_t;
-
-/** Type definition of the internet option header pointer.
- *  @see ip_header
- */
-typedef ip_option_t *		ip_option_ref;
-
-/** Type definition of the internet version 4 pseudo header.
- *  @see ipv4_pseudo_header
- */
-typedef struct ipv4_pseudo_header	ipv4_pseudo_header_t;
-
-/** Type definition of the internet version 4 pseudo header pointer.
- *  @see ipv4_pseudo_header
- */
-typedef ipv4_pseudo_header_t *		ipv4_pseudo_header_ref;
-
-/** Internet header.
- *  The variable options should be included after the header itself and indicated by the increased header length value.
- */
-struct ip_header{
-#ifdef ARCH_IS_BIG_ENDIAN
-	/** The Version field indicates the format of the internet header.
-	 */
-	uint8_t version:4;
-	/** Internet Header Length is the length of the internet header in 32~bit words, and thus points to the beginning of the data.
-	 *  Note that the minimum value for a~correct header is~5.
-	 */
-	uint8_t header_length:4;
-#else
-	/** Internet Header Length is the length of the internet header in 32~bit words, and thus points to the beginning of the data.
-	 *  Note that the minimum value for a~correct header is~5.
-	 */
-	uint8_t header_length:4;
-	/** The Version field indicates the format of the internet header.
-	 */
-	uint8_t version:4;
-#endif
-	/** The Type of Service provides an indication of the abstract parameters of the quality of service desired.
-	 *  These parameters are to be used to guide the selection of the actual service parameters when transmitting a~datagram through a~particular network.
-	 *  Several networks offer service precedence, which somehow treats high precedence traffic as more important than other traffic (generally by accepting only traffic above a~certain precedence at time of high load).
-	 *  The major choice is a~three way tradeoff between low-delay, high-reliability, and high-throughput.
-	 */
-	uint8_t tos;
-	/** Total Length is the length of the datagram, measured in octets, including internet header and data.
-	 *  This field allows the length of a~datagram to be up to 65,535~octets.
-	 */
-	uint16_t total_length;
-	/** An identifying value assigned by the sender to aid in assembling the fragments of a~datagram.
-	 */
-	uint16_t identification;
-#ifdef ARCH_IS_BIG_ENDIAN
-	/** Various control flags.
-	 */
-	uint8_t flags:3;
-	/** This field indicates where in the datagram this fragment belongs.
-	 *  High bits.
-	 */
-	uint8_t fragment_offset_high:5;
-#else
-	/** This field indicates where in the datagram this fragment belongs.
-	 *  High bits.
-	 */
-	uint8_t fragment_offset_high:5;
-	/** Various control flags.
-	 */
-	uint8_t flags:3;
-#endif
-	/** This field indicates where in the datagram this fragment belongs.
-	 *  Low bits.
-	 */
-	uint8_t fragment_offset_low;
-	/** This field indicates the maximum time the datagram is allowed to remain in the internet system.
-	 *  If this field contains the value zero, then the datagram must be destroyed.
-	 *  This field is modified in internet header processing.
-	 *  The time is measured in units of seconds, but since every module that processes a~datagram must decrease the TTL by at least one even if it process the datagram in less than a~second, the TTL must be thought of only as an upper bound on the time a~datagram may exist.
-	 *  The intention is to cause undeliverable datagrams to be discarded, and to bound the maximum datagram lifetime.
-	 */
-	uint8_t ttl;
-	/** This field indicates the next level protocol used in the data portion of the internet datagram.
-	 */
-	uint8_t protocol;
-	/** A checksum of the header only.
-	 *  Since some header fields change (e.g., time to live), this is recomputed and verified at each point that the internet header is processed.
-	 *  The checksum algorithm is: The checksum field is the 16~bit one's complement of the one's complement sum of all 16~bit words in the header.
-	 *  For purposes of computing the checksum, the value of the checksum field is zero.
-	 */
-	uint16_t header_checksum;
-	/** The source address.
-	 */
-	uint32_t source_address;
-	/** The destination address.
-	 */
-	uint32_t destination_address;
-} __attribute__ ((packed));
-
-/** Internet option header.
- *  Only type field is always valid.
- *  Other fields' validity depends on the option type.
- */
-struct ip_option{
-	/** A single octet of option-type.
-	 */
-	uint8_t type;
-	/** An option length octet.
-	 */
-	uint8_t length;
-	/** A~pointer.
-	 */
-	uint8_t pointer;
-#ifdef ARCH_IS_BIG_ENDIAN
-	/** The number of IP modules that cannot register timestamps due to lack of space.
-	 */
-	uint8_t overflow:4;
-	/** Various internet timestamp control flags.
-	 */
-	uint8_t flags:4;
-#else
-	/** Various internet timestamp control flags.
-	 */
-	uint8_t flags:4;
-	/** The number of IP modules that cannot register timestamps due to lack of space.
-	 */
-	uint8_t overflow:4;
-#endif
-} __attribute__ ((packed));
-
-/** Internet version 4 pseudo header.
- */
-struct ipv4_pseudo_header{
-	/** The source address.
-	 */
-	uint32_t source_address;
-	/** The destination address.
-	 */
-	uint32_t destination_address;
-	/** Reserved byte.
-	 *  Must be zero.
-	 */
-	uint8_t reserved;
-	/** This field indicates the next level protocol used in the data portion of the internet datagram.
-	 */
-	uint8_t protocol;
-	/** Data length is the length of the datagram, measured in octets.
-	 */
-	uint16_t data_length;
-} __attribute__ ((packed));
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/il/ip/ip_messages.h
===================================================================
--- uspace/srv/net/il/ip/ip_messages.h	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,106 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup ip
- *  @{
- */
-
-/** @file
- *  IP module messages.
- *  @see ip_interface.h
- */
-
-#ifndef __NET_IP_MESSAGES_H__
-#define __NET_IP_MESSAGES_H__
-
-#include <ipc/ipc.h>
-
-#include "../../include/in.h"
-#include "../../include/ip_codes.h"
-
-/** IP module messages.
- */
-typedef enum{
-	/** Adds the routing entry.
-	 *  @see ip_add_route()
-	 */
-	NET_IP_ADD_ROUTE = NET_IP_FIRST,
-	/** Gets the actual route information.
-	 *  @see ip_get_route()
-	 */
-	NET_IP_GET_ROUTE,
-	/** Processes the received error notification.
-	 *  @see ip_received_error_msg()
-	 */
-	NET_IP_RECEIVED_ERROR,
-	/** Sets the default gateway.
-	 *  @see ip_set_default_gateway()
-	 */
-	NET_IP_SET_GATEWAY
-} ip_messages;
-
-/** @name IP specific message parameters definitions
- */
-/*@{*/
-
-/** Returns the address message parameter.
- *  @param[in] call The message call structure.
- */
-#define IP_GET_ADDRESS(call) \
-	({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})
-
-/** Returns the gateway message parameter.
- *  @param[in] call The message call structure.
- */
-#define IP_GET_GATEWAY(call) \
-	({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;})
-
-/** Sets the header length in the message answer.
- *  @param[out] answer The message answer structure.
- */
-#define IP_SET_HEADERLEN(answer, value) \
-	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}
-
-/** Returns the network mask message parameter.
- *  @param[in] call The message call structure.
- */
-#define IP_GET_NETMASK(call) \
-	({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;})
-
-/** Returns the protocol message parameter.
- *  @param[in] call The message call structure.
- */
-#define IP_GET_PROTOCOL(call) \
-	({ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); protocol;})
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/il/ip/ip_module.c
===================================================================
--- uspace/srv/net/il/ip/ip_module.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ uspace/srv/net/il/ip/ip_module.c	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
@@ -40,21 +40,15 @@
 #include <async.h>
 #include <stdio.h>
-
 #include <ipc/ipc.h>
 #include <ipc/services.h>
 
-#include "../../err.h"
-#include "../../modules.h"
-
-#include "../../include/net_interface.h"
-
-#include "../../structures/packet/packet.h"
+#include <net_err.h>
+#include <net_modules.h>
+#include <net_interface.h>
+#include <packet/packet.h>
+#include <il_standalone.h>
 
 #include "ip.h"
 #include "ip_module.h"
-
-/** IP module name.
- */
-#define NAME	"IP protocol"
 
 /** IP module global data.
@@ -70,10 +64,7 @@
  *  @returns Other error codes as defined for the ip_message() function.
  */
-int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
-
-/** Prints the module name.
- *  @see NAME
- */
-void module_print_name(void);
+int il_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+	return ip_message(callid, call, answer, answer_count);
+}
 
 /** Starts the IP module.
@@ -84,15 +75,5 @@
  *  @returns Other error codes as defined for the REGISTER_ME() macro function.
  */
-int module_start(async_client_conn_t client_connection);
-
-int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
-	return ip_message(callid, call, answer, answer_count);
-}
-
-void module_print_name(void){
-	printf("%s", NAME);
-}
-
-int module_start(async_client_conn_t client_connection){
+int il_module_start(async_client_conn_t client_connection){
 	ERROR_DECLARE;
 
Index: uspace/srv/net/il/ip/ip_remote.c
===================================================================
--- uspace/srv/net/il/ip/ip_remote.c	(revision 3db888900c2e62ec19ed8118072f743bca5a6eb7)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * 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.
- */
-
-/** @addtogroup ip
- *  @{
- */
-
-/** @file
- *  IP interface implementation for standalone remote modules.
- *  @see ip_interface.h
- *  @see il_interface.h
- */
-
-#include <ipc/services.h>
-
-#include "../../messages.h"
-#include "../../modules.h"
-
-#include "../../include/device.h"
-#include "../../include/inet.h"
-#include "../../include/ip_interface.h"
-
-#include "../../structures/packet/packet_client.h"
-
-#include "../il_messages.h"
-
-#include "ip_messages.h"
-
-int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway){
-	return (int) async_req_4_0(ip_phone, NET_IP_ADD_ROUTE, (ipcarg_t) device_id, (ipcarg_t) gateway.s_addr, (ipcarg_t) address.s_addr, (ipcarg_t) netmask.s_addr);
-}
-
-int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg){
-	return (int) bind_service(service, (ipcarg_t) protocol, me, service, receiver);
-}
-
-int ip_connect_module(services_t service){
-	return connect_to_service(SERVICE_IP);
-}
-
-int ip_device_req(int ip_phone, device_id_t device_id, services_t service){
-	return generic_device_req(ip_phone, NET_IL_DEVICE, device_id, 0, service);
-}
-
-int ip_get_route_req(int ip_phone, ip_protocol_t protocol, const struct sockaddr * destination, socklen_t addrlen, device_id_t * device_id, ip_pseudo_header_ref * header, size_t * headerlen){
-	aid_t message_id;
-	ipcarg_t result;
-	ipc_call_t answer;
-
-	if(!(destination && (addrlen > 0))){
-		return EINVAL;
-	}
-	if(!(device_id && header && headerlen)){
-		return EBADMEM;
-	}
-
-	*header = NULL;
-	message_id = async_send_1(ip_phone, NET_IP_GET_ROUTE, (ipcarg_t) protocol, &answer);
-	if((async_data_write_start(ip_phone, destination, addrlen) == EOK)
-		&& (async_data_read_start(ip_phone, headerlen, sizeof(*headerlen)) == EOK)
-		&& (*headerlen > 0)){
-		*header = (ip_pseudo_header_ref) malloc(*headerlen);
-		if(*header){
-			if(async_data_read_start(ip_phone, * header, * headerlen) != EOK){
-				free(*header);
-			}
-		}
-	}
-	async_wait_for(message_id, &result);
-
-	if((result != EOK) && (*header)){
-		free(*header);
-	}else{
-		*device_id = IPC_GET_DEVICE(&answer);
-	}
-	return (int) result;
-}
-
-int ip_packet_size_req(int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension){
-	return generic_packet_size_req(ip_phone, NET_IL_PACKET_SPACE, device_id, packet_dimension);
-}
-
-int ip_received_error_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error){
-	return generic_received_msg(ip_phone, NET_IP_RECEIVED_ERROR, device_id, packet_get_id(packet), target, error);
-}
-
-int ip_send_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error){
-	return generic_send_msg(ip_phone, NET_IL_SEND, device_id, packet_get_id(packet), sender, error);
-}
-
-int ip_set_gateway_req(int ip_phone, device_id_t device_id, in_addr_t gateway){
-	return (int) async_req_2_0(ip_phone, NET_IP_SET_GATEWAY, (ipcarg_t) device_id, (ipcarg_t) gateway.s_addr);
-}
-
-/** @}
- */
