Project

General

Profile

ConfigFileFormat » History » Version 3

Junxiao Shi, 02/09/2014 09:45 PM

1 2 Junxiao Shi
# Config file format
2 1 Alex Afanasyev
3 3 Junxiao Shi
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).
4 1 Alex Afanasyev
5
## Example configuration
6
7 3 Junxiao Shi
    ; the process section contains settings of nfd process
8
    process
9
    {
10
      pidfile /tmp/nfd.pid ; filename to write PID upon startup
11
    }
12
    
13
    ; the face_system section defines what faces and channels are created
14
    face_system
15
    {
16
      ; the unix section contains settings of UNIX stream faces and channels
17
      unix
18
      {
19
        listen yes ; set to 'no' to disable UNIX stream listener, default 'yes'
20
        path /var/run/nfd.sock ; UNIX stream listener path
21
      }
22
      
23
      ; the tcp section contains settings of TCP faces and channels
24
      tcp
25
      {
26
        listen yes ; set to 'no' to disable TCP listener, default 'yes'
27
        port 6363 ; TCP listener port number
28
      }
29
      
30
      ; the udp section contains settings of UDP faces and channels
31
      udp
32
      {
33
        port 6363 ; UDP unicast port number
34
        idle_timeout 30 ; idle time (seconds) before closing a UDP unicast face
35
        keep_alive_interval 25; interval (seconds) between keep-alive refreshes
36
        
37
        ; NFD creates one UDP multicast face per NIC
38
        mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
39
        mcast_port 56363 ; UDP multicast port number
40
        mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
41
      }
42
      
43
      ; the ether section contains settings of Ethernet faces and channels
44
      ether
45
      {
46
        ; NFD creates one Ethernet multicast face per NIC
47
        mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
48
        mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
49
      }
50
    }
51 2 Junxiao Shi
52 3 Junxiao Shi
    ; the authorizations section grants privileges to authorized keys
53
    authorizations
54
    {
55
      ; an authorize section grants privileges to a key
56
      authorize
57
      {
58
        keyfile "/tmp/key1.pub" ; public key file
59
        privileges ; set of privileges granted to this public key
60
        {
61
          fib,
62
          stats
63
        }
64
      }
65
66
      authorize
67
      {
68
        keyfile "/tmp/key2.pub" ; public key file
69
        privileges ; set of privileges granted to this public key
70
        {
71
          face
72
        }
73
      }
74
    }