Task #2874
closedDecide directory structure for NDNLPv2
100%
Updated by Junxiao Shi over 9 years ago
- Blocked by Task #2841: NDNLPv2 design: packet format API for NACK, Fragmentation, NextHopFaceId, CachePolicy, IncomingFaceId added
Updated by Junxiao Shi over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
NDNLP-TLV exists only in NFD, but it's necessary to implement NDNLPv2 in ndn-cxx because some features, such as Nack, can be used by applications.
Unlike LocalControlHeader, management/
is not the right place to put NDNLPv2 abstractions, because many NDNLPv2 features are not limited for local use, and thus do not fit in management.
My proposal is to create a new lp/
subdirectory for NDNLPv2.
The files will be:
lp/tlv.hpp
: TLV-TYPE codeslp/sequence.hpp
: typedef forSequence
value typelp/nack-reason.hpp
:NackReason
base type, a Doxygen comment to defineNackReasonConcrete
concept and a concept checklp/detail/nack-reason-decl.hpp
: templates and specializations used for declaring NackReasonslp/duplicate.hpp
: typedef forDuplicate
typelp/give-up.hpp
: typedef forGiveUp
typelp/nack.hpp
:Nack
typelp/caching-policy.hpp
:CachingPolicy
typelp/field.hpp
: a Doxygen comment to defineField
concept and a concept checklp/detail/field-decl.hpp
: templates and specializations used for declaring fieldslp/fields.hpp
: field declaration typedefs
Updated by Junxiao Shi over 9 years ago
- Related to Feature #2875: NDNLPv2: TLV-TYPE codes added
Updated by Junxiao Shi over 9 years ago
- Related to Feature #2876: NDNLPv2: simple value type declaration added
Updated by Junxiao Shi over 9 years ago
- Related to Feature #2877: NDNLPv2: NackReason abstraction added
Updated by Alex Afanasyev over 9 years ago
I have no objections for this structure (I'm assuming it would go under src/
)
Updated by Junxiao Shi over 9 years ago
- Status changed from Resolved to Closed
Thanks for approval. Of course it's src/lp/*.hpp|cpp
for implementation and tests/unit-tests/lp/*.t.cpp
for testing.
Updated by Eric Newberry over 9 years ago
Where does the Packet class fit in this directory structure?
Updated by Junxiao Shi over 9 years ago
Where does the Packet class fit in this directory structure?
Opps I missed that.
lp/packet.hpp
: Packet class
Updated by Junxiao Shi over 9 years ago
- Status changed from Closed to Resolved
Due to Nack
API change (#2841 note-31), there's only one Nack
-related header:
lp/nack.hpp
:Nack
type
Updated by Junxiao Shi over 9 years ago
In commit:12726d8645f08edc862259b03550abaff6008066, @Alex expressed concern about concepts.hpp
being included everywhere.
I neither agree nor disagree with this concern.
Although nack-reason.hpp
is gone, the same situation would happens for field.hpp
under current design.
If there's a valid reason, I'll change the design.
@Alex, please state the reason why it's harmful to include concepts.hpp
everywhere.
Notice that concept checks are header-only and thus does not incur runtime overhead.
Updated by Eric Newberry over 9 years ago
Junxiao Shi wrote:
Due to
Nack
API change (#2841 note-31), there's only oneNack
-related header:
lp/nack.hpp
:Nack
type
Are Nack
, NackHeader
, and NackReason
all in lp/nack.hpp
?
Updated by Junxiao Shi over 9 years ago
Answer to note-12:
I forgot about the other two types. This should be:
lp/nack-header.hpp
:NackReason
type andNackHeader
typelp/nack.hpp
:Nack
type
Updated by Junxiao Shi over 9 years ago
- Related to Feature #2878: NDNLPv2: Nack abstraction added
Updated by Junxiao Shi over 9 years ago
- Status changed from Resolved to Closed
Due to CachePolicy design change, the file for this header field is changed to be:
lp/cache-policy.hpp
:CachePolicyType
type andCachePolicy
type