Task #1364
closed
Process client configuration file
Added by Alex Afanasyev about 11 years ago.
Updated about 11 years ago.
Description
Client configuration file would define connection parameters to NDN daemon.
The library should look in the following location (in order) to check for configuration file:
- $HOME/.ndn/client.conf
- @SYSCONFDIR@/ndn/client.conf
- /etc/ndn/client.conf
Config file format is INI.
The initial content is
unix_socket=/var/run/nfd.sock
protocol=nrd-0.1
The protocol parameter is either "nfd/0.1" or "nfd/0.1" and determines the protocol for prefix registration.
- Assignee set to Anonymous
- Description updated (diff)
- Estimated time set to 2.00 h
Not exactly related to this issue, but related to config file. Should we make ConfigFile a general-use config-file parser to be used by anybody using library or it should stay as specialized version, just for the library?
To be clear, I think NFD and the library need to have different ConfigFiles because they're using different parsing models. NFD has complex sections and it's nice to be able to delegate their parsing to the module it relates to. My experience so far with library configuration is that there's some value you care about and you just want to directly access it (i.e. no real complicated parsing to deal with).
If you think the library's model is useful for a variety applications, then I don't have any objections to generalizing it. I could do is add the existing suite of parse functions from the NFD ConfigFile so that it can handle filenames, strings, etc. Then, I would add a version of parse that accepts a function that searches potential configuration file locations (as the library ConfigFile does now).
That was just a thought. Given the simplicity of config file implementation, the one in the library can be used just as a reference for others. So, I guess it is better to have this ConfigFile in the library to be library-specific.
- Status changed from New to Code review
- Status changed from Code review to Closed
Also available in: Atom
PDF