Index: uspace/lib/c/include/net/device.h
===================================================================
--- uspace/lib/c/include/net/device.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
+++ uspace/lib/c/include/net/device.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -0,0 +1,141 @@
+/*
+ * 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 libc
+ * @{
+ */
+
+/** @file
+ * Device identifier, state and usage statistics.
+ */
+
+#ifndef LIBC_DEVICE_ID_TYPE_H_
+#define LIBC_DEVICE_ID_TYPE_H_
+
+#include <adt/int_map.h>
+
+/** Device identifier to generic type map declaration. */
+#define DEVICE_MAP_DECLARE	INT_MAP_DECLARE
+
+/** Device identifier to generic type map implementation. */
+#define DEVICE_MAP_IMPLEMENT	INT_MAP_IMPLEMENT
+
+/** Invalid device identifier. */
+#define DEVICE_INVALID_ID	(-1)
+
+/** Device identifier type. */
+typedef int device_id_t;
+
+/** Device state type. */
+typedef enum device_state device_state_t;
+
+/** Type definition of the device usage statistics.
+ * @see device_stats
+ */
+typedef struct device_stats device_stats_t;
+
+/** Type definition of the device usage statistics pointer.
+ * @see device_stats
+ */
+typedef device_stats_t *device_stats_ref;
+
+/** Device state. */
+enum device_state {
+	/** Device not present or not initialized. */
+	NETIF_NULL = 0,
+	/** Device present and stopped. */
+	NETIF_STOPPED,
+	/** Device present and active. */
+	NETIF_ACTIVE,
+	/** Device present but unable to transmit. */
+	NETIF_CARRIER_LOST
+};
+
+/** Device usage statistics. */
+struct device_stats {
+	/** Total packets received. */
+	unsigned long receive_packets;
+	/** Total packets transmitted. */
+	unsigned long send_packets;
+	/** Total bytes received. */
+	unsigned long receive_bytes;
+	/** Total bytes transmitted. */
+	unsigned long send_bytes;
+	/** Bad packets received counter. */
+	unsigned long receive_errors;
+	/** Packet transmition problems counter. */
+	unsigned long send_errors;
+	/** No space in buffers counter. */
+	unsigned long receive_dropped;
+	/** No space available counter. */
+	unsigned long send_dropped;
+	/** Total multicast packets received. */
+	unsigned long multicast;
+	/** The number of collisions due to congestion on the medium. */
+	unsigned long collisions;
+
+	/* detailed receive_errors */
+
+	/** Received packet length error counter. */
+	unsigned long receive_length_errors;
+	/** Receiver buffer overflow counter. */
+	unsigned long receive_over_errors;
+	/** Received packet with crc error counter. */
+	unsigned long receive_crc_errors;
+	/** Received frame alignment error counter. */
+	unsigned long receive_frame_errors;
+	/** Receiver fifo overrun counter. */
+	unsigned long receive_fifo_errors;
+	/** Receiver missed packet counter. */
+	unsigned long receive_missed_errors;
+
+	/* detailed send_errors */
+
+	/** Transmitter aborted counter. */
+	unsigned long send_aborted_errors;
+	/** Transmitter carrier errors counter. */
+	unsigned long send_carrier_errors;
+	/** Transmitter fifo overrun counter. */
+	unsigned long send_fifo_errors;
+	/** Transmitter carrier errors counter. */
+	unsigned long send_heartbeat_errors;
+	/** Transmitter window errors counter. */
+	unsigned long send_window_errors;
+
+	/* for cslip etc */
+	
+	/** Total compressed packets received. */
+	unsigned long receive_compressed;
+	/** Total compressed packet transmitted. */
+	unsigned long send_compressed;
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/net/generic/net_remote.c
===================================================================
--- uspace/lib/net/generic/net_remote.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/generic/net_remote.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -42,5 +42,5 @@
 #include <net_messages.h>
 #include <net/modules.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <net_interface.h>
 #include <adt/measured_strings.h>
Index: uspace/lib/net/il/arp_remote.c
===================================================================
--- uspace/lib/net/il/arp_remote.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/il/arp_remote.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -43,5 +43,5 @@
 #include <net_messages.h>
 #include <net/modules.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <arp_interface.h>
 #include <adt/measured_strings.h>
Index: uspace/lib/net/il/ip_remote.c
===================================================================
--- uspace/lib/net/il/ip_remote.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/il/ip_remote.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -44,5 +44,5 @@
 #include <net_messages.h>
 #include <net/modules.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <net/inet.h>
 #include <ip_interface.h>
Index: uspace/lib/net/include/arp_interface.h
===================================================================
--- uspace/lib/net/include/arp_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/arp_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -35,5 +35,5 @@
 
 #include <adt/measured_strings.h>
-#include <net_device.h>
+#include <net/device.h>
 
 /** @name ARP module interface
Index: uspace/lib/net/include/icmp_interface.h
===================================================================
--- uspace/lib/net/include/icmp_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/icmp_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -37,5 +37,5 @@
 #include <sys/types.h>
 
-#include <net_device.h>
+#include <net/device.h>
 #include <adt/measured_strings.h>
 #include <net/packet.h>
Index: uspace/lib/net/include/il_interface.h
===================================================================
--- uspace/lib/net/include/il_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/il_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -44,5 +44,5 @@
 
 #include <net_messages.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <net/packet.h>
 #include <packet_client.h>
Index: uspace/lib/net/include/ip_interface.h
===================================================================
--- uspace/lib/net/include/ip_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/ip_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -38,5 +38,5 @@
 #include <ipc/services.h>
 
-#include <net_device.h>
+#include <net/device.h>
 #include <net/packet.h>
 
Index: uspace/lib/net/include/net_interface.h
===================================================================
--- uspace/lib/net/include/net_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/net_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -36,5 +36,5 @@
 #include <ipc/services.h>
 
-#include <net_device.h>
+#include <net/device.h>
 #include <adt/measured_strings.h>
 
Index: uspace/lib/net/include/netif_local.h
===================================================================
--- uspace/lib/net/include/netif_local.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/netif_local.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -46,5 +46,5 @@
 
 #include <adt/measured_strings.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <net/packet.h>
 
Index: uspace/lib/net/include/nil_interface.h
===================================================================
--- uspace/lib/net/include/nil_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/nil_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -43,5 +43,5 @@
 #include <net/packet.h>
 #include <nil_messages.h>
-#include <net_device.h>
+#include <net/device.h>
 
 #define nil_bind_service(service, device_id, me, receiver) \
Index: uspace/lib/net/include/socket_core.h
===================================================================
--- uspace/lib/net/include/socket_core.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/socket_core.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -41,5 +41,5 @@
 
 #include <net/in.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <adt/generic_char_map.h>
 #include <adt/dynamic_fifo.h>
Index: uspace/lib/net/include/tl_common.h
===================================================================
--- uspace/lib/net/include/tl_common.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/tl_common.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -40,5 +40,5 @@
 #include <net/socket_codes.h>
 #include <net/packet.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <net/inet.h>
 
Index: uspace/lib/net/include/tl_interface.h
===================================================================
--- uspace/lib/net/include/tl_interface.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/include/tl_interface.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -42,5 +42,5 @@
 
 #include <net_messages.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <net/packet.h>
 #include <packet_client.h>
Index: uspace/lib/net/netif/netif_local.c
===================================================================
--- uspace/lib/net/netif/netif_local.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/netif/netif_local.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -51,5 +51,5 @@
 #include <packet_remote.h>
 #include <adt/measured_strings.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <nil_interface.h>
 #include <netif_local.h>
Index: uspace/lib/net/netif/netif_remote.c
===================================================================
--- uspace/lib/net/netif/netif_remote.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/netif/netif_remote.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -41,5 +41,5 @@
 #include <net/packet.h>
 #include <packet_client.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <netif_remote.h>
 #include <netif_messages.h>
Index: uspace/lib/net/nil/nil_remote.c
===================================================================
--- uspace/lib/net/nil/nil_remote.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/nil/nil_remote.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -37,5 +37,5 @@
 
 #include <net_messages.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <nil_interface.h>
 #include <net/packet.h>
Index: uspace/lib/net/tl/tl_common.c
===================================================================
--- uspace/lib/net/tl/tl_common.c	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/net/tl/tl_common.c	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -48,5 +48,5 @@
 #include <packet_client.h>
 #include <packet_remote.h>
-#include <net_device.h>
+#include <net/device.h>
 #include <icmp_interface.h>
 #include <ip_remote.h>
Index: uspace/lib/socket/include/net_device.h
===================================================================
--- uspace/lib/socket/include/net_device.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ 	(revision )
@@ -1,173 +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 netif
- *  @{
- */
-
-/** @file
- *  Device identifier, state and usage statistics.
- */
-
-#ifndef __NET_DEVICE_ID_TYPE_H__
-#define __NET_DEVICE_ID_TYPE_H__
-
-#include <adt/int_map.h>
-
-/** Device identifier to generic type map declaration.
- */
-#define DEVICE_MAP_DECLARE		INT_MAP_DECLARE
-
-/** Device identifier to generic type map implementation.
- */
-#define DEVICE_MAP_IMPLEMENT	INT_MAP_IMPLEMENT
-
-/** Invalid device identifier.
- */
-#define DEVICE_INVALID_ID		(-1)
-
-/** Device identifier type.
- */
-typedef int	device_id_t;
-
-/** Device state type.
- */
-typedef enum device_state	device_state_t;
-
-/** Type definition of the device usage statistics.
- *  @see device_stats
- */
-typedef struct device_stats	device_stats_t;
-
-/** Type definition of the device usage statistics pointer.
- *  @see device_stats
- */
-typedef device_stats_t *	device_stats_ref;
-
-/** Device state.
- */
-enum	device_state{
-	/** Device not present or not initialized.
-	 */
-	NETIF_NULL = 0,
-	/** Device present and stopped.
-	 */
-	NETIF_STOPPED,
-	/** Device present and active.
-	 */
-	NETIF_ACTIVE,
-	/** Device present but unable to transmit.
-	 */
-	NETIF_CARRIER_LOST
-};
-
-/** Device usage statistics.
- */
-struct	device_stats{
-	/** Total packets received.
-	 */
-	unsigned long receive_packets;
-	/** Total packets transmitted.
-	 */
-	unsigned long send_packets;
-	/** Total bytes received.
-	 */
-	unsigned long receive_bytes;
-	/** Total bytes transmitted.
-	 */
-	unsigned long send_bytes;
-	/** Bad packets received counter.
-	 */
-	unsigned long receive_errors;
-	/** Packet transmition problems counter.
-	 */
-	unsigned long send_errors;
-	/** No space in buffers counter.
-	 */
-	unsigned long receive_dropped;
-	/** No space available counter.
-	 */
-	unsigned long send_dropped;
-	/** Total multicast packets received.
-	 */
-	unsigned long multicast;
-	/** The number of collisions due to congestion on the medium.
-	 */
-	unsigned long collisions;
-
-	/* detailed receive_errors: */
-	/** Received packet length error counter.
-	 */
-	unsigned long receive_length_errors;
-	/** Receiver buffer overflow counter.
-	 */
-	unsigned long receive_over_errors;
-	/** Received packet with crc error counter.
-	 */
-	unsigned long receive_crc_errors;
-	/** Received frame alignment error counter.
-	 */
-	unsigned long receive_frame_errors;
-	/** Receiver fifo overrun counter.
-	 */
-	unsigned long receive_fifo_errors;
-	/** Receiver missed packet counter.
-	 */
-	unsigned long receive_missed_errors;
-
-	/* detailed send_errors */
-	/** Transmitter aborted counter.
-	 */
-	unsigned long send_aborted_errors;
-	/** Transmitter carrier errors counter.
-	 */
-	unsigned long send_carrier_errors;
-	/** Transmitter fifo overrun counter.
-	 */
-	unsigned long send_fifo_errors;
-	/** Transmitter carrier errors counter.
-	 */
-	unsigned long send_heartbeat_errors;
-	/** Transmitter window errors counter.
-	 */
-	unsigned long send_window_errors;
-
-	/* for cslip etc */
-	/** Total compressed packets received.
-	 */
-	unsigned long receive_compressed;
-	/** Total compressed packet transmitted.
-	 */
-	unsigned long send_compressed;
-};
-
-#endif
-
-/** @}
- */
-
Index: uspace/lib/socket/include/net_messages.h
===================================================================
--- uspace/lib/socket/include/net_messages.h	(revision db5f8d3f6b863644336c22fa862b14ad082158ac)
+++ uspace/lib/socket/include/net_messages.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
@@ -42,5 +42,5 @@
 #include <ipc/services.h>
 
-#include <net_device.h>
+#include <net/device.h>
 #include <adt/measured_strings.h>
 #include <net/packet.h>
