[ndnSIM] data pkt identified
george assaf
engdotgeorge at gmail.com
Mon Aug 13 12:43:41 PDT 2018
Dear Forks,
this is a piece of code for data pkt entry insertion in Cache
Store(cs).which checks for insertion a new entry or not .if it exists ,
then the entry will refresh Stale Time of entry and if it is not, it will
be inserted normally according to replacement policy .
Actually I need to extract an ID for data packet that will be newly
inserted or refreshed .How can I get to my goal??
bool isNewEntry = false;
iterator it;
std::tie(it, isNewEntry) =
m_table.insert(EntryImpl(data.shared_from_this(), isUnsolicited));
EntryImpl& entry = const_cast<EntryImpl&>(*it);
entry.updateStaleTime();
if (!isNewEntry) { // existing entry
// XXX This doesn't forbid unsolicited Data from refreshing a solicited
entry.
if (entry.isUnsolicited() && !isUnsolicited) {
entry.unsetUnsolicited();
}
m_policy->afterRefresh(it);
}
else {
m_policy->afterInsert(it);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180813/f6ca2388/attachment.html>
More information about the ndnSIM
mailing list