Project

General

Profile

ConfigFileFormat » History » Version 2

Junxiao Shi, 02/07/2014 09:19 PM

1 2 Junxiao Shi
# Config file format
2 1 Alex Afanasyev
3 2 Junxiao Shi
Initial state of NFD daemon is configured using an [INI file](http://en.wikipedia.org/wiki/INI_file).  
4 1 Alex Afanasyev
5 2 Junxiao Shi
## INI details
6
7
* Blank lines are allowed.
8
* Comments must start with `;`, and must appear on its own line.
9
* Sections must be used. Properties cannot be declared out of sections.
10
* Section and property names are case-sensitive.
11
* Duplicate section names and duplicate property names are allowed.
12
* Whitespaces are not allowed at beginning of the line, or around the equal sign. Whitespaces after the equal sign are part of the value.
13
* Escape characters are not supported.
14
15
## Example configuration
16
17
	; the process section defines settings of nfd process
18
	[process]
19
	pidfile=/tmp/nfd.pid
20
	; filename where NFD writes its PID upon startup
21
	uid=ndn
22
	; uid to change into after initialization
23
	gid=ndn
24
	; gid to change into after initialization
25
	
26
	; a channel section defines a channel
27
	; it can be repeated to define multiple channels
28
	[channel]
29
	name=unix
30
	; name of channel, must be unique
31
	proto=unix
32
	; underlying protocol
33
	path=/var/run/nfd.sock
34
	; (UNIX) path
35
	listen=y
36
	; whether to start listening
37
38
	[channel]
39
	name=tcp
40
	proto=tcp
41
	port=6363
42
	; (TCP) listen port
43
	listen=y
44
	
45
	[channel]
46
	name=udp
47
	proto=udp
48
	port=6363
49
	; (UDP) listen port
50
	listen=y
51
	
52
	[channel]
53
	name=udp_mcast
54
	proto=udp
55
	port=56363
56
	mcast_group=224.0.23.170
57
	; (UDP) join multicast group
58
	local_ip=192.0.2.1
59
	; (UDP mcast) local IP to use; must belong to a local NIC
60
	
61
	[channel]
62
	name=ether
63
	proto=ether
64
	dev=eth1
65
	; (Ethernet) local NIC
66
	wire=ndnlp
67
	    
68
	; an auth section defines an authorized key
69
	; it can be repeated to define multiple authorized keys
70
	[auth]
71
	keyfile=/etc/nfd/keys/1.pub
72
	; path to a public key, should be readable by root only
73
	privilege=fib
74
	privilege=stats
75
	; a privilege granted to this public key
76
	; privilege property can be repeated to grant multiple privileges