Actions
Task #1313
closedNameTree::findLongestPrefixMatch predicate
Start date:
03/01/2014
Due date:
% Done:
100%
Estimated time:
1.50 h
Description
Longest prefix match function of FIB is currently equivalent to:
- let nte be the longest prefix match NameTree entry for name
- if nte is nullptr, return the root FIB entry
- if nte contains a FIB entry, return this FIB entry
- let nte be its parent, goto step 2
This design assumes the NameTree is hashtable. It would be inefficient if NameTree is a trie.
This task moves to an alternate design:
NameTree::findLongestPrefixMatch
should take a predicate that determines whether an entry is acceptableNameTree::findLongestPrefixMatch(const Name& name, function<bool(name_tree::entry)> predicate);
- Current NameTree should implement the "walk up" algorithm in this method
Fib::findLongestPrefixMatch
andMeasurements::findLongestPrefixMatch
supply a predicate that checks whether FIB/Measurements entry exists
Actions