diff --git a/src/test/ns3tcp/ns3tcp-interop-test-suite.cc b/src/test/ns3tcp/ns3tcp-interop-test-suite.cc index 13444c086..c62bde8d4 100644 --- a/src/test/ns3tcp/ns3tcp-interop-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-interop-test-suite.cc @@ -157,15 +157,10 @@ Ns3TcpInteroperabilityTestCase::Ipv4L3Tx (std::string context, Ptr Time tNow = Simulator::Now (); int64_t tMicroSeconds = tNow.GetMicroSeconds (); - uint32_t size = p->GetSize (); - uint8_t *buf = new uint8_t[size]; - p->CopyData (buf, size); - m_pcapFile.Write (uint32_t (tMicroSeconds / 1000000), uint32_t (tMicroSeconds % 1000000), - buf, - size); - delete [] buf; + p + ); } else { diff --git a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc index 635865c58..534c46b3e 100644 --- a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc @@ -166,15 +166,11 @@ Ns3TcpLossTestCase::Ipv4L3Tx (std::string context, Ptr packet, Ptr Time tNow = Simulator::Now (); int64_t tMicroSeconds = tNow.GetMicroSeconds (); - uint32_t size = p->GetSize (); - uint8_t *buf = new uint8_t[size]; - p->CopyData (buf, size); m_pcapFile.Write (uint32_t (tMicroSeconds / 1000000), uint32_t (tMicroSeconds % 1000000), - buf, - size); - delete [] buf; + p + ); } else { diff --git a/src/test/ns3tcp/ns3tcp-state-test-suite.cc b/src/test/ns3tcp/ns3tcp-state-test-suite.cc index b8d02050e..8b8c9c860 100644 --- a/src/test/ns3tcp/ns3tcp-state-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-state-test-suite.cc @@ -170,15 +170,9 @@ Ns3TcpStateTestCase::Ipv4L3Tx (std::string context, Ptr packet, Pt Time tNow = Simulator::Now (); int64_t tMicroSeconds = tNow.GetMicroSeconds (); - uint32_t size = p->GetSize (); - uint8_t *buf = new uint8_t[size]; - p->CopyData (buf, size); - m_pcapFile.Write (uint32_t (tMicroSeconds / 1000000), uint32_t (tMicroSeconds % 1000000), - buf, - size); - delete [] buf; + p); } else {