Project

General

Profile

Feature #4570

Redesign Name::getSuccessor

Added by Junxiao Shi about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Base
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

Name::getSuccessor returns the "successor" of a name.
As of ndn-cxx 0.6.1, this is defined as:

   *  The successor of a name is defined as follows:
   *
   *      N represents the set of NDN Names, and X,Y ∈ N.
   *      Operator < is defined by canonical order on N.
   *      Y is the successor of X, if (a) X < Y, and (b) ∄ Z ∈ N s.t. X < Z < Y.
   *
   *  In plain words, successor of a name is the same name, but with its last component
   *  advanced to a next possible value.
   *
   *  Examples:
   *
   *  - successor for / is /%00
   *  - successor for /%00%01/%01%02 is /%00%01/%01%03
   *  - successor for /%00%01/%01%FF is /%00%01/%02%00
   *  - successor for /%00%01/%FF%FF is /%00%01/%00%00%00

With ImplicitSha256DigestComponent and typed name components (#4526) in Packet03Transition, the implementation and examples no longer match the definition.
According to the definition,

  • successor for / is /sha256digest=00000000000000000000000000000000.
  • successor for /sha256digest=ffffffffffffffffffffffffffffffff is /2=....
  • all other cases: the last component does not change type.

Related issues

Blocked by ndn-cxx - Feature #4526: Recognize typed name componentsClosedJunxiao Shi

Actions

Also available in: Atom PDF