<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;" class="">Hi,<div class=""><br class=""></div><div class="">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:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/interest.cpp#L217" class="">https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/interest.cpp#L217</a></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/data.cpp#L52" class="">https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.5.0-17-g99832d4-ndnSIM/src/data.cpp#L52</a></div><div class=""><br class=""></div><div class="">Probably you could use the API provided by NS-3 to do serialization in the header or the body of an NS-3 packet:</div><div class=""><br class=""></div><div class=""><a href="https://www.nsnam.org/doxygen/classns3_1_1_header.html" class="">https://www.nsnam.org/doxygen/classns3_1_1_header.html</a></div><div class=""><a href="https://www.nsnam.org/doxygen/classns3_1_1_packet.html" class="">https://www.nsnam.org/doxygen/classns3_1_1_packet.html</a></div><div class=""><br class=""></div><div class="">Hope that this helps,</div><div class=""><br class=""></div><div class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Sep 13, 2017, at 6:11 PM, lahmer ilyas <<a href="mailto:ilyaslahmer93@gmail.com" class="">ilyaslahmer93@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class="">I'm working on a new protocol and I need to send a NameTree to another<br class="">node. My question is there any  way to serialize a NameTree. If not is<br class="">there a document describing the inner strucuter of NameTree so I can<br class="">implement this.<br class=""></div></div></blockquote></div><br class=""></div></body></html>