Project

General

Profile

Actions

Task #2496

closed

Redesign initialization of nfd/nrd

Added by Alex Afanasyev about 9 years ago. Updated about 9 years ago.

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

100%

Estimated time:

Description

Right now, all initialization of both nfd and nrd is done inside daemon/main.cpp and rib/main.cpp.

In NS-3 and Android environments, it is necessary to manually initialize and start forwarder without use of main function at all (e.g., in both cases there is no command line and there is no config file to parse).

This task is to separate generic initialization of nfd and nrd into separate compilation modules and keep in main.cpp only logic necessary for command line.


Unrelated, but something to consider. getopt uses a global state for argument parsing. This makes main() function non-reentrant. This is not any kind of a problem in normal case, but was something causing problems within android environment.

Should we consider adding "reset" of getopt state, e.g.,

::optind = 1;
::optreset = 1;

Related issues 2 (0 open2 closed)

Related to NFD - Task #2489: Merge nrd into nfdClosedAlex Afanasyev

Actions
Related to NFD - Bug #2190: NRD cannot start when NFD disables UNIX facesClosed

Actions
Actions

Also available in: Atom PDF