Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
11 * | 11 * |
12 * You should have received a copy of the GNU General Public License | 12 * You should have received a copy of the GNU General Public License |
13 * along with this program; if not, write to the Free Software | 13 * along with this program; if not, write to the Free Software |
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 */ | 15 */ |
16 | 16 |
17 // Network topology | 17 // Network topology |
18 // | 18 // |
19 // n0 ----------- n1 | 19 // n0 ----------- n1 |
20 // 500 Kbps | 20 // 500 Kbps |
21 // 5 ms | 21 // 5 ms |
22 // | 22 // |
23 // - Flow from n0 to n1 using BulkSendApplication | 23 // - Flow from n0 to n1 using BulkSendApplication. |
24 // - Tracing of queues and packet receptions to file "tcp-bulk-send.tr" | 24 // - Tracing of queues and packet receptions to file "tcp-bulk-send.tr" |
Tom Henderson
2010/12/08 23:32:15
and mention that pcap traces are being generated.
Josh Pelkey
2010/12/09 16:42:17
Done.
| |
25 // and pcap tracing available when tracing is turned on. | |
25 | 26 |
26 #include <string> | 27 #include <string> |
27 #include <fstream> | 28 #include <fstream> |
28 #include "ns3/core-module.h" | 29 #include "ns3/core-module.h" |
29 #include "ns3/simulator-module.h" | 30 #include "ns3/simulator-module.h" |
30 #include "ns3/helper-module.h" | 31 #include "ns3/helper-module.h" |
31 #include "ns3/node-module.h" | 32 #include "ns3/node-module.h" |
32 #include "ns3/packet-sink.h" | 33 #include "ns3/packet-sink.h" |
33 | 34 |
34 using namespace ns3; | 35 using namespace ns3; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 // | 126 // |
126 NS_LOG_INFO ("Run Simulation."); | 127 NS_LOG_INFO ("Run Simulation."); |
127 Simulator::Stop (Seconds (10.0)); | 128 Simulator::Stop (Seconds (10.0)); |
128 Simulator::Run (); | 129 Simulator::Run (); |
129 Simulator::Destroy (); | 130 Simulator::Destroy (); |
130 NS_LOG_INFO ("Done."); | 131 NS_LOG_INFO ("Done."); |
131 | 132 |
132 Ptr<PacketSink> sink1 = DynamicCast<PacketSink> (sinkApps.Get (0)); | 133 Ptr<PacketSink> sink1 = DynamicCast<PacketSink> (sinkApps.Get (0)); |
133 std::cout << "Total Bytes Received: " << sink1->GetTotalRx () << std::endl; | 134 std::cout << "Total Bytes Received: " << sink1->GetTotalRx () << std::endl; |
134 } | 135 } |
LEFT | RIGHT |