Project

General

Profile

ConfigFileFormat » History » Version 6

Anonymous, 03/26/2014 09:51 AM

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 6 Anonymous
        listen yes ; set to 'no' to disable UDP listener, default 'yes'
34 3 Junxiao Shi
        port 6363 ; UDP unicast port number
35
        idle_timeout 30 ; idle time (seconds) before closing a UDP unicast face
36
        keep_alive_interval 25; interval (seconds) between keep-alive refreshes
37
        
38
        ; NFD creates one UDP multicast face per NIC
39
        mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
40
        mcast_port 56363 ; UDP multicast port number
41
        mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
42
      }
43
      
44
      ; the ether section contains settings of Ethernet faces and channels
45
      ether
46
      {
47
        ; NFD creates one Ethernet multicast face per NIC
48
        mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
49
        mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
50
      }
51
    }
52 2 Junxiao Shi
53 3 Junxiao Shi
    ; the authorizations section grants privileges to authorized keys
54
    authorizations
55
    {
56
      ; an authorize section grants privileges to a key
57
      authorize
58
      {
59
        keyfile "/tmp/key1.pub" ; public key file
60
        privileges ; set of privileges granted to this public key
61
        {
62 4 Anonymous
          fib
63 3 Junxiao Shi
          stats
64
        }
65
      }
66
67
      authorize
68
      {
69
        keyfile "/tmp/key2.pub" ; public key file
70
        privileges ; set of privileges granted to this public key
71
        {
72 5 Anonymous
          faces
73 3 Junxiao Shi
        }
74
      }
75
    }