python-ndn icon indicating copy to clipboard operation
python-ndn copied to clipboard

Add support for NDNLP packets

Open JonnyKong opened this issue 5 years ago • 8 comments

Currently, python-ndn does not handle NDN link protocol packets, except NACK.

For example, when the network gets congested, NFD will wrap Interest/Data packets in NDNLP packet with congestion markings. The python-ndn library currently discards such packets, and shows a warning message as follows:

WARNING:Unable to decode received packet

I have attached an example NDNLP packet here: packet.zip

JonnyKong avatar Nov 06 '20 00:11 JonnyKong

Will fix this ASAP.

zjkmxy avatar Nov 06 '20 01:11 zjkmxy

NDNLP has a "critical vs non-critical TLV-TYPE" distinction. If you don't want to handle congestion mark, you can ignore it since it has a non-critical TLV-TYPE number. On the other hand, if you are unable to handle PIT token or fragmentation, you have to drop the packet as those have critical TLV-TYPE numbers.

yoursunny avatar Nov 06 '20 01:11 yoursunny

Hi, can we please fix this? We don't want to rely on application retransmission since that adds to congestion.

susmit85 avatar Nov 13 '20 00:11 susmit85

Hi, can we please fix this? We don't want to rely on application retransmission since that adds to congestion.

I'm currently working on this. I'm sorry that this may take some time, but you will see it in several weeks.

zjkmxy avatar Nov 13 '20 00:11 zjkmxy

Hello. I just pushed a patch. Sorry for being late. After I upgraded my Mac, everything was broken ... I have only tested it in the integration test, but not with NFD yet. (I need to reinstall NFD and fix possible problems which may take more time.) Please check if it solves the problem or brings more bugs. Thanks

zjkmxy avatar Nov 15 '20 08:11 zjkmxy

As of b5e60a67ee8b72582b25bb1262e913c09f0cfbe5, the implementation is incorrect. For example, if a fragmented packet arrives, this implementation would incorrectly accept this packet, despite that it lacks a reassembler.

Please see NDNLPv2 protocol for requirements on processing critical vs non-critical TLV-TYPE numbers. It differs from evolvability rules of NDN network layer packets.

yoursunny avatar Nov 15 '20 12:11 yoursunny

This implementation does not handle fragmentation yet. Will be added later.

zjkmxy avatar Nov 15 '20 17:11 zjkmxy

This implementation does not handle fragmentation yet. Will be added later.

You missed the point. It's OK to not handle a certain NDNLPv2 field that has a critical TLV-TYPE number, but then the decoder MUST drop any NDNLPv2 frame that uses such field.

yoursunny avatar Nov 15 '20 17:11 yoursunny