Disabling FIB-entry-limit decrease. Implementing probabilistic interest
acceptance based on accumulated statistics.
Statistics generation is changed to real 1-second averaging
diff --git a/utils/trie.h b/utils/trie.h
index a1f9dc7..bcffdc3 100644
--- a/utils/trie.h
+++ b/utils/trie.h
@@ -264,6 +264,22 @@
return this;
}
+ /**
+ * @brief Perform prune of the node, but without attempting to parent of the node
+ */
+ inline void
+ prune_node ()
+ {
+ if (payload_ == PayloadTraits::empty_payload &&
+ children_.size () == 0)
+ {
+ if (parent_ == 0) return;
+
+ trie *parent = parent_;
+ parent->children_.erase_and_dispose (*this, trie_delete_disposer ()); // delete this; basically, committing a suicide
+ }
+ }
+
// inline boost::tuple<const iterator, bool, const iterator>
// find (const FullKey &key) const
// {