[ndnSIM] problem with setExclude

Sugang Li sugang.li718 at gmail.com
Sun Jul 5 20:10:30 PDT 2015


Hi there,

I am working on a service discovery protocol which might use the "Exclude"
field in Interest.  However, after searching for a while, I coul not find
too many examples to show how to use setExclude, and I kept receive
segmentation fault when I tried it.

In my case, I send a Interest  named "/service" to the network, and the
potential producers are "/service/1" "/service/2" and "/service/2".  So the
first time, one Data "/service/1" comes back, and consumer excludes it and
send a Interest again. Repeat this until all the producers are discovered.

my code is attached here:
In header:
......
private:
ndn::Exclude &m_exclude;
.......

In cpp:
......
m_exclude->appendExclude(ndn::name::Component("postfix_of_disovered_ser"),true);
interest->setExclude(*m_exclude);


Anyone can give me a example will be appreciated!

Thanks,

-- 
*Sugang Li*

*Rutgers,the State University of New Jersey*
*Department of Electrical and Computer Engineering*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150705/58d9fa52/attachment.html>


More information about the ndnSIM mailing list