Project

General

Profile

Feature #4526

Recognize typed name components

Added by Junxiao Shi over 2 years ago. Updated almost 2 years ago.

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

100%

Estimated time:
6.00 h

Description

NDN Packet Format v0.3 permits certain TLV-TYPEs other than GenericNameComponent and ImplicitSha256DigestComponent to be a NameComponent.
In ndn::Name and ndn::name::Component should recognize these types, and properly convert a name containing typed name components to and from URI.
This is part of Packet03Transition.


Related issues

Blocked by NDN Specifications - Feature #4440: Typed name componentsClosedAlex Afanasyev

Actions
Blocks ndn-cxx - Task #4560: Don't strip whitespace in Name URI parsingClosedJunxiao Shi

Actions
Blocks NFD - Task #4564: Release 0.6.2ClosedAlex Afanasyev05/04/2018

Actions
Blocks ndn-cxx - Feature #4570: Redesign Name::getSuccessorClosedJunxiao Shi

Actions
#1

Updated by Junxiao Shi over 2 years ago

#2

Updated by Junxiao Shi over 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
#3

Updated by Junxiao Shi over 2 years ago

  • % Done changed from 0 to 20
  • Estimated time changed from 3.00 h to 6.00 h

https://gerrit.named-data.net/4627 patchset 1 has the implementation of name::Component type and fixes for existing test cases, but there isn't any new test case yet. Please review API.

A design decision: in Component constructors, I'm putting TLV-TYPE parameter before TLV-VALUE, instead of adding it at the end with a default argument value. The reason is that TLV-TYPE comes before TLV-VALUE in "T-L-V".

#4

Updated by Junxiao Shi over 2 years ago

  • Description updated (diff)
  • % Done changed from 20 to 40

https://gerrit.named-data.net/4627 has the test cases.

Upcoming commits:

  • change all tlv::NameComponent to tlv::GenericNameComponent
  • add some methods to append typed components in Name class
#5

Updated by Junxiao Shi over 2 years ago

  • Blocks Task #4560: Don't strip whitespace in Name URI parsing added
#6

Updated by Davide Pesavento over 2 years ago

#7

Updated by Junxiao Shi over 2 years ago

  • % Done changed from 40 to 70

https://gerrit.named-data.net/4642 allows typed component in FinalBlockId element. I notice that the protocol does not forbid a zero-length GenericNameComponent to be FinalBlockId, but the existing API does not support that. Therefore, I'm introducing MetaInfo::getFinalBlock that returns optional<name::Component>, and deprecating the existing API.
The protocol envisions "Name component with TLV-TYPE 0 (zero) is reserved to indicate an invalid name component". However, I'm unable to implement as such, because legacy code expects a default-constructed name::Component to be a zero-length GenericNameComponent.

https://gerrit.named-data.net/4643 extends Name::append for typed component.
Existing Name::append(const Block&) encapsulates non-0x08 element into GenericNameComponent, and this behavior is preserved.

https://gerrit.named-data.net/4644 renames tlv::NameComponent to tlv::GenericNameComponent in files not touched by the above two changes.

#8

Updated by Junxiao Shi over 2 years ago

  • Blocked by Feature #4566: Examples for NDN_CXX_DEPRECATED added
#9

Updated by Davide Pesavento over 2 years ago

  • Blocked by deleted (Feature #4566: Examples for NDN_CXX_DEPRECATED)
#10

Updated by Junxiao Shi over 2 years ago

#11

Updated by Junxiao Shi over 2 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 70 to 100

During Name class changes, I notice a problem with getSuccessor algorithm. It is separated to #4570 to be triaged later.

#12

Updated by Junxiao Shi over 2 years ago

  • Status changed from Code review to Closed
#13

Updated by Davide Pesavento almost 2 years ago

  • Tags set to CodeCleanup
#14

Updated by Davide Pesavento almost 2 years ago

  • Tags changed from CodeCleanup to Packet03Transition

Also available in: Atom PDF