rename History::Enable to Packet::EnableMetadata
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 07 Jun 2007 12:17:25 +0200
changeset 875 4ebee6ceebb5
parent 874 85c528e8eb0b
child 876 850783184c36
rename History::Enable to Packet::EnableMetadata
src/common/packet.cc
src/common/packet.h
utils/bench-packets.cc
--- a/src/common/packet.cc	Thu Jun 07 11:38:06 2007 +0200
+++ b/src/common/packet.cc	Thu Jun 07 12:17:25 2007 +0200
@@ -141,4 +141,10 @@
   m_history.Print (os, m_buffer, printer);
 }
 
+void
+Packet::EnableMetadata (void)
+{
+  PacketHistory::Enable ();
+}
+
 }; // namespace ns3
--- a/src/common/packet.h	Thu Jun 07 11:38:06 2007 +0200
+++ b/src/common/packet.h	Thu Jun 07 12:17:25 2007 +0200
@@ -257,6 +257,8 @@
 
   void Print (std::ostream &os) const;
   void Print (std::ostream &os, const PacketPrinter &printer) const;
+
+  static void EnableMetadata (void);
 private:
   Packet (Buffer buffer, Tags tags, PacketHistory history, uint32_t uid);
   Buffer m_buffer;
--- a/utils/bench-packets.cc	Thu Jun 07 11:38:06 2007 +0200
+++ b/utils/bench-packets.cc	Thu Jun 07 12:17:25 2007 +0200
@@ -179,9 +179,9 @@
           char const *nAscii = argv[0] + strlen ("--n=");
           n = atoi (nAscii);
         }
-      if (strncmp ("--enable-history", argv[0], strlen ("--enable-history")) == 0)
+      if (strncmp ("--enable-history", argv[0], strlen ("--enable-metadata")) == 0)
         {
-          PacketHistory::Enable ();          
+          Packet::EnableMetadata ();
         }
       argc--;
       argv++;