Index: uspace/srv/hw/netif/dp8390/Makefile
===================================================================
--- uspace/srv/hw/netif/dp8390/Makefile	(revision 24ab58b348754b301fea741628d74d49704735d6)
+++ uspace/srv/hw/netif/dp8390/Makefile	(revision 1ef0fc3af9d3036d613efbe2d4cfb0ce271abed0)
@@ -39,11 +39,9 @@
 -include $(CONFIG_MAKEFILE)
 
-ifeq ($(CONFIG_NETWORKING),modular)
-	BINARY = dp8390
+ifeq ($(CONFIG_NETIF_NIL_BUNDLE),y)
+	LIBS += $(USPACE_PREFIX)/srv/net/nil/eth/libeth.a
 endif
 
-ifeq ($(CONFIG_NETWORKING),module)
-	LIBRARY = libdp8390
-endif
+BINARY = dp8390
 
 SOURCES = \
Index: uspace/srv/hw/netif/dp8390/dp8390.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390.c	(revision 24ab58b348754b301fea741628d74d49704735d6)
+++ uspace/srv/hw/netif/dp8390/dp8390.c	(revision 1ef0fc3af9d3036d613efbe2d4cfb0ce271abed0)
@@ -37,9 +37,7 @@
 
 #include <net_byteorder.h>
-
+#include <netif_local.h>
 #include <packet/packet.h>
 #include <packet/packet_client.h>
-
-#include <netif.h>
 
 #include "dp8390_drv.h"
Index: uspace/srv/hw/netif/dp8390/dp8390_module.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390_module.c	(revision 24ab58b348754b301fea741628d74d49704735d6)
+++ uspace/srv/hw/netif/dp8390/dp8390_module.c	(revision 1ef0fc3af9d3036d613efbe2d4cfb0ce271abed0)
@@ -50,6 +50,6 @@
 #include <net_device.h>
 #include <nil_interface.h>
-#include <netif.h>
-#include <netif_module.h>
+#include <netif_interface.h>
+#include <netif_local.h>
 
 #include "dp8390.h"
@@ -95,8 +95,4 @@
 };
 
-/** Network interface module global data.
- */
-netif_globals_t netif_globals;
-
 /** Handles the interrupt messages.
  *  This is the interrupt handler callback function.
@@ -104,61 +100,7 @@
  *  @param[in] call The interrupt message.
  */
-void irq_handler(ipc_callid_t iid, ipc_call_t * call);
-
-/** Changes the network interface state.
- *  @param[in,out] device The network interface.
- *  @param[in] state The new state.
- *  @returns The new state.
- */
-int change_state(device_ref device, device_state_t state);
-
-int netif_specific_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
-	return ENOTSUP;
-}
-
-int netif_get_device_stats(device_id_t device_id, device_stats_ref stats){
-	ERROR_DECLARE;
-
-	device_ref device;
-	eth_stat_t * de_stat;
-
-	if(! stats){
-		return EBADMEM;
-	}
-	ERROR_PROPAGATE(find_device(device_id, &device));
-	de_stat = &((dpeth_t *) device->specific)->de_stat;
-	null_device_stats(stats);
-	stats->receive_errors = de_stat->ets_recvErr;
-	stats->send_errors = de_stat->ets_sendErr;
-	stats->receive_crc_errors = de_stat->ets_CRCerr;
-	stats->receive_frame_errors = de_stat->ets_frameAll;
-	stats->receive_missed_errors = de_stat->ets_missedP;
-	stats->receive_packets = de_stat->ets_packetR;
-	stats->send_packets = de_stat->ets_packetT;
-	stats->collisions = de_stat->ets_collision;
-	stats->send_aborted_errors = de_stat->ets_transAb;
-	stats->send_carrier_errors = de_stat->ets_carrSense;
-	stats->send_heartbeat_errors = de_stat->ets_CDheartbeat;
-	stats->send_window_errors = de_stat->ets_OWC;
-	return EOK;
-}
-
-int netif_get_addr_message(device_id_t device_id, measured_string_ref address){
-	ERROR_DECLARE;
-
-	device_ref device;
-
-	if(! address){
-		return EBADMEM;
-	}
-	ERROR_PROPAGATE(find_device(device_id, &device));
-	address->value = (char *) (&((dpeth_t *) device->specific)->de_address);
-	address->length = CONVERT_SIZE(ether_addr_t, char, 1);
-	return EOK;
-}
-
-void irq_handler(ipc_callid_t iid, ipc_call_t * call)
+static void irq_handler(ipc_callid_t iid, ipc_call_t * call)
 {
-	device_ref device;
+	netif_device_t * device;
 	dpeth_t * dep;
 	packet_t received;
@@ -203,11 +145,77 @@
 }
 
+/** Changes the network interface state.
+ *  @param[in,out] device The network interface.
+ *  @param[in] state The new state.
+ *  @returns The new state.
+ */
+static int change_state(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");
+		
+		return state;
+	}
+	
+	return EOK;
+}
+
+int netif_specific_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+	return ENOTSUP;
+}
+
+int netif_get_device_stats(device_id_t device_id, device_stats_ref stats){
+	ERROR_DECLARE;
+
+	netif_device_t * device;
+	eth_stat_t * de_stat;
+
+	if(! stats){
+		return EBADMEM;
+	}
+	ERROR_PROPAGATE(find_device(device_id, &device));
+	de_stat = &((dpeth_t *) device->specific)->de_stat;
+	null_device_stats(stats);
+	stats->receive_errors = de_stat->ets_recvErr;
+	stats->send_errors = de_stat->ets_sendErr;
+	stats->receive_crc_errors = de_stat->ets_CRCerr;
+	stats->receive_frame_errors = de_stat->ets_frameAll;
+	stats->receive_missed_errors = de_stat->ets_missedP;
+	stats->receive_packets = de_stat->ets_packetR;
+	stats->send_packets = de_stat->ets_packetT;
+	stats->collisions = de_stat->ets_collision;
+	stats->send_aborted_errors = de_stat->ets_transAb;
+	stats->send_carrier_errors = de_stat->ets_carrSense;
+	stats->send_heartbeat_errors = de_stat->ets_CDheartbeat;
+	stats->send_window_errors = de_stat->ets_OWC;
+	return EOK;
+}
+
+int netif_get_addr_message(device_id_t device_id, measured_string_ref address){
+	ERROR_DECLARE;
+
+	netif_device_t * device;
+
+	if(! address){
+		return EBADMEM;
+	}
+	ERROR_PROPAGATE(find_device(device_id, &device));
+	address->value = (char *) (&((dpeth_t *) device->specific)->de_address);
+	address->length = CONVERT_SIZE(ether_addr_t, char, 1);
+	return EOK;
+}
+
+
+
 int netif_probe_message(device_id_t device_id, int irq, uintptr_t io){
 	ERROR_DECLARE;
 
-	device_ref device;
-	dpeth_t * dep;
-
-	device = (device_ref) malloc(sizeof(device_t));
+	netif_device_t * device;
+	dpeth_t * dep;
+
+	device = (netif_device_t *) malloc(sizeof(netif_device_t));
 	if(! device){
 		return ENOMEM;
@@ -218,5 +226,5 @@
 		return ENOMEM;
 	}
-	bzero(device, sizeof(device_t));
+	bzero(device, sizeof(netif_device_t));
 	bzero(dep, sizeof(dpeth_t));
 	device->device_id = device_id;
@@ -233,5 +241,5 @@
 		return ERROR_CODE;
 	}
-	if(ERROR_OCCURRED(device_map_add(&netif_globals.device_map, device->device_id, device))){
+	if(ERROR_OCCURRED(netif_device_map_add(&netif_globals.device_map, device->device_id, device))){
 		free(dep);
 		free(device);
@@ -244,5 +252,5 @@
 	ERROR_DECLARE;
 
-	device_ref device;
+	netif_device_t * device;
 	dpeth_t * dep;
 	packet_t next;
@@ -271,5 +279,5 @@
 }
 
-int netif_start_message(device_ref device){
+int netif_start_message(netif_device_t * device){
 	ERROR_DECLARE;
 
@@ -290,5 +298,5 @@
 }
 
-int netif_stop_message(device_ref device){
+int netif_stop_message(netif_device_t * device){
 	dpeth_t * dep;
 
@@ -302,18 +310,4 @@
 }
 
-int change_state(device_ref 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");
-		
-		return state;
-	}
-	
-	return EOK;
-}
-
 int netif_initialize(void){
 	ipcarg_t phonehash;
@@ -323,8 +317,4 @@
 	return REGISTER_ME(SERVICE_DP8390, &phonehash);
 }
-
-#ifdef CONFIG_NETWORKING_modular
-
-#include <netif_standalone.h>
 
 /** Default thread for new connections.
@@ -386,7 +376,4 @@
 }
 
-#endif /* CONFIG_NETWORKING_modular */
-
-
 /** @}
  */
