Feature #4221
openRelax decoding of out-of-order TLV sub-elements in NFD management protocol
0%
Description
Protocols that use TLV sub-elements generally define a certain order in which TLV elements should appear.
Two styles of wireDecode
functions exist in ndn-cxx codebase: some can accept out-of-order TLV sub-elements, and ignore unrecognized sub-elements; others fail the decoding if a sub-element is out-of-order or unrecognized.
According to RFC1122 section-1.2.2:
At every layer of the protocols, there is a general rule whose application can lead to enormous benefits in robustness and interoperability:
"Be liberal in what you accept, and conservative in what you send"
This issue shall convert wireDecode
functions in mgmt/
to use the first style. It also makes changing the Management protocol easier.
Updated by Alex Afanasyev over 7 years ago
This has been discussed before and we decided to semi-enforce the order. So, disagree with the issue.
Updated by Junxiao Shi over 7 years ago
This has been discussed before
I do not recall. Please provide reasoning or link to existing decision.
we decided to semi-enforce the order
What does "semi-enforce" mean? It's either enforce or not enforce.
Why do management and LpPacket enforce the order, while Interest and Data do not?
Updated by Davide Pesavento over 6 years ago
- Subject changed from Relax decoding of out-of-order TLV sub-elements to Relax decoding of out-of-order TLV sub-elements in NFD management protocol
Updated by Junxiao Shi about 6 years ago
Alex withdraws his note-1 disagreement on 20180926 NFD call.
The general direction is:
- NFD must recognize (almost) everything in the request packet.
- The library may ignore (almost) everything it cannot recognize in the response packet.
- Ordering (usually) does not matter.