Fwd: pcap tracing refalgamization (issue171049)

2 views
Skip to first unread message

Mathieu Lacage

unread,
Dec 14, 2009, 9:15:30 AM12/14/09
to ns-3-r...@googlegroups.com


---------- Forwarded message ----------
From: <mathieu...@gmail.com>
Date: Mon, Dec 14, 2009 at 3:11 PM
Subject: pcap tracing refalgamization (issue171049)
To: cra...@gmail.com
Cc: re...@codereview.appspotmail.com


I really like the proposed approach. Small comments below.


http://codereview.appspot.com/171049/diff/1/53
File src/common/pcap-file-object.cc (right):

http://codereview.appspot.com/171049/diff/1/53#newcode33
src/common/pcap-file-object.cc:33: .AddConstructor<PcapFileObject> ()
add snap len as attribute and pass it down to PcapFile ?

http://codereview.appspot.com/171049/diff/1/53#newcode76
src/common/pcap-file-object.cc:76: bool rc = file.Write (s, us, buffer,
bufferSize);
The use of this PcapFile class makes the Packet::CopyData (std::ostream
&os) useless. I would support its removal and replacement with
Packet::CopyData (const PcapFile *pcap) instead which would save you
these nasty new/delete calls.

http://codereview.appspot.com/171049/diff/1/54
File src/common/pcap-file-object.h (right):

http://codereview.appspot.com/171049/diff/1/54#newcode54
src/common/pcap-file-object.h:54: PcapFile file;
m_file

http://codereview.appspot.com/171049



--
Mathieu Lacage <mathieu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages