Merge remote-tracking branch 'gerrit/master'
diff --git a/README.md b/README.md
index b0d6426..2adfa16 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,13 @@
-NDN Binary packages for Ubuntu
-==============================
+# NDN binary packages for Ubuntu
 
-Prerequisites
--------------
+## Prerequisites
 
 The following packages needs to be installed in order to build source .deb package to be
 upload to PPA:
 
     sudo apt-get install git devscripts debhelper dh-make
 
-Building source packages
-------------------------
+## Building source packages
 
 The build process is very much automated and the following command can be used to build
 all packages and upload them to the ppa.
@@ -22,13 +19,12 @@
 
 To build a specific package, go to the package's folder and run the same `make dput` command.
 
-Advanced uses
--------------
+## Advanced uses
 
-The scripts by default create source packages for Ubuntu 12.04 (precise), 13.10 (saucy),
-and 14.04 (trusty).  If necessary, default actions and distributions can be overriden:
+The scripts by default create source packages for Ubuntu 16.04 (xenial) and 18.04 (bionic).
+If necessary, default actions and distributions can be overriden:
 
-To only build source packages (no upload) only for Ubuntu 12.04:
+To only build source packages (no upload), only for Ubuntu 12.04:
 
     make build DISTROS=precise
 
@@ -36,4 +32,4 @@
 
     make build DEBUILD=debuild DISTROS=precise
 
-The build package will be in `<package-folder>/work/<package-name>_<version>.deb`
+The built package will be in `<package-folder>/work/<package-name>_<version>.deb`
diff --git a/libchronosync/debian/control b/libchronosync/debian/control
index 27fc1d6..413ce5f 100644
--- a/libchronosync/debian/control
+++ b/libchronosync/debian/control
@@ -23,9 +23,7 @@
 Package: libchronosync-dev
 Section: libdevel
 Architecture: i386 amd64 arm64 armel armhf ppc64el
-Depends: python (>= 2.7.0),
- pkg-config (>= 0.26),
- libndn-cxx-dev (>= 0.6.1),
+Depends: libndn-cxx-dev (>= 0.6.1),
  libchronosync (= ${binary:Version})
 Description: Development headers and libraries of sync library for multiuser realtime applications for NDN
 
diff --git a/libpsync/Makefile b/libpsync/Makefile
new file mode 100644
index 0000000..9865ef2
--- /dev/null
+++ b/libpsync/Makefile
@@ -0,0 +1,16 @@
+# URL for git clone
+GIT_URL=https://github.com/named-data/PSync.git
+
+# Tag name or commit hash for checkout
+GIT_VERSION=0.1.0
+
+# Package name
+NAME=libpsync
+
+# Package version
+VERSION=0.1.0
+
+# PPA version
+PPA_VERSION=1
+
+include ../packaging.mk
diff --git a/libpsync/debian/changelog b/libpsync/debian/changelog
new file mode 100644
index 0000000..6ae7bc7
--- /dev/null
+++ b/libpsync/debian/changelog
@@ -0,0 +1,5 @@
+libpsync (0.1.0-ppa0~DISTRO) DISTRO; urgency=low
+
+  * Initial release
+
+ -- Ashlesh Gawande <agawande@memphis.edu>  Mon, 14 Jan 2019 18:36:57 -0600
diff --git a/libpsync/debian/compat b/libpsync/debian/compat
new file mode 100644
index 0000000..9a03714
--- /dev/null
+++ b/libpsync/debian/compat
@@ -0,0 +1 @@
+10
\ No newline at end of file
diff --git a/libpsync/debian/control b/libpsync/debian/control
new file mode 100644
index 0000000..8e1301a
--- /dev/null
+++ b/libpsync/debian/control
@@ -0,0 +1,37 @@
+Source: libpsync
+Priority: optional
+Maintainer: Ashlesh Gawande <agawande@memphis.edu>
+Build-Depends: debhelper (>= 8.0.0),
+ python (>= 2.7.0),
+ pkg-config (>= 0.26),
+ python-sphinx (>= 1.1.3),
+ libboost-all-dev (>= 1.53.0),
+ libndn-cxx-dev (>= 0.6.3),
+ git
+Standards-Version: 4.1.2
+Section: libs
+Homepage: https://named-data.net/doc/PSync/
+Vcs-Git: git://github.com/named-data/PSync.git
+Vcs-Browser: https://github.com/named-data/PSync
+
+Package: libpsync
+Section: libs
+Architecture: i386 amd64 arm64 armel armhf ppc64el
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Partial and Full Name Synchronization Library for NDN
+
+Package: libpsync-dev
+Section: libdevel
+Architecture: i386 amd64 arm64 armel armhf ppc64el
+Depends: libndn-cxx-dev (>= 0.6.3),
+ libpsync (= ${binary:Version})
+Description: Development headers and libraries of Partial and Full Name Synchronization Library for NDN
+
+Package: libpsync-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends:
+ libpsync (= ${binary:Version}),
+ ${misc:Depends}
+Description: debugging symbols for libpsync
\ No newline at end of file
diff --git a/libpsync/debian/copyright b/libpsync/debian/copyright
new file mode 100644
index 0000000..181437c
--- /dev/null
+++ b/libpsync/debian/copyright
@@ -0,0 +1,36 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: PSync
+Source: http://github.com/named-data/PSync
+
+Files: *
+Copyright: Copyright (c) 2014-2019 The University of Memphis
+
+License: LGPL-3+
+ PSync 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.
+ .
+ PSync 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
+ PSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+
+Files: debian/*
+Copyright: 2019 Ashlesh Gawande <agawande@memphis.edu>
+License: Apache 2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+     http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the complete text of the Apache License 2.0 can
+ be found in "/usr/share/common-licenses/Apache-2.0"
\ No newline at end of file
diff --git a/libpsync/debian/libpsync-dev.dirs b/libpsync/debian/libpsync-dev.dirs
new file mode 100644
index 0000000..4418816
--- /dev/null
+++ b/libpsync/debian/libpsync-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
diff --git a/libpsync/debian/libpsync-dev.install b/libpsync/debian/libpsync-dev.install
new file mode 100644
index 0000000..61c9409
--- /dev/null
+++ b/libpsync/debian/libpsync-dev.install
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/*/lib*.so
+usr/lib/*/pkgconfig/*
+usr/share/pkgconfig/*
diff --git a/libpsync/debian/libpsync.install b/libpsync/debian/libpsync.install
new file mode 100644
index 0000000..146d0ad
--- /dev/null
+++ b/libpsync/debian/libpsync.install
@@ -0,0 +1 @@
+usr/lib/*/*.so.*
\ No newline at end of file
diff --git a/libpsync/debian/rules b/libpsync/debian/rules
new file mode 100755
index 0000000..4006ae8
--- /dev/null
+++ b/libpsync/debian/rules
@@ -0,0 +1,39 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
+CXXFLAGS += -std=c++14
+LIBDIR := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+%:
+	dh $@ --parallel
+
+override_dh_auto_configure:
+	./waf configure --with-examples --prefix=/usr --sysconfdir=/etc --libdir="$(LIBDIR)" --localstatedir=/var --boost-libs="$(LIBDIR)"
+
+override_dh_auto_build:
+	./waf build
+
+override_dh_auto_install:
+	./waf install --destdir=debian/tmp
+
+override_dh_auto_clean:
+	./waf distclean
+
+override_dh_clean:
+	dh_clean
+	./waf distclean
+	rm -rf .waf-1*
+	rm -f .waf-tools/*.pyc
+	rm -f docs/*.pyc
+
+override_dh_auto_test:
+
+.PHONY: override_dh_strip
+override_dh_strip:
+	dh_strip --dbg-package=libpsync-dbg
+
diff --git a/libpsync/debian/source/format b/libpsync/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/libpsync/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/ndn-tools/debian/ndnping.upstart b/ndn-tools/debian/ndnping.upstart
deleted file mode 100644
index 75d9cc4..0000000
--- a/ndn-tools/debian/ndnping.upstart
+++ /dev/null
@@ -1,21 +0,0 @@
-description "NDN TLV ping 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
-    FLAGS=""
-    PREFIX="/localhost/ndnpingserver"
-    if [ -f /etc/default/ndnping ]; then
-        . /etc/default/ndnping
-    fi
-    export HOME=/var/lib/ndn/ndnping
-    exec /usr/bin/ndnpingserver "$PREFIX" $FLAGS
-end script
diff --git a/ndncert/debian/ndncert-server.upstart b/ndncert/debian/ndncert-server.upstart
deleted file mode 100644
index 22ab33b..0000000
--- a/ndncert/debian/ndncert-server.upstart
+++ /dev/null
@@ -1,21 +0,0 @@
-description "NDN Certificate Management System Library"
-author      "Zhiyi Zhang <zhiyi@cs.ucla.edu>"
-
-start on started  nfd
-stop  on stopping nfd
-
-respawn
-respawn limit unlimited
-
-setuid ndn
-setgid ndn
-
-script
-  FLAGS = ""
-  if [ -f /etc/default/ndncert ]; then
-      . /etc/default/ndncert
-  fi
-
-  export HOME=/var/lib/ndn/ndncert
-  exec /usr/bin/ndncert-ca-server -c /etc/ndncert/ndncert-ca.conf $FLAGS
-end script
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.upstart b/ndnmap-data-collector/debian/ndnmap-data-collector.upstart
deleted file mode 100644
index 2cf0cb9..0000000
--- a/ndnmap-data-collector/debian/ndnmap-data-collector.upstart
+++ /dev/null
@@ -1,21 +0,0 @@
-description "New NDN XML Status client"
-author      "John DeHart <jdd@wustl.edu>"
-
-start on started  nfd
-stop  on stopping nfd
-
-respawn
-respawn limit unlimited
-
-setuid ndn
-setgid ndn
-
-script
-    FLAGS=""
-    PREFIX=""
-    if [ -f /etc/default/ndnmap-data-collector  ]; then
-        . /etc/default/ndnmap-data-collector
-    fi
-    export HOME=/var/lib/ndn/ndnmapDataCollector
-    exec /usr/bin/ndnmapDataCollectorClient $FLAGS -p $PREFIX
-end script
diff --git a/ndns/debian/ndns.upstart b/ndns/debian/ndns.upstart
deleted file mode 100644
index a494be6..0000000
--- a/ndns/debian/ndns.upstart
+++ /dev/null
@@ -1,21 +0,0 @@
-description "Domain Name Service for Named Data Networking"
-author      "Xiaoke Jiang <shock.jiang@gmail.com>"
-
-start on started  nfd
-stop  on stopping nfd
-
-respawn
-respawn limit 10 5
-# respawn limit unlimited
-
-setuid ndns
-setgid ndns
-
-script
-  export HOME=/var/lib/ndns
-  NDNS_DAEMON_ENABLE=false
-  . /etc/default/ndns
-  if [ "$NDNS_DAEMON_ENABLE" = "true" ]; then
-    exec /usr/bin/ndns-daemon -c /etc/ndns/ndns.conf
-  fi
-end script
diff --git a/ndns/debian/rules b/ndns/debian/rules
index f2a58ae..618b4ae 100755
--- a/ndns/debian/rules
+++ b/ndns/debian/rules
@@ -18,7 +18,7 @@
 	dh $@ --parallel --with=systemd
 
 override_dh_auto_configure:
-	LDFLAGS="${LDFLAGS}" CXXFLAGS="$(CXXFLAGS)" ./waf configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --boost-libs="$(LIBDIR)"
+	LDFLAGS="${LDFLAGS}" CXXFLAGS="$(CXXFLAGS)" ./waf configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --boost-libs="$(LIBDIR)"
 
 override_dh_auto_build:
 	./waf build
diff --git a/nfd/debian/ndn-autoconfig-client.upstart b/nfd/debian/ndn-autoconfig-client.upstart
deleted file mode 100644
index e467300..0000000
--- a/nfd/debian/ndn-autoconfig-client.upstart
+++ /dev/null
@@ -1,17 +0,0 @@
-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.upstart b/nfd/debian/ndn-autoconfig-server.upstart
deleted file mode 100644
index e5cbef2..0000000
--- a/nfd/debian/ndn-autoconfig-server.upstart
+++ /dev/null
@@ -1,25 +0,0 @@
-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
-  FACE_URI=""
-  ROUTABLE_PREFIXES=""
-  ENABLE_DAEMON=false
-  if [ -f /etc/default/ndn-autoconfig-server ]; then
-      . /etc/default/ndn-autoconfig-server
-  fi
-
-  if [ "$FACE_URI" != "" ]; then
-    export HOME=/var/lib/ndn/ndn-autoconfig-server
-    exec /usr/bin/ndn-autoconfig-server $ROUTABLE_PREFIXES $FACE_URI
-  fi
-end script
diff --git a/nfd/debian/nfd-autoreg.upstart b/nfd/debian/nfd-autoreg.upstart
deleted file mode 100644
index f7c1436..0000000
--- a/nfd/debian/nfd-autoreg.upstart
+++ /dev/null
@@ -1,25 +0,0 @@
-description "NFD Autoreg 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
-  BLACKLIST=""
-  WHITELIST=""
-  ALL_FACES_PREFIXES=""
-  ON_DEMAND_FACES_PREFIXES=""
-  FLAGS=""
-  if [ -f /etc/default/nfd-autoreg ]; then
-      . /etc/default/nfd-autoreg
-  fi
-
-  export HOME=/var/lib/ndn/nfd-autoreg
-  exec /usr/bin/nfd-autoreg $BLACKLIST $WHITELIST $ON_DEMAND_FACES_PREFIXES $ALL_FACES_PREFIXES $FLAGS
-end script
diff --git a/nfd/debian/nfd-status-http-server.upstart b/nfd/debian/nfd-status-http-server.upstart
deleted file mode 100644
index df28359..0000000
--- a/nfd/debian/nfd-status-http-server.upstart
+++ /dev/null
@@ -1,17 +0,0 @@
-description "NFD HTTP Status Server"
-author      "Alexander Afanasyev <alexander.afanasyev@ucla.edu>"
-
-start on started  nfd
-stop  on stopping nfd
-
-respawn
-respawn limit unlimited
-
-script
-  FLAGS=""
-  if [ -f /etc/default/nfd-status-http-server ]; then
-      . /etc/default/nfd-status-http-server
-  fi
-  export HOME=/tmp/nfd-status-http-server
-  exec /usr/bin/nfd-status-http-server $FLAGS
-end script
diff --git a/nfd/debian/nfd.conf b/nfd/debian/nfd.conf
index a3232d7..d309796 100644
--- a/nfd/debian/nfd.conf
+++ b/nfd/debian/nfd.conf
@@ -1,6 +1,9 @@
 ; The general section contains settings of nfd process.
 general
 {
+  ; Specify a user and/or group for NFD to drop privileges to
+  ; when not performing privileged tasks. NFD does not drop
+  ; privileges by default.
   user ndn
   group ndn
 }
@@ -29,7 +32,8 @@
   ; Run:
   ;   nfd --modules
   ;
-  ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
+  ; Or look for NFD_LOG_INIT(<module name>) statements in source files.
+  ; Note that the "nfd." prefix can be omitted.
   ;
   ; Example module-level settings:
   ;
@@ -40,11 +44,18 @@
 ; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
 tables
 {
-
   ; ContentStore size limit in number of packets
   ; default is 65536, about 500MB with 8KB packet size
   cs_max_packets 65536
 
+  ; Set the CS replacement policy.
+  ; Available policies are: priority_fifo, lru
+  cs_policy lru
+
+  ; Set a policy to decide whether to cache or drop unsolicited Data.
+  ; Available policies are: drop-all, admit-local, admit-network, admit-all
+  cs_unsolicited_policy drop-all
+
   ; Set the forwarding strategy for the specified prefixes:
   ;   <prefix> <strategy>
   strategy_choice
@@ -69,89 +80,121 @@
 ; The face_system section defines what faces and channels are created.
 face_system
 {
-  ; The unix section contains settings of Unix stream faces and channels.
-  ; Unix channel is always listening; delete unix section to disable
+  ; This section contains options that apply to multiple face protocols.
+  general
+  {
+    ; Set to 'no' to disable congestion marking on supported faces, default 'yes'
+    enable_congestion_marking yes
+  }
+
+  ; The unix section contains settings for Unix stream faces and channels.
+  ; A Unix channel is always listening; delete the 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.
+  ; 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 want to
+  ; disable Unix sockets and use TCP instead.
   unix
   {
     path /var/run/nfd.sock ; Unix stream listener path
   }
 
-  ; The tcp section contains settings of TCP faces and channels.
+  ; The tcp section contains settings for TCP faces and channels.
   tcp
   {
     listen yes ; set to 'no' to disable TCP listener, default 'yes'
     port 6363 ; TCP listener 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'
+
+    ; A TCP face has local scope if the local and remote IP addresses match the whitelist but not the blacklist
+    local
+    {
+      whitelist
+      {
+        subnet 127.0.0.0/8
+        subnet ::1/128
+      }
+      blacklist
+      {
+      }
+    }
   }
 
-  ; The udp section contains settings of UDP faces and channels.
-  ; UDP channel is always listening; delete udp section to disable UDP
+  ; The udp section contains settings for UDP faces and channels.
   udp
   {
-    port 6363 ; UDP unicast port number
+    ; UDP unicast settings.
+    listen yes ; set to 'no' to disable UDP listener, default 'yes'
+    port 6363 ; UDP listener 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 time (seconds) before closing a UDP unicast face, the actual timeout would be
-    ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
+    ; Time (in seconds) before closing an idle UDP unicast face.
+    ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
+    ; The default is 600 (10 minutes).
     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
-    ;
+    ; UDP multicast settings.
+    ; By default, NFD creates one UDP multicast face per NIC.
     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)
+    mcast_group 224.0.23.170 ; UDP multicast group (IPv4)
+    mcast_port 56363 ; UDP multicast port number (IPv4)
+    mcast_group_v6 ff02::1234 ; UDP multicast group (IPv6)
+    mcast_port_v6 56363 ; UDP multicast port number (IPv6)
+    mcast_ad_hoc no ; set to 'yes' to make all UDP multicast faces "ad hoc", default 'no'
+
+    ; Whitelist and blacklist can contain, in no particular order:
+    ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
+    ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
+    ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
+    ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
+    ; - a single asterisk ('*') that matches all interfaces
+    ; By default, all interfaces are whitelisted.
+    whitelist
+    {
+      *
+    }
+    blacklist
+    {
+    }
   }
 
-  ; 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*
-
+  ; The ether section contains settings for Ethernet faces and channels.
   ether
   {
-    ; Ethernet multicast settings
-    ; NFD creates one Ethernet multicast face per NIC
+    ; Ethernet unicast settings.
+    listen yes ; set to 'no' to disable Ethernet listener, default 'yes'
 
+    ; Time (in seconds) before closing an idle Ethernet unicast face.
+    ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
+    ; The default is 600 (10 minutes).
+    idle_timeout 600
+
+    ; Ethernet multicast settings.
+    ; By default, 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
+    mcast_ad_hoc no ; set to 'yes' to make all Ethernet multicast faces "ad hoc", default 'no'
+
+    ; Whitelist and blacklist can contain, in no particular order:
+    ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
+    ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
+    ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
+    ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
+    ; - a single asterisk ('*') that matches all interfaces
+    ; By default, all interfaces are whitelisted.
+    whitelist
+    {
+      *
+    }
+    blacklist
+    {
+    }
   }
 
-  ; The websocket section contains settings of WebSocket faces and channels.
-
+  ; The websocket section contains settings for WebSocket faces and channels.
   websocket
   {
     listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
@@ -170,19 +213,22 @@
     certfile certs/localhost_daemons_nfd.ndncert
     privileges
     {
-        faces
-        fib
-        strategy-choice
+      faces
+      fib
+      cs
+      strategy-choice
     }
   }
 
   authorize
   {
-    certfile any
+    certfile any ; "any" authorizes command interests signed under any certificate,
+                 ; i.e., no actual validation.
     privileges
     {
-        faces
-        strategy-choice
+      faces
+      cs
+      strategy-choice
     }
   }
 
@@ -217,9 +263,9 @@
   ; {
   ;   ; This section defines the trust model for NFD RIB Management. It consists of rules and
   ;   ; trust-anchors, which are briefly defined in this file.  For more information refer to
-  ;   ; manpage of ndn-validator.conf:
+  ;   ; validator configuration file format documentation:
   ;   ;
-  ;   ;     man ndn-validator.conf
+  ;   ;    https://named-data.net/doc/ndn-cxx/current/tutorials/security-validator-config.html
   ;   ;
   ;   ; A trust-anchor is a pre-trusted certificate.  This can be any certificate that is the
   ;   ; root of certification chain (e.g., NDN testbed root certificate) or an existing
@@ -239,13 +285,12 @@
   ;
   ;   rule
   ;   {
-  ;     id "NRD Prefix Registration Command Rule"
+  ;     id "RIB Registration Command Rule"
   ;     for interest                         ; rule for Interests (to validate CommandInterests)
   ;     filter
   ;     {
-  ;       type name                          ; condition on interest name (w/o signature)
-  ;       regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
-  ;                                                                           ; timestamp
+  ;       type name                          ; condition on interest name (w/o SignatureInfo/SignatureValue)
+  ;       regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<><><>$
   ;     }
   ;     checker
   ;     {
@@ -255,7 +300,7 @@
   ;       {
   ;         type name                        ; key locator must be the certificate name of the
   ;                                          ; signing key
-  ;         regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
+  ;         regex ^<>*<KEY><>$
   ;       }
   ;     }
   ;   }
@@ -266,7 +311,7 @@
   ;     filter
   ;     {
   ;       type name                          ; condition on data name
-  ;       regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
+  ;       regex ^<>*<KEY><><><>$
   ;     }
   ;     checker
   ;     {
@@ -313,4 +358,8 @@
     ; 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.
   }
+
+  ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate)
+  ; will be readvertised into local NLSR daemon.
+  readvertise_nlsr no
 }
diff --git a/nfd/debian/nfd.upstart b/nfd/debian/nfd.upstart
deleted file mode 100644
index bab3f79..0000000
--- a/nfd/debian/nfd.upstart
+++ /dev/null
@@ -1,30 +0,0 @@
-# nfd.conf
-#
-# NDN Forwarding Daemon
-
-description "NDN forwarding daemon"
-author      "Alexander Afanasyev <alexander.afanasyev@ucla.edu>"
-
-start on (local-filesystems and net-device-up IFACE!=lo)
-stop on runlevel [!2345]
-
-respawn
-respawn limit unlimited
-
-env HOME=/var/lib/ndn/nfd
-export HOME
-
-exec /usr/bin/nfd --config /etc/ndn/nfd.conf 2>> /var/log/ndn/nfd.log
-
-post-start script
-  if [ -f /etc/ndn/nfd-init.sh ]; then
-      sleep 2 # post-start is executed just after nfd process starts, but there is no guarantee
-              # that all initialization has been finished
-      . /etc/ndn/nfd-init.sh
-  fi
-end script
-
-post-stop exec sleep 2
-
-# The following option is useful, but not supported on Ubuntu 12.04
-# reload signal SIGHUP
diff --git a/nlsr/debian/control b/nlsr/debian/control
index b4bfd75..e5b147a 100644
--- a/nlsr/debian/control
+++ b/nlsr/debian/control
@@ -7,6 +7,7 @@
  pkg-config (>= 0.26),
  libndn-cxx-dev (>= 0.6.2),
  libchronosync-dev (>= 0.5.1),
+ libpsync-dev (>= 0.1.0),
  libboost-all-dev (>= 1.53.0),
  python-sphinx (>= 1.1.3),
  git
diff --git a/nlsr/debian/nlsr.upstart b/nlsr/debian/nlsr.upstart
deleted file mode 100644
index d4ad653..0000000
--- a/nlsr/debian/nlsr.upstart
+++ /dev/null
@@ -1,24 +0,0 @@
-# nlsr.conf
-#
-# NDN NLSR Routing Daemon
-
-description "NDN NLSR Routing Daemon"
-author      "John DeHart <jdd@wustl.edu>"
-
-start on started  nfd
-stop  on stopping nfd
-
-respawn
-respawn limit unlimited
-
-setuid nlsr
-setgid nlsr
-
-pre-start exec sleep 2
-
-script
-  export HOME=/var/lib/ndn/nlsr
-  exec /usr/bin/nlsr -f /etc/ndn/nlsr/nlsr.conf
-end script
-
-post-stop exec sleep 2
diff --git a/repo-ng/debian/repo-ng.upstart b/repo-ng/debian/repo-ng.upstart
deleted file mode 100644
index 2826f86..0000000
--- a/repo-ng/debian/repo-ng.upstart
+++ /dev/null
@@ -1,16 +0,0 @@
-description "New generation of NDN repo"
-author      "Alexander Afanasyev <alexander.afanasyev@ucla.edu>"
-
-start on started  nfd
-stop  on stopping nfd
-
-respawn
-respawn limit unlimited
-
-setuid ndn
-setgid ndn
-
-script
-  export HOME=/var/lib/ndn/repo-ng
-  exec /usr/bin/ndn-repo-ng -c /etc/ndn/repo-ng.conf
-end script