[ndnSIM] Content Discovery
Spyridon (Spyros) Mastorakis
mastorakis at CS.UCLA.EDU
Thu Mar 24 23:01:56 PDT 2016
Just a follow-up on this one:
Another way that probably would be simpler is to add your new fields to the name of the Interest and Data packet as new name components. Then, you can handle those components in your application using the API of the Name class provided by the ndn-cxx library:
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
> On Mar 24, 2016, at 10:53 PM, Spyridon (Spyros) Mastorakis <mastorakis at CS.UCLA.EDU> wrote:
> some trivial changes off the top of my head are to add some get and set methods for the new fields (and define the new fields as well). These changes should be made here (and to the corresponding header files):
> https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.cpp <https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.cpp>
> https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/data.cpp <https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/data.cpp>
> You would also need to modify the wireEncode and wireDecode methods of the Interest and Data class (files mentioned above) to encode and decode the new fields to/from wire format.
> When you are done with these changes, you should be able to use the new fields in your applications. You just need to get and set the fields in the way that your approach works (e.g., when you express an Interest in your consumer application set the new field of the interest packet, when you receive an Interest in your producer application read the new field of this packet and add the appropriate field to the data packet etc..).
> Please let me know if you need any additional information.
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
> Internet Research Laboratory
> Computer Science Department
>> On Mar 19, 2016, at 9:49 PM, Shahid Md. Asif Iqbal <asifcsep at gmail.com <mailto:asifcsep at gmail.com>> wrote:
>> Dear All,
>> I would like to try an idea where the consumers first try to
>> discover the available content providers, then get the content
>> from one of the providers sending the actual request packets.
>> Here is my thoughts:
>> I have added one field to the interest packet to indicate the
>> type of the interest : discover or request
>> I have added one field to the data packet to indicate the type
>> of the data packet : content-offer or content-real
>> content-offer is same as content-real except the content field is empty.
>> Now, please help me to identify what other things do I need to do to make my changes work especially in the consumer and producer files.
>> Thanking in advance
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM