Using OONF

From Wiki
Jump to: navigation, search

OONF command line parameters

By running the OONF executable with the -h or --help command line parameter you get a complete list of command line parameters.

> ./olsrd2_static --help
Usage: ./olsrd2_static [OPTION]...
OLSRv2 routing agent
Mandatory arguments for long options are mandatory for short options too.
  -h, --help                             Display this help file
  -v, --version                          Display the version string and the included static plugins
  -p, --plugin=shared-library            Load a shared library as a plugin
  -q, --quit                             Load plugins and validate configuration, then end
      --schema                           Display all allowed section types of configuration
              =all                       Display all allowed entries in all sections
              =section_type              Display all allowed entries of one configuration section
              =section_type.key          Display help text for configuration entry
  -l, --load=SOURCE                      Load configuration from a SOURCE
  -S, --save=TARGET                      Save configuration to a TARGET
  -s, --set=section_type.                Add an unnamed section to the configuration
           =section_type.key=value       Add a key/value pair to an unnamed section
           =section_type[name].          Add a named section to the configuration
           =section_type[name].key=value Add a key/value pair to a named section
  -r, --remove=section_type.             Remove all sections of a certain type
              =section_type.key          Remove a key in an unnamed section
              =section_type[name].       Remove a named section
              =section_type[name].key    Remove a key in a named section
  -g, --get                              Show all section types in database
           =section_type.                Show all named sections of a certain type
           =section_type.key             Show the value(s) of a key in an unnamed section
           =section_type[name].key       Show the value(s) of a key in a named section

Expert/Experimental arguments
  --Xearlydebug                          Activate debugging output before configuration could be parsed
  --Xignoreunknown                       Ignore unknown command line arguments

The remainder of the parameters which are no arguments are handled as interface names.

The parameters schema, load, save, set, remove, get and format are direct interfaces to the configuration system. Each of this commands manipulate the configuration database of OONF before it is processed by the daemon. This also means that every line in a configuration file is the equivalent of a --set command line parameter.

Use the --schema parameters to learn about the configuration options of OONF.

OONF configuration

OONF Configuration has its own wiki page.

The configuration consists of Sections. Some sections have a name, others have no name or an optional name. Each section is a list of Key/Value pairs, some keys allow multiple values.

The default configuration format is a line based ascii format that is similar to the windows .ini files.

The following example configuration file has two sections:

    debug timer

    bindto fd00::/8

The first section log defines a single key called debug with the value timer. The second section interface has the name wlan0 and defines a single key bindto with two values, and fd00::/8.

The configuration file would be the equivalent of the command line parameters

--set log.debug=timer
--set interface[wlan0].bindto=
--set interface[wlan0].bindto=fd00::/8