commit | e4631003a99e130dd0746be8a24fd49fd060aa6d | [log] [tgz] |
---|---|---|
author | Davide Pesavento <davide.pesavento@lip6.fr> | Fri Mar 21 20:55:36 2014 +0100 |
committer | Alexander Afanasyev <alexander.afanasyev@ucla.edu> | Fri Mar 21 15:44:42 2014 -0700 |
tree | 35d58a309d79c3fbbc2cb4d55f8224e262a1714c | |
parent | d8d4d986566403e1b9b58f13129150a54157f82b [diff] |
face: silence silly warning thrown by clang. Clang 3.3 complains about a "missing field initializer" for struct ifreq. However, according to the standard, if there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, the remainder of the aggregate shall be initialized implicitly as if they were declared static, i.e. with zero or default-constructed value. Therefore using "= {0}" is correct (and common practice in C). Emitting a warning doesn't make sense. As a matter of fact recent GCC releases disabled it. Luckily this is C++ and we can simply use the "empty braces" initializer (which wouldn't be valid C99 syntax) to silence the compiler. Change-Id: Ibee8d17cc9b5d0eaa5270c52f3596b7994b5e911
This README uses SYSCONFDIR
when referring to the default locations of various NFD configuration files. By default, SYSCONFDIR
is set to /usr/local/etc
. If you override PREFIX
, then SYSCONFDIR
will default to PREFIX/etc
.
You may override SYSCONFDIR
and PREFIX
by specifying their corresponding options during installation:
./waf install --prefix <path/for/prefix> --sysconfdir <some/other/path>
NFD's runtime settings may be modified via configuration file. After installation, a working sample configuration is provided at SYSCONFDIR/ndn/nfd.conf.sample
. At startup, NFD will attempt to read the default configuration file location: SYSCONFDIR/ndn/nfd.conf
.
You may also specify an alternative configuration file location by running NFD with:
nfd --config </path/to/nfd.conf>
Once again, note that you may simply copy or rename the provided sample configuration and have an almost fully configured NFD. However, this NFD will be unable to add FIB entries or perform other typical operation tasks until you authorize an NDN certificate with the appropriate privileges.
Many NFD management protocols require signed commands to be processed (e.g. FIB modification, Face creation/destructions, etc.). You will need an NDN certificate to use any application that issues signed commands.
If you do not already have NDN certificate, you can generate one with the following commands:
Generate and install a self-signed identity certificate:
ndnsec-keygen /`whoami` | ndnsec-install-cert -
Note that the argument to ndnsec-key will be the identity name of the new key (in this case, /your-username
). Identity names are hierarchical NDN names and may have multiple components (e.g. /ndn/ucla/edu/alice
). You may create additional keys and identities as you see fit.
Dump the NDN certificate to a file:
The following commands assume that you have not modified PREFIX
or SYSCONFDIR
If you have, please substitute /usr/local/etc
for the appropriate value (the overriden SYSCONFDIR
or PREFIX/etc
if you changed PREFIX
).
sudo mkdir -p /usr/local/etc/ndn/keys ndnsec-cert-dump -i /`whoami` > default.ndncert sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert
The ether configuration file section contains settings for 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*