rename History::Enable to Packet::EnableMetadata

This commit is contained in:
Mathieu Lacage
2007-06-07 12:17:25 +02:00
parent fb3786c137
commit 9cec524f88
3 changed files with 10 additions and 2 deletions

View File

@@ -141,4 +141,10 @@ Packet::Print (std::ostream &os, const PacketPrinter &printer) const
m_history.Print (os, m_buffer, printer);
}
void
Packet::EnableMetadata (void)
{
PacketHistory::Enable ();
}
}; // namespace ns3

View File

@@ -257,6 +257,8 @@ public:
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;

View File

@@ -179,9 +179,9 @@ int main (int argc, char *argv[])
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++;