nfd: 0.4.0 release
This commit includes a new daemon package (ndn-autoconfig-client).
Also fixes #5, #6, #7, #8, #13
Change-Id: Ib51f12ea1d2bd78cd7f30a7c0018353bdf37e466
diff --git a/nfd/debian/autoconfig.conf b/nfd/debian/autoconfig.conf
new file mode 100644
index 0000000..3d6774b
--- /dev/null
+++ b/nfd/debian/autoconfig.conf
@@ -0,0 +1,2 @@
+# Enable ndn-autoconfig to run in parallel with NFD. Disabled by default
+enabled=true
diff --git a/nfd/debian/changelog b/nfd/debian/changelog
index 9f9d37c..ba6ab36 100644
--- a/nfd/debian/changelog
+++ b/nfd/debian/changelog
@@ -1,23 +1,9 @@
-nfd (0.3.4-ppa1~DISTRO) DISTRO; urgency=low
+nfd (0.4.0-ppa2~DISTRO) DISTRO; urgency=low
- * New version based on NFD-0.3.4 (https://github.com/named-
+ * New version based on NFD-0.4.0 (https://github.com/named-
data/NFD.git)
- -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Mon, 31 Aug 2015 19:58:19 +0000
-
-nfd (0.3.3-ppa4~DISTRO) DISTRO; urgency=low
-
- * New version based on NFD-0.3.3 (https://github.com/named-
- data/NFD.git)
-
- -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 23 Jul 2015 04:04:07 +0000
-
-nfd (0.3.3-ppa3~DISTRO) DISTRO; urgency=low
-
- * New version based on NFD-0.3.3 (https://github.com/named-
- data/NFD.git)
-
- -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Wed, 22 Jul 2015 05:50:48 +0000
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 07 Jan 2016 22:49:14 +0000
nfd (0.3.3-ppa2~DISTRO) DISTRO; urgency=low
diff --git a/nfd/debian/control b/nfd/debian/control
index 3e59b84..756084b 100644
--- a/nfd/debian/control
+++ b/nfd/debian/control
@@ -5,7 +5,7 @@
dh-systemd (>= 1.5),
python (>= 2.7.0),
pkg-config (>= 0.26),
- ndn-cxx-dev (>= 0.3.0~rc0.2),
+ ndn-cxx-dev (>= 0.4.0),
python-sphinx,
libpcap-dev,
libboost-all-dev (>= 1.48.0)
@@ -37,7 +37,12 @@
Depends: nfd (= ${binary:Version}), ${misc:Depends}
Description: NDN autoconfig server
+Package: ndn-autoconfig-client
+Architecture: i386 amd64
+Depends: nfd (= ${binary:Version}), ${misc:Depends}
+Description: NDN autoconfig client
+
Package: nfd-all
Architecture: any
-Depends: ${misc:Depends}, nfd, nfd-status-http-server, nfd-autoreg, ndn-autoconfig-server
+Depends: ${misc:Depends}, nfd, nfd-status-http-server, nfd-autoreg, ndn-autoconfig-server, ndn-autoconfig-client
Description: NFD and all related daemons
diff --git a/nfd/debian/control.precise b/nfd/debian/control.precise
index a94531c..f3ac452 100644
--- a/nfd/debian/control.precise
+++ b/nfd/debian/control.precise
@@ -4,7 +4,7 @@
Build-Depends: debhelper (>= 8.0.0),
python (>= 2.7.0),
pkg-config (>= 0.26),
- ndn-cxx-dev (>= 0.3.0~rc0.2),
+ ndn-cxx-dev (>= 0.4.0),
python-sphinx,
libpcap-dev,
libboost1.48-all-dev (>= 1.48.0)
@@ -36,7 +36,12 @@
Depends: nfd (= ${binary:Version}), ${misc:Depends}
Description: NDN autoconfig server
+Package: ndn-autoconfig-client
+Architecture: i386 amd64
+Depends: nfd (= ${binary:Version}), ${misc:Depends}
+Description: NDN autoconfig client
+
Package: nfd-all
Architecture: any
-Depends: ${misc:Depends}, nfd, nfd-status-http-server, nfd-autoreg, ndn-autoconfig-server
+Depends: ${misc:Depends}, nfd, nfd-status-http-server, nfd-autoreg, ndn-autoconfig-server, ndn-autoconfig-client
Description: NFD and all related daemons
diff --git a/nfd/debian/ndn-autoconfig-client.install b/nfd/debian/ndn-autoconfig-client.install
new file mode 100644
index 0000000..8cfe386
--- /dev/null
+++ b/nfd/debian/ndn-autoconfig-client.install
@@ -0,0 +1,7 @@
+etc/ndn/autoconfig.conf.sample
+debian/autoconfig.conf etc/ndn
+
+usr/bin/ndn-autoconfig
+
+usr/share/man/man1/ndn-autoconfig.1
+usr/share/man/man5/ndn-autoconfig.conf.5
diff --git a/nfd/debian/ndn-autoconfig-client.service b/nfd/debian/ndn-autoconfig-client.service
new file mode 100644
index 0000000..270476c
--- /dev/null
+++ b/nfd/debian/ndn-autoconfig-client.service
@@ -0,0 +1,40 @@
+# Copyright (c) 2015, Regents of the University of California,
+# Arizona Board of Regents,
+# Colorado State University,
+# University Pierre & Marie Curie, Sorbonne University,
+# Washington University in St. Louis,
+# Beijing Institute of Technology,
+# The University of Memphis.
+#
+# This file is part of NFD (Named Data Networking Forwarding Daemon).
+# See AUTHORS.md for complete list of NFD authors and contributors.
+#
+# NFD is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+
+[Unit]
+Description=NDN Autoconfig Client
+Documentation=man:nfd-autoconfig
+Requires=nfd.service
+After=nfd.service
+
+[Service]
+User=ndn
+Group=ndn
+ExecStart=/usr/bin/ndn-autoconfig -d -c /etc/ndn/autoconfig.conf
+Restart=on-failure
+ProtectSystem=full
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectHome=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nfd/debian/ndn-autoconfig-client.upstart b/nfd/debian/ndn-autoconfig-client.upstart
new file mode 100644
index 0000000..e467300
--- /dev/null
+++ b/nfd/debian/ndn-autoconfig-client.upstart
@@ -0,0 +1,17 @@
+description "NDN Autoconfig Server"
+author "Alexander Afanasyev <alexander.afanasyev@ucla.edu>"
+
+start on started nfd
+stop on stopping nfd
+
+respawn
+respawn limit unlimited
+
+setuid ndn
+setgid ndn
+
+script
+ if [ -f /etc/ndn/autoconfig.conf ]; then
+ exec /usr/bin/ndn-autoconfig -d -c /etc/ndn/autoconfig.conf
+ fi
+end script
diff --git a/nfd/debian/ndn-autoconfig-server.install b/nfd/debian/ndn-autoconfig-server.install
new file mode 100644
index 0000000..b444390
--- /dev/null
+++ b/nfd/debian/ndn-autoconfig-server.install
@@ -0,0 +1,3 @@
+usr/bin/ndn-autoconfig-server
+
+usr/share/man/man1/ndn-autoconfig-server.1
diff --git a/nfd/debian/ndn-autoconfig-server.service b/nfd/debian/ndn-autoconfig-server.service
index 53e2de4..eee789d 100644
--- a/nfd/debian/ndn-autoconfig-server.service
+++ b/nfd/debian/ndn-autoconfig-server.service
@@ -24,7 +24,7 @@
[Unit]
Description=NDN Autoconfig Server
-Documentation=man:nfd-autoreg
+Documentation=man:nfd-autoconfig-server
Requires=nfd.service
After=nfd.service
diff --git a/nfd/debian/nfd-autoreg.install b/nfd/debian/nfd-autoreg.install
new file mode 100644
index 0000000..7fd916f
--- /dev/null
+++ b/nfd/debian/nfd-autoreg.install
@@ -0,0 +1,3 @@
+usr/bin/nfd-autoreg
+usr/share/man/man1/nfd-autoreg.1
+
diff --git a/nfd/debian/nfd-status-http-server.install b/nfd/debian/nfd-status-http-server.install
new file mode 100644
index 0000000..8b3ee62
--- /dev/null
+++ b/nfd/debian/nfd-status-http-server.install
@@ -0,0 +1,10 @@
+usr/bin/nfd-status-http-server
+
+usr/share/man/man1/nfd-status-http-server.1
+
+usr/share/ndn/nfd-status.xsl
+usr/share/ndn/reset.css
+usr/share/ndn/robots.txt
+usr/share/ndn/style.css
+usr/share/ndn/text.css
+
diff --git a/nfd/debian/nfd.conf b/nfd/debian/nfd.conf
index bc93199..a3232d7 100644
--- a/nfd/debian/nfd.conf
+++ b/nfd/debian/nfd.conf
@@ -28,7 +28,6 @@
;
; Run:
; nfd --modules
- ; nrd --modules
;
; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
;
@@ -45,15 +44,42 @@
; ContentStore size limit in number of packets
; default is 65536, about 500MB with 8KB packet size
cs_max_packets 65536
+
+ ; Set the forwarding strategy for the specified prefixes:
+ ; <prefix> <strategy>
+ strategy_choice
+ {
+ / /localhost/nfd/strategy/best-route
+ /localhost /localhost/nfd/strategy/multicast
+ /localhost/nfd /localhost/nfd/strategy/best-route
+ /ndn/broadcast /localhost/nfd/strategy/multicast
+ }
+
+ ; Declare network region names
+ ; These are used for mobility support. An Interest carrying a Link object is
+ ; assumed to have reached the producer region if any delegation name in the
+ ; Link object is a prefix of any region name.
+ network_region
+ {
+ ; /example/region1
+ ; /example/region2
+ }
}
; The face_system section defines what faces and channels are created.
face_system
{
- ; The unix section contains settings of UNIX stream faces and channels.
+ ; The unix section contains settings of Unix stream faces and channels.
+ ; Unix channel is always listening; delete unix section to disable
+ ; Unix stream faces and channels.
+ ;
+ ; The ndn-cxx library expects unix:///var/run/nfd.sock
+ ; to be used as the default transport option. Please change
+ ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
+ ; if you need to disable unix sockets.
unix
{
- path /var/run/nfd.sock ; UNIX stream listener path
+ path /var/run/nfd.sock ; Unix stream listener path
}
; The tcp section contains settings of TCP faces and channels.
@@ -72,28 +98,73 @@
port 6363 ; UDP unicast port number
enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
- idle_timeout 600 ; idle time (seconds) before closing a UDP unicast face
+
+ ; idle time (seconds) before closing a UDP unicast face, the actual timeout would be
+ ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
+ idle_timeout 600
+
keep_alive_interval 25; interval (seconds) between keep-alive refreshes
; UDP multicast settings
; NFD creates one UDP multicast face per NIC
+ ;
+ ; In multi-homed Linux machines these settings will NOT work without
+ ; root or settings the appropriate permissions:
+ ;
+ ; sudo setcap cap_net_raw=eip /full/path/nfd
+ ;
mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
mcast_port 56363 ; UDP multicast port number
mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
}
; The ether section contains settings of Ethernet faces and channels.
+ ; These settings will NOT work without root or setting the appropriate
+ ; permissions:
+ ;
+ ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
+ ;
+ ; You may need to install a package to use setcap:
+ ;
+ ; **Ubuntu:**
+ ;
+ ; sudo apt-get install libcap2-bin
+ ;
+ ; **Mac OS X:**
+ ;
+ ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
+ ; tar zxvf ChmodBPF.tar.gz
+ ; open ChmodBPF/Install\ ChmodBPF.app
+ ;
+ ; or manually:
+ ;
+ ; sudo chgrp admin /dev/bpf*
+ ; sudo chmod g+rw /dev/bpf*
+
ether
{
; Ethernet multicast settings
; NFD creates one Ethernet multicast face per NIC
+
mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
}
+
+ ; The websocket section contains settings of WebSocket faces and channels.
+
+ websocket
+ {
+ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
+ port 9696 ; WebSocket listener port number
+ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
+ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
+ }
}
+; The authorizations section grants privileges to authorized keys.
authorizations
{
+ ; An authorize section grants privileges to a NDN certificate.
authorize
{
certfile certs/localhost_daemons_nfd.ndncert
@@ -114,6 +185,19 @@
strategy-choice
}
}
+
+ ; You may have multiple authorize sections that specify additional
+ ; certificates and their privileges.
+
+ ; authorize
+ ; {
+ ; certfile keys/this_cert_does_not_exist.ndncert
+ ; authorize
+ ; privileges
+ ; {
+ ; faces
+ ; }
+ ; }
}
rib
@@ -160,7 +244,8 @@
; filter
; {
; type name ; condition on interest name (w/o signature)
- ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>{3}$
+ ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
+ ; ; timestamp
; }
; checker
; {
@@ -202,7 +287,7 @@
; ; file-name keys/ndn-testbed.ndncert
; ; }
; }
- ;
+
; The following localhop_security should be enabled when NFD runs on a hub,
; which accepts all remote registrations and is a short-term solution.
; localhop_security
@@ -213,14 +298,19 @@
; }
; }
- remote_register
+ auto_prefix_propagate
{
cost 15 ; forwarding cost of prefix registered on remote router
- timeout 10000 ; timeout (in milliseconds) of remote prefix registration command
- retry 0 ; maximum number of retries for each remote prefix registration command
+ timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
- refresh_interval 300 ; interval (in seconds) before refreshing the registration
+ refresh_interval 300 ; interval (in seconds) before refreshing the propagation
; This setting should be less than face_system.udp.idle_time,
; so that the face is kept alive on the remote router.
+
+ base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
+ max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
+ ; for consequent retries, the wait time before each retry is calculated based on the back-off
+ ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
+ ; retry unless beyond the max_retry_wait, in which case max_retry_wait is set as the wait time.
}
}
diff --git a/nfd/debian/nfd.install b/nfd/debian/nfd.install
index b8b6b86..a4feb55 100644
--- a/nfd/debian/nfd.install
+++ b/nfd/debian/nfd.install
@@ -1,6 +1,13 @@
-etc/ndn/*
-usr/bin/*
-usr/share/*
+etc/ndn/nfd.conf.sample
+
+usr/bin/nfd
+usr/bin/nfd-status
+usr/bin/nfdc
+
+usr/share/man/man1/nfd-status.1
+usr/share/man/man1/nfd.1
+usr/share/man/man1/nfdc.1
+
debian/nfd-start usr/bin/
debian/nfd-stop usr/bin/
debian/nfd.conf etc/ndn/
diff --git a/nfd/debian/nfd.postinst b/nfd/debian/nfd.postinst
index 23e3794..84463aa 100644
--- a/nfd/debian/nfd.postinst
+++ b/nfd/debian/nfd.postinst
@@ -12,7 +12,7 @@
(
export HOME="/var/lib/ndn/nfd"
- if [ -z "$(ndnsec-get-default)" ]; then
+ if [ -z "$(ndnsec-get-default 2>/dev/null)" ]; then
ndnsec-keygen "/localhost/daemons/nfd" | ndnsec-install-cert -
fi
diff --git a/nfd/debian/rules b/nfd/debian/rules
index cde2d83..42884d3 100755
--- a/nfd/debian/rules
+++ b/nfd/debian/rules
@@ -41,10 +41,12 @@
dh_systemd_enable -pnfd
dh_systemd_enable -pnfd-status-http-server
dh_systemd_enable -pndn-autoconfig-server --no-enable
+ dh_systemd_enable -pndn-autoconfig-client --no-enable
dh_systemd_enable -pnfd-autoreg --no-enable
override_dh_systemd_start:
dh_systemd_start -pnfd
dh_systemd_start -pnfd-status-http-server
dh_systemd_start -pndn-autoconfig-server --no-start
+ dh_systemd_start -pndn-autoconfig-client --no-start
dh_systemd_start -pnfd-autoreg --no-start