Index: uspace/lib/c/include/ipc/il.h
===================================================================
--- uspace/lib/c/include/ipc/il.h	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ uspace/lib/c/include/ipc/il.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -33,5 +33,5 @@
 /** @file
  * Internetwork layer modules messages.
- * @see il_interface.h
+ * @see il_remote.h
  * @see ip_interface.h
  */
@@ -45,28 +45,18 @@
 /** 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,
+	NET_IL_DEVICE_STATE = NET_IL_FIRST,
+	
 	/** 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
+	NET_IL_RECEIVED
 } il_messages;
 
Index: uspace/lib/c/include/ipc/ip.h
===================================================================
--- uspace/lib/c/include/ipc/ip.h	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ uspace/lib/c/include/ipc/ip.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -47,8 +47,13 @@
 /** IP module messages. */
 typedef enum {
+	/** New device message.
+	 * @see ip_device_req()
+	 */
+	NET_IP_DEVICE = NET_IP_FIRST,
+	
 	/** Adds the routing entry.
 	 * @see ip_add_route()
 	 */
-	NET_IP_ADD_ROUTE = NET_IP_FIRST,
+	NET_IP_ADD_ROUTE,
 	
 	/** Gets the actual route information.
@@ -65,5 +70,15 @@
 	 * @see ip_set_default_gateway()
 	 */
-	NET_IP_SET_GATEWAY
+	NET_IP_SET_GATEWAY,
+	
+	/** Packet size message.
+	 * @see ip_packet_size_req()
+	 */
+	NET_IP_PACKET_SPACE,
+	
+	/** Packet send message.
+	 * @see ip_send_msg()
+	 */
+	NET_IP_SEND
 } ip_messages;
 
Index: uspace/lib/net/Makefile
===================================================================
--- uspace/lib/net/Makefile	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ uspace/lib/net/Makefile	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -44,5 +44,6 @@
 	nil/nil_remote.c \
 	nil/nil_skel.c \
-	il/il_interface.c \
+	il/il_remote.c \
+	il/il_skel.c \
 	il/ip_remote.c \
 	il/ip_client.c \
Index: uspace/lib/net/il/il_interface.c
===================================================================
--- uspace/lib/net/il/il_interface.c	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ 	(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 libnet
- * @{
- */
-
-/** @file
- * Internetwork layer module interface for the underlying network interface
- * layer. This interface is always called by the remote modules.
- */
-
-#include <il_interface.h>
-#include <generic.h>
-#include <packet_client.h>
-
-#include <ipc/services.h>
-#include <ipc/il.h>
-
-#include <net/device.h>
-#include <net/packet.h>
-
-/** Notify the internetwork layer modules about the device state change.
- *
- * @param[in] il_phone  The internetwork layer module phone used for
- *                      (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] state     The new device state.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- *
- * @return EOK on success.
- *
- */
-int il_device_state_msg(int il_phone, device_id_t device_id,
-    device_state_t state, services_t target)
-{
-	return generic_device_state_msg_remote(il_phone, NET_IL_DEVICE_STATE,
-	    device_id, state, target);
-}
-
-/** Notify the internetwork layer modules about the received packet/s.
- *
- * @param[in] il_phone  The internetwork layer module phone used for
- *                      (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] packet    The received packet or the received packet queue.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- *
- * @return EOK on success.
- *
- */
-int il_received_msg(int il_phone, device_id_t device_id, packet_t *packet,
-    services_t target)
-{
-	return generic_received_msg_remote(il_phone, NET_IL_RECEIVED, device_id,
-	    packet_get_id(packet), target, 0);
-}
-
-/** Notify the internetwork layer modules about the mtu change.
- *
- * @param[in] il_phone  The internetwork layer module phone used for
- *                      (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] mtu       The new mtu value.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- *
- * @return EOK on success.
- *
- */
-int il_mtu_changed_msg(int il_phone, device_id_t device_id, size_t mtu,
-    services_t target)
-{
-	return generic_device_state_msg_remote(il_phone, NET_IL_MTU_CHANGED,
-	    device_id, (int) mtu, target);
-}
-
-/** @}
- */
Index: uspace/lib/net/il/il_remote.c
===================================================================
--- uspace/lib/net/il/il_remote.c	(revision 797b704b28bced20e17a9eb959845c20363ce662)
+++ uspace/lib/net/il/il_remote.c	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -0,0 +1,106 @@
+/*
+ * 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 libnet
+ * @{
+ */
+
+/** @file
+ * Internetwork layer module interface for the underlying network interface
+ * layer.
+ */
+
+#include <il_remote.h>
+#include <generic.h>
+#include <packet_client.h>
+
+#include <ipc/services.h>
+#include <ipc/il.h>
+
+#include <net/device.h>
+#include <net/packet.h>
+
+/** Notify the internetwork layer modules about the device state change.
+ *
+ * @param[in] il_phone  The internetwork layer module phone used for
+ *                      (semi)remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] state     The new device state.
+ * @param[in] target    The target internetwork module service to be
+ *                      delivered to.
+ *
+ * @return EOK on success.
+ *
+ */
+int il_device_state_msg(int il_phone, device_id_t device_id,
+    device_state_t state, services_t target)
+{
+	return generic_device_state_msg_remote(il_phone, NET_IL_DEVICE_STATE,
+	    device_id, state, target);
+}
+
+/** Notify the internetwork layer modules about the received packet/s.
+ *
+ * @param[in] il_phone  The internetwork layer module phone used for
+ *                      (semi)remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] packet    The received packet or the received packet queue.
+ * @param[in] target    The target internetwork module service to be
+ *                      delivered to.
+ *
+ * @return EOK on success.
+ *
+ */
+int il_received_msg(int il_phone, device_id_t device_id, packet_t *packet,
+    services_t target)
+{
+	return generic_received_msg_remote(il_phone, NET_IL_RECEIVED, device_id,
+	    packet_get_id(packet), target, 0);
+}
+
+/** Notify the internetwork layer modules about the mtu change.
+ *
+ * @param[in] il_phone  The internetwork layer module phone used for
+ *                      (semi)remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] mtu       The new mtu value.
+ * @param[in] target    The target internetwork module service to be
+ *                      delivered to.
+ *
+ * @return EOK on success.
+ *
+ */
+int il_mtu_changed_msg(int il_phone, device_id_t device_id, size_t mtu,
+    services_t target)
+{
+	return generic_device_state_msg_remote(il_phone, NET_IL_MTU_CHANGED,
+	    device_id, (int) mtu, target);
+}
+
+/** @}
+ */
Index: uspace/lib/net/il/il_skel.c
===================================================================
--- uspace/lib/net/il/il_skel.c	(revision 797b704b28bced20e17a9eb959845c20363ce662)
+++ uspace/lib/net/il/il_skel.c	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2011 Martin Decky
+ * 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 libnet
+ * @{
+ */
+
+/** @file
+ * Internetworking layer module skeleton implementation.
+ * @see il_skel.h
+ */
+
+#include <bool.h>
+#include <errno.h>
+#include <il_skel.h>
+#include <net_interface.h>
+#include <net/modules.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 by answering
+	 * the initial IPC_M_CONNECT_ME_TO call.
+	 */
+	ipc_answer_0(iid, EOK);
+	
+	while (true) {
+		ipc_call_t answer;
+		size_t count;
+		
+		/* Clear the answer structure */
+		refresh_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,
+		    &count);
+		
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP))
+			return;
+		
+		/* Answer the message */
+		answer_call(callid, res, &answer, count);
+	}
+}
+
+/** Start the internetworking layer module.
+ *
+ * Initialize the client connection serving function, initialize
+ * the module, register the module service and start the async
+ * manager, processing IPC messages in an infinite loop.
+ *
+ * @param[in] service Service identification.
+ *
+ * @return EOK on success.
+ * @return Other error codes as defined for the pm_init() function.
+ * @return Other error codes as defined for the il_initialize()
+ *         function.
+ * @return Other error codes as defined for the REGISTER_ME() macro
+ *         function.
+ *
+ */
+int il_module_start(int service)
+{
+	async_set_client_connection(il_client_connection);
+	int net_phone = net_connect_module();
+	
+	int rc = pm_init();
+	if (rc != EOK)
+		return rc;
+	
+	rc = il_initialize(net_phone);
+	if (rc != EOK)
+		goto out;
+	
+	sysarg_t phonehash;
+	rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, &phonehash);
+	if (rc != EOK)
+		goto out;
+	
+	async_manager();
+	
+out:
+	pm_destroy();
+	return rc;
+}
+
+/** @}
+ */
Index: uspace/lib/net/il/ip_remote.c
===================================================================
--- uspace/lib/net/il/ip_remote.c	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ uspace/lib/net/il/ip_remote.c	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -36,5 +36,5 @@
  *
  * @see ip_interface.h
- * @see il_interface.h
+ * @see il_remote.h
  *
  */
@@ -121,5 +121,5 @@
     services_t service)
 {
-	return generic_device_req_remote(ip_phone, NET_IL_DEVICE, device_id, 0,
+	return generic_device_req_remote(ip_phone, NET_IP_DEVICE, device_id, 0,
 	    service);
 }
@@ -188,5 +188,5 @@
     packet_dimension_t *packet_dimension)
 {
-	return generic_packet_size_req_remote(ip_phone, NET_IL_PACKET_SPACE,
+	return generic_packet_size_req_remote(ip_phone, NET_IP_PACKET_SPACE,
 	    device_id, packet_dimension);
 }
@@ -228,5 +228,5 @@
     services_t sender, services_t error)
 {
-	return generic_send_msg_remote(ip_phone, NET_IL_SEND, device_id,
+	return generic_send_msg_remote(ip_phone, NET_IP_SEND, device_id,
 	    packet_get_id(packet), sender, error);
 }
Index: uspace/lib/net/include/il_interface.h
===================================================================
--- uspace/lib/net/include/il_interface.h	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ 	(revision )
@@ -1,61 +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 libnet
- * @{
- */
-
-/** @file
- * Internetwork layer module interface for the underlying network interface
- * layer. This interface is always called by the remote modules.
- */
-
-#ifndef LIBNET_IL_INTERFACE_H_
-#define LIBNET_IL_INTERFACE_H_
-
-#include <ipc/services.h>
-#include <sys/types.h>
-
-#include <net/device.h>
-#include <net/packet.h>
-
-/** @name Internetwork layer module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-extern int il_device_state_msg(int, device_id_t, device_state_t, services_t);
-extern int il_received_msg(int, device_id_t, packet_t *, services_t);
-extern int il_mtu_changed_msg(int, device_id_t, size_t, services_t);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/il_local.h
===================================================================
--- uspace/lib/net/include/il_local.h	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- * Copyright (c) 2010 Martin Decky
- * 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 libnet 
- * @{
- */
-
-#ifndef LIBNET_IL_LOCAL_H_
-#define LIBNET_IL_LOCAL_H_
-
-#include <ipc/ipc.h>
-#include <async.h>
-
-/** Processes the Internet layer module message.
- *
- * @param[in]		callid The message identifier.
- * @param[in]		call The message parameters.
- * @param[out]		answer The message answer parameters.
- * @param[out]		answer_count The last parameter for the actual answer in
- *			the answer parameter.
- * @return		EOK on success.
- * @return		Other error codes as defined for the arp_message()
- *			function.
- */
-extern int il_module_message(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, size_t *answer_count);
-
-/** Starts the Internet layer module.
- *
- * Initializes the client connection servicing function, initializes the module,
- * registers the module service and starts the async manager, processing IPC
- * messages in an infinite loop.
- *
- * @param[in] client_connection The client connection processing function. The
- *			module skeleton propagates its own one.
- * @return		EOK on successful module termination.
- * @return		Other error codes as defined for the arp_initialize()
- *			function.
- * @return		Other error codes as defined for the REGISTER_ME() macro
- *			function.
- */
-extern int il_module_start(async_client_conn_t client_connection);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/il_remote.h
===================================================================
--- uspace/lib/net/include/il_remote.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
+++ uspace/lib/net/include/il_remote.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -0,0 +1,61 @@
+/*
+ * 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 libnet
+ * @{
+ */
+
+/** @file
+ * Internetwork layer module interface for the underlying network interface
+ * layer. This interface is always called by the remote modules.
+ */
+
+#ifndef LIBNET_IL_REMOTE_H_
+#define LIBNET_IL_REMOTE_H_
+
+#include <ipc/services.h>
+#include <sys/types.h>
+
+#include <net/device.h>
+#include <net/packet.h>
+
+/** @name Internetwork layer module interface
+ * This interface is used by other modules.
+ */
+/*@{*/
+
+extern int il_device_state_msg(int, device_id_t, device_state_t, services_t);
+extern int il_received_msg(int, device_id_t, packet_t *, services_t);
+extern int il_mtu_changed_msg(int, device_id_t, size_t, services_t);
+
+/*@}*/
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/net/include/il_skel.h
===================================================================
--- uspace/lib/net/include/il_skel.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
+++ uspace/lib/net/include/il_skel.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2010 Martin Decky
+ * 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 libnet
+ * @{
+ */
+
+#ifndef LIBNET_IL_SKEL_H_
+#define LIBNET_IL_SKEL_H_
+
+/** @file
+ * Internetwork layer module skeleton.
+ * The skeleton has to be part of each internetwork layer module.
+ */
+
+#include <async.h>
+#include <fibril_synch.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
+
+#include <adt/measured_strings.h>
+#include <net/device.h>
+#include <net/packet.h>
+
+/** Module initialization.
+ *
+ * This has to be implemented in user code.
+ *
+ * @param[in] net_phone Networking module phone.
+ *
+ * @return EOK on success.
+ * @return Other error codes as defined for each specific module
+ *         initialize function.
+ *
+ */
+extern int il_initialize(int net_phone);
+
+/** Process the Internet layer module message.
+ *
+ * This has to be implemented in user code.
+ *
+ * @param[in]  callid Message identifier.
+ * @param[in]  call   Message parameters.
+ * @param[out] answer Answer.
+ * @param[out] count  Number of arguments of the answer.
+ *
+ * @return EOK on success.
+ * @return Other error codes as defined for the arp_message()
+ *         function.
+ *
+ */
+extern int il_module_message(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, size_t *answer_count);
+
+extern int il_module_start(int);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/net/include/nil_skel.h
===================================================================
--- uspace/lib/net/include/nil_skel.h	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ uspace/lib/net/include/nil_skel.h	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -50,5 +50,5 @@
 /** Module initialization.
  *
- * Is called by the module_start() function.
+ * This has to be implemented in user code.
  *
  * @param[in] net_phone Networking module phone.
@@ -59,7 +59,9 @@
  *
  */
-extern int nil_initialize(int);
+extern int nil_initialize(int net_phone);
 
 /** Notify the network interface layer about the device state change.
+ *
+ * This has to be implemented in user code.
  *
  * @param[in] nil_phone Network interface layer phone.
@@ -79,4 +81,6 @@
  * upper layers.
  *
+ * This has to be implemented in user code.
+ *
  * @param[in] nil_phone Network interface layer phone.
  * @param[in] device_id Source device identifier.
@@ -92,4 +96,6 @@
 
 /** Message processing function.
+ *
+ * This has to be implemented in user code.
  *
  * @param[in]  name   Module name.
Index: uspace/lib/net/nil/nil_skel.c
===================================================================
--- uspace/lib/net/nil/nil_skel.c	(revision fe5a9fc4b7984d760b15c9c1dd964a5b0f138bed)
+++ uspace/lib/net/nil/nil_skel.c	(revision 797b704b28bced20e17a9eb959845c20363ce662)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2009 Lukas Mejdrech
+ * Copyright (c) 2011 Martin Decky
  * All rights reserved.
  *
@@ -32,5 +32,5 @@
 
 /** @file
- * Network network interface layer module implementation.
+ * Network interface layer module skeleton implementation.
  * @see nil_skel.h
  */
