<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>I updated TestListRib to fetch multiple segments to get the entire response before decoding the RibEntry dataset:</div>
<div><a href="https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/TestListRib.java">https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/TestListRib.java</a></div>
<div><br>
</div>
<div>Thanks,</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span><Thompson>, Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Date: </span>Monday, February 9, 2015 at 15:17<br>
<span style="font-weight:bold">To: </span>Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>><br>
<span style="font-weight:bold">Cc: </span>Bassem Labib <<a href="mailto:bassem.labib@gmail.com">bassem.labib@gmail.com</a>>, "<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] List of registerPrefix<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi Junxiao,</div>
<div><br>
</div>
<div>Yes you are right. Thanks for pointing it out.  (I forgot to mention this while I was sending a reply quickly.)  The example will only work with a reponse which fits into one Data packet. I can update the example to handle mutiple segments.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>><br>
<span style="font-weight:bold">Date: </span>Sunday, February 8, 2015 at 19:54<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>Bassem Labib <<a href="mailto:bassem.labib@gmail.com">bassem.labib@gmail.com</a>>, "<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] List of registerPrefix<br>
</div>
<div><br>
</div>
<div>
<div>
<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>
</div>
</div>
</span></div>
</div>
</span>
</body>
</html>