Index: uspace/srv/hw/netif/ne2000/ne2000.c
===================================================================
--- uspace/srv/hw/netif/ne2000/ne2000.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/hw/netif/ne2000/ne2000.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -51,5 +51,5 @@
 #include <net/device.h>
 #include <netif_skel.h>
-#include <nil_interface.h>
+#include <nil_remote.h>
 #include "dp8390.h"
 
@@ -346,5 +346,5 @@
 	}
 	
-	return EOK;
+	return device->state;
 }
 
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/il/arp/arp.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -54,12 +54,11 @@
 #include <ipc/arp.h>
 #include <ipc/il.h>
+#include <ipc/nil.h>
 #include <byteorder.h>
 #include <errno.h>
-
 #include <net/modules.h>
 #include <net/device.h>
 #include <net/packet.h>
-
-#include <nil_interface.h>
+#include <nil_remote.h>
 #include <protocol_map.h>
 #include <packet_client.h>
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/il/ip/ip.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -75,5 +75,5 @@
 #include <ip_header.h>
 #include <net_interface.h>
-#include <nil_interface.h>
+#include <nil_remote.h>
 #include <tl_interface.h>
 #include <packet_remote.h>
Index: uspace/srv/net/net/net.c
===================================================================
--- uspace/srv/net/net/net.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/net/net.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -51,4 +51,5 @@
 #include <ipc/net_net.h>
 #include <ipc/il.h>
+#include <ipc/nil.h>
 
 #include <net/modules.h>
@@ -62,5 +63,5 @@
 
 #include <netif_remote.h>
-#include <nil_interface.h>
+#include <nil_remote.h>
 #include <net_interface.h>
 #include <ip_interface.h>
Index: uspace/srv/net/netif/lo/lo.c
===================================================================
--- uspace/srv/net/netif/lo/lo.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/netif/lo/lo.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -48,9 +48,6 @@
 #include <packet_client.h>
 #include <net/device.h>
-#include <nil_interface.h>
 #include <netif_skel.h>
-
-/** Default hardware address. */
-#define DEFAULT_ADDR  0
+#include <nil_remote.h>
 
 /** Default address length. */
@@ -60,6 +57,6 @@
 #define NAME  "lo"
 
-/** Network interface global data. */
-netif_globals_t netif_globals;
+static uint8_t default_addr[DEFAULT_ADDR_LEN] =
+    {0, 0, 0, 0, 0, 0};
 
 int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
@@ -74,8 +71,5 @@
 		return EBADMEM;
 	
-	uint8_t *addr = (uint8_t *) malloc(DEFAULT_ADDR_LEN);
-	memset(addr, DEFAULT_ADDR, DEFAULT_ADDR_LEN);
-	
-	address->value = addr;
+	address->value = default_addr;
 	address->length = DEFAULT_ADDR_LEN;
 	
@@ -85,60 +79,67 @@
 int netif_get_device_stats(device_id_t device_id, device_stats_t *stats)
 {
-	netif_device_t *device;
-	int rc;
-
 	if (!stats)
 		return EBADMEM;
-
-	rc = find_device(device_id, &device);
+	
+	netif_device_t *device;
+	int rc = find_device(device_id, &device);
 	if (rc != EOK)
 		return rc;
-
+	
 	memcpy(stats, (device_stats_t *) device->specific,
 	    sizeof(device_stats_t));
-
-	return EOK;
-}
-
-/** Changes the loopback state.
- *
- * @param[in] device	The device structure.
- * @param[in] state	The new device state.
- * @return		The new state if changed.
- * @return		EOK otherwise.
- */
-static int change_state_message(netif_device_t *device, device_state_t state)
+	
+	return EOK;
+}
+
+/** Change the loopback state.
+ *
+ * @param[in] device The device structure.
+ * @param[in] state  The new device state.
+ *
+ * @return New state if changed.
+ * @return EOK otherwise.
+ *
+ */
+static void change_state_message(netif_device_t *device, device_state_t state)
 {
 	if (device->state != state) {
 		device->state = state;
 		
-		printf("%s: State changed to %s\n", NAME,
-		    (state == NETIF_ACTIVE) ? "active" : "stopped");
+		const char *desc;
+		switch (state) {
+		case NETIF_ACTIVE:
+			desc = "active";
+			break;
+		case NETIF_STOPPED:
+			desc = "stopped";
+			break;
+		default:
+			desc = "unknown";
+		}
 		
-		return state;
-	}
-	
-	return EOK;
-}
-
-/** Creates and returns the loopback network interface structure.
- *
- * @param[in] device_id	The new devce identifier.
- * @param[out] device	The device structure.
- * @return		EOK on success.
- * @return		EXDEV if one loopback network interface already exists.
- * @return		ENOMEM if there is not enough memory left.
- */
-static int create(device_id_t device_id, netif_device_t **device)
-{
-	int index;
-
+		printf("%s: State changed to %s\n", NAME, desc);
+	}
+}
+
+/** Create and return the loopback network interface structure.
+ *
+ * @param[in]  device_id New devce identifier.
+ * @param[out] device    Device structure.
+ *
+ * @return EOK on success.
+ * @return EXDEV if one loopback network interface already exists.
+ * @return ENOMEM if there is not enough memory left.
+ *
+ */
+static int lo_create(device_id_t device_id, netif_device_t **device)
+{
 	if (netif_device_map_count(&netif_globals.device_map) > 0)
 		return EXDEV;
-
+	
 	*device = (netif_device_t *) malloc(sizeof(netif_device_t));
 	if (!*device)
 		return ENOMEM;
-
+	
 	(*device)->specific = (device_stats_t *) malloc(sizeof(device_stats_t));
 	if (!(*device)->specific) {
@@ -146,12 +147,12 @@
 		return ENOMEM;
 	}
-
+	
 	null_device_stats((device_stats_t *) (*device)->specific);
 	(*device)->device_id = device_id;
 	(*device)->nil_phone = -1;
 	(*device)->state = NETIF_STOPPED;
-	index = netif_device_map_add(&netif_globals.device_map,
+	int index = netif_device_map_add(&netif_globals.device_map,
 	    (*device)->device_id, *device);
-
+	
 	if (index < 0) {
 		free(*device);
@@ -167,5 +168,4 @@
 {
 	sysarg_t phonehash;
-
 	return ipc_connect_to_me(PHONE_NS, SERVICE_LO, 0, 0, &phonehash);
 }
@@ -173,15 +173,11 @@
 int netif_probe_message(device_id_t device_id, int irq, void *io)
 {
+	/* Create a new device */
 	netif_device_t *device;
-	int rc;
-
-	/* Create a new device */
-	rc = create(device_id, &device);
+	int rc = lo_create(device_id, &device);
 	if (rc != EOK)
 		return rc;
-
-	/* Print the settings */
+	
 	printf("%s: Device created (id: %d)\n", NAME, device->device_id);
-
 	return EOK;
 }
@@ -190,33 +186,29 @@
 {
 	netif_device_t *device;
-	size_t length;
-	packet_t *next;
-	int phone;
-	int rc;
-
-	rc = find_device(device_id, &device);
+	int rc = find_device(device_id, &device);
 	if (rc != EOK)
 		return EOK;
-
+	
 	if (device->state != NETIF_ACTIVE) {
 		netif_pq_release(packet_get_id(packet));
 		return EFORWARD;
 	}
-
-	next = packet;
+	
+	packet_t *next = packet;
 	do {
 		((device_stats_t *) device->specific)->send_packets++;
 		((device_stats_t *) device->specific)->receive_packets++;
-		length = packet_get_data_length(next);
+		size_t length = packet_get_data_length(next);
 		((device_stats_t *) device->specific)->send_bytes += length;
 		((device_stats_t *) device->specific)->receive_bytes += length;
 		next = pq_next(next);
-	} while(next);
-
-	phone = device->nil_phone;
+	} while (next);
+	
+	int phone = device->nil_phone;
 	fibril_rwlock_write_unlock(&netif_globals.lock);
+	
 	nil_received_msg(phone, device_id, packet, sender);
+	
 	fibril_rwlock_write_lock(&netif_globals.lock);
-	
 	return EOK;
 }
@@ -224,10 +216,12 @@
 int netif_start_message(netif_device_t *device)
 {
-	return change_state_message(device, NETIF_ACTIVE);
+	change_state_message(device, NETIF_ACTIVE);
+	return device->state;
 }
 
 int netif_stop_message(netif_device_t *device)
 {
-	return change_state_message(device, NETIF_STOPPED);
+	change_state_message(device, NETIF_STOPPED);
+	return device->state;
 }
 
Index: uspace/srv/net/nil/eth/Makefile
===================================================================
--- uspace/srv/net/nil/eth/Makefile	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/nil/eth/Makefile	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -42,6 +42,5 @@
 
 SOURCES = \
-	eth.c \
-	eth_module.c
+	eth.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/nil/eth/eth.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -45,4 +45,5 @@
 
 #include <ipc/ipc.h>
+#include <ipc/nil.h>
 #include <ipc/net.h>
 #include <ipc/services.h>
@@ -56,13 +57,11 @@
 #include <netif_remote.h>
 #include <net_interface.h>
-#include <nil_interface.h>
 #include <il_interface.h>
 #include <adt/measured_strings.h>
 #include <packet_client.h>
 #include <packet_remote.h>
-#include <nil_local.h>
+#include <nil_skel.h>
 
 #include "eth.h"
-#include "eth_header.h"
 
 /** The module name. */
@@ -72,45 +71,44 @@
 #define ETH_PREFIX \
 	(sizeof(eth_header_t) + sizeof(eth_header_lsap_t) + \
-	sizeof(eth_header_snap_t))
+	    sizeof(eth_header_snap_t))
 
 /** Reserved packet suffix length. */
-#define ETH_SUFFIX \
-	sizeof(eth_fcs_t)
+#define ETH_SUFFIX  (sizeof(eth_fcs_t))
 
 /** Maximum packet content length. */
-#define ETH_MAX_CONTENT 1500u
+#define ETH_MAX_CONTENT  1500u
 
 /** Minimum packet content length. */
-#define ETH_MIN_CONTENT 46u
+#define ETH_MIN_CONTENT  46u
 
 /** Maximum tagged packet content length. */
 #define ETH_MAX_TAGGED_CONTENT(flags) \
 	(ETH_MAX_CONTENT - \
-	((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? \
-	sizeof(eth_header_lsap_t) : 0) - \
-	(IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
+	    ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? \
+	    sizeof(eth_header_lsap_t) : 0) - \
+	    (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
 
 /** Minimum tagged packet content length. */
 #define ETH_MIN_TAGGED_CONTENT(flags) \
 	(ETH_MIN_CONTENT - \
-	((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? \
-	sizeof(eth_header_lsap_t) : 0) - \
-	(IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
+	    ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? \
+	    sizeof(eth_header_lsap_t) : 0) - \
+	    (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
 
 /** Dummy flag shift value. */
-#define ETH_DUMMY_SHIFT	0
+#define ETH_DUMMY_SHIFT  0
 
 /** Mode flag shift value. */
-#define ETH_MODE_SHIFT	1
+#define ETH_MODE_SHIFT  1
 
 /** Dummy device flag.
  * Preamble and FCS are mandatory part of the packets.
  */
-#define ETH_DUMMY		(1 << ETH_DUMMY_SHIFT)
+#define ETH_DUMMY  (1 << ETH_DUMMY_SHIFT)
 
 /** Returns the dummy flag.
  * @see ETH_DUMMY
  */
-#define IS_DUMMY(flags)		((flags) & ETH_DUMMY)
+#define IS_DUMMY(flags)  ((flags) & ETH_DUMMY)
 
 /** Device mode flags.
@@ -119,35 +117,38 @@
  * @see ETH_8023_2_SNAP
  */
-#define ETH_MODE_MASK		(3 << ETH_MODE_SHIFT)
+#define ETH_MODE_MASK  (3 << ETH_MODE_SHIFT)
 
 /** DIX Ethernet mode flag. */
-#define ETH_DIX			(1 << ETH_MODE_SHIFT)
-
-/** Returns whether the DIX Ethernet mode flag is set.
- *
- * @param[in] flags	The ethernet flags.
+#define ETH_DIX  (1 << ETH_MODE_SHIFT)
+
+/** Return whether the DIX Ethernet mode flag is set.
+ *
+ * @param[in] flags Ethernet flags.
  * @see ETH_DIX
- */
-#define IS_DIX(flags)		(((flags) & ETH_MODE_MASK) == ETH_DIX)
+ *
+ */
+#define IS_DIX(flags)  (((flags) & ETH_MODE_MASK) == ETH_DIX)
 
 /** 802.3 + 802.2 + LSAP mode flag. */
-#define ETH_8023_2_LSAP		(2 << ETH_MODE_SHIFT)
-
-/** Returns whether the 802.3 + 802.2 + LSAP mode flag is set.
- *
- * @param[in] flags	The ethernet flags.
+#define ETH_8023_2_LSAP  (2 << ETH_MODE_SHIFT)
+
+/** Return whether the 802.3 + 802.2 + LSAP mode flag is set.
+ *
+ * @param[in] flags Ethernet flags.
  * @see ETH_8023_2_LSAP
- */
-#define IS_8023_2_LSAP(flags)	(((flags) & ETH_MODE_MASK) == ETH_8023_2_LSAP)
+ *
+ */
+#define IS_8023_2_LSAP(flags)  (((flags) & ETH_MODE_MASK) == ETH_8023_2_LSAP)
 
 /** 802.3 + 802.2 + LSAP + SNAP mode flag. */
-#define ETH_8023_2_SNAP		(3 << ETH_MODE_SHIFT)
-
-/** Returns whether the 802.3 + 802.2 + LSAP + SNAP mode flag is set.
- *
- * @param[in] flags	The ethernet flags.
+#define ETH_8023_2_SNAP  (3 << ETH_MODE_SHIFT)
+
+/** Return whether the 802.3 + 802.2 + LSAP + SNAP mode flag is set.
+ *
+ * @param[in] flags Ethernet flags.
  * @see ETH_8023_2_SNAP
- */
-#define IS_8023_2_SNAP(flags)	(((flags) & ETH_MODE_MASK) == ETH_8023_2_SNAP)
+ *
+ */
+#define IS_8023_2_SNAP(flags)  (((flags) & ETH_MODE_MASK) == ETH_8023_2_SNAP)
 
 /** Type definition of the ethernet address type.
@@ -836,6 +837,6 @@
 }
 
-int nil_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, size_t *answer_count)
+int nil_module_message(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, size_t *answer_count)
 {
 	measured_string_t *address;
@@ -893,52 +894,8 @@
 }
 
-/** Default thread for new connections.
- *
- * @param[in] iid	The initial message identifier.
- * @param[in] icall	The initial message call structure.
- */
-static void nil_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;
-		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 = nil_module_message_standalone(NAME, 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);
-	}
-}
-
 int main(int argc, char *argv[])
 {
-	int rc;
-	
 	/* Start the module */
-	rc = nil_module_start_standalone(nil_client_connection);
-	return rc;
+	return nil_module_start(SERVICE_ETHERNET);
 }
 
Index: uspace/srv/net/nil/eth/eth.h
===================================================================
--- uspace/srv/net/nil/eth/eth.h	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/nil/eth/eth.h	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -44,4 +44,150 @@
 #include <adt/measured_strings.h>
 
+/** Ethernet address length. */
+#define ETH_ADDR  6
+
+/** Ethernet header preamble value. */
+#define ETH_PREAMBLE  0x55
+
+/** Ethernet header start of frame value. */
+#define ETH_SFD  0xD5
+
+/** IEEE 802.2 unordered information control field. */
+#define IEEE_8023_2_UI  0x03
+
+/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
+ * @see eth_header_snap
+ */
+typedef struct eth_header_snap eth_header_snap_t;
+
+/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
+ * @see eth_header_lsap
+ */
+typedef struct eth_header_lsap eth_header_lsap_t;
+
+/** Type definition of the Ethernet header LSAP extension.
+ * @see eth_ieee_lsap
+ */
+typedef struct eth_ieee_lsap eth_ieee_lsap_t;
+
+/** Type definition of the Ethernet header SNAP extension.
+ * @see eth_snap
+ */
+typedef struct eth_snap eth_snap_t;
+
+/** Type definition of the Ethernet header preamble.
+ * @see preamble
+ */
+typedef struct eth_preamble eth_preamble_t;
+
+/** Type definition of the Ethernet header.
+ * @see eth_header
+ */
+typedef struct eth_header eth_header_t;
+
+/** Ethernet header Link Service Access Point extension. */
+struct eth_ieee_lsap {
+	/**
+	 * Destination Service Access Point identifier.
+	 * The possible values are assigned by an IEEE committee.
+	 */
+	uint8_t dsap;
+	
+	/**
+	 * Source Service Access Point identifier.
+	 * The possible values are assigned by an IEEE committee.
+	 */
+	uint8_t ssap;
+	
+	/**
+	 * Control parameter.
+	 * The possible values are assigned by an IEEE committee.
+	 */
+	uint8_t ctrl;
+} __attribute__ ((packed));
+
+/** Ethernet header SNAP extension. */
+struct eth_snap {
+	/** Protocol identifier or organization code. */
+	uint8_t protocol[3];
+	
+	/**
+	 * Ethernet protocol identifier in the network byte order (big endian).
+	 * @see ethernet_protocols.h
+	 */
+	uint16_t ethertype;
+} __attribute__ ((packed));
+
+/** Ethernet header preamble.
+ *
+ * Used for dummy devices.
+ */
+struct eth_preamble {
+	/**
+	 * Controlling preamble used for the frame transmission synchronization.
+	 * All should be set to ETH_PREAMBLE.
+	 */
+	uint8_t preamble[7];
+	
+	/**
+	 * Start of Frame Delimiter used for the frame transmission
+	 * synchronization.
+	 * Should be set to ETH_SFD.
+	 */
+	uint8_t sfd;
+} __attribute__ ((packed));
+
+/** Ethernet header. */
+struct eth_header {
+	/** Destination host Ethernet address (MAC address). */
+	uint8_t destination_address[ETH_ADDR];
+	/** Source host Ethernet address (MAC address). */
+	uint8_t source_address[ETH_ADDR];
+	
+	/**
+	 * Ethernet protocol identifier in the network byte order (big endian).
+	 * @see ethernet_protocols.h
+	 */
+	uint16_t ethertype;
+} __attribute__ ((packed));
+
+/** Ethernet header IEEE 802.3 + 802.2 extension. */
+struct eth_header_lsap {
+	/** Ethernet header. */
+	eth_header_t header;
+	
+	/**
+	 * LSAP extension.
+	 * If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being
+	 * used.
+	 * If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet
+	 * without any extensions is being used and the frame content starts
+	 * rigth after the two fields.
+	 */
+	eth_ieee_lsap_t lsap;
+} __attribute__ ((packed));
+
+/** Ethernet header IEEE 802.3 + 802.2 + SNAP extensions. */
+struct eth_header_snap {
+	/** Ethernet header. */
+	eth_header_t header;
+	
+	/**
+	 * LSAP extension.
+	 * If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being
+	 * used.
+	 * If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet
+	 * without any extensions is being used and the frame content starts
+	 * rigth after the two fields.
+	 */
+	eth_ieee_lsap_t lsap;
+	
+	/** SNAP extension. */
+	eth_snap_t snap;
+} __attribute__ ((packed));
+
+/** Ethernet Frame Check Sequence. */
+typedef uint32_t eth_fcs_t;
+
 /** Type definition of the Ethernet global data.
  * @see eth_globals
Index: uspace/srv/net/nil/eth/eth_header.h
===================================================================
--- uspace/srv/net/nil/eth/eth_header.h	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ 	(revision )
@@ -1,192 +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 eth
- *  @{
- */
-
-/** @file
- * Ethernet protocol header definitions.
- * Based on the IEEE 802.3-2005
- */
-
-#ifndef NET_ETH_HEADER_H_
-#define NET_ETH_HEADER_H_
-
-#include <sys/types.h>
-
-/** Ethernet address length. */
-#define ETH_ADDR  6
-
-/** Ethernet header preamble value. */
-#define ETH_PREAMBLE  0x55
-
-/** Ethernet header start of frame value. */
-#define ETH_SFD  0xD5
-
-/** IEEE 802.2 unordered information control field. */
-#define IEEE_8023_2_UI  0x03
-
-/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
- * @see eth_header_snap
- */
-typedef struct eth_header_snap eth_header_snap_t;
-
-/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
- * @see eth_header_lsap
- */
-typedef struct eth_header_lsap eth_header_lsap_t;
-
-/** Type definition of the Ethernet header LSAP extension.
- * @see eth_ieee_lsap
- */
-typedef struct eth_ieee_lsap eth_ieee_lsap_t;
-
-/** Type definition of the Ethernet header SNAP extension.
- * @see eth_snap
- */
-typedef struct eth_snap eth_snap_t;
-
-/** Type definition of the Ethernet header preamble.
- * @see preamble
- */
-typedef struct eth_preamble eth_preamble_t;
-
-/** Type definition of the Ethernet header.
- * @see eth_header
- */
-typedef struct eth_header eth_header_t;
-
-/** Ethernet header Link Service Access Point extension. */
-struct eth_ieee_lsap {
-	/**
-	 * Destination Service Access Point identifier.
-	 * The possible values are assigned by an IEEE committee.
-	 */
-	uint8_t dsap;
-	
-	/**
-	 * Source Service Access Point identifier.
-	 * The possible values are assigned by an IEEE committee.
-	 */
-	uint8_t ssap;
-	
-	/**
-	 * Control parameter.
-	 * The possible values are assigned by an IEEE committee.
-	 */
-	uint8_t ctrl;
-} __attribute__ ((packed));
-
-/** Ethernet header SNAP extension. */
-struct eth_snap {
-	/** Protocol identifier or organization code. */
-	uint8_t protocol[3];
-	
-	/**
-	 * Ethernet protocol identifier in the network byte order (big endian).
-	 * @see ethernet_protocols.h
-	 */
-	uint16_t ethertype;
-} __attribute__ ((packed));
-
-/** Ethernet header preamble.
- *
- * Used for dummy devices.
- */
-struct eth_preamble {
-	/**
-	 * Controlling preamble used for the frame transmission synchronization.
-	 * All should be set to ETH_PREAMBLE.
-	 */
-	uint8_t preamble[7];
-	
-	/**
-	 * Start of Frame Delimiter used for the frame transmission
-	 * synchronization.
-	 * Should be set to ETH_SFD.
-	 */
-	uint8_t sfd;
-} __attribute__ ((packed));
-
-/** Ethernet header. */
-struct eth_header {
-	/** Destination host Ethernet address (MAC address). */
-	uint8_t destination_address[ETH_ADDR];
-	/** Source host Ethernet address (MAC address). */
-	uint8_t source_address[ETH_ADDR];
-	
-	/**
-	 * Ethernet protocol identifier in the network byte order (big endian).
-	 * @see ethernet_protocols.h
-	 */
-	uint16_t ethertype;
-} __attribute__ ((packed));
-
-/** Ethernet header IEEE 802.3 + 802.2 extension. */
-struct eth_header_lsap {
-	/** Ethernet header. */
-	eth_header_t header;
-	
-	/**
-	 * LSAP extension.
-	 * If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being
-	 * used.
-	 * If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet
-	 * without any extensions is being used and the frame content starts
-	 * rigth after the two fields.
-	 */
-	eth_ieee_lsap_t lsap;
-} __attribute__ ((packed));
-
-/** Ethernet header IEEE 802.3 + 802.2 + SNAP extensions. */
-struct eth_header_snap {
-	/** Ethernet header. */
-	eth_header_t header;
-	
-	/**
-	 * LSAP extension.
-	 * If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being
-	 * used.
-	 * If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet
-	 * without any extensions is being used and the frame content starts
-	 * rigth after the two fields.
-	 */
-	eth_ieee_lsap_t lsap;
-	
-	/** SNAP extension. */
-	eth_snap_t snap;
-} __attribute__ ((packed));
-
-/** Ethernet Frame Check Sequence. */
-typedef uint32_t eth_fcs_t;
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/nil/eth/eth_module.c
===================================================================
--- uspace/srv/net/nil/eth/eth_module.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ 	(revision )
@@ -1,86 +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 eth
- * @{
- */
-
-/** @file
- *  Ethernet module stub.
- *  @see module.c
- */
-
-#include "eth.h"
-
-#include <async.h>
-#include <stdio.h>
-#include <errno.h>
-
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-
-#include <net/modules.h>
-#include <net_interface.h>
-#include <net/packet.h>
-#include <nil_local.h>
-
-int nil_module_start_standalone(async_client_conn_t client_connection)
-{
-	sysarg_t phonehash;
-	int rc;
-	
-	async_set_client_connection(client_connection);
-	int net_phone = net_connect_module();
-
-	rc = pm_init();
-	if (rc != EOK)
-		return rc;
-	
-	rc = nil_initialize(net_phone);
-	if (rc != EOK)
-		goto out;
-
-	rc = ipc_connect_to_me(PHONE_NS, SERVICE_ETHERNET, 0, 0, &phonehash);
-	if (rc != EOK)
-		goto out;
-	
-	async_manager();
-
-out:
-	pm_destroy();
-	return rc;
-}
-
-int nil_module_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, size_t *count)
-{
-	return nil_message_standalone(name, callid, call, answer, count);
-}
-
-/** @}
- */
Index: uspace/srv/net/nil/nildummy/Makefile
===================================================================
--- uspace/srv/net/nil/nildummy/Makefile	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/nil/nildummy/Makefile	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -42,6 +42,5 @@
 
 SOURCES = \
-	nildummy.c \
-	nildummy_module.c
+	nildummy.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -42,4 +42,5 @@
 #include <str.h>
 #include <ipc/ipc.h>
+#include <ipc/nil.h>
 #include <ipc/net.h>
 #include <ipc/services.h>
@@ -47,5 +48,4 @@
 #include <net/modules.h>
 #include <net/device.h>
-#include <nil_interface.h>
 #include <il_interface.h>
 #include <adt/measured_strings.h>
@@ -53,5 +53,5 @@
 #include <packet_remote.h>
 #include <netif_remote.h>
-#include <nil_local.h>
+#include <nil_skel.h>
 
 #include "nildummy.h"
@@ -81,6 +81,4 @@
 int nil_initialize(int net_phone)
 {
-	int rc;
-	
 	fibril_rwlock_initialize(&nildummy_globals.devices_lock);
 	fibril_rwlock_initialize(&nildummy_globals.protos_lock);
@@ -90,5 +88,5 @@
 	nildummy_globals.net_phone = net_phone;
 	nildummy_globals.proto.phone = 0;
-	rc = nildummy_devices_initialize(&nildummy_globals.devices);
+	int rc = nildummy_devices_initialize(&nildummy_globals.devices);
 	
 	fibril_rwlock_write_unlock(&nildummy_globals.protos_lock);
@@ -98,9 +96,9 @@
 }
 
-/** Process IPC messages from the registered device driver modules in an
- * infinite loop.
- *
- * @param[in] iid	The message identifier.
- * @param[in,out]	icall The message parameters.
+/** Process IPC messages from the registered device driver modules
+ *
+ * @param[in]     iid   Message identifier.
+ * @param[in,out] icall Message parameters.
+ *
  */
 static void nildummy_receiver(ipc_callid_t iid, ipc_call_t *icall)
@@ -108,5 +106,5 @@
 	packet_t *packet;
 	int rc;
-
+	
 	while (true) {
 		switch (IPC_GET_IMETHOD(*icall)) {
@@ -139,26 +137,25 @@
  * Determine the device local hardware address.
  *
- * @param[in] device_id	The new device identifier.
- * @param[in] service	The device driver service.
- * @param[in] mtu	The device maximum transmission unit.
- * @return		EOK on success.
- * @return		EEXIST if the device with the different service exists.
- * @return		ENOMEM if there is not enough memory left.
- * @return		Other error codes as defined for the
- *			netif_bind_service() function.
- * @return		Other error codes as defined for the
- *			netif_get_addr_req() function.
+ * @param[in] device_id New device identifier.
+ * @param[in] service   Device driver service.
+ * @param[in] mtu       Device maximum transmission unit.
+ *
+ * @return EOK on success.
+ * @return EEXIST if the device with the different service exists.
+ * @return ENOMEM if there is not enough memory left.
+ * @return Other error codes as defined for the
+ *         netif_bind_service() function.
+ * @return Other error codes as defined for the
+ *         netif_get_addr_req() function.
+ *
  */
 static int nildummy_device_message(device_id_t device_id, services_t service,
     size_t mtu)
 {
-	nildummy_device_t *device;
-	int index;
-	int rc;
-
 	fibril_rwlock_write_lock(&nildummy_globals.devices_lock);
-
+	
 	/* An existing device? */
-	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
+	nildummy_device_t *device =
+	    nildummy_devices_find(&nildummy_globals.devices, device_id);
 	if (device) {
 		if (device->service != service) {
@@ -213,6 +210,6 @@
 	
 	/* Get hardware address */
-	rc = netif_get_addr_req(device->phone, device->device_id, &device->addr,
-	    &device->addr_data);
+	int rc = netif_get_addr_req(device->phone, device->device_id,
+	    &device->addr, &device->addr_data);
 	if (rc != EOK) {
 		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
@@ -222,5 +219,5 @@
 	
 	/* Add to the cache */
-	index = nildummy_devices_add(&nildummy_globals.devices,
+	int index = nildummy_devices_add(&nildummy_globals.devices,
 	    device->device_id, device);
 	if (index < 0) {
@@ -240,9 +237,10 @@
 /** Return the device hardware address.
  *
- * @param[in] device_id	The device identifier.
- * @param[out] address	The device hardware address.
- * @return		 EOK on success.
- * @return		EBADMEM if the address parameter is NULL.
- * @return		ENOENT if there no such device.
+ * @param[in]  device_id Device identifier.
+ * @param[out] address   Device hardware address.
+ *
+ * @return EOK on success.
+ * @return EBADMEM if the address parameter is NULL.
+ * @return ENOENT if there no such device.
  *
  */
@@ -250,16 +248,18 @@
     measured_string_t **address)
 {
-	nildummy_device_t *device;
-
 	if (!address)
 		return EBADMEM;
 	
 	fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
-	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
+	
+	nildummy_device_t *device =
+	    nildummy_devices_find(&nildummy_globals.devices, device_id);
 	if (!device) {
 		fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 		return ENOENT;
 	}
+	
 	*address = device->addr;
+	
 	fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 	
@@ -269,12 +269,13 @@
 /** Return the device packet dimensions for sending.
  *
- * @param[in] device_id	The device identifier.
- * @param[out] addr_len	The minimum reserved address length.
- * @param[out] prefix	The minimum reserved prefix size.
- * @param[out] content	The maximum content size.
- * @param[out] suffix	The minimum reserved suffix size.
- * @return		EOK on success.
- * @return		EBADMEM if either one of the parameters is NULL.
- * @return		ENOENT if there is no such device.
+ * @param[in]  device_id Device identifier.
+ * @param[out] addr_len  Minimum reserved address length.
+ * @param[out] prefix    Minimum reserved prefix size.
+ * @param[out] content   Maximum content size.
+ * @param[out] suffix    Minimum reserved suffix size.
+ *
+ * @return EOK on success.
+ * @return EBADMEM if either one of the parameters is NULL.
+ * @return ENOENT if there is no such device.
  *
  */
@@ -282,17 +283,18 @@
     size_t *prefix, size_t *content, size_t *suffix)
 {
-	nildummy_device_t *device;
-
-	if (!addr_len || !prefix || !content || !suffix)
+	if ((!addr_len) || (!prefix) || (!content) || (!suffix))
 		return EBADMEM;
 	
 	fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
-	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
+	
+	nildummy_device_t *device =
+	    nildummy_devices_find(&nildummy_globals.devices, device_id);
 	if (!device) {
 		fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 		return ENOENT;
 	}
-
+	
 	*content = device->mtu;
+	
 	fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 	
@@ -306,15 +308,15 @@
     packet_t *packet, services_t target)
 {
-	packet_t *next;
-
 	fibril_rwlock_read_lock(&nildummy_globals.protos_lock);
+	
 	if (nildummy_globals.proto.phone) {
 		do {
-			next = pq_detach(packet);
+			packet_t *next = pq_detach(packet);
 			il_received_msg(nildummy_globals.proto.phone, device_id,
 			    packet, nildummy_globals.proto.service);
 			packet = next;
-		} while(packet);
-	}
+		} while (packet);
+	}
+	
 	fibril_rwlock_read_unlock(&nildummy_globals.protos_lock);
 	
@@ -326,9 +328,11 @@
  * Pass received packets for this service.
  *
- * @param[in] service	The module service.
- * @param[in] phone	The service phone.
- * @return		EOK on success.
- * @return		ENOENT if the service is not known.
- * @return		ENOMEM if there is not enough memory left.
+ * @param[in] service Module service.
+ * @param[in] phone   Service phone.
+ *
+ * @return EOK on success.
+ * @return ENOENT if the service is not known.
+ * @return ENOMEM if there is not enough memory left.
+ *
  */
 static int nildummy_register_message(services_t service, int phone)
@@ -347,33 +351,37 @@
 /** Send the packet queue.
  *
- * @param[in] device_id	The device identifier.
- * @param[in] packet	The packet queue.
- * @param[in] sender	The sending module service.
- * @return		EOK on success.
- * @return		ENOENT if there no such device.
- * @return		EINVAL if the service parameter is not known.
+ * @param[in] device_id Device identifier.
+ * @param[in] packet    Packet queue.
+ * @param[in] sender    Sending module service.
+ *
+ * @return EOK on success.
+ * @return ENOENT if there no such device.
+ * @return EINVAL if the service parameter is not known.
+ *
  */
 static int nildummy_send_message(device_id_t device_id, packet_t *packet,
     services_t sender)
 {
-	nildummy_device_t *device;
-
 	fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
-	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
+	
+	nildummy_device_t *device =
+	    nildummy_devices_find(&nildummy_globals.devices, device_id);
 	if (!device) {
 		fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 		return ENOENT;
 	}
-
+	
 	/* Send packet queue */
 	if (packet)
 		netif_send_msg(device->phone, device_id, packet,
 		    SERVICE_NILDUMMY);
+	
 	fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
-	return EOK;
-}
-
-int nil_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, size_t *answer_count)
+	
+	return EOK;
+}
+
+int nil_module_message(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, size_t *answer_count)
 {
 	measured_string_t *address;
@@ -434,52 +442,8 @@
 }
 
-/** Default thread for new connections.
- *
- * @param[in] iid	The initial message identifier.
- * @param[in] icall	The initial message call structure.
- */
-static void nil_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;
-		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 = nil_module_message_standalone(NAME, 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);
-	}
-}
-
 int main(int argc, char *argv[])
 {
-	int rc;
-	
 	/* Start the module */
-	rc = nil_module_start_standalone(nil_client_connection);
-	return rc;
+	return nil_module_start(SERVICE_NILDUMMY);
 }
 
Index: uspace/srv/net/nil/nildummy/nildummy.h
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.h	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ uspace/srv/net/nil/nildummy/nildummy.h	(revision fe8dfa6849229e829003d0fb83de58148a0aa45d)
@@ -45,21 +45,29 @@
 
 /** Type definition of the dummy nil global data.
+ *
  * @see nildummy_globals
+ *
  */
 typedef struct nildummy_globals nildummy_globals_t;
 
 /** Type definition of the dummy nil device specific data.
+ *
  * @see nildummy_device
+ *
  */
 typedef struct nildummy_device nildummy_device_t;
 
 /** Type definition of the dummy nil protocol specific data.
+ *
  * @see nildummy_proto
+ *
  */
 typedef struct nildummy_proto nildummy_proto_t;
 
 /** Dummy nil device map.
- * Maps devices to the dummy nil device specific data.
+ *
+ * Map devices to the dummy nil device specific data.
  * @see device.h
+ *
  */
 DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t);
@@ -69,12 +77,17 @@
 	/** Device identifier. */
 	device_id_t device_id;
+	
 	/** Device driver service. */
 	services_t service;
+	
 	/** Driver phone. */
 	int phone;
+	
 	/** Maximal transmission unit. */
 	size_t mtu;
+	
 	/** Actual device hardware address. */
 	measured_string_t *addr;
+	
 	/** Actual device hardware address data. */
 	uint8_t *addr_data;
@@ -85,4 +98,5 @@
 	/** Protocol service. */
 	services_t service;
+	
 	/** Protocol module phone. */
 	int phone;
@@ -93,10 +107,14 @@
 	/** Networking module phone. */
 	int net_phone;
-	/** Safety lock for devices. */
+	
+	/** Lock for devices. */
 	fibril_rwlock_t devices_lock;
+	
 	/** All known Ethernet devices. */
 	nildummy_devices_t devices;
+	
 	/** Safety lock for protocols. */
 	fibril_rwlock_t protos_lock;
+	
 	/** Default protocol. */
 	nildummy_proto_t proto;
Index: uspace/srv/net/nil/nildummy/nildummy_module.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy_module.c	(revision 04aade50a67495aecc9fe75aa94bf31860cfc3e3)
+++ 	(revision )
@@ -1,87 +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 nildummy
- * @{
- */
-
-/** @file
- *  Dummy network interface layer module stub.
- *  @see module.c
- */
-
-#include <async.h>
-#include <stdio.h>
-#include <errno.h>
-
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-
-#include <net/modules.h>
-#include <net_interface.h>
-#include <net/packet.h>
-#include <nil_local.h>
-
-#include "nildummy.h"
-
-int nil_module_start_standalone(async_client_conn_t client_connection)
-{
-	sysarg_t phonehash;
-	int rc;
-	
-	async_set_client_connection(client_connection);
-	int net_phone = net_connect_module();
-	
-	rc = pm_init();
-	if (rc != EOK)
-		return rc;
-	
-	
-	rc = nil_initialize(net_phone);
-	if (rc != EOK)
-		goto out;
-	
-	rc = ipc_connect_to_me(PHONE_NS, SERVICE_NILDUMMY, 0, 0, &phonehash);
-	if (rc != EOK)
-		goto out;
-	
-	async_manager();
-
-out:
-	pm_destroy();
-	return rc;
-}
-
-int nil_module_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, size_t *count)
-{
-	return nil_message_standalone(name, callid, call, answer, count);
-}
-
-/** @}
- */
