<div dir="ltr">Hello everyone,<div>I have implemented a new structure for nfd::cs and now I want to test my model. I want a scenario that several consumers request a huge amount of data (like 10k) from a producer with which they are connected via a central node. Just this central node has a content store and all the consumers will request the same 10k packets with different orders.</div><div>Searching at this mailing list, I found the code below. However, in this code, consumers repetitively ask for just 4 packets. </div><div>Is it possible that I change it in a way that each consumer sends identical 10k interests? </div><div>If there is another way to write that scenario please tell me.</div><div><br></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)"> NodeContainer nodes;
nodes.Create (5); // Connecting nodes using two links
PointToPointHelper p2p;
p2p.Install (nodes.Get (0), nodes.Get (4));
p2p.Install (nodes.Get (4), nodes.Get (2));
p2p.Install (nodes.Get (3), nodes.Get (4));
p2p.Install (nodes.Get (1), nodes.Get (4));
// Install NDN stack on all nodes
ndn::StackHelper ndnHelper;
ndnHelper.SetPit ("ns3::ndn::pit::Lru","PitEntryPruningTimout","20");
ndnHelper.SetDefaultRoutes (true);
ndnHelper.SetContentStore("ns3::ndn::cs::Lru", "MaxSize", "10000000");
ndnHelper.Install(nodes.Get (4));
ndnHelper.SetContentStore("ns3::ndn::cs::Nocache");
ndnHelper.Install(nodes.Get (0));
ndnHelper.Install(nodes.Get (1));
ndnHelper.Install(nodes.Get (2));
ndnHelper.Install(nodes.Get (3));
//*****************4/27
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
ndn::AppHelper producerHelper ("ns3::ndn::Producer");
consumerHelper.SetPrefix ("/prefix");
consumerHelper.SetAttribute ("Frequency", StringValue ("5"));
ApplicationContainer consumer[4][20];
producerHelper.SetPrefix ("/prefix");
producerHelper.SetAttribute ("PayloadSize", StringValue("1024"));
ApplicationContainer producer[4][21];</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"> for ( int i=0;i <10;i++){</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"> int provider=x->GetInteger (0,3);
int user=x->GetInteger (0,3);
while( (provider)==(user)){
user=x->GetInteger (0,3);
}
consumer[user][i]=consumerHelper.Install (nodes.Get (user));
consumer[user][i].Start(Seconds(2*i));
consumer[user][i].Stop(Seconds(2*i+1));
producer[provider][i]=producerHelper.Install (nodes.Get (provider));
producer[provider][i].Start(Seconds(2*i));
producer[provider][i].Stop(Seconds(2*i+2));
std::cout <<"provideris :"<<provider<<"user is "<<user<< std::endl;
}</pre></div><div><br></div><div>Thank you in advance,</div><div>Regards,</div><div>Farzane</div></div>