<div dir="ltr"><div>Hi Spyridon,<br></div><div class="gmail_extra"><div class="gmail_quote"><br></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></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></div><div class="gmail_quote"><br></div></div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Mar 17, 2017 at 12:39 AM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><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">Hi,<div><br></div><div>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><br></div><div><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/apps/ndn-consumer.cpp#L227-L232" target="_blank">https://github.com/named-data-<wbr>ndnSIM/ndnSIM/blob/master/<wbr>apps/ndn-consumer.cpp#L227-<wbr>L232</a></div><div><br></div><div>Hope that this helps,</div><div><br></div><div><div>
<div><div><div><span style="float:none;display:inline">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~<wbr>mastorakis/</a><br><span style="float:none;display:inline">Internet Research Laboratory</span><br><span style="float:none;display:inline">Computer Science Department</span><br><span style="float:none;display:inline">UCLA</span></div></div></div>
</div><div><div class="gmail-h5">
<br><div><blockquote type="cite"><div>On Mar 16, 2017, at 3:00 AM, Rizky Yanuar <<a href="mailto:mryanuar21@gmail.com" target="_blank">mryanuar21@gmail.com</a>> wrote:</div><br class="gmail-m_3502450256537381080Apple-interchange-newline"><div><div dir="ltr">Hello,<div><font size="3"><br></font><div>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">http://www.lists.cs.ucla.edu/<wbr>pipermail/ndnsim/2016-<wbr>February/002423.html</a></div><div><div><br></div><div>However, on the compiling process I still got an error message:</div><div><br></div><div><div>In file included from ../src/ndnSIM/model/cs/<wbr>content-store-with-freshness.<wbr>hpp:28:0,</div><div>                 from ../src/ndnSIM/model/cs/<wbr>content-store-with-freshness.<wbr>cpp:20:</div><div>../src/ndnSIM/model/cs/custom-<wbr>policies/freshness-policy.hpp: In member function ‘bool ns3::ndn::ndnSIM::freshness_<wbr>policy_traits::policy<Base, Container, Hook>::type::insert(typename ns3::ndn::ndnSIM::freshness_<wbr>policy_traits::policy<Base, Container, Hook>::type::parent_trie::<wbr>iterator)’:</div><div>../src/ndnSIM/model/cs/custom-<wbr>policies/freshness-policy.hpp:<wbr>114:27: error: expected unqualified-id before ‘typename’</div><div>      auto dataTag = data->typename getTag<Ns3PacketTag>();</div><div>                           ^</div><div><br></div><div>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><br></div>-- <br><div class="gmail-m_3502450256537381080gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="color:rgb(136,136,136);font-size:12.8px"><div dir="ltr"><i><font color="#666666">Muhamad Rizky Yanuar</font></i></div><div dir="ltr"><i><font color="#666666">23515017</font></i></div><div><i><font color="#666666"><a href="mailto:mryanuar21@gmail.com" style="color:rgb(17,85,204)" target="_blank">mryanuar21@gmail.com</a></font></i></div></div></div></div></div></div></div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="color:rgb(136,136,136);font-size:12.8px"><div dir="ltr"><i><font color="#666666">Muhamad Rizky Yanuar</font></i></div><div dir="ltr"><i><font color="#666666">23515017</font></i></div><div><i><font color="#666666"><a href="mailto:mryanuar21@gmail.com" style="color:rgb(17,85,204)" target="_blank">mryanuar21@gmail.com</a></font></i></div></div></div></div></div></div>
</div></div>