You can use all of the pcap files if
you filter them properly.
It is true that in an adhoc network,
you will generally see different packets in each node's pcap file,
because each pcap file reports on both the sent and received
packets, which can differ depending on the position of the node.
If you filter each of these pcap files to include only the sent
packets by each node (you will need to know the address of each
node to filter the pcaps in this way) and use all of these
filtered pcap outputs, you will have a record of all packets sent.
Another tracing mechanism that may make
it easier for this specifically is the ASCII trace. You can
enable it by uncommenting the following lines in
manet-routing-compare.cc:
// AsciiTraceHelper ascii;
// Ptr<OutputStreamWrapper> osw =
ascii.CreateFileStream(tr_name + ".tr");
// wifiPhy.EnableAsciiAll(osw);
You will need to comment or delete the
subsequent line that redeclares AsciiTraceHelper in this case;
i.e.:
AsciiTraceHelper ascii;
Ptr<OutputStreamWrapper> osw =
ascii.CreateFileStream(tr_name + ".tr");
wifiPhy.EnableAsciiAll(osw);
//AsciiTraceHelper ascii;
MobilityHelper::EnableAsciiAll(ascii.CreateFileStream(tr_name
+ ".mob"));
This will generate a file called
'
manet-routing-compare.tr'. In this file, the first character
will be a 't'(transmit), 'r'(receive) or 'd'(drop), followed by a
timestamp, and a path string showing the node and device.
Following that, the headers of the packets are printed out. For
instance, here is the start of that file:
t 0.00705
/NodeList/21/DeviceList/0/$ns3::WifiNetDevice/Phy/State/Tx
DsssRate11Mbps ns3::WifiMacHeader
This will allow you to filter on all
lines that start with 't'. then, you will need to classify them
as routing or data, and calculate the length of each one (which
can be deduced from the length field shown in the IP header
printout).
- Tom