ConfigFileFormat » History » Revision 3
Revision 2 (Junxiao Shi, 02/07/2014 09:19 PM) → Revision 3/19 (Junxiao Shi, 02/09/2014 09:45 PM)
# Config file format Initial state of NFD daemon is configured using an [INFO file](http://www.boost.org/doc/libs/1_42_0/doc/html/boost_propertytree/parsers.html#boost_propertytree.parsers.info_parser). [INI file](http://en.wikipedia.org/wiki/INI_file). ## INI details * Blank lines are allowed. * Comments must start with `;`, and must appear on its own line. * Sections must be used. Properties cannot be declared out of sections. * Section and property names are case-sensitive. * Duplicate section names and duplicate property names are allowed. * Whitespaces are not allowed at beginning of the line, or around the equal sign. Whitespaces after the equal sign are part of the value. * Escape characters are not supported. ## Example configuration ; the process section contains defines settings of nfd process process { pidfile /tmp/nfd.pid [process] pidfile=/tmp/nfd.pid ; filename to write where NFD writes its PID upon startup } uid=ndn ; the face_system uid to change into after initialization gid=ndn ; gid to change into after initialization ; a channel section defines what faces and a channel ; it can be repeated to define multiple channels are created face_system { [channel] name=unix ; the unix section contains settings name of UNIX stream faces and channels unix { listen yes channel, must be unique proto=unix ; set to 'no' to disable UNIX stream listener, default 'yes' path /var/run/nfd.sock underlying protocol path=/var/run/nfd.sock ; UNIX stream listener (UNIX) path } listen=y ; the tcp section contains settings of TCP faces and channels tcp { listen yes ; set whether to 'no' to disable TCP listener, default 'yes' port 6363 start listening [channel] name=tcp proto=tcp port=6363 ; TCP listener (TCP) listen port number } listen=y [channel] name=udp proto=udp port=6363 ; the udp section contains settings of UDP faces and channels udp { (UDP) listen port 6363 listen=y [channel] name=udp_mcast proto=udp port=56363 mcast_group=224.0.23.170 ; UDP unicast port number idle_timeout 30 ; idle time (seconds) before closing a UDP unicast face keep_alive_interval 25; interval (seconds) between keep-alive refreshes ; NFD creates one UDP (UDP) join multicast face per NIC mcast yes group local_ip=192.0.2.1 ; set (UDP mcast) local IP to 'no' use; must belong to disable UDP multicast, default 'yes' mcast_port 56363 a local NIC [channel] name=ether proto=ether dev=eth1 ; UDP multicast port number mcast_group 224.0.23.170 (Ethernet) local NIC wire=ndnlp ; UDP multicast group (IPv4 only) } ; the ether an auth section contains settings of Ethernet faces and channels ether { defines an authorized key ; NFD creates one Ethernet multicast face per NIC mcast yes ; set it can be repeated to 'no' to disable Ethernet multicast, default 'yes' mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group } } ; the authorizations section grants privileges to define multiple authorized keys authorizations { [auth] keyfile=/etc/nfd/keys/1.pub ; an authorize section grants privileges path to a key authorize { keyfile "/tmp/key1.pub" ; public key file privileges key, should be readable by root only privilege=fib privilege=stats ; set of privileges a privilege granted to this public key { fib, stats } } authorize { keyfile "/tmp/key2.pub" ; public key file privilege property can be repeated to grant multiple privileges ; set of privileges granted to this public key { face } } }