<div dir="ltr">Dear folks<div><br></div><div>I need to point out that <a href="https://github.com/named-data/jndn/blob/6b49300be80b097789d4a07be1376bda7e58dfea/examples/src/net/named_data/jndn/tests/TestListRib.java">TestLibRib.java</a> is an incomplete implementation of StatusDataset client requesting RIB dataset.</div><div>A <a href="http://redmine.named-data.net/projects/nfd/wiki/StatusDataset">StatusDataset</a> is segmented, but the example doesn't request all segments.</div><div>Also, there's no guarantee that segment boundary is between two RibEntry elements.</div><div><br></div><div>Yours, Junxiao<br><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 8, 2015 at 7:20 PM, Thompson, Jeff <span dir="ltr"><<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello Bassem,</div>
<div><br>
</div>
<div>I added an example to jNDN which sends an interest to /localhost/nfd/rib/list and prints the returned RibEntry message. Please pull the lastest from GitHub. Here is the file:</div>
<div><a href="https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/TestListRib.java" target="_blank">https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/TestListRib.java</a></div>
<div><br>
</div>
<div>The content of the returned Data packet is a TLV RibEntry message. To decode it, the example uses the jNDN utility called ProtobufTlv.  This works with a .proto definition file:</div>
<div><a href="https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/rib-entry-proto.proto" target="_blank">https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/rib-entry-proto.proto</a><br></div>
<div><br>
</div>
<div>Note that ProtobufTlv does not work with the Protobuf wire format. Instead, ProtobufTlv decodes the TLV and creates an in-memory Protobuf RibEntryMessage object that your code can examine to get the field values. The ProtobufTlv utility is very general.
 You can use it to encode and decode just about any TLV type, if you make the .proto file.</div>
<div><br>
</div>
<div>Let me know if you have any trouble running the example.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>- Jeff T</div></div></blockquote></div></div></div>