Merge zizzer.eecs.umich.edu:/bk/m5
[gem5.git] / dev / etherdump.hh
index e22b661663a72800ee9f6ba74615b961871154da..ba15796c836a930d327255f3002dddea30cec99e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2002-2004 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,6 +44,7 @@ class EtherDump : public SimObject
 {
   private:
     std::ofstream stream;
+    const int maxlen;
     void dumpPacket(PacketPtr &packet);
     void init();
 
@@ -52,9 +53,9 @@ class EtherDump : public SimObject
     Tick us_freq;
 
   public:
-    EtherDump(const std::string &name, const std::string &file);
+    EtherDump(const std::string &name, const std::string &file, int max);
 
-    inline void dump(PacketPtr &pkt) { if (stream.is_open()) dumpPacket(pkt); }
+    inline void dump(PacketPtr &pkt) { dumpPacket(pkt); }
 };
 
 #endif // __ETHERDUMP_H__