Feature #4526
closed
Recognize typed name components
Added by Junxiao Shi over 6 years ago.
Updated about 6 years ago.
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.
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
- % 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".
- 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
- Blocks Task #4560: Don't strip whitespace in Name URI parsing added
- % 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.
- Blocked by deleted (Feature #4566: Examples for NDN_CXX_DEPRECATED)
- 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.
- Status changed from Code review to Closed
- Tags changed from CodeCleanup to Packet03Transition
Also available in: Atom
PDF