dev: Move network devices to src/dev/net/

--HG--
rename : src/dev/Ethernet.py => src/dev/net/Ethernet.py
rename : src/dev/etherbus.cc => src/dev/net/etherbus.cc
rename : src/dev/etherbus.hh => src/dev/net/etherbus.hh
rename : src/dev/etherdevice.cc => src/dev/net/etherdevice.cc
rename : src/dev/etherdevice.hh => src/dev/net/etherdevice.hh
rename : src/dev/etherdump.cc => src/dev/net/etherdump.cc
rename : src/dev/etherdump.hh => src/dev/net/etherdump.hh
rename : src/dev/etherint.cc => src/dev/net/etherint.cc
rename : src/dev/etherint.hh => src/dev/net/etherint.hh
rename : src/dev/etherlink.cc => src/dev/net/etherlink.cc
rename : src/dev/etherlink.hh => src/dev/net/etherlink.hh
rename : src/dev/etherobject.hh => src/dev/net/etherobject.hh
rename : src/dev/etherpkt.cc => src/dev/net/etherpkt.cc
rename : src/dev/etherpkt.hh => src/dev/net/etherpkt.hh
rename : src/dev/ethertap.cc => src/dev/net/ethertap.cc
rename : src/dev/ethertap.hh => src/dev/net/ethertap.hh
rename : src/dev/i8254xGBe.cc => src/dev/net/i8254xGBe.cc
rename : src/dev/i8254xGBe.hh => src/dev/net/i8254xGBe.hh
rename : src/dev/i8254xGBe_defs.hh => src/dev/net/i8254xGBe_defs.hh
rename : src/dev/multi_etherlink.cc => src/dev/net/multi_etherlink.cc
rename : src/dev/multi_etherlink.hh => src/dev/net/multi_etherlink.hh
rename : src/dev/multi_iface.cc => src/dev/net/multi_iface.cc
rename : src/dev/multi_iface.hh => src/dev/net/multi_iface.hh
rename : src/dev/multi_packet.cc => src/dev/net/multi_packet.cc
rename : src/dev/multi_packet.hh => src/dev/net/multi_packet.hh
rename : src/dev/ns_gige.cc => src/dev/net/ns_gige.cc
rename : src/dev/ns_gige.hh => src/dev/net/ns_gige.hh
rename : src/dev/ns_gige_reg.h => src/dev/net/ns_gige_reg.h
rename : src/dev/pktfifo.cc => src/dev/net/pktfifo.cc
rename : src/dev/pktfifo.hh => src/dev/net/pktfifo.hh
rename : src/dev/sinic.cc => src/dev/net/sinic.cc
rename : src/dev/sinic.hh => src/dev/net/sinic.hh
rename : src/dev/sinicreg.hh => src/dev/net/sinicreg.hh
rename : src/dev/tcp_iface.cc => src/dev/net/tcp_iface.cc
rename : src/dev/tcp_iface.hh => src/dev/net/tcp_iface.hh
diff --git a/src/dev/SConscript b/src/dev/SConscript
index 4bacb3e..85bf839 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -41,7 +41,6 @@
 
 SimObject('BadDevice.py')
 SimObject('DiskImage.py')
-SimObject('Ethernet.py')
 SimObject('Ide.py')
 SimObject('Platform.py')
 SimObject('SimpleDisk.py')
@@ -51,29 +50,14 @@
 Source('baddev.cc')
 Source('disk_image.cc')
 Source('dma_device.cc')
-Source('etherbus.cc')
-Source('etherdevice.cc')
-Source('etherdump.cc')
-Source('etherint.cc')
-Source('etherlink.cc')
-Source('multi_packet.cc')
-Source('multi_iface.cc')
-Source('multi_etherlink.cc')
-Source('tcp_iface.cc')
-Source('etherpkt.cc')
-Source('ethertap.cc')
-Source('i8254xGBe.cc')
 Source('ide_ctrl.cc')
 Source('ide_disk.cc')
 Source('intel_8254_timer.cc')
 Source('mc146818.cc')
-Source('ns_gige.cc')
 Source('pixelpump.cc')
-Source('pktfifo.cc')
 Source('platform.cc')
 Source('ps2.cc')
 Source('simple_disk.cc')
-Source('sinic.cc')
 Source('terminal.cc')
 Source('uart.cc')
 Source('uart8250.cc')
@@ -81,17 +65,6 @@
 DebugFlag('DiskImageRead')
 DebugFlag('DiskImageWrite')
 DebugFlag('DMA')
-DebugFlag('Ethernet')
-DebugFlag('MultiEthernet')
-DebugFlag('MultiEthernetPkt')
-DebugFlag('EthernetCksum')
-DebugFlag('EthernetDMA')
-DebugFlag('EthernetData')
-DebugFlag('EthernetDesc')
-DebugFlag('EthernetEEPROM')
-DebugFlag('EthernetIntr')
-DebugFlag('EthernetPIO')
-DebugFlag('EthernetSM')
 DebugFlag('IdeCtrl')
 DebugFlag('IdeDisk')
 DebugFlag('Intel8254Timer')
@@ -103,9 +76,4 @@
 DebugFlag('Uart')
 
 CompoundFlag('DiskImageAll', [ 'DiskImageRead', 'DiskImageWrite' ])
-CompoundFlag('EthernetAll', [ 'Ethernet', 'EthernetPIO', 'EthernetDMA',
-    'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM',
-    'EthernetCksum', 'EthernetEEPROM' ])
-CompoundFlag('EthernetNoData', [ 'Ethernet', 'EthernetPIO', 'EthernetDesc',
-    'EthernetIntr', 'EthernetSM', 'EthernetCksum' ])
 CompoundFlag('IdeAll', [ 'IdeCtrl', 'IdeDisk' ])
diff --git a/src/dev/Ethernet.py b/src/dev/net/Ethernet.py
similarity index 95%
rename from src/dev/Ethernet.py
rename to src/dev/net/Ethernet.py
index 89d1bad..9859857 100644
--- a/src/dev/Ethernet.py
+++ b/src/dev/net/Ethernet.py
@@ -46,11 +46,11 @@
 class EtherObject(SimObject):
     type = 'EtherObject'
     abstract = True
-    cxx_header = "dev/etherobject.hh"
+    cxx_header = "dev/net/etherobject.hh"
 
 class EtherLink(EtherObject):
     type = 'EtherLink'
-    cxx_header = "dev/etherlink.hh"
+    cxx_header = "dev/net/etherlink.hh"
     int0 = SlavePort("interface 0")
     int1 = SlavePort("interface 1")
     delay = Param.Latency('0us', "packet transmit delay")
@@ -60,7 +60,7 @@
 
 class MultiEtherLink(EtherObject):
     type = 'MultiEtherLink'
-    cxx_header = "dev/multi_etherlink.hh"
+    cxx_header = "dev/net/multi_etherlink.hh"
     int0 = SlavePort("interface 0")
     delay = Param.Latency('0us', "packet transmit delay")
     delay_var = Param.Latency('0ns', "packet transmit delay variability")
@@ -74,34 +74,34 @@
 
 class EtherBus(EtherObject):
     type = 'EtherBus'
-    cxx_header = "dev/etherbus.hh"
+    cxx_header = "dev/net/etherbus.hh"
     loopback = Param.Bool(True, "send packet back to the sending interface")
     dump = Param.EtherDump(NULL, "dump object")
     speed = Param.NetworkBandwidth('100Mbps', "bus speed in bits per second")
 
 class EtherTap(EtherObject):
     type = 'EtherTap'
-    cxx_header = "dev/ethertap.hh"
+    cxx_header = "dev/net/ethertap.hh"
     bufsz = Param.Int(10000, "tap buffer size")
     dump = Param.EtherDump(NULL, "dump object")
     port = Param.UInt16(3500, "tap port")
 
 class EtherDump(SimObject):
     type = 'EtherDump'
-    cxx_header = "dev/etherdump.hh"
+    cxx_header = "dev/net/etherdump.hh"
     file = Param.String("dump file")
     maxlen = Param.Int(96, "max portion of packet data to dump")
 
 class EtherDevice(PciDevice):
     type = 'EtherDevice'
     abstract = True
-    cxx_header = "dev/etherdevice.hh"
+    cxx_header = "dev/net/etherdevice.hh"
     interface = MasterPort("Ethernet Interface")
 
 class IGbE(EtherDevice):
     # Base class for two IGbE adapters listed above
     type = 'IGbE'
-    cxx_header = "dev/i8254xGBe.hh"
+    cxx_header = "dev/net/i8254xGBe.hh"
     hardware_address = Param.EthernetAddr(NextEthernetAddr,
         "Ethernet Hardware Address")
     rx_fifo_size = Param.MemorySize('384kB', "Size of the rx FIFO")
@@ -154,7 +154,7 @@
 class EtherDevBase(EtherDevice):
     type = 'EtherDevBase'
     abstract = True
-    cxx_header = "dev/etherdevice.hh"
+    cxx_header = "dev/net/etherdevice.hh"
 
     hardware_address = Param.EthernetAddr(NextEthernetAddr,
         "Ethernet Hardware Address")
@@ -177,7 +177,7 @@
 
 class NSGigE(EtherDevBase):
     type = 'NSGigE'
-    cxx_header = "dev/ns_gige.hh"
+    cxx_header = "dev/net/ns_gige.hh"
 
     dma_data_free = Param.Bool(False, "DMA of Data is free")
     dma_desc_free = Param.Bool(False, "DMA of Descriptors is free")
@@ -207,7 +207,7 @@
 class Sinic(EtherDevBase):
     type = 'Sinic'
     cxx_class = 'Sinic::Device'
-    cxx_header = "dev/sinic.hh"
+    cxx_header = "dev/net/sinic.hh"
 
     rx_max_copy = Param.MemorySize('1514B', "rx max copy")
     tx_max_copy = Param.MemorySize('16kB', "tx max copy")
diff --git a/src/dev/net/SConscript b/src/dev/net/SConscript
new file mode 100644
index 0000000..f529a1b
--- /dev/null
+++ b/src/dev/net/SConscript
@@ -0,0 +1,94 @@
+# -*- mode:python -*-
+
+# Copyright (c) 2015 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Copyright (c) 2006 The Regents of The University of Michigan
+# 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;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "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 COPYRIGHT
+# OWNER OR CONTRIBUTORS 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.
+#
+# Authors: Steve Reinhardt
+#          Gabe Black
+#          Andreas Sandberg
+
+Import('*')
+
+if env['TARGET_ISA'] == 'null':
+    Return()
+
+SimObject('Ethernet.py')
+
+# Basic Ethernet infrastructure
+Source('etherbus.cc')
+Source('etherdevice.cc')
+Source('etherdump.cc')
+Source('etherint.cc')
+Source('etherlink.cc')
+Source('etherpkt.cc')
+Source('ethertap.cc')
+
+Source('pktfifo.cc')
+
+DebugFlag('Ethernet')
+DebugFlag('EthernetCksum')
+DebugFlag('EthernetDMA')
+DebugFlag('EthernetData')
+DebugFlag('EthernetDesc')
+DebugFlag('EthernetEEPROM')
+DebugFlag('EthernetIntr')
+DebugFlag('EthernetPIO')
+DebugFlag('EthernetSM')
+
+# Multi gem5
+Source('multi_packet.cc')
+Source('multi_iface.cc')
+Source('multi_etherlink.cc')
+Source('tcp_iface.cc')
+
+DebugFlag('MultiEthernet')
+DebugFlag('MultiEthernetPkt')
+
+# Ethernet controllers
+Source('i8254xGBe.cc')
+Source('ns_gige.cc')
+Source('sinic.cc')
+
+
+
+CompoundFlag('EthernetAll', [ 'Ethernet', 'EthernetPIO', 'EthernetDMA',
+    'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM',
+    'EthernetCksum', 'EthernetEEPROM' ])
+
+CompoundFlag('EthernetNoData', [ 'Ethernet', 'EthernetPIO', 'EthernetDesc',
+    'EthernetIntr', 'EthernetSM', 'EthernetCksum' ])
diff --git a/src/dev/etherbus.cc b/src/dev/net/etherbus.cc
similarity index 96%
rename from src/dev/etherbus.cc
rename to src/dev/net/etherbus.cc
index c9e9c93..ba5beab 100644
--- a/src/dev/etherbus.cc
+++ b/src/dev/net/etherbus.cc
@@ -31,6 +31,7 @@
 /* @file
  * Device module for modelling an ethernet hub
  */
+#include "dev/net/etherbus.hh"
 
 #include <cmath>
 #include <deque>
@@ -40,10 +41,9 @@
 #include "base/trace.hh"
 #include "debug/Ethernet.hh"
 #include "debug/EthernetData.hh"
-#include "dev/etherbus.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
 #include "params/EtherBus.hh"
 #include "sim/core.hh"
 
diff --git a/src/dev/etherbus.hh b/src/dev/net/etherbus.hh
similarity index 94%
rename from src/dev/etherbus.hh
rename to src/dev/net/etherbus.hh
index 43978b9..7395c28 100644
--- a/src/dev/etherbus.hh
+++ b/src/dev/net/etherbus.hh
@@ -32,11 +32,11 @@
  * Device module for modelling an ethernet hub
  */
 
-#ifndef __ETHERBUS_H__
-#define __ETHERBUS_H__
+#ifndef __DEV_NET_ETHERBUS_HH__
+#define __DEV_NET_ETHERBUS_HH__
 
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
 #include "params/EtherBus.hh"
 #include "sim/eventq.hh"
 #include "sim/sim_object.hh"
@@ -87,4 +87,4 @@
     virtual EtherInt *getEthPort(const std::string &if_name, int idx);
 };
 
-#endif // __ETHERBUS_H__
+#endif // __DEV_NET_ETHERBUS_HH__
diff --git a/src/dev/etherdevice.cc b/src/dev/net/etherdevice.cc
similarity index 99%
rename from src/dev/etherdevice.cc
rename to src/dev/net/etherdevice.cc
index 59febcd..5984950 100644
--- a/src/dev/etherdevice.cc
+++ b/src/dev/net/etherdevice.cc
@@ -29,7 +29,8 @@
  *          Lisa Hsu
  */
 
-#include "dev/etherdevice.hh"
+#include "dev/net/etherdevice.hh"
+
 #include "sim/stats.hh"
 
 void
diff --git a/src/dev/etherdevice.hh b/src/dev/net/etherdevice.hh
similarity index 97%
rename from src/dev/etherdevice.hh
rename to src/dev/net/etherdevice.hh
index 45df2a2..d13a1c3 100644
--- a/src/dev/etherdevice.hh
+++ b/src/dev/net/etherdevice.hh
@@ -33,13 +33,13 @@
  * Base Ethernet Device declaration.
  */
 
-#ifndef __DEV_ETHERDEVICE_HH__
-#define __DEV_ETHERDEVICE_HH__
+#ifndef __DEV_NET_ETHERDEVICE_HH__
+#define __DEV_NET_ETHERDEVICE_HH__
 
 #include "base/statistics.hh"
 #include "dev/pci/device.hh"
-#include "params/EtherDevice.hh"
 #include "params/EtherDevBase.hh"
+#include "params/EtherDevice.hh"
 #include "sim/sim_object.hh"
 
 class EtherInt;
@@ -148,4 +148,5 @@
 
 };
 
-#endif //__DEV_ETHERDEVICE_HH__
+#endif // __DEV_NET_ETHERDEVICE_HH__
+
diff --git a/src/dev/etherdump.cc b/src/dev/net/etherdump.cc
similarity index 98%
rename from src/dev/etherdump.cc
rename to src/dev/net/etherdump.cc
index 21532bd..c537fbf 100644
--- a/src/dev/etherdump.cc
+++ b/src/dev/net/etherdump.cc
@@ -31,6 +31,7 @@
 /* @file
  * Simple object for creating a simple pcap style packet trace
  */
+#include "dev/net/etherdump.hh"
 
 #include <sys/time.h>
 
@@ -39,7 +40,6 @@
 
 #include "base/misc.hh"
 #include "base/output.hh"
-#include "dev/etherdump.hh"
 #include "sim/core.hh"
 
 using std::string;
diff --git a/src/dev/etherdump.hh b/src/dev/net/etherdump.hh
similarity index 93%
rename from src/dev/etherdump.hh
rename to src/dev/net/etherdump.hh
index cc8fa91..8e651ba 100644
--- a/src/dev/etherdump.hh
+++ b/src/dev/net/etherdump.hh
@@ -32,12 +32,12 @@
  * Simple object for creating a simple pcap style packet trace
  */
 
-#ifndef __ETHERDUMP_H__
-#define __ETHERDUMP_H__
+#ifndef __DEV_NET_ETHERDUMP_HH__
+#define __DEV_NET_ETHERDUMP_HH__
 
 #include <fstream>
 
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
 #include "params/EtherDump.hh"
 #include "sim/sim_object.hh"
 
@@ -59,4 +59,4 @@
     inline void dump(EthPacketPtr &pkt) { dumpPacket(pkt); }
 };
 
-#endif // __ETHERDUMP_H__
+#endif // __DEV_NET_ETHERDUMP_HH__
diff --git a/src/dev/etherint.cc b/src/dev/net/etherint.cc
similarity index 98%
rename from src/dev/etherint.cc
rename to src/dev/net/etherint.cc
index fce7b28..b5990c7 100644
--- a/src/dev/etherint.cc
+++ b/src/dev/net/etherint.cc
@@ -28,8 +28,9 @@
  * Authors: Nathan Binkert
  */
 
+#include "dev/net/etherint.hh"
+
 #include "base/misc.hh"
-#include "dev/etherint.hh"
 #include "sim/sim_object.hh"
 
 void
diff --git a/src/dev/etherint.hh b/src/dev/net/etherint.hh
similarity index 95%
rename from src/dev/etherint.hh
rename to src/dev/net/etherint.hh
index 98b820d..a11d026 100644
--- a/src/dev/etherint.hh
+++ b/src/dev/net/etherint.hh
@@ -33,12 +33,12 @@
  * components.
  */
 
-#ifndef __DEV_ETHERINT_HH__
-#define __DEV_ETHERINT_HH__
+#ifndef __DEV_NET_ETHERINT_HH__
+#define __DEV_NET_ETHERINT_HH__
 
 #include <string>
 
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
 
 /*
  * Class representing the actual interface between two ethernet
@@ -73,4 +73,4 @@
     virtual bool isBusy() { return false; }
 };
 
-#endif // __DEV_ETHERINT_HH__
+#endif // __DEV_NET_ETHERINT_HH__
diff --git a/src/dev/etherlink.cc b/src/dev/net/etherlink.cc
similarity index 98%
rename from src/dev/etherlink.cc
rename to src/dev/net/etherlink.cc
index 1c88a31..c327a01 100644
--- a/src/dev/etherlink.cc
+++ b/src/dev/net/etherlink.cc
@@ -45,6 +45,8 @@
  * Device module for modelling a fixed bandwidth full duplex ethernet link
  */
 
+#include "dev/net/etherlink.hh"
+
 #include <cmath>
 #include <deque>
 #include <string>
@@ -54,10 +56,9 @@
 #include "base/trace.hh"
 #include "debug/Ethernet.hh"
 #include "debug/EthernetData.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherlink.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
 #include "params/EtherLink.hh"
 #include "sim/core.hh"
 #include "sim/serialize.hh"
diff --git a/src/dev/etherlink.hh b/src/dev/net/etherlink.hh
similarity index 96%
rename from src/dev/etherlink.hh
rename to src/dev/net/etherlink.hh
index 9d2a5fd..1d02dec 100644
--- a/src/dev/etherlink.hh
+++ b/src/dev/net/etherlink.hh
@@ -44,15 +44,15 @@
  * Device module for modelling a fixed bandwidth full duplex ethernet link
  */
 
-#ifndef __DEV_ETHERLINK_HH__
-#define __DEV_ETHERLINK_HH__
+#ifndef __DEV_NET_ETHERLINK_HH__
+#define __DEV_NET_ETHERLINK_HH__
 
 #include <queue>
 
 #include "base/types.hh"
-#include "dev/etherint.hh"
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
 #include "params/EtherLink.hh"
 #include "sim/eventq.hh"
 #include "sim/sim_object.hh"
@@ -163,4 +163,4 @@
 
 };
 
-#endif // __ETHERLINK_HH__
+#endif // __DEV_NET_ETHERLINK_HH__
diff --git a/src/dev/etherobject.hh b/src/dev/net/etherobject.hh
similarity index 95%
rename from src/dev/etherobject.hh
rename to src/dev/net/etherobject.hh
index 02a30ab..55cfa97 100644
--- a/src/dev/etherobject.hh
+++ b/src/dev/net/etherobject.hh
@@ -33,8 +33,8 @@
  * Base Ethernet Object declaration.
  */
 
-#ifndef __DEV_ETHEROBJECT_HH__
-#define __DEV_ETHEROBJECT_HH__
+#ifndef __DEV_NET_ETHEROBJECT_HH__
+#define __DEV_NET_ETHEROBJECT_HH__
 
 #include "params/EtherObject.hh"
 #include "sim/sim_object.hh"
@@ -64,4 +64,4 @@
 
 };
 
-#endif //__MEM_MEM_OBJECT_HH__
+#endif // __DEV_NET_ETHEROBJECT_HH__
diff --git a/src/dev/etherpkt.cc b/src/dev/net/etherpkt.cc
similarity index 98%
rename from src/dev/etherpkt.cc
rename to src/dev/net/etherpkt.cc
index 58b53b5..a16f572 100644
--- a/src/dev/etherpkt.cc
+++ b/src/dev/net/etherpkt.cc
@@ -28,11 +28,12 @@
  * Authors: Nathan Binkert
  */
 
+#include "dev/net/etherpkt.hh"
+
 #include <iostream>
 
-#include "base/misc.hh"
 #include "base/inet.hh"
-#include "dev/etherpkt.hh"
+#include "base/misc.hh"
 #include "sim/serialize.hh"
 
 using namespace std;
diff --git a/src/dev/etherpkt.hh b/src/dev/net/etherpkt.hh
similarity index 96%
rename from src/dev/etherpkt.hh
rename to src/dev/net/etherpkt.hh
index 0d8998b..4119578 100644
--- a/src/dev/etherpkt.hh
+++ b/src/dev/net/etherpkt.hh
@@ -33,8 +33,8 @@
  * Reference counted class containing ethernet packet data
  */
 
-#ifndef __ETHERPKT_HH__
-#define __ETHERPKT_HH__
+#ifndef __DEV_NET_ETHERPKT_HH__
+#define __DEV_NET_ETHERPKT_HH__
 
 #include <cassert>
 #include <iosfwd>
@@ -92,4 +92,4 @@
 
 typedef std::shared_ptr<EthPacketData> EthPacketPtr;
 
-#endif // __ETHERPKT_HH__
+#endif // __DEV_NET_ETHERPKT_HH__
diff --git a/src/dev/ethertap.cc b/src/dev/net/ethertap.cc
similarity index 98%
rename from src/dev/ethertap.cc
rename to src/dev/net/ethertap.cc
index d062b5d..e8d6a36 100644
--- a/src/dev/ethertap.cc
+++ b/src/dev/net/ethertap.cc
@@ -32,8 +32,11 @@
  * Interface to connect a simulated ethernet device to the real world
  */
 
+#include "dev/net/ethertap.hh"
+
 #if defined(__OpenBSD__) || defined(__APPLE__)
 #include <sys/param.h>
+
 #endif
 #include <netinet/in.h>
 #include <unistd.h>
@@ -47,10 +50,9 @@
 #include "base/trace.hh"
 #include "debug/Ethernet.hh"
 #include "debug/EthernetData.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
-#include "dev/ethertap.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
 
 using namespace std;
 
diff --git a/src/dev/ethertap.hh b/src/dev/net/ethertap.hh
similarity index 94%
rename from src/dev/ethertap.hh
rename to src/dev/net/ethertap.hh
index 5755032..b27b80f 100644
--- a/src/dev/ethertap.hh
+++ b/src/dev/net/ethertap.hh
@@ -32,16 +32,16 @@
  * Interface to connect a simulated ethernet device to the real world
  */
 
-#ifndef __ETHERTAP_HH__
-#define __ETHERTAP_HH__
+#ifndef __DEV_NET_ETHERTAP_HH__
+#define __DEV_NET_ETHERTAP_HH__
 
 #include <queue>
 #include <string>
 
 #include "base/pollevent.hh"
-#include "dev/etherint.hh"
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
 #include "params/EtherTap.hh"
 #include "sim/eventq.hh"
 #include "sim/sim_object.hh"
@@ -133,4 +133,4 @@
 };
 
 
-#endif // __ETHERTAP_HH__
+#endif // __DEV_NET_ETHERTAP_HH__
diff --git a/src/dev/i8254xGBe.cc b/src/dev/net/i8254xGBe.cc
similarity index 99%
rename from src/dev/i8254xGBe.cc
rename to src/dev/net/i8254xGBe.cc
index 50126e6..cba773f 100644
--- a/src/dev/i8254xGBe.cc
+++ b/src/dev/net/i8254xGBe.cc
@@ -35,6 +35,7 @@
  * other MACs with slight modifications.
  */
 
+#include "dev/net/i8254xGBe.hh"
 
 /*
  * @todo really there are multiple dma engines.. we should implement them.
@@ -47,7 +48,6 @@
 #include "base/trace.hh"
 #include "debug/Drain.hh"
 #include "debug/EthernetAll.hh"
-#include "dev/i8254xGBe.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"
 #include "params/IGbE.hh"
diff --git a/src/dev/i8254xGBe.hh b/src/dev/net/i8254xGBe.hh
similarity index 98%
rename from src/dev/i8254xGBe.hh
rename to src/dev/net/i8254xGBe.hh
index 700f49f..e357444 100644
--- a/src/dev/i8254xGBe.hh
+++ b/src/dev/net/i8254xGBe.hh
@@ -32,8 +32,8 @@
  * Device model for Intel's 8254x line of gigabit ethernet controllers.
  */
 
-#ifndef __DEV_I8254XGBE_HH__
-#define __DEV_I8254XGBE_HH__
+#ifndef __DEV_NET_I8254XGBE_HH__
+#define __DEV_NET_I8254XGBE_HH__
 
 #include <deque>
 #include <string>
@@ -42,12 +42,12 @@
 #include "base/inet.hh"
 #include "debug/EthernetDesc.hh"
 #include "debug/EthernetIntr.hh"
-#include "dev/etherdevice.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
-#include "dev/i8254xGBe_defs.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/i8254xGBe_defs.hh"
+#include "dev/net/pktfifo.hh"
 #include "dev/pci/device.hh"
-#include "dev/pktfifo.hh"
 #include "params/IGbE.hh"
 #include "sim/eventq.hh"
 
@@ -557,4 +557,4 @@
     virtual void sendDone() { dev->ethTxDone(); }
 };
 
-#endif //__DEV_I8254XGBE_HH__
+#endif //__DEV_NET_I8254XGBE_HH__
diff --git a/src/dev/i8254xGBe_defs.hh b/src/dev/net/i8254xGBe_defs.hh
similarity index 100%
rename from src/dev/i8254xGBe_defs.hh
rename to src/dev/net/i8254xGBe_defs.hh
diff --git a/src/dev/multi_etherlink.cc b/src/dev/net/multi_etherlink.cc
similarity index 96%
rename from src/dev/multi_etherlink.cc
rename to src/dev/net/multi_etherlink.cc
index b7d411a..cf4300d 100644
--- a/src/dev/multi_etherlink.cc
+++ b/src/dev/net/multi_etherlink.cc
@@ -41,7 +41,7 @@
  * Device module for a full duplex ethernet link for multi gem5 simulations.
  */
 
-#include "dev/multi_etherlink.hh"
+#include "dev/net/multi_etherlink.hh"
 
 #include <arpa/inet.h>
 #include <sys/socket.h>
@@ -57,13 +57,13 @@
 #include "debug/EthernetData.hh"
 #include "debug/MultiEthernet.hh"
 #include "debug/MultiEthernetPkt.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherlink.hh"
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
-#include "dev/multi_iface.hh"
-#include "dev/tcp_iface.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherlink.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/multi_iface.hh"
+#include "dev/net/tcp_iface.hh"
 #include "params/EtherLink.hh"
 #include "sim/core.hh"
 #include "sim/serialize.hh"
diff --git a/src/dev/multi_etherlink.hh b/src/dev/net/multi_etherlink.hh
similarity index 97%
rename from src/dev/multi_etherlink.hh
rename to src/dev/net/multi_etherlink.hh
index 68e96f8..0a3e39b 100644
--- a/src/dev/multi_etherlink.hh
+++ b/src/dev/net/multi_etherlink.hh
@@ -47,12 +47,12 @@
  * multi gem5 runs.
  *
  */
-#ifndef __DEV_MULTIETHERLINK_HH__
-#define __DEV_MULTIETHERLINK_HH__
+#ifndef __DEV_NET_MULTIETHERLINK_HH__
+#define __DEV_NET_MULTIETHERLINK_HH__
 
 #include <iostream>
 
-#include "dev/etherlink.hh"
+#include "dev/net/etherlink.hh"
 #include "params/MultiEtherLink.hh"
 
 class MultiIface;
@@ -232,4 +232,4 @@
     void unserialize(CheckpointIn &cp) override;
 };
 
-#endif // __DEV_MULTIETHERLINK_HH__
+#endif // __DEV_NET_MULTIETHERLINK_HH__
diff --git a/src/dev/multi_iface.cc b/src/dev/net/multi_iface.cc
similarity index 99%
rename from src/dev/multi_iface.cc
rename to src/dev/net/multi_iface.cc
index c924c1a..15f69f2 100644
--- a/src/dev/multi_iface.cc
+++ b/src/dev/net/multi_iface.cc
@@ -41,7 +41,7 @@
  * The interface class for multi gem5 simulations.
  */
 
-#include "dev/multi_iface.hh"
+#include "dev/net/multi_iface.hh"
 
 #include <queue>
 #include <thread>
@@ -50,7 +50,7 @@
 #include "base/trace.hh"
 #include "debug/MultiEthernet.hh"
 #include "debug/MultiEthernetPkt.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
 #include "sim/sim_exit.hh"
 #include "sim/sim_object.hh"
 
diff --git a/src/dev/multi_iface.hh b/src/dev/net/multi_iface.hh
similarity index 98%
rename from src/dev/multi_iface.hh
rename to src/dev/net/multi_iface.hh
index 5c7834d..f8ce2ab 100644
--- a/src/dev/multi_iface.hh
+++ b/src/dev/net/multi_iface.hh
@@ -75,8 +75,8 @@
  * send/receive service implementations (e.g. TCP/IP, MPI,...). A TCP
  * stream socket version is implemented in dev/src/tcp_iface.[hh,cc].
  */
-#ifndef __DEV_MULTI_IFACE_HH__
-#define __DEV_MULTI_IFACE_HH__
+#ifndef __DEV_NET_MULTI_IFACE_HH__
+#define __DEV_NET_MULTI_IFACE_HH__
 
 #include <array>
 #include <mutex>
@@ -84,8 +84,8 @@
 #include <thread>
 #include <utility>
 
-#include "dev/etherpkt.hh"
-#include "dev/multi_packet.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/multi_packet.hh"
 #include "sim/core.hh"
 #include "sim/drain.hh"
 #include "sim/global_event.hh"
@@ -489,4 +489,4 @@
 };
 
 
-#endif
+#endif // __DEV_NET_MULTI_IFACE_HH__
diff --git a/src/dev/multi_packet.cc b/src/dev/net/multi_packet.cc
similarity index 98%
rename from src/dev/multi_packet.cc
rename to src/dev/net/multi_packet.cc
index 1fd0c0e..85f76b0 100644
--- a/src/dev/multi_packet.cc
+++ b/src/dev/net/multi_packet.cc
@@ -42,7 +42,7 @@
  *
  */
 
-#include "dev/multi_packet.hh"
+#include "dev/net/multi_packet.hh"
 
 #include <cstdint>
 #include <cstring>
diff --git a/src/dev/multi_packet.hh b/src/dev/net/multi_packet.hh
similarity index 97%
rename from src/dev/multi_packet.hh
rename to src/dev/net/multi_packet.hh
index 4b27064..3d8e85d 100644
--- a/src/dev/multi_packet.hh
+++ b/src/dev/net/multi_packet.hh
@@ -50,8 +50,8 @@
  * data packet description, the corresponding data packet always follows
  * the header packet back-to-back.
  */
-#ifndef __DEV_MULTI_PACKET_HH__
-#define __DEV_MULTI_PACKET_HH__
+#ifndef __DEV_NET_MULTI_PACKET_HH__
+#define __DEV_NET_MULTI_PACKET_HH__
 
 #include <cstring>
 
@@ -127,4 +127,4 @@
     static bool isBroadcastAddress(const AddressType &addr);
 };
 
-#endif
+#endif // __DEV_NET_MULTI_PACKET_HH__
diff --git a/src/dev/ns_gige.cc b/src/dev/net/ns_gige.cc
similarity index 99%
rename from src/dev/ns_gige.cc
rename to src/dev/net/ns_gige.cc
index eb4f0eb..a1dc23b 100644
--- a/src/dev/ns_gige.cc
+++ b/src/dev/net/ns_gige.cc
@@ -33,6 +33,9 @@
  * Device module for modelling the National Semiconductor
  * DP83820 ethernet controller.  Does not support priority queueing
  */
+
+#include "dev/net/ns_gige.hh"
+
 #include <deque>
 #include <memory>
 #include <string>
@@ -42,8 +45,7 @@
 #include "base/types.hh"
 #include "config/the_isa.hh"
 #include "debug/EthernetAll.hh"
-#include "dev/etherlink.hh"
-#include "dev/ns_gige.hh"
+#include "dev/net/etherlink.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"
 #include "params/NSGigE.hh"
diff --git a/src/dev/ns_gige.hh b/src/dev/net/ns_gige.hh
similarity index 97%
rename from src/dev/ns_gige.hh
rename to src/dev/net/ns_gige.hh
index 33a76ab..096b2b6 100644
--- a/src/dev/ns_gige.hh
+++ b/src/dev/net/ns_gige.hh
@@ -34,16 +34,16 @@
  * DP83820 ethernet controller
  */
 
-#ifndef __DEV_NS_GIGE_HH__
-#define __DEV_NS_GIGE_HH__
+#ifndef __DEV_NET_NS_GIGE_HH__
+#define __DEV_NET_NS_GIGE_HH__
 
 #include "base/inet.hh"
-#include "dev/etherdevice.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
 #include "dev/io_device.hh"
-#include "dev/ns_gige_reg.h"
-#include "dev/pktfifo.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/ns_gige_reg.h"
+#include "dev/net/pktfifo.hh"
 #include "params/NSGigE.hh"
 #include "sim/eventq.hh"
 
@@ -389,4 +389,4 @@
     virtual void sendDone() { dev->transferDone(); }
 };
 
-#endif // __DEV_NS_GIGE_HH__
+#endif // __DEV_NET_NS_GIGE_HH__
diff --git a/src/dev/ns_gige_reg.h b/src/dev/net/ns_gige_reg.h
similarity index 100%
rename from src/dev/ns_gige_reg.h
rename to src/dev/net/ns_gige_reg.h
diff --git a/src/dev/pktfifo.cc b/src/dev/net/pktfifo.cc
similarity index 98%
rename from src/dev/pktfifo.cc
rename to src/dev/net/pktfifo.cc
index fb2564b..af4dbf4 100644
--- a/src/dev/pktfifo.cc
+++ b/src/dev/net/pktfifo.cc
@@ -28,8 +28,9 @@
  * Authors: Nathan Binkert
  */
 
+#include "dev/net/pktfifo.hh"
+
 #include "base/misc.hh"
-#include "dev/pktfifo.hh"
 
 using namespace std;
 
diff --git a/src/dev/pktfifo.hh b/src/dev/net/pktfifo.hh
similarity index 97%
rename from src/dev/pktfifo.hh
rename to src/dev/net/pktfifo.hh
index ea58030..5ef7542 100644
--- a/src/dev/pktfifo.hh
+++ b/src/dev/net/pktfifo.hh
@@ -28,14 +28,15 @@
  * Authors: Nathan Binkert
  */
 
-#ifndef __DEV_PKTFIFO_HH__
-#define __DEV_PKTFIFO_HH__
+#ifndef __DEV_NET_PKTFIFO_HH__
+#define __DEV_NET_PKTFIFO_HH__
 
 #include <iosfwd>
 #include <list>
 #include <string>
 
-#include "dev/etherpkt.hh"
+#include "base/misc.hh"
+#include "dev/net/etherpkt.hh"
 #include "sim/serialize.hh"
 
 class Checkpoint;
@@ -208,4 +209,4 @@
     void unserialize(const std::string &base, CheckpointIn &cp);
 };
 
-#endif // __DEV_PKTFIFO_HH__
+#endif // __DEV_NET_PKTFIFO_HH__
diff --git a/src/dev/sinic.cc b/src/dev/net/sinic.cc
similarity index 99%
rename from src/dev/sinic.cc
rename to src/dev/net/sinic.cc
index 18642ef..d0adb10 100644
--- a/src/dev/sinic.cc
+++ b/src/dev/net/sinic.cc
@@ -28,12 +28,15 @@
  * Authors: Nathan Binkert
  */
 
+#include "dev/net/sinic.hh"
+
 #include <deque>
 #include <limits>
 #include <string>
 
 #ifdef SINIC_VTOPHYS
 #include "arch/vtophys.hh"
+
 #endif
 #include "base/compiler.hh"
 #include "base/debug.hh"
@@ -41,8 +44,7 @@
 #include "base/types.hh"
 #include "config/the_isa.hh"
 #include "debug/EthernetAll.hh"
-#include "dev/etherlink.hh"
-#include "dev/sinic.hh"
+#include "dev/net/etherlink.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"
 #include "sim/eventq.hh"
diff --git a/src/dev/sinic.hh b/src/dev/net/sinic.hh
similarity index 96%
rename from src/dev/sinic.hh
rename to src/dev/net/sinic.hh
index dc1947f..b041cb1 100644
--- a/src/dev/sinic.hh
+++ b/src/dev/net/sinic.hh
@@ -28,18 +28,18 @@
  * Authors: Nathan Binkert
  */
 
-#ifndef __DEV_SINIC_HH__
-#define __DEV_SINIC_HH__
+#ifndef __DEV_NET_SINIC_HH__
+#define __DEV_NET_SINIC_HH__
 
 #include "base/inet.hh"
 #include "base/statistics.hh"
-#include "dev/etherdevice.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
 #include "dev/io_device.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/pktfifo.hh"
+#include "dev/net/sinicreg.hh"
 #include "dev/pci/device.hh"
-#include "dev/pktfifo.hh"
-#include "dev/sinicreg.hh"
 #include "params/Sinic.hh"
 #include "sim/eventq.hh"
 
@@ -324,4 +324,4 @@
 
 } // namespace Sinic
 
-#endif // __DEV_SINIC_HH__
+#endif // __DEV_NET_SINIC_HH__
diff --git a/src/dev/sinicreg.hh b/src/dev/net/sinicreg.hh
similarity index 98%
rename from src/dev/sinicreg.hh
rename to src/dev/net/sinicreg.hh
index 540e690..fc74889 100644
--- a/src/dev/sinicreg.hh
+++ b/src/dev/net/sinicreg.hh
@@ -28,8 +28,8 @@
  * Authors: Nathan Binkert
  */
 
-#ifndef __DEV_SINICREG_HH__
-#define __DEV_SINICREG_HH__
+#ifndef __DEV_NET_SINICREG_HH__
+#define __DEV_NET_SINICREG_HH__
 
 #define __SINIC_REG32(NAME, VAL) static const uint32_t NAME = (VAL);
 #define __SINIC_REG64(NAME, VAL) static const uint64_t NAME = (VAL);
@@ -236,4 +236,4 @@
 
 } // namespace Sinic
 
-#endif // __DEV_SINICREG_HH__
+#endif // __DEV_NET_SINICREG_HH__
diff --git a/src/dev/tcp_iface.cc b/src/dev/net/tcp_iface.cc
similarity index 99%
rename from src/dev/tcp_iface.cc
rename to src/dev/net/tcp_iface.cc
index f18486f..035ec8f 100644
--- a/src/dev/tcp_iface.cc
+++ b/src/dev/net/tcp_iface.cc
@@ -41,7 +41,7 @@
  * TCP stream socket based interface class implementation for multi gem5 runs.
  */
 
-#include "dev/tcp_iface.hh"
+#include "dev/net/tcp_iface.hh"
 
 #include <arpa/inet.h>
 #include <netdb.h>
diff --git a/src/dev/tcp_iface.hh b/src/dev/net/tcp_iface.hh
similarity index 96%
rename from src/dev/tcp_iface.hh
rename to src/dev/net/tcp_iface.hh
index 553f862..2eb2c1c 100644
--- a/src/dev/tcp_iface.hh
+++ b/src/dev/net/tcp_iface.hh
@@ -49,13 +49,13 @@
  * transfers messages and co-ordinates the synchronisation among the gem5
  * peers.
  */
-#ifndef __DEV_TCP_IFACE_HH__
-#define __DEV_TCP_IFACE_HH__
+#ifndef __DEV_NET_TCP_IFACE_HH__
+#define __DEV_NET_TCP_IFACE_HH__
 
 
 #include <string>
 
-#include "dev/multi_iface.hh"
+#include "dev/net/multi_iface.hh"
 
 class EventManager;
 
@@ -130,4 +130,4 @@
     ~TCPIface() override;
 };
 
-#endif
+#endif // __DEV_NET_TCP_IFACE_HH__