[ndnSIM] Getting hop count

Fabio Campioni fcampioni at algomau.ca
Thu Feb 25 12:36:29 PST 2016

I am trying to get the hop count from a packet in a custom content
store implementation policy I am working on, in the latest version of
ndnSIM (2.1).

I have created my own policy_traits struct based on the ones already
present. I have also instantiated a ContentStoreImpl class with the new
policy traits. In the insert method, I have the following code:

Ptr<const Packet> pkt = item->payload()->GetPacket();
FwHopCountTag tag;

However, when compiling, I get an error message:

../src/ndnSIM/model/cs/../../utils/trie/hop-policy.hpp:105:60: error:
::hop_policy_traits> >’ has no member named ‘GetPacket’
         Ptr<const Packet> pkt = item->payload()->GetPacket();

I have even made sure to include "ndn-fw-hop-count-tag.hpp" in the
file, but it still has not made any difference. Not sure if that method
has been depreciated or if I am overseeing something. If anyone has any
advice I would greatly appreciate it. Thank you.

More information about the ndnSIM mailing list