<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="">yes, you can modify the Data and Interest classes to add the attributes that you want, but please make sure that you modify the wireEncode and wireDecode methods properly so that  the newly added fields are encoded and decoded to/from wire format.</div><div class=""><br class=""></div><div class="">You can also take a look here on how to add custom Tags to packets:</div><div class=""><br class=""></div><div class=""><a href="https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/" class="">https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/</a></div><div class=""><br class=""></div><div class="">Hope that this helps,</div><div class=""><br 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 Jul 25, 2017, at 2:38 AM, Surnin Oleg <<a href="mailto:o.surnin@innopolis.ru" class="">o.surnin@innopolis.ru</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<meta http-equiv="Content-Security-Policy" content="script-src 'self'; img-src * cid: data:;" class="">

<div contenteditable="false" class="">
<div id="response_container_BBPPID" style="outline:none;font-size:initial;font-family:"Calibri","Slate Pro",sans-serif,"sans-serif"" dir="auto" class="">
<div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;" class="">Dear all,</div>
<div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;" class=""><br class="">
</div>
<div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;" class="">I want to add and then check  some additional info when receive Interest or Data(and update  info if necessary). </div>
<div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;" class=""><br class="">
</div>
<div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;" class="">What is the best way to add this info to  Interests and Data?</div>
<div name="BB10" id="response_div_spacer_BBPPID" dir="auto" style="width:100%;" class=""><br style="display:initial" class="">
</div>
<div name="BB10" id="response_div_spacer_BBPPID" dir="auto" style="width:100%;" class="">I'm thinking about modify the Data and Interest classes(add a string variable), but I'm not sure it's OK? Or maybe it's possible to add some tag or change header of the packet?</div>
<div name="BB10" id="response_div_spacer_BBPPID" dir="auto" style="width:100%;" class=""><br class="">
</div>
<div name="BB10" id="response_div_spacer_BBPPID" dir="auto" style="width:100%;" class=""><br class="">
</div>
<div id="blackberry_signature_BBPPID" name="BB10" dir="auto" class="">
<div id="_signaturePlaceholder_BBPPID" name="BB10" dir="auto" class="">Best regards,<br class="">
Oleg .</div>
</div>
</div>
</div><br class=""></div></blockquote></div><br class=""></div></body></html>