Project

General

Profile

ConfigFileFormat » History » Version 9

Anonymous, 03/29/2014 06:34 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 9 Anonymous
    ; the general section contains settings of nfd process
8
    general
9 3 Junxiao Shi
    {
10 9 Anonymous
11 1 Alex Afanasyev
    }
12
    
13 9 Anonymous
    log
14
    {
15
    ; default_level specifies the logging level for modules
16
    ; that are not explicitly named. All debugging levels
17
    ; listed above the selected value are enabled.
18
    ;
19
    ; Valid levels:
20
    ;
21
    ;  NONE ; no messages
22
    ;  ERROR ; error messages
23
    ;  WARN ; warning messages
24
    ;  INFO ; informational messages (default)
25
    ;  DEBUG ; debugging messages
26
    ;  TRACE ; trace messages (most verbose)
27
    ;  ALL ; all messages
28
29
      default_level WARN
30
31
    ; You may override default_level by assigning a logging level
32
    ; to the desired module name. Module names can be found in two ways:
33
    ;
34
    ; Run:
35
    ;   nfd --modules
36
    ;
37
    ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
38
 
39
      FibManager DEBUG
40
      Forwarder INFO
41
    }
42
43 3 Junxiao Shi
    ; the face_system section defines what faces and channels are created
44
    face_system
45
    {
46
      ; the unix section contains settings of UNIX stream faces and channels
47
      unix
48
      {
49
        listen yes ; set to 'no' to disable UNIX stream listener, default 'yes'
50
        path /var/run/nfd.sock ; UNIX stream listener path
51
      }
52
      
53
      ; the tcp section contains settings of TCP faces and channels
54
      tcp
55
      {
56
        listen yes ; set to 'no' to disable TCP listener, default 'yes'
57
        port 6363 ; TCP listener port number
58
      }
59
      
60
      ; the udp section contains settings of UDP faces and channels
61
      udp
62
      {
63
        port 6363 ; UDP unicast port number
64
        idle_timeout 30 ; idle time (seconds) before closing a UDP unicast face
65
        keep_alive_interval 25; interval (seconds) between keep-alive refreshes
66
        
67
        ; NFD creates one UDP multicast face per NIC
68
        mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
69
        mcast_port 56363 ; UDP multicast port number
70
        mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
71
      }
72
      
73
      ; the ether section contains settings of Ethernet faces and channels
74
      ether
75 2 Junxiao Shi
      {
76 3 Junxiao Shi
        ; NFD creates one Ethernet multicast face per NIC
77
        mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
78 1 Alex Afanasyev
        mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
79 3 Junxiao Shi
      }
80 1 Alex Afanasyev
    }
81
82 9 Anonymous
    ; the authorizations section grants privileges to authorized NDN certificates
83 3 Junxiao Shi
    authorizations
84
    {
85 9 Anonymous
      ; an authorize section grants privileges to an NDN certificate
86 3 Junxiao Shi
      authorize
87
      {
88 9 Anonymous
        keyfile "/tmp/cert1.ndncert" ; NDN identity certificate file
89
        privileges ; set of privileges granted to this identity
90 1 Alex Afanasyev
        {
91 4 Anonymous
          fib
92 3 Junxiao Shi
          stats
93
        }
94
      }
95
96
      authorize
97
      {
98 9 Anonymous
        keyfile "/tmp/cert2.ndncert" ; NDN identity certificate file
99
        privileges ; set of privileges granted to this identity
100 3 Junxiao Shi
        {
101 5 Anonymous
          faces
102 3 Junxiao Shi
        }
103
      }
104
    }