Project

General

Profile

Actions

Bug #3263

closed

peek: does not process Nack

Added by Junxiao Shi over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
10/14/2015
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

ndnpeek is using a deprecated overload of Face::expressInterest that does not process Nack.


Files

producer-nack.cpp (1.37 KB) producer-nack.cpp Teng Liang, 03/17/2016 11:19 AM

Related issues 3 (0 open3 closed)

Related to ndn-tools - Feature #3268: peek: verbose outputClosedJunxiao Shi

Actions
Related to NFD - Bug #3692: integ fails due to inconsideration of NackClosedEric Newberry08/01/2016

Actions
Blocks ndn-cxx - Task #3334: Deprecate Face::expressInterest non-Nack overloadsClosedZhiyi Zhang

Actions
Actions #1

Updated by Junxiao Shi over 8 years ago

For ndnpeek, it could simply print the incoming Nack, and exit with a code that differs from Data and timeout.

The Nack should be printed as LpPacket wire encoding to stdout (rather than stderr) so that it can be processed by a script (e.g. with ndn-dissect).

Actions #2

Updated by Junxiao Shi over 8 years ago

20151015 conference call rejects note-1 design, because LpPacket is at a lower layer than Data.

Instead, the following design is approved:

  • Without -p option, the Nack header field should be printed as wire encoding to stdout.
  • With -p option, the NackReason code should be printed to stdout.
Actions #3

Updated by Junxiao Shi over 8 years ago

Actions #4

Updated by Junxiao Shi over 8 years ago

  • Blocks Task #3334: Deprecate Face::expressInterest non-Nack overloads added
Actions #5

Updated by Teng Liang about 8 years ago

  • Assignee set to Teng Liang
Actions #6

Updated by Teng Liang about 8 years ago

I tried to use the Face::expressInterest that handles nack, and implement the onNack() method to satisfy note-2. The problem was that the following call couldn't find a matching member function. What's the right way to call?

m_face.expressInterest(createInterestPacket(),
                                          
bind(&NdnPeek::onData, this, _1, _2),
                                          
bind(&NdnPeek::onNack, this, _1, _2),
                                          
bind(&NdnPeek::onTimeout, this, _1));
                                          

Actions #7

Updated by Teng Liang about 8 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Teng Liang about 8 years ago

To test the change, the attached file is performed as the producer replies to any Interests with a NACK .

Actions #9

Updated by Davide Pesavento about 8 years ago

Teng Liang wrote:

To test the change, the attached file is performed as the producer replies to any Interests with a NACK .

Can you write a unit test instead?

Actions #10

Updated by Teng Liang about 8 years ago

Davide Pesavento wrote:

Can you write a unit test instead?

Currently, ndn-peek.cpp has the symbol _main inside. How about I do a separate commit (or issue) for the unit test?

Actions #11

Updated by Junxiao Shi about 8 years ago

Unit tests should be added in #3558. It can be performed either before or after this issue.

Actions #12

Updated by Junxiao Shi about 8 years ago

  • Status changed from Code review to Closed
  • % Done changed from 0 to 100
Actions #13

Updated by Junxiao Shi over 7 years ago

  • Related to Bug #3692: integ fails due to inconsideration of Nack added
Actions

Also available in: Atom PDF