@@ -121,25 +121,26 @@ void TxPacket (Ipv4Address add, Ptr<const Packet> p);
121
121
void LogCache (Ptr <InrppL3Protocol> inrpp);
122
122
void LogCacheFlow (Ptr <OutputStreamWrapper> streamtr, Ptr <InrppL3Protocol> ip,Ptr <InrppInterface> iface,uint32_t flow);
123
123
void LogFairness ();
124
+
124
125
int
125
126
main (int argc, char *argv[])
126
127
{
127
128
t = Simulator::Now ();
128
129
i=0 ;
129
130
tracing = false ;
130
131
tracing2 = true ;
131
- uint32_t maxBytes = 1000000 ;
132
+ uint32_t maxBytes = 10000000 ;
132
133
uint32_t stop = 100 ;
133
134
n = 300 ;
134
135
std::string bottleneck=" 100Mbps" ;
135
- uint32_t bneck = 100000000 ;
136
+ uint32_t bneck = 100000000 ;
136
137
double time = 0 ;
137
138
uint32_t maxPackets = (bneck * 0.05 )/(8 );
138
139
uint32_t maxTh = maxPackets;
139
140
uint32_t minTh = maxPackets/2 ;
140
- uint32_t hCacheTh = bneck * 12.5 ;
141
- uint32_t lCacheTh = hCacheTh/2 ;
142
- uint32_t maxCacheSize = hCacheTh*2 ;
141
+ uint32_t hCacheTh = bneck * 12.5 ;
142
+ uint32_t lCacheTh = hCacheTh/2 ;
143
+ uint32_t maxCacheSize = hCacheTh*2 ;
143
144
protocol = " t" ;
144
145
145
146
//
@@ -173,9 +174,10 @@ main (int argc, char *argv[])
173
174
Config::SetDefault (" ns3::TcpSocket::SegmentSize" , UintegerValue (1458 ));
174
175
175
176
} else if (protocol==" r" ){
176
- Config::SetDefault (" ns3::TcpL4Protocol::SocketType" , TypeIdValue (TcpRcp::GetTypeId ()));
177
- Config::SetDefault (" ns3::TcpSocket::SegmentSize" , UintegerValue (1434 ));
177
+ Config::SetDefault (" ns3::TcpL4Protocol::SocketType" , TypeIdValue (TcpRcp ::GetTypeId ()));
178
+ Config::SetDefault (" ns3::TcpSocket::SegmentSize" , UintegerValue (1434 ));
178
179
Config::SetDefault (" ns3::TcpSocketBase::Timestamp" , BooleanValue (true ));
180
+ Config::SetDefault (" ns3::RcpQueue::upd_timeslot_" , DoubleValue (0.005 ));
179
181
180
182
181
183
} else if (protocol==" i" ){
@@ -214,7 +216,7 @@ main (int argc, char *argv[])
214
216
215
217
if (protocol==" t" ){
216
218
pointToPoint.SetQueue (" ns3::DropTailQueue" ,
217
- " MaxBytes" , UintegerValue (maxPackets*100 ));
219
+ " MaxBytes" , UintegerValue (maxPackets*1000 ));
218
220
} else if (protocol==" i" ) {
219
221
220
222
pointToPoint.SetQueue (" ns3::InrppTailQueue" ,
@@ -288,7 +290,6 @@ main (int argc, char *argv[])
288
290
devices1 = pointToPoint.Install (nodes.Get (1 ),nodes.Get (2 ));
289
291
290
292
291
-
292
293
//
293
294
// We've got the "hardware" in place. Now we need to add IP addresses.
294
295
//
@@ -360,7 +361,7 @@ main (int argc, char *argv[])
360
361
std::ostringstream osstr3;
361
362
osstr3 << folder << " /netdevice_" <<5 +i<<" .bf" ;
362
363
Ptr <OutputStreamWrapper> streamtr3 = asciiTraceHelper.CreateFileStream (osstr3.str ());
363
- txQueue3->GetObject <DropTailQueue>()->TraceConnectWithoutContext (" BytesQueue" , MakeBoundCallback (&BufferChange, streamtr3));
364
+ if (protocol!= " r " ) txQueue3->GetObject <DropTailQueue>()->TraceConnectWithoutContext (" BytesQueue" , MakeBoundCallback (&BufferChange, streamtr3));
364
365
365
366
tmap.insert (std::make_pair (iSource.GetAddress (0 ),Simulator::Now ()));
366
367
}
@@ -578,9 +579,9 @@ main (int argc, char *argv[])
578
579
{
579
580
std::ostringstream osstr;
580
581
osstr << folder << " /inrpp2" ;
581
- pointToPoint.EnablePcap (osstr.str (),nodes, false );
582
- // pointToPoint.EnablePcap(osstr.str(),senders, false);
583
- // pointToPoint.EnablePcap(osstr.str(),receivers, false);
582
+ // pointToPoint.EnablePcap(osstr.str(),nodes, false);
583
+ pointToPoint.EnablePcap (osstr.str (),senders, false );
584
+ pointToPoint.EnablePcap (osstr.str (),receivers, false );
584
585
}
585
586
586
587
std::ostringstream osstrfct;
0 commit comments