[ndnSIM] is there a way to serialize a NameTree?

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Wed Sep 13 20:02:34 PDT 2017


unfortunately, I am not aware of any quick hacks to do that, unless you implement your own serialization/deserialization scheme. You can take a look at how we encode and decode Interest and Data packets here:

https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/interest.cpp#L217 <https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/interest.cpp#L217>
https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/data.cpp#L52 <https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/data.cpp#L52>

Probably you could use the API provided by NS-3 to do serialization in the header or the body of an NS-3 packet:

https://www.nsnam.org/doxygen/classns3_1_1_header.html <https://www.nsnam.org/doxygen/classns3_1_1_header.html>
https://www.nsnam.org/doxygen/classns3_1_1_packet.html <https://www.nsnam.org/doxygen/classns3_1_1_packet.html>

Hope that this helps,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department

> On Sep 13, 2017, at 6:11 PM, lahmer ilyas <ilyaslahmer93 at gmail.com> wrote:
> Hi,
> I'm working on a new protocol and I need to send a NameTree to another
> node. My question is there any  way to serialize a NameTree. If not is
> there a document describing the inner strucuter of NameTree so I can
> implement this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170913/289452bc/attachment.html>

More information about the ndnSIM mailing list