[Ndn-interest] List of registerPrefix

Thompson, Jeff jefft0 at remap.UCLA.EDU
Mon Feb 9 15:17:21 PST 2015


Hi Junxiao,

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.

Thanks,
- Jeff T

From: Junxiao Shi <shijunxiao at email.arizona.edu<mailto:shijunxiao at email.arizona.edu>>
Date: Sunday, February 8, 2015 at 19:54
To: Jeff Thompson <jefft0 at remap.ucla.edu<mailto:jefft0 at remap.ucla.edu>>
Cc: Bassem Labib <bassem.labib at gmail.com<mailto:bassem.labib at gmail.com>>, "ndn-interest at lists.cs.ucla.edu<mailto:ndn-interest at lists.cs.ucla.edu>" <ndn-interest at lists.cs.ucla.edu<mailto:ndn-interest at lists.cs.ucla.edu>>
Subject: Re: [Ndn-interest] List of registerPrefix

Dear folks

I need to point out that TestLibRib.java<https://github.com/named-data/jndn/blob/6b49300be80b097789d4a07be1376bda7e58dfea/examples/src/net/named_data/jndn/tests/TestListRib.java> is an incomplete implementation of StatusDataset client requesting RIB dataset.
A StatusDataset<http://redmine.named-data.net/projects/nfd/wiki/StatusDataset> is segmented, but the example doesn't request all segments.
Also, there's no guarantee that segment boundary is between two RibEntry elements.

Yours, Junxiao



On Sun, Feb 8, 2015 at 7:20 PM, Thompson, Jeff <jefft0 at remap.ucla.edu<mailto:jefft0 at remap.ucla.edu>> wrote:
Hello Bassem,

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:
https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/TestListRib.java

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:
https://github.com/named-data/jndn/blob/master/examples/src/net/named_data/jndn/tests/rib-entry-proto.proto

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.

Let me know if you have any trouble running the example.

Thanks,
- Jeff T
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20150209/91a14fa0/attachment.html>


More information about the Ndn-interest mailing list