[ndnSIM] Getting Hop Count on Insert Method for New Custom Policy

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Thu Mar 16 10:39:57 PDT 2017


Hi,

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):

https://github.com/named-data-ndnSIM/ndnSIM/blob/master/apps/ndn-consumer.cpp#L227-L232 <https://github.com/named-data-ndnSIM/ndnSIM/blob/master/apps/ndn-consumer.cpp#L227-L232>

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
UCLA

> On Mar 16, 2017, at 3:00 AM, Rizky Yanuar <mryanuar21 at gmail.com> wrote:
> 
> Hello,
> 
> 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: http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-February/002423.html <http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-February/002423.html>
> 
> However, on the compiling process I still got an error message:
> 
> In file included from ../src/ndnSIM/model/cs/content-store-with-freshness.hpp:28:0,
>                  from ../src/ndnSIM/model/cs/content-store-with-freshness.cpp:20:
> ../src/ndnSIM/model/cs/custom-policies/freshness-policy.hpp: In member function ‘bool ns3::ndn::ndnSIM::freshness_policy_traits::policy<Base, Container, Hook>::type::insert(typename ns3::ndn::ndnSIM::freshness_policy_traits::policy<Base, Container, Hook>::type::parent_trie::iterator)’:
> ../src/ndnSIM/model/cs/custom-policies/freshness-policy.hpp:114:27: error: expected unqualified-id before ‘typename’
>       auto dataTag = data->typename getTag<Ns3PacketTag>();
>                            ^
> 
> 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.
> 
> -- 
> Muhamad Rizky Yanuar
> 23515017
> mryanuar21 at gmail.com <mailto:mryanuar21 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170316/f7737bc0/attachment.html>


More information about the ndnSIM mailing list