summaryrefslogtreecommitdiff
path: root/src/dev/ethertap.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-07-24 15:48:40 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-07-24 15:48:40 -0700
commit26b1c455e0aed69eda0cc165b5084edb1b557c38 (patch)
tree0b7ffa9259c55f9a639a12f09ddef033d78b084b /src/dev/ethertap.cc
parent02c39000bfc6be620382bf89636e3b1bbb2f4cf6 (diff)
parentabc76f20cb98c90e8dab416dd16dfd4a954013ba (diff)
downloadgem5-26b1c455e0aed69eda0cc165b5084edb1b557c38.tar.xz
Merge with head.
--HG-- extra : convert_revision : 4a34b3f91c4fc90055596245ae3efec45ea33888
Diffstat (limited to 'src/dev/ethertap.cc')
-rw-r--r--src/dev/ethertap.cc28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/dev/ethertap.cc b/src/dev/ethertap.cc
index 65089a8b2..0b6ab97fc 100644
--- a/src/dev/ethertap.cc
+++ b/src/dev/ethertap.cc
@@ -50,7 +50,7 @@
#include "dev/etherint.hh"
#include "dev/etherpkt.hh"
#include "dev/ethertap.hh"
-#include "sim/builder.hh"
+#include "params/EtherTap.hh"
using namespace std;
@@ -313,28 +313,10 @@ EtherTap::unserialize(Checkpoint *cp, const std::string &section)
//=====================================================================
-BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherTap)
-
- SimObjectParam<EtherInt *> peer;
- SimObjectParam<EtherDump *> dump;
- Param<unsigned> port;
- Param<unsigned> bufsz;
-
-END_DECLARE_SIM_OBJECT_PARAMS(EtherTap)
-
-BEGIN_INIT_SIM_OBJECT_PARAMS(EtherTap)
-
- INIT_PARAM_DFLT(peer, "peer interface", NULL),
- INIT_PARAM_DFLT(dump, "object to dump network packets to", NULL),
- INIT_PARAM_DFLT(port, "tap port", 3500),
- INIT_PARAM_DFLT(bufsz, "tap buffer size", 10000)
-
-END_INIT_SIM_OBJECT_PARAMS(EtherTap)
-
-
-CREATE_SIM_OBJECT(EtherTap)
+EtherTap *
+EtherTapParams::create()
{
- EtherTap *tap = new EtherTap(getInstanceName(), dump, port, bufsz);
+ EtherTap *tap = new EtherTap(name, dump, port, bufsz);
if (peer) {
tap->setPeer(peer);
@@ -343,5 +325,3 @@ CREATE_SIM_OBJECT(EtherTap)
return tap;
}
-
-REGISTER_SIM_OBJECT("EtherTap", EtherTap)