Project

General

Profile

Actions

Task #1313

closed

NameTree::findLongestPrefixMatch predicate

Added by Junxiao Shi over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tables
Target version:
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:

  1. let nte be the longest prefix match NameTree entry for name
  2. if nte is nullptr, return the root FIB entry
  3. if nte contains a FIB entry, return this FIB entry
  4. 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 acceptable NameTree::findLongestPrefixMatch(const Name& name, function<bool(name_tree::entry)> predicate);
  • Current NameTree should implement the "walk up" algorithm in this method
  • Fib::findLongestPrefixMatch and Measurements::findLongestPrefixMatch supply a predicate that checks whether FIB/Measurements entry exists

Related issues 1 (0 open1 closed)

Blocks NFD - Task #1309: Strategy Choice tableClosedJunxiao Shi03/01/2014

Actions
Actions #1

Updated by Junxiao Shi over 10 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 70
  • Estimated time set to 1.50 h
Actions #2

Updated by Junxiao Shi over 10 years ago

  • Status changed from Code review to Closed
  • % Done changed from 70 to 100
Actions

Also available in: Atom PDF