Project

General

Profile

Actions

Feature #4221

open

Relax decoding of out-of-order TLV sub-elements in NFD management protocol

Added by Junxiao Shi over 6 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Management
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
6.00 h

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.

Actions #1

Updated by Alex Afanasyev over 6 years ago

This has been discussed before and we decided to semi-enforce the order. So, disagree with the issue.

Actions #2

Updated by Junxiao Shi over 6 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?

Actions #3

Updated by Davide Pesavento about 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
Actions #4

Updated by Junxiao Shi over 5 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.
Actions

Also available in: Atom PDF