[ndnSIM] How to install multiple prefixes in one producer

Muhammad Hosain Abdollahi Sabet M.AbdollahiSabet at mail.sbu.ac.ir
Sat Apr 11 12:19:32 PDT 2015


Hi Alex,

How? I don't know about the _another way_. According to Spyridon, the assumption is that each application only responds to one prefix.

Thanks,
Sabet


-----Original Message-----
From: Alex Afanasyev [mailto:alexander.afanasyev at ucla.edu]
Sent: Sat 4/11/2015 11:07 PM
To: Muhammad Hosain Abdollahi Sabet
Cc: Trade; Spyros Mastorakis; ndnsim at lists.cs.ucla.edu
Subject: Re: [ndnSIM] How to install multiple prefixes in one producer
 

> On Apr 10, 2015, at 10:52 PM, Muhammad Hosain Abdollahi Sabet <M.AbdollahiSabet at mail.sbu.ac.ir> wrote:
> 
> Oops. Sorry.
> I meant like this:
> 
> ndn::AppHelper producerHelper("ns3::ndn::Producer");
> producerHelper.SetPrefix("/prefix1");
> producerHelper.Install(nodes.Get(NODENUMBER));
> 
> ndn::AppHelper producerHelper("ns3::ndn::Producer");
> producerHelper.SetPrefix("/prefix2");
> producerHelper.Install(nodes.Get(NODENUMBER));
> 
> ndn::AppHelper producerHelper("ns3::ndn::Producer");
> producerHelper.SetPrefix("/prefix3");
> producerHelper.Install(nodes.Get(NODENUMBER));
> 

Yes. However, this can be simplified a bit (you don't need to create multiple producerHelpers)

ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetPrefix("/prefix1");
producerHelper.Install(nodes.Get(NODENUMBER));

producerHelper.SetPrefix("/prefix2");
producerHelper.Install(nodes.Get(NODENUMBER));

producerHelper.SetPrefix("/prefix3");
producerHelper.Install(nodes.Get(NODENUMBER));

* * *

Another way to accomplish your goal is to create another Producer application, which would register and respond to multiple prefixes.

-
Alex

> 
> Right?
> 
> Thanks,
> Sabet
> 
> -----Original Message-----
> From: ndnSIM on behalf of Trade
> Sent: Sat 4/11/2015 2:54 AM
> To: Spyridon (Spyros) Mastorakis
> Cc: ndnsim at lists.cs.ucla.edu
> Subject: Re: [ndnSIM] How to install multiple prefixes in one producer
> 
> Thanks.
> Do you mean that multiple producers can be installed at one node?
> 
> On 4/10/15 9:29 AM, Spyridon (Spyros) Mastorakis wrote:
> > Hello,
> >
> > you will need to install more than one producer applications on the node, because each producer application has been assumed to respond only to one prefix.
> >
> > --
> > Spyridon (Spyros) Mastorakis
> > Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
> > Internet Research Laboratory
> > PhD Computer Science
> > UCLA
> >
> >
> >
> >
> >> On Apr 9, 2015, at 5:15 PM, Trade <trade20122012 at gmail.com> wrote:
> >>
> >> I want one producer can have multiple prefixes, but how to implement?
> >> Does this work?  or it only takes the last row ? Thanks
> >>
> >>           ProducerHelper.SetPrefix (prefix1);
> >>           ProducerHelper.SetPrefix (prefix2);
> >>           ProducerHelper.SetPrefix (prefix3);
> >>
> >> Trade
> >> _______________________________________________
> >> ndnSIM mailing list
> >> ndnSIM at lists.cs.ucla.edu
> >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>
> 
> 
> 
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150411/cccc2784/attachment.html>


More information about the ndnSIM mailing list