Project

General

Profile

Actions

Task #2456

closed

Simplify nfd-status using SegmentFetcher

Added by Alex Afanasyev almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tools
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
6.00 h

Description

The code of nfd-status can be simplified by using SegmentFetcher from the library.


Files

nfd-status.cpp (27.8 KB) nfd-status.cpp Yukai Tu, 05/25/2015 08:35 PM
20150627154553.tgz (131 KB) 20150627154553.tgz integ 2145,3 Junxiao Shi, 06/27/2015 09:35 AM
20150629175143.tgz (135 KB) 20150629175143.tgz integ 2145,5 Junxiao Shi, 06/29/2015 12:35 PM
Actions #1

Updated by Teng Liang almost 10 years ago

  • Assignee set to Teng Liang
Actions #2

Updated by Junxiao Shi almost 10 years ago

  • Estimated time set to 6.00 h
Actions #3

Updated by Yukai Tu over 9 years ago

  • Status changed from New to In Progress
  • Assignee changed from Teng Liang to Yukai Tu

In SegmentFetcher, if data without finalBlockId, it will emit next Interest. In NfdStatus::fetchVersionInformation(), NfdStatus emit "/localhost/nfd/status", but statusServer doesn't have publisher, which means it can't set finalBlockId in Data, and it doesn't have second data. So it will fail to fetch "/localhost/nfd/status". Add setFinalBlockId in statusServer can solve the problem. Other fetch can be rewrited using SegmentFetcher successfully.

Actions #4

Updated by Junxiao Shi over 9 years ago

ForwarderStatus is not StatusDataset, so fetching it is a simple Interest, not SegmentFetcher.

Actions #5

Updated by Yukai Tu over 9 years ago

So we don't rewrite NfdStatus::fetchVersionInformation() using SegmentFetcher, just express one Interest?

Actions #6

Updated by Junxiao Shi over 9 years ago

note-5 is correct. SegmentFetcher is only applicable to StatusDataset.

Actions #7

Updated by Yukai Tu over 9 years ago

I have tested and it works, for you to review.

Actions #8

Updated by Junxiao Shi over 9 years ago

Please submit a patchset to Gerrit for review.

Actions #9

Updated by Junxiao Shi over 9 years ago

Actions #10

Updated by Junxiao Shi over 9 years ago

Actions #11

Updated by Alex Afanasyev over 9 years ago

  • Description updated (diff)
Actions #12

Updated by Lan Wang over 9 years ago

Why isn't validation done in the code?

Actions #13

Updated by Junxiao Shi over 9 years ago

Why isn't validation done in the code?

SegmentFetcher validation API is incomplete, see #2734.

There isn't a solution for how to obtain NFD's public key.

It should be an out-of-band method, such as reading from a file (owned by root, 0644 permission).

Actions

Also available in: Atom PDF