make benchmarks.ini a bit less confusing
[gem5.git] / dev / ethertap.cc
index 960d21d730329e7ce9a7b5dee6d2db6f10f0f0ca..03f2724b1d2e9bde685c2ddcb2a07cc0d84b1667 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2003-2004 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
  * Interface to connect a simulated ethernet device to the real world
  */
 
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || defined(__APPLE__)
 #include <sys/param.h>
 #endif
 #include <netinet/in.h>
@@ -169,7 +169,7 @@ EtherTap::detach()
 }
 
 bool
-EtherTap::recvPacket(PacketPtr &packet)
+EtherTap::recvPacket(PacketPtr packet)
 {
     if (dump)
         dump->dump(packet);
@@ -219,7 +219,7 @@ EtherTap::process(int revent)
 
     while (data_len != 0 && buffer_offset >= data_len + sizeof(u_int32_t)) {
         PacketPtr packet;
-        packet = new EtherPacket;
+        packet = new PacketData;
         packet->data = new uint8_t[data_len];
         packet->length = data_len;
         memcpy(packet->data, data, data_len);
@@ -313,8 +313,8 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherTap)
 
     SimObjectParam<EtherInt *> peer;
     SimObjectParam<EtherDump *> packet_dump;
-    Param<uint16_t> port;
-    Param<uint16_t> bufsz;
+    Param<unsigned> port;
+    Param<unsigned> bufsz;
 
 END_DECLARE_SIM_OBJECT_PARAMS(EtherTap)