<div dir="ltr"><div><div><div><div>Hi there,<br><br></div>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.<br><br></div>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.<br><br></div>my code is attached here:<br></div><div>In header:<br>......<br></div>private:<br><div><div>ndn::Exclude &m_exclude;<br>.......<br><br>In cpp:<br>......<br>m_exclude->appendExclude(ndn::name::Component("postfix_of_disovered_ser"),true);<br>interest->setExclude(*m_exclude);<br><br><br></div><div>Anyone can give me a example will be appreciated!<br><br></div><div>Thanks,<br clear="all"></div><div><div><div><div><div><br>-- <br><div class="gmail_signature"><b><i>Sugang Li</i></b><div><b><i>Rutgers,the State University of New Jersey<br></i></b><div><b><i>Department of Electrical and Computer Engineering</i></b></div></div></div>
</div></div></div></div></div></div></div>