<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Your mail to Mini-NDN list bounced, because you used this email to send:</p>
<div>bertolin@eurecom.fr instead of <span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">matteo.bertolino@eurecom.fr</span><br>
</div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">I have subscribed this email as well, please confirm so that I can grant permission to post.</span></div>
<p></p>
<p><br>
</p>
<p>1) For printing data:</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt"></p>
<div>   void</div>
<div>   onData(const Interest& interest, const Data& data)</div>
<div>   {</div>
<div>     std::cout << data << std::endl;</div>
    </span><br>
<p></p>
<p></p>
<div>     std::string receivedContent = reinterpret_cast<const char*>(data.getContent().value());</div>
<div>     int receivedContentLength = data.getContent().value_size();</div>
<div>     receivedContent = receivedContent.substr(0, receivedContentLength);</div>
<div>     std::cout << receivedContent << std::endl;</div>
<div>    }</div>
<p></p>
<p>    (Taken from here: <a href="https://github.com/named-data/ndn-traffic-generator/blob/master/src/ndn-traffic-client.cpp#L558" class="x_OWAAutoLink" id="LPlnk193542">https://github.com/named-data/ndn-traffic-generator/blob/master/src/ndn-traffic-client.cpp#L558</a>)</p>
<p><br>
</p>
<p>2) PIT is not printed or logged currently. It is planned to be logged in future but cannot say when.</p>
<p>    You can modify PIT related files here: <a href="https://github.com/named-data/NFD/tree/master/daemon/table" class="x_OWAAutoLink" id="LPlnk897835">https://github.com/named-data/NFD/tree/master/daemon/table</a></p>
<p>    and add some logging.</p>
<p><br>
</p>
<p>3) Just have a 3 node topology.</p>
<p>    a----b----c</p>
<p>    NFD and NLSR runs on each node by default.</p>
<p>    Use NLSR on a to advertise your route to the network:</p>
<p>    mininet> a nlsrc advertise /sample</p>
<p>    </p>
<p>    Then run consumer on 'a' and producer on 'c'.</p>
<p><br>
</p>
<p>    If you don't want to use NLSR. You would have to create a route on 'b' using the route command so         that 'a' can reach 'c'. Then you can use nfdc register to register a prefix towards c from a. In Mini-NDN     a node can only reach its neighbors.</p>
<p><br>
</p>
<p>Ashlesh</p>
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Ndn-interest <ndn-interest-bounces@lists.cs.ucla.edu> on behalf of bertolin@eurecom.fr <bertolin@eurecom.fr><br>
<b>Sent:</b> Monday, September 12, 2016 9:13:37 AM<br>
<b>To:</b> ndn-interest@lists.cs.ucla.edu<br>
<b>Cc:</b> mini-ndn@lists.cs.ucla.edu<br>
<b>Subject:</b> [Ndn-interest] [ndn-cxx][mini-NDN][General] Printing some information</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Good morning at all and thank you again for the help that I am 
<br>
receiving by your community.<br>
I spent some time, without success, in trying to print the following  <br>
information (I am working in miniNDN:<br>
<br>
1) The Content of the Data.<br>
If I print the packet, I obtain:<br>
Name: /mat/try/normandie/%FC%00%05%3CO%E0%D0%FC%D7<br>
MetaInfo: ContentType: 0, FreshnessPeriod: 10000 milliseconds<br>
Content: (size: 6)<br>
Signature: (type: 1, value_length: 256)<br>
<br>
So I manage to play with the blocks and the buffers, but the  <br>
documentation is not really verbose. However, I though to write:<br>
<br>
        void onData(const Interest& interest, const Data& data) {<br>
                log << "Data received correctly" << std::endl;<br>
                log << data << endl;<br>
<br>
                //take block<br>
                ndn::Block x = data.getContent();<br>
<br>
                //take buffer<br>
                shared_ptr<const Buffer> buffer = x.getBuffer();<br>
<br>
                //take string<br>
                std::string content((char*)buffer.get(), 6);<br>
                log << content << endl;<br>
         }<br>
<br>
But on my log file I obtained just not-printable random characters!  <br>
Where did I wrong?<br>
<br>
2) the PIT table of a node. I did not find any with nfd-status and  <br>
other commands. Is it possible in principle ?<br>
<br>
3) Finallyh, I would like to concentrate here another question a bit  <br>
different. Working with miniNDN, I would like to build the following  <br>
topology:<br>
Consume <-------> gateway <-------> Producer.<br>
I already wrote my version of consumer and producer, with the callback  <br>
onInterest, onData etc.. But with the gateway, conceptually how should  <br>
I structure the program that works on this node?<br>
<br>
Thank you for you help, I say it again it so I will not fill up the  <br>
mailing list with just "thank you" answers :)<br>
Matteo<br>
<br>
-------------------------------------------------------------------------------<br>
This message was sent using EURECOM Webmail: <a href="http://webmail.eurecom.fr">
http://webmail.eurecom.fr</a><br>
<br>
<br>
_______________________________________________<br>
Ndn-interest mailing list<br>
Ndn-interest@lists.cs.ucla.edu<br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest</a><br>
</div>
</span></font>
</body>
</html>