<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></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="">that means that you fetch data from the local cache or NFD (or some other local application).</div><div class=""><br class=""></div><div class="">Thanks,</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 class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Mar 16, 2017, at 5:24 PM, Rizky Yanuar <<a href="mailto:mryanuar21@gmail.com" class="">mryanuar21@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Spyridon,<br class=""></div><div class="gmail_extra"><div class="gmail_quote"><br class=""></div><div class="gmail_quote">Thanks for the reply! I've tried the code and it passed the compiling process, but everytime I check the hop count I always got 0 as the value. I've checked the pointer and looks like it always get nullptr as its value. Here is my code on the insert method:</div><div class="gmail_quote">shared_ptr<const Data> data = item->payload()->GetData();<br class=""></div><div class="gmail_quote"><div class="gmail_quote">    <span class="gmail-Apple-tab-span" style="white-space:pre">      </span>auto hopCountTag = data->getTag<lp::HopCountTag>();</div><div class="gmail_quote">    <span class="gmail-Apple-tab-span" style="white-space:pre">       </span>NS_LOG_DEBUG(hopCountTag); // it returns 0</div><div class="gmail_quote"><br class=""></div><div class="gmail_quote"><br class=""></div></div><div class="gmail_quote"><br class=""></div><div class="gmail_quote">On Fri, Mar 17, 2017 at 12:39 AM, Spyridon (Spyros) Mastorakis <span dir="ltr" class=""><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank" class="">mastorakis@cs.ucla.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">Hi,<div class=""><br class=""></div><div class="">since the latest version of ndnSIM (v2.3), we do not use the NS3 packet tags for the hop count, but we rather use the LP tags implemented for the NDN Link Protocol (NDNLP):</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/apps/ndn-consumer.cpp#L227-L232" target="_blank" class="">https://github.com/named-data-<wbr class="">ndnSIM/ndnSIM/blob/master/<wbr class="">apps/ndn-consumer.cpp#L227-<wbr class="">L232</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 style="float:none;display:inline" class="">Spyridon (Spyros) Mastorakis</span><br class=""><span style="float:none;display:inline" class="">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank" class="">http://cs.ucla.edu/~<wbr class="">mastorakis/</a><br class=""><span style="float:none;display:inline" class="">Internet Research Laboratory</span><br class=""><span style="float:none;display:inline" class="">Computer Science Department</span><br class=""><span style="float:none;display:inline" class="">UCLA</span></div></div></div>
</div><div class=""><div class="gmail-h5">
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 16, 2017, at 3:00 AM, Rizky Yanuar <<a href="mailto:mryanuar21@gmail.com" target="_blank" class="">mryanuar21@gmail.com</a>> wrote:</div><br class="gmail-m_3502450256537381080Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello,<div class=""><font size="3" class=""><br class=""></font><div class="">I'm trying to get the hop count from a packet in a new custom policy based from existing policy (which is freshness-policy). I've tried using the example that's Alex mentioned in this mail: <a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-February/002423.html" target="_blank" class="">http://www.lists.cs.ucla.edu/<wbr class="">pipermail/ndnsim/2016-<wbr class="">February/002423.html</a></div><div class=""><div class=""><br class=""></div><div class="">However, on the compiling process I still got an error message:</div><div class=""><br class=""></div><div class=""><div class="">In file included from ../src/ndnSIM/model/cs/<wbr class="">content-store-with-freshness.<wbr class="">hpp:28:0,</div><div class="">                 from ../src/ndnSIM/model/cs/<wbr class="">content-store-with-freshness.<wbr class="">cpp:20:</div><div class="">../src/ndnSIM/model/cs/custom-<wbr class="">policies/freshness-policy.hpp: In member function ‘bool ns3::ndn::ndnSIM::freshness_<wbr class="">policy_traits::policy<Base, Container, Hook>::type::insert(typename ns3::ndn::ndnSIM::freshness_<wbr class="">policy_traits::policy<Base, Container, Hook>::type::parent_trie::<wbr class="">iterator)’:</div><div class="">../src/ndnSIM/model/cs/custom-<wbr class="">policies/freshness-policy.hpp:<wbr class="">114:27: error: expected unqualified-id before ‘typename’</div><div class="">      auto dataTag = data->typename getTag<Ns3PacketTag>();</div><div class="">                           ^</div><div class=""><br class=""></div><div class="">I've tried remove the typename declaration and the <Ns3PacketTag> but I still failed on the compilation process. I'd greatly appreciate if anyone has any advice for this problem. Thank you very much.</div></div><div class=""><br class=""></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div style="color:rgb(136,136,136);font-size:12.8px" class=""><div class=""><i class=""><font color="#666666" class=""></font></i></div></div></div></div></div></div>
</div></div>
</div></blockquote></div><br class=""></div></body></html>