Compare commits
466
Commits
NLSR-0.0-ccnx
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd1e940648 | ||
|
|
5849ee7582 | ||
|
|
2ecb059eb9 | ||
|
|
20377645fb | ||
|
|
6593a43fa3 | ||
|
|
931ca9f576 | ||
|
|
cd77aabaa9 | ||
|
|
eed3209c8d | ||
|
|
5110a8a4ee | ||
|
|
52f16644ab | ||
|
|
43f37a08fc | ||
|
|
ecb0b7180e | ||
|
|
771a0de40c | ||
|
|
907675bd06 | ||
|
|
7543f590a3 | ||
|
|
a2599dafa9 | ||
|
|
f7ea150405 | ||
|
|
658fd85bc7 | ||
|
|
070ee3b52d | ||
|
|
e0ad5808e3 | ||
|
|
fa54ee99b4 | ||
|
|
1e9faf1d1b | ||
|
|
1b640fd092 | ||
|
|
fcef058206 | ||
|
|
7d2d689d89 | ||
|
|
65ee992149 | ||
|
|
69904fcb73 | ||
|
|
1954a0c5ce | ||
|
|
d1cb063482 | ||
|
|
ede5963845 | ||
|
|
c1d0e8e34d | ||
|
|
0c87b12458 | ||
|
|
fabe9729b9 | ||
|
|
135288cf4f | ||
|
|
8de8a8b37a | ||
|
|
b032fcb38f | ||
|
|
583473a76f | ||
|
|
e28d8756ce | ||
|
|
d1f1df802c | ||
|
|
a3a63975d1 | ||
|
|
ea94f83039 | ||
|
|
cf14807f7d | ||
|
|
7bc3d438e7 | ||
|
|
ba8a4ed2d2 | ||
|
|
7ae8b08fc2 | ||
|
|
6f0f35d96d | ||
|
|
3781c7ebc1 | ||
|
|
22520e68f5 | ||
|
|
6184c2088b | ||
|
|
e63b7fa7dc | ||
|
|
04bfe0465a | ||
|
|
30d96e4875 | ||
|
|
6002e6ab4b | ||
|
|
5d93aa5b04 | ||
|
|
d90338d230 | ||
|
|
cf06444860 | ||
|
|
214032e7ac | ||
|
|
0af4627ad7 | ||
|
|
e4edb3952c | ||
|
|
d8d6bbcbe6 | ||
|
|
4a90b9ae52 | ||
|
|
7a231c0dc1 | ||
|
|
57a8717ec7 | ||
|
|
0421bc6bcd | ||
|
|
0ad01f3834 | ||
|
|
96ebd9b7c3 | ||
|
|
a122abf5f6 | ||
|
|
4b9d30f8e2 | ||
|
|
f6be8e37f6 | ||
|
|
0db4d4d8fc | ||
|
|
f89878c12c | ||
|
|
fd021d5e3d | ||
|
|
1158c55878 | ||
|
|
427e012304 | ||
|
|
4a5334cba7 | ||
|
|
55d1b5c2c0 | ||
|
|
cb065f1773 | ||
|
|
328fc11217 | ||
|
|
6b388fc36d | ||
|
|
f75bfdaa34 | ||
|
|
842b1cf1f0 | ||
|
|
d21d83d892 | ||
|
|
4187857a9a | ||
|
|
d0816a3ced | ||
|
|
c64bed22a8 | ||
|
|
9ea3639be2 | ||
|
|
cf22053914 | ||
|
|
348321368d | ||
|
|
08bce9c325 | ||
|
|
0b1b7d9ff4 | ||
|
|
15052408e9 | ||
|
|
dec85d2da4 | ||
|
|
af7a2113e4 | ||
|
|
0b0eddd60c | ||
|
|
9ecbdc95c5 | ||
|
|
b2fea6d79f | ||
|
|
d3b60a8b24 | ||
|
|
0da3eab4da | ||
|
|
82a34c2cd8 | ||
|
|
85998a1dc9 | ||
|
|
7e3f6d75c8 | ||
|
|
e3c741da9a | ||
|
|
5859ed3dfb | ||
|
|
e556991595 | ||
|
|
72b2b25cd2 | ||
|
|
7c13ba5448 | ||
|
|
008c9b18a5 | ||
|
|
7526cee087 | ||
|
|
939b6f8652 | ||
|
|
e5002b3fc4 | ||
|
|
32ec3fd51e | ||
|
|
2fa23ea104 | ||
|
|
744e481642 | ||
|
|
8433cfeace | ||
|
|
2e6c8bb896 | ||
|
|
3494f7366a | ||
|
|
05cb728c63 | ||
|
|
057005460e | ||
|
|
e8d8bd5276 | ||
|
|
481010723b | ||
|
|
a08dc3f1f1 | ||
|
|
301220346e | ||
|
|
8df15986ef | ||
|
|
f3c79a6f87 | ||
|
|
cba0ae2f56 | ||
|
|
f1a8ee66de | ||
|
|
d65786a0ea | ||
|
|
e6ba9158e0 | ||
|
|
aa41b04807 | ||
|
|
67758b1fba | ||
|
|
350d58489b | ||
|
|
8c6d8c831a | ||
|
|
0b27c1ff5c | ||
|
|
39cf81a110 | ||
|
|
b0bf8df1bd | ||
|
|
a073e2e23e | ||
|
|
9da6aa7fce | ||
|
|
304bebf64f | ||
|
|
982a58fae5 | ||
|
|
7afe22f410 | ||
|
|
f7da9c542c | ||
|
|
c3ea26f000 | ||
|
|
0d2c38299e | ||
|
|
563611eb20 | ||
|
|
af87575012 | ||
|
|
4964870e9d | ||
|
|
b2ef6adbd3 | ||
|
|
cf8d0eda75 | ||
|
|
437adfeed6 | ||
|
|
357318540d | ||
|
|
14ab329746 | ||
|
|
ed473c6c47 | ||
|
|
ac4b65664f | ||
|
|
d88c1dfdc2 | ||
|
|
9e955bcec7 | ||
|
|
f04f98943d | ||
|
|
2f62338d12 | ||
|
|
ae0a047c41 | ||
|
|
5bcb39e255 | ||
|
|
0fa4c77987 | ||
|
|
22cc1a8d17 | ||
|
|
96861ca49c | ||
|
|
faf49f4c32 | ||
|
|
9212bd43bb | ||
|
|
727d4830d7 | ||
|
|
ff9a62713b | ||
|
|
e18296c270 | ||
|
|
2a1ac616b3 | ||
|
|
a47255c2c5 | ||
|
|
ffb62fa3fb | ||
|
|
114537f6e0 | ||
|
|
922714a0d9 | ||
|
|
5867b5233f | ||
|
|
d40a588e25 | ||
|
|
8f23b5d58e | ||
|
|
9eac4d9830 | ||
|
|
6ebfd7c182 | ||
|
|
b7b5839197 | ||
|
|
813df80e20 | ||
|
|
0bd37314fe | ||
|
|
6a81b77260 | ||
|
|
c0c6bcf7e2 | ||
|
|
098aae410a | ||
|
|
e40377d570 | ||
|
|
7afcab4652 | ||
|
|
e98480b5d1 | ||
|
|
d0a7df337f | ||
|
|
e0d2048d5f | ||
|
|
f14ec357d5 | ||
|
|
c58cc7f596 | ||
|
|
22b5c957c0 | ||
|
|
90173ad966 | ||
|
|
608061b95d | ||
|
|
793e8707a1 | ||
|
|
54a43f06e1 | ||
|
|
820bb66350 | ||
|
|
9b71bbc970 | ||
|
|
3909aa160a | ||
|
|
d5c1a378d1 | ||
|
|
f6bfb14def | ||
|
|
d22da51783 | ||
|
|
a75fdb27c5 | ||
|
|
cd7ca05378 | ||
|
|
b00dc2acea | ||
|
|
0f1bf1dfcd | ||
|
|
8bfd124212 | ||
|
|
7600c90882 | ||
|
|
e9733ed876 | ||
|
|
b9e2c650e6 | ||
|
|
494de4033d | ||
|
|
56d1fae10a | ||
|
|
adad2490e5 | ||
|
|
b23f279353 | ||
|
|
3e105a0493 | ||
|
|
b9c5cecfb2 | ||
|
|
f8852c2d27 | ||
|
|
9461afb721 | ||
|
|
2108808ae3 | ||
|
|
6fa00d923c | ||
|
|
b4567f40fb | ||
|
|
415676b6cc | ||
|
|
c780a6986b | ||
|
|
9eaf3f4417 | ||
|
|
c2c3ae0fd2 | ||
|
|
812af97447 | ||
|
|
e689dd6d8b | ||
|
|
4d2c6c07ae | ||
|
|
30096b8f37 | ||
|
|
3be6466a85 | ||
|
|
f023a88ec1 | ||
|
|
4c2bb361ae | ||
|
|
1de901f161 | ||
|
|
9f93666519 | ||
|
|
48daea20d7 | ||
|
|
218aaef118 | ||
|
|
87911dacd5 | ||
|
|
54e726cf5e | ||
|
|
a4cf402084 | ||
|
|
f590fecfc2 | ||
|
|
6077ea910c | ||
|
|
d1f4f33cfd | ||
|
|
d8c9d8cdab | ||
|
|
feae5574b8 | ||
|
|
4fc69e49a9 | ||
|
|
c6a852234d | ||
|
|
44395237b8 | ||
|
|
c5fa320239 | ||
|
|
41330f4256 | ||
|
|
96bf2f0db8 | ||
|
|
2b057af9e1 | ||
|
|
b71684744f | ||
|
|
b50e51b374 | ||
|
|
3e5120c543 | ||
|
|
ef21d8eab0 | ||
|
|
97e3494256 | ||
|
|
d69f9a3c82 | ||
|
|
63bd0348b3 | ||
|
|
b9d43d06cc | ||
|
|
e2d3fe9d9a | ||
|
|
7b5872ec86 | ||
|
|
fad8e257c0 | ||
|
|
f8b5bcd27e | ||
|
|
800833b7ac | ||
|
|
e8e03ac303 | ||
|
|
5ec9ae4271 | ||
|
|
f7eec4f4c0 | ||
|
|
5c467f0ca8 | ||
|
|
aa3b085384 | ||
|
|
d02c3880d5 | ||
|
|
3ac0728e5a | ||
|
|
c778e814db | ||
|
|
af909fcc13 | ||
|
|
c69da0a350 | ||
|
|
0ff5d45ba8 | ||
|
|
5d9c0573c0 | ||
|
|
4c7caadb72 | ||
|
|
f9f3910dd2 | ||
|
|
53c0e3e9ee | ||
|
|
c57c64b633 | ||
|
|
97473d47fd | ||
|
|
5363c7946b | ||
|
|
f4772d4f21 | ||
|
|
46ccaae829 | ||
|
|
c69c9af931 | ||
|
|
d33e5bc475 | ||
|
|
dce3f18229 | ||
|
|
cae33b69f2 | ||
|
|
18df0602d3 | ||
|
|
41b173ed54 | ||
|
|
9630fbf4e0 | ||
|
|
a6f3e645f5 | ||
|
|
de5560cd3d | ||
|
|
9551edf4d8 | ||
|
|
52493c7c19 | ||
|
|
59dfac3569 | ||
|
|
c2acdcbbb6 | ||
|
|
c439d66728 | ||
|
|
d6bb3fa306 | ||
|
|
297f4163c2 | ||
|
|
9d09780605 | ||
|
|
199e9cf8d9 | ||
|
|
24ed83aa5e | ||
|
|
cec3885c43 | ||
|
|
fb2adee968 | ||
|
|
a0497d8f5c | ||
|
|
02e32996c7 | ||
|
|
50df6b7981 | ||
|
|
7a56d1c7c1 | ||
|
|
75b0ea543f | ||
|
|
c035206443 | ||
|
|
c00650f1ad | ||
|
|
6151e957cf | ||
|
|
9dce0c9445 | ||
|
|
7ccf694ae1 | ||
|
|
f814205d5c | ||
|
|
c2e51f6b6b | ||
|
|
d5a13cdaea | ||
|
|
49b1c0c23f | ||
|
|
5a45495e3e | ||
|
|
c11cc20948 | ||
|
|
0bcf9a361d | ||
|
|
f09e2633a0 | ||
|
|
b45eed2d28 | ||
|
|
a2228c6e1f | ||
|
|
93d9ec37ea | ||
|
|
fc7d5b6fc5 | ||
|
|
2fe12879bd | ||
|
|
bfa2760c57 | ||
|
|
b669f9c02d | ||
|
|
c292d18cd9 | ||
|
|
ee29a03a66 | ||
|
|
b7079a11a3 | ||
|
|
0a7da61b45 | ||
|
|
7c8882ffac | ||
|
|
1cf1e10389 | ||
|
|
7b616582ed | ||
|
|
27f1add26d | ||
|
|
92e5ffba6e | ||
|
|
5bf83175c3 | ||
|
|
20fe4a9cb0 | ||
|
|
942eb7b67d | ||
|
|
f1aa52389a | ||
|
|
0913112f4a | ||
|
|
e875d1f0e6 | ||
|
|
9a7090334d | ||
|
|
904c2413b2 | ||
|
|
9f51efdbcb | ||
|
|
7c60329b07 | ||
|
|
c0b97af1cc | ||
|
|
cb76aded0a | ||
|
|
f99b87fe07 | ||
|
|
7decbbf274 | ||
|
|
b722b10127 | ||
|
|
2afef66e23 | ||
|
|
145064a15e | ||
|
|
1884108a33 | ||
|
|
06cc3383dc | ||
|
|
bc98fcfe37 | ||
|
|
411ee4bf23 | ||
|
|
8388ec6617 | ||
|
|
db49f4e08b | ||
|
|
060d302bf2 | ||
|
|
48265996f2 | ||
|
|
191f5fa878 | ||
|
|
dcee936fe3 | ||
|
|
102aea40d6 | ||
|
|
443ad81ceb | ||
|
|
dfe615ffcb | ||
|
|
669d4a7ab7 | ||
|
|
0494c25213 | ||
|
|
b5b3b4fb18 | ||
|
|
69c9aa98f0 | ||
|
|
bf11c5f1aa | ||
|
|
393d4ffbb2 | ||
|
|
1717b24efd | ||
|
|
cc82753e8d | ||
|
|
18f861a852 | ||
|
|
8e0252bf74 | ||
|
|
c04e7270d2 | ||
|
|
dbee8e3766 | ||
|
|
e176515758 | ||
|
|
50125a90f3 | ||
|
|
778f81b61b | ||
|
|
ad5fe95854 | ||
|
|
6a3a4ddb0a | ||
|
|
a816bee305 | ||
|
|
3cb0cfc899 | ||
|
|
a7cc43e387 | ||
|
|
93f1a07547 | ||
|
|
9a18bfba1f | ||
|
|
e024803565 | ||
|
|
d57f3678c6 | ||
|
|
2f4233531e | ||
|
|
20e3a6ee3f | ||
|
|
3d06e79119 | ||
|
|
0698667cfc | ||
|
|
c7a79b2adb | ||
|
|
674b0b1ffe | ||
|
|
157b0a473a | ||
|
|
31d1d4b331 | ||
|
|
fdbddb114e | ||
|
|
eb582eb919 | ||
|
|
c8a10f762b | ||
|
|
0c21782b13 | ||
|
|
b6450b1719 | ||
|
|
53353465e9 | ||
|
|
40cd1c35c4 | ||
|
|
082403acec | ||
|
|
c8df795fe7 | ||
|
|
05d5fcf0bb | ||
|
|
6e6b7fcb8d | ||
|
|
e14bc49752 | ||
|
|
5f0e65f57e | ||
|
|
955d949d5a | ||
|
|
fa8ee9b314 | ||
|
|
5a44dd4ecd | ||
|
|
099495b524 | ||
|
|
eb764c5c0f | ||
|
|
8264f5842c | ||
|
|
ba09474389 | ||
|
|
2bb198edb8 | ||
|
|
50fda020fc | ||
|
|
d36484c43e | ||
|
|
66e661897c | ||
|
|
4e27b94a86 | ||
|
|
fdfd11abe6 | ||
|
|
1fd8c1e4a4 | ||
|
|
b1710aac0b | ||
|
|
1a4810947f | ||
|
|
92afde42b5 | ||
|
|
ee79e4671e | ||
|
|
59c53c4532 | ||
|
|
f2eef2cb10 | ||
|
|
c52a46ccf0 | ||
|
|
3f4c7b0bed | ||
|
|
85d88339de | ||
|
|
c4eb26cb09 | ||
|
|
1ec25f23e2 | ||
|
|
298385ac96 | ||
|
|
8ff29cc4e2 | ||
|
|
9d19a49f2d | ||
|
|
e77d814bb4 | ||
|
|
4768f89c6e | ||
|
|
62a8e40aa2 | ||
|
|
f7c2c7ca81 | ||
|
|
3fdf7618d1 | ||
|
|
79d355f969 | ||
|
|
dfa4a5b758 | ||
|
|
a002781aa3 | ||
|
|
c717dd30f1 | ||
|
|
da62ec425c | ||
|
|
693c970800 | ||
|
|
2e963a0c32 | ||
|
|
fcf765daf3 | ||
|
|
cd55247fad | ||
|
|
3c6bd92fb7 | ||
|
|
bd7c8e6612 | ||
|
|
faf9d9b8a6 | ||
|
|
fd1dd0a30a | ||
|
|
dbfd7912b3 | ||
|
|
a8cd6b97d9 | ||
|
|
204e754cd1 | ||
|
|
95b7c8cbff | ||
|
|
147f499cab | ||
|
|
87347a35f6 | ||
|
|
fc31641858 |
No files matched your search
@@ -0,0 +1,16 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '*.md'
|
||||
- '.mailmap'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
Ubuntu:
|
||||
uses: named-data/actions/.github/workflows/jenkins-script-ubuntu.yml@v1
|
||||
macOS:
|
||||
uses: named-data/actions/.github/workflows/jenkins-script-macos.yml@v1
|
||||
@@ -0,0 +1,21 @@
|
||||
name: Docs
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
skip-deploy:
|
||||
description: 'Skip deployment?'
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
html:
|
||||
uses: named-data/actions/.github/workflows/docs-html.yml@v1
|
||||
with:
|
||||
# Deploy only the master branch and release tags
|
||||
deploy: ${{ !inputs.skip-deploy && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/NLSR-')) }}
|
||||
secrets: inherit
|
||||
man:
|
||||
uses: named-data/actions/.github/workflows/docs-man.yml@v1
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# Emacs
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
.\#*
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# KDevelop
|
||||
*.kdev*
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
|
||||
# Waf build system
|
||||
/build/
|
||||
.waf-*-*/
|
||||
.waf3-*-*/
|
||||
.lock-waf*
|
||||
|
||||
# Compiled python code
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# Other
|
||||
/VERSION.info
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
case $(uname) in
|
||||
Linux)
|
||||
if [[ -e /etc/os-release ]]; then
|
||||
source /etc/os-release
|
||||
else
|
||||
source /usr/lib/os-release
|
||||
fi
|
||||
export ID VERSION_ID
|
||||
export ID_LIKE="${ID} ${ID_LIKE} linux"
|
||||
export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
|
||||
;;
|
||||
Darwin)
|
||||
# Emulate a subset of os-release(5)
|
||||
export ID=macos
|
||||
export VERSION_ID=$(sw_vers -productVersion)
|
||||
export PATH="/usr/local/bin${PATH:+:}${PATH}"
|
||||
if [[ -x /opt/homebrew/bin/brew ]]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
elif [[ -x /usr/local/bin/brew ]]; then
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
export CACHE_DIR=${CACHE_DIR:-/tmp}
|
||||
|
||||
if [[ $JOB_NAME == *"code-coverage" ]]; then
|
||||
export DISABLE_ASAN=yes
|
||||
export DISABLE_HEADERS_CHECK=yes
|
||||
fi
|
||||
|
||||
# https://reproducible-builds.org/docs/source-date-epoch/
|
||||
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
|
||||
|
||||
for file in .jenkins.d/*; do
|
||||
[[ -f $file && -x $file ]] || continue
|
||||
|
||||
if [[ -n $GITHUB_ACTIONS ]]; then
|
||||
label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
|
||||
echo "::group::${label}"
|
||||
fi
|
||||
|
||||
echo "\$ $file"
|
||||
"$file"
|
||||
|
||||
if [[ -n $GITHUB_ACTIONS ]]; then
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
done
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
APT_PKGS=(build-essential pkg-config python3-minimal
|
||||
libboost-all-dev libssl-dev libsqlite3-dev)
|
||||
FORMULAE=(boost openssl pkg-config)
|
||||
PIP_PKGS=()
|
||||
case $JOB_NAME in
|
||||
*code-coverage)
|
||||
APT_PKGS+=(lcov python3-pip)
|
||||
PIP_PKGS+=('gcovr~=5.2')
|
||||
;;
|
||||
*Docs)
|
||||
APT_PKGS+=(doxygen graphviz python3-pip)
|
||||
FORMULAE+=(doxygen graphviz)
|
||||
PIP_PKGS+=(sphinx sphinxcontrib-doxylink)
|
||||
;;
|
||||
esac
|
||||
|
||||
set -x
|
||||
|
||||
if [[ $ID == macos ]]; then
|
||||
if [[ -n $GITHUB_ACTIONS ]]; then
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
fi
|
||||
brew update
|
||||
brew install --formula "${FORMULAE[@]}"
|
||||
elif [[ $ID_LIKE == *debian* ]]; then
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -qy install "${APT_PKGS[@]}"
|
||||
elif [[ $ID_LIKE == *fedora* ]]; then
|
||||
sudo dnf -y install gcc-c++ libasan lld pkgconf-pkg-config python3 \
|
||||
boost-devel openssl-devel sqlite-devel
|
||||
fi
|
||||
|
||||
if (( ${#PIP_PKGS[@]} )); then
|
||||
pip3 install --user --upgrade --upgrade-strategy=eager "${PIP_PKGS[@]}"
|
||||
fi
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
|
||||
pushd "$CACHE_DIR" >/dev/null
|
||||
|
||||
INSTALLED_VERSION=
|
||||
if [[ $ID == macos ]]; then
|
||||
BOOST=$(brew list --formula --versions boost)
|
||||
OLD_BOOST=$(cat boost.txt || :)
|
||||
if [[ $OLD_BOOST != $BOOST ]]; then
|
||||
echo "$BOOST" > boost.txt
|
||||
INSTALLED_VERSION=NONE
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z $INSTALLED_VERSION ]]; then
|
||||
INSTALLED_VERSION=$(git -C ndn-cxx rev-parse HEAD 2>/dev/null || echo NONE)
|
||||
fi
|
||||
|
||||
sudo rm -rf ndn-cxx-latest
|
||||
git clone --depth 1 https://github.com/named-data/ndn-cxx.git ndn-cxx-latest
|
||||
LATEST_VERSION=$(git -C ndn-cxx-latest rev-parse HEAD 2>/dev/null || echo UNKNOWN)
|
||||
|
||||
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
|
||||
sudo rm -rf ndn-cxx
|
||||
mv ndn-cxx-latest ndn-cxx
|
||||
else
|
||||
sudo rm -rf ndn-cxx-latest
|
||||
fi
|
||||
|
||||
sudo rm -f /usr/local/bin/ndnsec*
|
||||
sudo rm -fr /usr/local/include/ndn-cxx
|
||||
sudo rm -f /usr/local/lib{,64}/libndn-cxx*
|
||||
sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
|
||||
|
||||
pushd ndn-cxx >/dev/null
|
||||
|
||||
./waf --color=yes configure --without-osx-keychain
|
||||
./waf --color=yes build
|
||||
sudo ./waf --color=yes install
|
||||
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
if [[ $ID_LIKE == *fedora* ]]; then
|
||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||
fi
|
||||
if [[ $ID_LIKE == *linux* ]]; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
|
||||
PROJ=ChronoSync
|
||||
|
||||
pushd "$CACHE_DIR" >/dev/null
|
||||
|
||||
INSTALLED_VERSION=
|
||||
NDN_CXX=$(ndnsec version)
|
||||
OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
|
||||
if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
|
||||
echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
|
||||
INSTALLED_VERSION=NONE
|
||||
fi
|
||||
|
||||
if [[ -z $INSTALLED_VERSION ]]; then
|
||||
INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
|
||||
fi
|
||||
|
||||
sudo rm -rf "$PROJ-latest"
|
||||
git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
|
||||
LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
|
||||
|
||||
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
|
||||
sudo rm -rf "$PROJ"
|
||||
mv "$PROJ-latest" "$PROJ"
|
||||
else
|
||||
sudo rm -rf "$PROJ-latest"
|
||||
fi
|
||||
|
||||
sudo rm -fr /usr/local/include/"$PROJ"
|
||||
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
|
||||
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
|
||||
|
||||
pushd "$PROJ" >/dev/null
|
||||
|
||||
./waf --color=yes configure
|
||||
./waf --color=yes build
|
||||
sudo ./waf --color=yes install
|
||||
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
if [[ $ID_LIKE == *fedora* ]]; then
|
||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||
fi
|
||||
if [[ $ID_LIKE == *linux* ]]; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
|
||||
PROJ=PSync
|
||||
|
||||
pushd "$CACHE_DIR" >/dev/null
|
||||
|
||||
INSTALLED_VERSION=
|
||||
NDN_CXX=$(ndnsec version)
|
||||
OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
|
||||
if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
|
||||
echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
|
||||
INSTALLED_VERSION=NONE
|
||||
fi
|
||||
|
||||
if [[ -z $INSTALLED_VERSION ]]; then
|
||||
INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
|
||||
fi
|
||||
|
||||
sudo rm -rf "$PROJ-latest"
|
||||
git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
|
||||
LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
|
||||
|
||||
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
|
||||
sudo rm -rf "$PROJ"
|
||||
mv "$PROJ-latest" "$PROJ"
|
||||
else
|
||||
sudo rm -rf "$PROJ-latest"
|
||||
fi
|
||||
|
||||
sudo rm -fr /usr/local/include/"$PROJ"
|
||||
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
|
||||
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
|
||||
|
||||
pushd "$PROJ" >/dev/null
|
||||
|
||||
./waf --color=yes configure
|
||||
./waf --color=yes build
|
||||
sudo ./waf --color=yes install
|
||||
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
if [[ $ID_LIKE == *fedora* ]]; then
|
||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||
fi
|
||||
if [[ $ID_LIKE == *linux* ]]; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
|
||||
PROJ=ndn-svs
|
||||
|
||||
pushd "$CACHE_DIR" >/dev/null
|
||||
|
||||
INSTALLED_VERSION=
|
||||
NDN_CXX=$(ndnsec version)
|
||||
OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
|
||||
if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
|
||||
echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
|
||||
INSTALLED_VERSION=NONE
|
||||
fi
|
||||
|
||||
if [[ -z $INSTALLED_VERSION ]]; then
|
||||
INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
|
||||
fi
|
||||
|
||||
sudo rm -rf "$PROJ-latest"
|
||||
git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
|
||||
LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
|
||||
|
||||
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
|
||||
sudo rm -rf "$PROJ"
|
||||
mv "$PROJ-latest" "$PROJ"
|
||||
else
|
||||
sudo rm -rf "$PROJ-latest"
|
||||
fi
|
||||
|
||||
sudo rm -fr /usr/local/include/"$PROJ"
|
||||
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
|
||||
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
|
||||
|
||||
pushd "$PROJ" >/dev/null
|
||||
|
||||
./waf --color=yes configure
|
||||
./waf --color=yes build
|
||||
sudo ./waf --color=yes install
|
||||
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
if [[ $ID_LIKE == *fedora* ]]; then
|
||||
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
|
||||
fi
|
||||
if [[ $ID_LIKE == *linux* ]]; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
if [[ -z $DISABLE_ASAN ]]; then
|
||||
ASAN="--with-sanitizer=address"
|
||||
fi
|
||||
if [[ $JOB_NAME == *"code-coverage" ]]; then
|
||||
COVERAGE="--with-coverage"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
|
||||
# Build in release mode with tests
|
||||
./waf --color=yes configure --with-tests
|
||||
./waf --color=yes build
|
||||
|
||||
# Cleanup
|
||||
./waf --color=yes distclean
|
||||
|
||||
# Build in release mode without tests
|
||||
./waf --color=yes configure
|
||||
./waf --color=yes build
|
||||
|
||||
# Cleanup
|
||||
./waf --color=yes distclean
|
||||
fi
|
||||
|
||||
# Build in debug mode with tests
|
||||
./waf --color=yes configure --debug --with-chronosync --with-psync --with-svs --with-tests $ASAN $COVERAGE
|
||||
./waf --color=yes build
|
||||
|
||||
# (tests will be run against the debug version)
|
||||
|
||||
# Install
|
||||
sudo ./waf --color=yes install
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
|
||||
ASAN_OPTIONS="color=always"
|
||||
ASAN_OPTIONS+=":check_initialization_order=1"
|
||||
ASAN_OPTIONS+=":detect_stack_use_after_return=1"
|
||||
ASAN_OPTIONS+=":strict_init_order=1"
|
||||
ASAN_OPTIONS+=":strict_string_checks=1"
|
||||
ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
|
||||
ASAN_OPTIONS+=":detect_container_overflow=0"
|
||||
ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
|
||||
export ASAN_OPTIONS
|
||||
|
||||
# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
|
||||
export BOOST_TEST_BUILD_INFO=1
|
||||
export BOOST_TEST_COLOR_OUTPUT=1
|
||||
export BOOST_TEST_DETECT_MEMORY_LEAK=0
|
||||
export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
|
||||
|
||||
set -x
|
||||
|
||||
# Prepare environment
|
||||
rm -rf ~/.ndn
|
||||
|
||||
# Run unit tests
|
||||
./build/unit-tests-nlsr
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
|
||||
if [[ $JOB_NAME == *"code-coverage" ]]; then
|
||||
# Generate an XML report (Cobertura format) and a detailed HTML report using gcovr
|
||||
# Note: trailing slashes are important in the paths below. Do not remove them!
|
||||
gcovr --object-directory build \
|
||||
--filter src/ \
|
||||
--exclude-throw-branches \
|
||||
--exclude-unreachable-branches \
|
||||
--cobertura build/coverage.xml \
|
||||
--html-details build/gcovr/ \
|
||||
--print-summary
|
||||
|
||||
# Generate a detailed HTML report using lcov
|
||||
lcov --quiet \
|
||||
--capture \
|
||||
--directory . \
|
||||
--exclude "$PWD/tests/*" \
|
||||
--no-external \
|
||||
--rc lcov_branch_coverage=1 \
|
||||
--output-file build/coverage.info
|
||||
|
||||
genhtml --branch-coverage \
|
||||
--demangle-cpp \
|
||||
--legend \
|
||||
--output-directory build/lcov \
|
||||
--title "NLSR unit tests" \
|
||||
build/coverage.info
|
||||
fi
|
||||
@@ -0,0 +1,36 @@
|
||||
# Continuous Integration Scripts
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `ID`: lower-case string that identifies the operating system, for example: `ID=ubuntu`,
|
||||
`ID=centos`. See [os-release(5)] for more information. On macOS, where `os-release` is
|
||||
not available, we emulate it by setting `ID=macos`.
|
||||
|
||||
- `ID_LIKE`: space-separated list of operating system identifiers that are closely related
|
||||
to the running OS. See [os-release(5)] for more information. The listed values are used
|
||||
by the CI scripts to select the proper behavior for different platforms and OS flavors.
|
||||
|
||||
Examples:
|
||||
|
||||
- On CentOS, `ID_LIKE="centos rhel fedora linux"`
|
||||
- On Ubuntu, `ID_LIKE="ubuntu debian linux"`
|
||||
|
||||
- `VERSION_ID`: identifies the operating system version, excluding any release code names.
|
||||
See [os-release(5)] for more information. Examples: `VERSION_ID=42`, `VERSION_ID=22.04`.
|
||||
|
||||
- `JOB_NAME`: defines the type of the current CI job. Depending on the job type, the CI
|
||||
scripts can perform different tasks.
|
||||
|
||||
Supported values:
|
||||
|
||||
- empty: default build task
|
||||
- `code-coverage`: debug build with tests and code coverage analysis
|
||||
- `limited-build`: only a single debug build with tests
|
||||
|
||||
- `CACHE_DIR`: directory containing cached files from previous builds, e.g., a compiled
|
||||
version of ndn-cxx. If not set, `/tmp` is used.
|
||||
|
||||
- `DISABLE_ASAN`: disable building with AddressSanitizer. This is automatically set for
|
||||
the `code-coverage` job type.
|
||||
|
||||
[os-release(5)]: https://www.freedesktop.org/software/systemd/man/os-release.html
|
||||
@@ -0,0 +1,16 @@
|
||||
A K M Mahmudul Hoque <akmhoque@gmail.com>
|
||||
<agawande@memphis.edu> <ashu2493@gmail.com>
|
||||
Nick Gordon <nmgordon@memphis.edu>
|
||||
Laqin Fan <lfan1@memphis.edu>
|
||||
Syed Obaid Amin <soamin@memphis.edu>
|
||||
Syed Obaid Amin <soamin@memphis.edu> <obaidasyed@gmail.com>
|
||||
Syed Obaid Amin <soamin@memphis.edu> <obaid@Obaids-MacBook.local>
|
||||
Syed Obaid Amin <soamin@memphis.edu> <obaid@obaids-macbook.memphis.edu>
|
||||
Syed Obaid Amin <soamin@memphis.edu> <soamin@mira.cs.memphis.edu>
|
||||
Syed Obaid Amin <soamin@memphis.edu> <soamin@wd222yx4.memphis.edu>
|
||||
Muktadir R Chowdhury <mrchwdhr@memphis.edu>
|
||||
Muktadir R Chowdhury <mrchwdhr@memphis.edu> <muktadir.rahman.c@gmail.com>
|
||||
<aa@cs.fiu.edu> <alexander.afanasyev@ucla.edu>
|
||||
<davidepesa@gmail.com> <davide.pesavento@lip6.fr>
|
||||
<enewberry@email.arizona.edu> <enewberry@cs.arizona.edu>
|
||||
Md Ashiqur Rahman <marahman@email.arizona.edu>
|
||||
@@ -0,0 +1,533 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# partially based on boost.py written by Gernot Vormayr
|
||||
# written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008
|
||||
# modified by Bjoern Michaelsen, 2008
|
||||
# modified by Luca Fossati, 2008
|
||||
# rewritten for waf 1.5.1, Thomas Nagy, 2008
|
||||
# rewritten for waf 1.6.2, Sylvain Rouquette, 2011
|
||||
|
||||
'''
|
||||
|
||||
This is an extra tool, not bundled with the default waf binary.
|
||||
To add the boost tool to the waf file:
|
||||
$ ./waf-light --tools=compat15,boost
|
||||
or, if you have waf >= 1.6.2
|
||||
$ ./waf update --files=boost
|
||||
|
||||
When using this tool, the wscript will look like:
|
||||
|
||||
def options(opt):
|
||||
opt.load('compiler_cxx boost')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('compiler_cxx boost')
|
||||
conf.check_boost(lib='system filesystem')
|
||||
|
||||
def build(bld):
|
||||
bld(source='main.cpp', target='app', use='BOOST')
|
||||
|
||||
Options are generated, in order to specify the location of boost includes/libraries.
|
||||
The `check_boost` configuration function allows to specify the used boost libraries.
|
||||
It can also provide default arguments to the --boost-mt command-line arguments.
|
||||
Everything will be packaged together in a BOOST component that you can use.
|
||||
|
||||
When using MSVC, a lot of compilation flags need to match your BOOST build configuration:
|
||||
- you may have to add /EHsc to your CXXFLAGS or define boost::throw_exception if BOOST_NO_EXCEPTIONS is defined.
|
||||
Errors: C4530
|
||||
- boost libraries will try to be smart and use the (pretty but often not useful) auto-linking feature of MSVC
|
||||
So before calling `conf.check_boost` you might want to disabling by adding
|
||||
conf.env.DEFINES_BOOST += ['BOOST_ALL_NO_LIB']
|
||||
Errors:
|
||||
- boost might also be compiled with /MT, which links the runtime statically.
|
||||
If you have problems with redefined symbols,
|
||||
self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
|
||||
self.env['CXXFLAGS_%s' % var] += ['/MD', '/EHsc']
|
||||
Passing `--boost-linkage_autodetect` might help ensuring having a correct linkage in some basic cases.
|
||||
|
||||
'''
|
||||
|
||||
import sys
|
||||
import re
|
||||
from waflib import Utils, Logs, Errors
|
||||
from waflib.Configure import conf
|
||||
from waflib.TaskGen import feature, after_method
|
||||
|
||||
BOOST_LIBS = ['/usr/lib', '/usr/local/lib', '/opt/homebrew/lib', '/opt/local/lib', '/sw/lib', '/lib']
|
||||
BOOST_INCLUDES = ['/usr/include', '/usr/local/include', '/opt/homebrew/include', '/opt/local/include', '/sw/include']
|
||||
|
||||
BOOST_VERSION_FILE = 'boost/version.hpp'
|
||||
BOOST_VERSION_CODE = '''
|
||||
#include <iostream>
|
||||
#include <boost/version.hpp>
|
||||
int main() { std::cout << BOOST_LIB_VERSION << ":" << BOOST_VERSION << std::endl; }
|
||||
'''
|
||||
|
||||
BOOST_ERROR_CODE = '''
|
||||
#include <boost/system/error_code.hpp>
|
||||
int main() { boost::system::error_code c; }
|
||||
'''
|
||||
|
||||
PTHREAD_CODE = '''
|
||||
#include <pthread.h>
|
||||
static void* f(void*) { return 0; }
|
||||
int main() {
|
||||
pthread_t th;
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
pthread_create(&th, &attr, &f, 0);
|
||||
pthread_join(th, 0);
|
||||
pthread_cleanup_push(0, 0);
|
||||
pthread_cleanup_pop(0);
|
||||
pthread_attr_destroy(&attr);
|
||||
}
|
||||
'''
|
||||
|
||||
BOOST_THREAD_CODE = '''
|
||||
#include <boost/thread.hpp>
|
||||
int main() { boost::thread t; }
|
||||
'''
|
||||
|
||||
BOOST_LOG_CODE = '''
|
||||
#include <boost/log/trivial.hpp>
|
||||
int main() { BOOST_LOG_TRIVIAL(info) << "boost_log is working"; }
|
||||
'''
|
||||
|
||||
BOOST_LOG_SETUP_CODE = '''
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/log/utility/setup/console.hpp>
|
||||
#include <boost/log/utility/setup/common_attributes.hpp>
|
||||
int main() {
|
||||
using namespace boost::log;
|
||||
add_common_attributes();
|
||||
add_console_log(std::clog, keywords::format = "%Message%");
|
||||
BOOST_LOG_TRIVIAL(info) << "boost_log_setup is working";
|
||||
}
|
||||
'''
|
||||
|
||||
# toolsets from {boost_dir}/tools/build/v2/tools/common.jam
|
||||
PLATFORM = Utils.unversioned_sys_platform()
|
||||
detect_intel = lambda env: (PLATFORM == 'win32') and 'iw' or 'il'
|
||||
detect_clang = lambda env: (PLATFORM == 'darwin') and 'clang-darwin' or 'clang'
|
||||
detect_mingw = lambda env: (re.search('MinGW', env.CXX[0])) and 'mgw' or 'gcc'
|
||||
BOOST_TOOLSETS = {
|
||||
'borland': 'bcb',
|
||||
'clang': detect_clang,
|
||||
'como': 'como',
|
||||
'cw': 'cw',
|
||||
'darwin': 'xgcc',
|
||||
'edg': 'edg',
|
||||
'g++': detect_mingw,
|
||||
'gcc': detect_mingw,
|
||||
'icpc': detect_intel,
|
||||
'intel': detect_intel,
|
||||
'kcc': 'kcc',
|
||||
'kylix': 'bck',
|
||||
'mipspro': 'mp',
|
||||
'mingw': 'mgw',
|
||||
'msvc': 'vc',
|
||||
'qcc': 'qcc',
|
||||
'sun': 'sw',
|
||||
'sunc++': 'sw',
|
||||
'tru64cxx': 'tru',
|
||||
'vacpp': 'xlc'
|
||||
}
|
||||
|
||||
|
||||
def options(opt):
|
||||
opt = opt.add_option_group('Boost Options')
|
||||
opt.add_option('--boost-includes', type='string',
|
||||
default='', dest='boost_includes',
|
||||
help='''path to the directory where the boost includes are,
|
||||
e.g., /path/to/boost_1_55_0/stage/include''')
|
||||
opt.add_option('--boost-libs', type='string',
|
||||
default='', dest='boost_libs',
|
||||
help='''path to the directory where the boost libs are,
|
||||
e.g., path/to/boost_1_55_0/stage/lib''')
|
||||
opt.add_option('--boost-mt', action='store_true',
|
||||
default=False, dest='boost_mt',
|
||||
help='select multi-threaded libraries')
|
||||
opt.add_option('--boost-abi', type='string', default='', dest='boost_abi',
|
||||
help='''select libraries with tags (gd for debug, static is automatically added),
|
||||
see doc Boost, Getting Started, chapter 6.1''')
|
||||
opt.add_option('--boost-linkage_autodetect', action='store_true', dest='boost_linkage_autodetect',
|
||||
help="auto-detect boost linkage options (don't get used to it / might break other stuff)")
|
||||
opt.add_option('--boost-toolset', type='string',
|
||||
default='', dest='boost_toolset',
|
||||
help='force a toolset e.g. msvc, vc90, \
|
||||
gcc, mingw, mgw45 (default: auto)')
|
||||
py_version = '%d%d' % (sys.version_info[0], sys.version_info[1])
|
||||
opt.add_option('--boost-python', type='string',
|
||||
default=py_version, dest='boost_python',
|
||||
help='select the lib python with this version \
|
||||
(default: %s)' % py_version)
|
||||
|
||||
|
||||
@conf
|
||||
def __boost_get_version_file(self, d):
|
||||
if not d:
|
||||
return None
|
||||
dnode = self.root.find_dir(d)
|
||||
if dnode:
|
||||
return dnode.find_node(BOOST_VERSION_FILE)
|
||||
return None
|
||||
|
||||
@conf
|
||||
def boost_get_version(self, d):
|
||||
"""silently retrieve the boost version number"""
|
||||
node = self.__boost_get_version_file(d)
|
||||
if node:
|
||||
try:
|
||||
txt = node.read()
|
||||
except EnvironmentError:
|
||||
Logs.error('Could not read the file %r' % node.abspath())
|
||||
else:
|
||||
re_but1 = re.compile('^#define\\s+BOOST_LIB_VERSION\\s+"(.+)"', re.M)
|
||||
m1 = re_but1.search(txt)
|
||||
re_but2 = re.compile('^#define\\s+BOOST_VERSION\\s+(\\d+)', re.M)
|
||||
m2 = re_but2.search(txt)
|
||||
if m1 and m2:
|
||||
return (m1.group(1), m2.group(1))
|
||||
return self.check_cxx(fragment=BOOST_VERSION_CODE, includes=[d], execute=True, define_ret=True).split(':')
|
||||
|
||||
@conf
|
||||
def boost_get_includes(self, *k, **kw):
|
||||
includes = k and k[0] or kw.get('includes', None)
|
||||
if includes and self.__boost_get_version_file(includes):
|
||||
return includes
|
||||
for d in self.environ.get('INCLUDE', '').split(';') + BOOST_INCLUDES:
|
||||
if self.__boost_get_version_file(d):
|
||||
return d
|
||||
if includes:
|
||||
self.end_msg('headers not found in %s' % includes, 'YELLOW')
|
||||
self.fatal('The configuration failed')
|
||||
else:
|
||||
self.end_msg('headers not found, please provide a --boost-includes argument (see help)', 'YELLOW')
|
||||
self.fatal('The configuration failed')
|
||||
|
||||
|
||||
@conf
|
||||
def boost_get_toolset(self, cc):
|
||||
toolset = cc
|
||||
if not cc:
|
||||
build_platform = Utils.unversioned_sys_platform()
|
||||
if build_platform in BOOST_TOOLSETS:
|
||||
cc = build_platform
|
||||
else:
|
||||
cc = self.env.CXX_NAME
|
||||
if cc in BOOST_TOOLSETS:
|
||||
toolset = BOOST_TOOLSETS[cc]
|
||||
return isinstance(toolset, str) and toolset or toolset(self.env)
|
||||
|
||||
|
||||
@conf
|
||||
def __boost_get_libs_path(self, *k, **kw):
|
||||
''' return the lib path and all the files in it '''
|
||||
if 'files' in kw:
|
||||
return self.root.find_dir('.'), Utils.to_list(kw['files'])
|
||||
libs = k and k[0] or kw.get('libs', None)
|
||||
if libs:
|
||||
path = self.root.find_dir(libs)
|
||||
files = path.ant_glob('*boost_*')
|
||||
if not libs or not files:
|
||||
for d in self.environ.get('LIB', '').split(';') + BOOST_LIBS:
|
||||
if not d:
|
||||
continue
|
||||
path = self.root.find_dir(d)
|
||||
if path:
|
||||
files = path.ant_glob('*boost_*')
|
||||
if files:
|
||||
break
|
||||
path = self.root.find_dir(d + '64')
|
||||
if path:
|
||||
files = path.ant_glob('*boost_*')
|
||||
if files:
|
||||
break
|
||||
if not path:
|
||||
if libs:
|
||||
self.end_msg('libs not found in %s' % libs, 'YELLOW')
|
||||
self.fatal('The configuration failed')
|
||||
else:
|
||||
self.end_msg('libs not found, please provide a --boost-libs argument (see help)', 'YELLOW')
|
||||
self.fatal('The configuration failed')
|
||||
|
||||
self.to_log('Found the boost path in %r with the libraries:' % path)
|
||||
for x in files:
|
||||
self.to_log(' %r' % x)
|
||||
return path, files
|
||||
|
||||
@conf
|
||||
def boost_get_libs(self, *k, **kw):
|
||||
'''
|
||||
return the lib path and the required libs
|
||||
according to the parameters
|
||||
'''
|
||||
path, files = self.__boost_get_libs_path(**kw)
|
||||
files = sorted(files, key=lambda f: (len(f.name), f.name), reverse=True)
|
||||
toolset = self.boost_get_toolset(kw.get('toolset', ''))
|
||||
toolset_pat = '(-%s[0-9]{0,3})' % toolset
|
||||
version = '-%s' % self.env.BOOST_VERSION
|
||||
|
||||
def find_lib(re_lib, files):
|
||||
for file in files:
|
||||
if re_lib.search(file.name):
|
||||
self.to_log('Found boost lib %s' % file)
|
||||
return file
|
||||
return None
|
||||
|
||||
def format_lib_name(name):
|
||||
if name.startswith('lib') and self.env.CC_NAME != 'msvc':
|
||||
name = name[3:]
|
||||
return name[:name.rfind('.')]
|
||||
|
||||
def match_libs(lib_names, is_static):
|
||||
libs = []
|
||||
lib_names = Utils.to_list(lib_names)
|
||||
if not lib_names:
|
||||
return libs
|
||||
t = []
|
||||
if kw.get('mt', False):
|
||||
t.append('-mt')
|
||||
if kw.get('abi', None):
|
||||
t.append('%s%s' % (is_static and '-s' or '-', kw['abi']))
|
||||
elif is_static:
|
||||
t.append('-s')
|
||||
tags_pat = t and ''.join(t) or ''
|
||||
ext = is_static and self.env.cxxstlib_PATTERN or self.env.cxxshlib_PATTERN
|
||||
ext = ext.partition('%s')[2] # remove '%s' or 'lib%s' from PATTERN
|
||||
|
||||
for lib in lib_names:
|
||||
if lib == 'python':
|
||||
# for instance, with python='27',
|
||||
# accepts '-py27', '-py2', '27' and '2'
|
||||
# but will reject '-py3', '-py26', '26' and '3'
|
||||
tags = '({0})?((-py{2})|(-py{1}(?=[^0-9]))|({2})|({1}(?=[^0-9]))|(?=[^0-9])(?!-py))'.format(tags_pat, kw['python'][0], kw['python'])
|
||||
else:
|
||||
tags = tags_pat
|
||||
# Trying libraries, from most strict match to least one
|
||||
for pattern in ['boost_%s%s%s%s%s$' % (lib, toolset_pat, tags, version, ext),
|
||||
'boost_%s%s%s%s$' % (lib, tags, version, ext),
|
||||
# Give up trying to find the right version
|
||||
'boost_%s%s%s%s$' % (lib, toolset_pat, tags, ext),
|
||||
'boost_%s%s%s$' % (lib, tags, ext),
|
||||
'boost_%s%s$' % (lib, ext),
|
||||
'boost_%s' % lib]:
|
||||
self.to_log('Trying pattern %s' % pattern)
|
||||
file = find_lib(re.compile(pattern), files)
|
||||
if file:
|
||||
libs.append(format_lib_name(file.name))
|
||||
break
|
||||
else:
|
||||
self.end_msg('lib %s not found in %s' % (lib, path.abspath()), 'YELLOW')
|
||||
self.fatal('The configuration failed')
|
||||
return libs
|
||||
|
||||
return path.abspath(), match_libs(kw.get('lib', None), False), match_libs(kw.get('stlib', None), True)
|
||||
|
||||
@conf
|
||||
def _check_pthread_flag(self, *k, **kw):
|
||||
'''
|
||||
Computes which flags should be added to CXXFLAGS and LINKFLAGS to compile in multi-threading mode
|
||||
|
||||
Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3,
|
||||
boost/thread.hpp will trigger a #error if -pthread isn't used:
|
||||
boost/config/requires_threads.hpp:47:5: #error "Compiler threading support
|
||||
is not turned on. Please set the correct command line options for
|
||||
threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
|
||||
|
||||
Based on _BOOST_PTHREAD_FLAG(): https://github.com/tsuna/boost.m4/blob/master/build-aux/boost.m4
|
||||
'''
|
||||
|
||||
var = kw.get('uselib_store', 'BOOST')
|
||||
|
||||
self.start_msg('Checking the flags needed to use pthreads')
|
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the
|
||||
# individual items follow:
|
||||
# (none): in case threads are in libc; should be tried before -Kthread and
|
||||
# other compiler flags to prevent continual compiler warnings
|
||||
# -lpthreads: AIX (must check this before -lpthread)
|
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
# -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads)
|
||||
# -pthreads: Solaris/GCC
|
||||
# -mthreads: MinGW32/GCC, Lynx/GCC
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads too;
|
||||
# also defines -D_REENTRANT)
|
||||
# ... -mt is also the pthreads flag for HP/aCC
|
||||
# -lpthread: GNU Linux, etc.
|
||||
# --thread-safe: KAI C++
|
||||
if Utils.unversioned_sys_platform() == 'sunos':
|
||||
# On Solaris (at least, for some versions), libc contains stubbed
|
||||
# (non-functional) versions of the pthreads routines, so link-based
|
||||
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
|
||||
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
||||
# a function called by this macro, so we could check for that, but
|
||||
# who knows whether they'll stub that too in a future libc.) So,
|
||||
# we'll just look for -pthreads and -lpthread first:
|
||||
boost_pthread_flags = ['-pthreads', '-lpthread', '-mt', '-pthread']
|
||||
else:
|
||||
boost_pthread_flags = ['', '-lpthreads', '-Kthread', '-kthread', '-llthread', '-pthread',
|
||||
'-pthreads', '-mthreads', '-lpthread', '--thread-safe', '-mt']
|
||||
|
||||
for boost_pthread_flag in boost_pthread_flags:
|
||||
try:
|
||||
self.env.stash()
|
||||
self.env['CXXFLAGS_%s' % var] += [boost_pthread_flag]
|
||||
self.env['LINKFLAGS_%s' % var] += [boost_pthread_flag]
|
||||
self.check_cxx(code=PTHREAD_CODE, msg=None, use=var, execute=False, quiet=True)
|
||||
self.end_msg(boost_pthread_flag)
|
||||
return
|
||||
except self.errors.ConfigurationError:
|
||||
self.env.revert()
|
||||
self.end_msg('none')
|
||||
|
||||
@conf
|
||||
def check_boost(self, *k, **kw):
|
||||
"""
|
||||
Initialize boost libraries to be used.
|
||||
|
||||
Keywords: you can pass the same parameters as with the command line (without "--boost-").
|
||||
Note that the command line has the priority, and should preferably be used.
|
||||
"""
|
||||
if not self.env['CXX']:
|
||||
self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
|
||||
|
||||
params = {
|
||||
'lib': k and k[0] or kw.get('lib', None),
|
||||
'stlib': kw.get('stlib', None)
|
||||
}
|
||||
for key, value in self.options.__dict__.items():
|
||||
if not key.startswith('boost_'):
|
||||
continue
|
||||
key = key[len('boost_'):]
|
||||
params[key] = value and value or kw.get(key, '')
|
||||
|
||||
var = kw.get('uselib_store', 'BOOST')
|
||||
|
||||
if not self.env.DONE_FIND_BOOST_COMMON:
|
||||
self.find_program('dpkg-architecture', var='DPKG_ARCHITECTURE', mandatory=False)
|
||||
if self.env.DPKG_ARCHITECTURE:
|
||||
deb_host_multiarch = self.cmd_and_log([self.env.DPKG_ARCHITECTURE[0], '-qDEB_HOST_MULTIARCH'])
|
||||
BOOST_LIBS.insert(0, '/usr/lib/%s' % deb_host_multiarch.strip())
|
||||
|
||||
self.start_msg('Checking boost includes')
|
||||
self.env['INCLUDES_%s' % var] = inc = self.boost_get_includes(**params)
|
||||
versions = self.boost_get_version(inc)
|
||||
self.env.BOOST_VERSION = versions[0]
|
||||
self.env.BOOST_VERSION_NUMBER = int(versions[1])
|
||||
self.end_msg('%d.%d.%d' % (int(versions[1]) / 100000,
|
||||
int(versions[1]) / 100 % 1000,
|
||||
int(versions[1]) % 100))
|
||||
if Logs.verbose:
|
||||
Logs.pprint('CYAN', ' path : %s' % self.env['INCLUDES_%s' % var])
|
||||
|
||||
self.env.DONE_FIND_BOOST_COMMON = True
|
||||
|
||||
if not params['lib'] and not params['stlib']:
|
||||
return
|
||||
if 'static' in kw or 'static' in params:
|
||||
Logs.warn('boost: static parameter is deprecated, use stlib instead.')
|
||||
self.start_msg('Checking boost libs')
|
||||
path, libs, stlibs = self.boost_get_libs(**params)
|
||||
self.env['LIBPATH_%s' % var] = [path]
|
||||
self.env['STLIBPATH_%s' % var] = [path]
|
||||
self.env['LIB_%s' % var] = libs
|
||||
self.env['STLIB_%s' % var] = stlibs
|
||||
self.end_msg(' '.join(libs + stlibs))
|
||||
if Logs.verbose:
|
||||
Logs.pprint('CYAN', ' path : %s' % path)
|
||||
Logs.pprint('CYAN', ' shared libs : %s' % libs)
|
||||
Logs.pprint('CYAN', ' static libs : %s' % stlibs)
|
||||
|
||||
def has_shlib(lib):
|
||||
return params['lib'] and lib in params['lib']
|
||||
def has_stlib(lib):
|
||||
return params['stlib'] and lib in params['stlib']
|
||||
def has_lib(lib):
|
||||
return has_shlib(lib) or has_stlib(lib)
|
||||
if has_lib('thread'):
|
||||
# not inside try_link to make check visible in the output
|
||||
self._check_pthread_flag(k, kw)
|
||||
|
||||
def try_link():
|
||||
if has_lib('system'):
|
||||
self.check_cxx(fragment=BOOST_ERROR_CODE, use=var, execute=False)
|
||||
if has_lib('thread'):
|
||||
self.check_cxx(fragment=BOOST_THREAD_CODE, use=var, execute=False)
|
||||
if has_lib('log') or has_lib('log_setup'):
|
||||
if not has_lib('thread'):
|
||||
self.env['DEFINES_%s' % var] += ['BOOST_LOG_NO_THREADS']
|
||||
if has_shlib('log') or has_shlib('log_setup'):
|
||||
self.env['DEFINES_%s' % var] += ['BOOST_LOG_DYN_LINK']
|
||||
if has_lib('log_setup'):
|
||||
self.check_cxx(fragment=BOOST_LOG_SETUP_CODE, use=var, execute=False)
|
||||
else:
|
||||
self.check_cxx(fragment=BOOST_LOG_CODE, use=var, execute=False)
|
||||
|
||||
if params.get('linkage_autodetect', False):
|
||||
self.start_msg('Attempting to detect boost linkage flags')
|
||||
toolset = self.boost_get_toolset(kw.get('toolset', ''))
|
||||
if toolset in ('vc',):
|
||||
# disable auto-linking feature, causing error LNK1181
|
||||
# because the code wants to be linked against
|
||||
self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
|
||||
|
||||
# if no dlls are present, we guess the .lib files are not stubs
|
||||
has_dlls = False
|
||||
for x in Utils.listdir(path):
|
||||
if x.endswith(self.env.cxxshlib_PATTERN % ''):
|
||||
has_dlls = True
|
||||
break
|
||||
if not has_dlls:
|
||||
self.env['STLIBPATH_%s' % var] = [path]
|
||||
self.env['STLIB_%s' % var] = libs
|
||||
del self.env['LIB_%s' % var]
|
||||
del self.env['LIBPATH_%s' % var]
|
||||
|
||||
# we attempt to play with some known-to-work CXXFLAGS combinations
|
||||
for cxxflags in (['/MD', '/EHsc'], []):
|
||||
self.env.stash()
|
||||
self.env['CXXFLAGS_%s' % var] += cxxflags
|
||||
try:
|
||||
try_link()
|
||||
self.end_msg('ok: winning cxxflags combination: %s' % (self.env['CXXFLAGS_%s' % var]))
|
||||
exc = None
|
||||
break
|
||||
except Errors.ConfigurationError as e:
|
||||
self.env.revert()
|
||||
exc = e
|
||||
|
||||
if exc is not None:
|
||||
self.end_msg('Could not auto-detect boost linking flags combination, you may report it to boost.py author', ex=exc)
|
||||
self.fatal('The configuration failed')
|
||||
else:
|
||||
self.end_msg('Boost linkage flags auto-detection not implemented (needed ?) for this toolchain')
|
||||
self.fatal('The configuration failed')
|
||||
else:
|
||||
self.start_msg('Checking for boost linkage')
|
||||
try:
|
||||
try_link()
|
||||
except Errors.ConfigurationError as e:
|
||||
self.end_msg('Could not link against boost libraries using supplied options', 'YELLOW')
|
||||
self.fatal('The configuration failed')
|
||||
self.end_msg('ok')
|
||||
|
||||
|
||||
@feature('cxx')
|
||||
@after_method('apply_link')
|
||||
def install_boost(self):
|
||||
if install_boost.done or not Utils.is_win32 or not self.bld.cmd.startswith('install'):
|
||||
return
|
||||
install_boost.done = True
|
||||
inst_to = getattr(self, 'install_path', '${BINDIR}')
|
||||
for lib in self.env.LIB_BOOST:
|
||||
try:
|
||||
file = self.bld.find_file(self.env.cxxshlib_PATTERN % lib, self.env.LIBPATH_BOOST)
|
||||
self.bld.install_files(inst_to, self.bld.root.find_node(file))
|
||||
except:
|
||||
continue
|
||||
install_boost.done = False
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
from waflib import TaskGen
|
||||
|
||||
def options(opt):
|
||||
opt.add_option('--with-coverage', action='store_true', default=False,
|
||||
help='Add compiler flags to enable code coverage information')
|
||||
|
||||
def configure(conf):
|
||||
if conf.options.with_coverage:
|
||||
if not conf.options.debug:
|
||||
conf.fatal('Code coverage flags require debug mode compilation (add --debug)')
|
||||
conf.check_cxx(cxxflags=['-fprofile-arcs', '-ftest-coverage', '-fPIC'],
|
||||
linkflags=['-fprofile-arcs'], uselib_store='GCOV', mandatory=True)
|
||||
|
||||
@TaskGen.feature('cxx','cc')
|
||||
@TaskGen.after('process_source')
|
||||
def add_coverage(self):
|
||||
if getattr(self, 'use', ''):
|
||||
self.use += ' GCOV'
|
||||
else:
|
||||
self.use = 'GCOV'
|
||||
@@ -0,0 +1,240 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
import platform
|
||||
from waflib import Configure, Logs, Utils
|
||||
|
||||
|
||||
def options(opt):
|
||||
opt.add_option('--debug', '--with-debug', action='store_true', default=False,
|
||||
help='Compile in debugging mode with minimal optimizations (-Og)')
|
||||
|
||||
|
||||
def configure(conf):
|
||||
conf.start_msg('Checking C++ compiler version')
|
||||
|
||||
cxx = conf.env.CXX_NAME # generic name of the compiler
|
||||
ccver = tuple(int(i) for i in conf.env.CC_VERSION)
|
||||
ccverstr = '.'.join(conf.env.CC_VERSION)
|
||||
errmsg = ''
|
||||
warnmsg = ''
|
||||
if cxx == 'gcc':
|
||||
if ccver < (7, 4, 0):
|
||||
errmsg = ('The version of gcc you are using is too old.\n'
|
||||
'The minimum supported gcc version is 9.3.')
|
||||
elif ccver < (9, 3, 0):
|
||||
warnmsg = ('Using a version of gcc older than 9.3 is not '
|
||||
'officially supported and may result in build failures.')
|
||||
conf.flags = GccFlags()
|
||||
elif cxx == 'clang':
|
||||
if Utils.unversioned_sys_platform() == 'darwin':
|
||||
if ccver < (10, 0, 0):
|
||||
errmsg = ('The version of Xcode you are using is too old.\n'
|
||||
'The minimum supported Xcode version is 12.4.')
|
||||
elif ccver < (12, 0, 0):
|
||||
warnmsg = ('Using a version of Xcode older than 12.4 is not '
|
||||
'officially supported and may result in build failures.')
|
||||
elif ccver < (7, 0, 0):
|
||||
errmsg = ('The version of clang you are using is too old.\n'
|
||||
'The minimum supported clang version is 7.0.')
|
||||
conf.flags = ClangFlags()
|
||||
else:
|
||||
warnmsg = f'{cxx} compiler is unsupported'
|
||||
conf.flags = CompilerFlags()
|
||||
|
||||
if errmsg:
|
||||
conf.end_msg(ccverstr, color='RED')
|
||||
conf.fatal(errmsg)
|
||||
elif warnmsg:
|
||||
conf.end_msg(ccverstr, color='YELLOW')
|
||||
Logs.warn('WARNING: ' + warnmsg)
|
||||
else:
|
||||
conf.end_msg(ccverstr)
|
||||
|
||||
conf.areCustomCxxflagsPresent = len(conf.env.CXXFLAGS) > 0
|
||||
|
||||
# General flags are always applied (e.g., selecting C++ language standard)
|
||||
generalFlags = conf.flags.getGeneralFlags(conf)
|
||||
conf.add_supported_cxxflags(generalFlags['CXXFLAGS'])
|
||||
conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
|
||||
conf.env.DEFINES += generalFlags['DEFINES']
|
||||
|
||||
|
||||
@Configure.conf
|
||||
def check_compiler_flags(conf):
|
||||
# Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
|
||||
# corresponding environment variables are not set.
|
||||
# DEFINES are always applied.
|
||||
if conf.options.debug:
|
||||
extraFlags = conf.flags.getDebugFlags(conf)
|
||||
if conf.areCustomCxxflagsPresent:
|
||||
missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS]
|
||||
if missingFlags:
|
||||
Logs.warn('Selected debug mode, but CXXFLAGS is set to a custom value "%s"'
|
||||
% ' '.join(conf.env.CXXFLAGS))
|
||||
Logs.warn('Default flags "%s" will not be used' % ' '.join(missingFlags))
|
||||
else:
|
||||
extraFlags = conf.flags.getOptimizedFlags(conf)
|
||||
|
||||
if not conf.areCustomCxxflagsPresent:
|
||||
conf.add_supported_cxxflags(extraFlags['CXXFLAGS'])
|
||||
conf.add_supported_linkflags(extraFlags['LINKFLAGS'])
|
||||
|
||||
conf.env.DEFINES += extraFlags['DEFINES']
|
||||
|
||||
|
||||
@Configure.conf
|
||||
def add_supported_cxxflags(self, cxxflags):
|
||||
"""
|
||||
Check which cxxflags are supported by the active compiler and add them to env.CXXFLAGS variable.
|
||||
"""
|
||||
if len(cxxflags) == 0:
|
||||
return
|
||||
|
||||
self.start_msg('Checking supported CXXFLAGS')
|
||||
|
||||
supportedFlags = []
|
||||
for flags in cxxflags:
|
||||
flags = Utils.to_list(flags)
|
||||
if self.check_cxx(cxxflags=['-Werror'] + flags, mandatory=False):
|
||||
supportedFlags += flags
|
||||
|
||||
self.end_msg(' '.join(supportedFlags))
|
||||
self.env.prepend_value('CXXFLAGS', supportedFlags)
|
||||
|
||||
|
||||
@Configure.conf
|
||||
def add_supported_linkflags(self, linkflags):
|
||||
"""
|
||||
Check which linkflags are supported by the active compiler and add them to env.LINKFLAGS variable.
|
||||
"""
|
||||
if len(linkflags) == 0:
|
||||
return
|
||||
|
||||
self.start_msg('Checking supported LINKFLAGS')
|
||||
|
||||
supportedFlags = []
|
||||
for flags in linkflags:
|
||||
flags = Utils.to_list(flags)
|
||||
if self.check_cxx(linkflags=['-Werror'] + flags, mandatory=False):
|
||||
supportedFlags += flags
|
||||
|
||||
self.end_msg(' '.join(supportedFlags))
|
||||
self.env.prepend_value('LINKFLAGS', supportedFlags)
|
||||
|
||||
|
||||
class CompilerFlags:
|
||||
def getCompilerVersion(self, conf):
|
||||
return tuple(int(i) for i in conf.env.CC_VERSION)
|
||||
|
||||
def getGeneralFlags(self, conf):
|
||||
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
|
||||
return {
|
||||
'CXXFLAGS': [],
|
||||
'LINKFLAGS': [],
|
||||
'DEFINES': ['BOOST_ASIO_NO_DEPRECATED', 'BOOST_FILESYSTEM_NO_DEPRECATED'],
|
||||
}
|
||||
|
||||
def getDebugFlags(self, conf):
|
||||
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in debug mode"""
|
||||
return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['_DEBUG']}
|
||||
|
||||
def getOptimizedFlags(self, conf):
|
||||
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in optimized mode"""
|
||||
return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['NDEBUG']}
|
||||
|
||||
|
||||
class GccClangCommonFlags(CompilerFlags):
|
||||
"""
|
||||
This class defines common flags that work for both gcc and clang compilers.
|
||||
"""
|
||||
|
||||
def getGeneralFlags(self, conf):
|
||||
flags = super().getGeneralFlags(conf)
|
||||
flags['CXXFLAGS'] += ['-std=c++17']
|
||||
if Utils.unversioned_sys_platform() != 'darwin':
|
||||
flags['LINKFLAGS'] += ['-fuse-ld=lld']
|
||||
return flags
|
||||
|
||||
__cxxFlags = [
|
||||
'-fdiagnostics-color',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wpedantic',
|
||||
'-Wenum-conversion',
|
||||
'-Wextra-semi',
|
||||
'-Wno-unused-parameter',
|
||||
]
|
||||
__linkFlags = ['-Wl,-O1']
|
||||
|
||||
def getDebugFlags(self, conf):
|
||||
flags = super().getDebugFlags(conf)
|
||||
flags['CXXFLAGS'] += ['-Og', '-g'] + self.__cxxFlags + [
|
||||
'-Werror',
|
||||
'-Wno-error=deprecated-declarations', # Bug #3795
|
||||
'-Wno-error=maybe-uninitialized', # Bug #1615
|
||||
]
|
||||
flags['LINKFLAGS'] += self.__linkFlags
|
||||
return flags
|
||||
|
||||
def getOptimizedFlags(self, conf):
|
||||
flags = super().getOptimizedFlags(conf)
|
||||
flags['CXXFLAGS'] += ['-O2', '-g1'] + self.__cxxFlags
|
||||
flags['LINKFLAGS'] += self.__linkFlags
|
||||
return flags
|
||||
|
||||
|
||||
class GccFlags(GccClangCommonFlags):
|
||||
__cxxFlags = [
|
||||
'-Wcatch-value=2',
|
||||
'-Wcomma-subscript', # enabled by default in C++20
|
||||
'-Wduplicated-branches',
|
||||
'-Wduplicated-cond',
|
||||
'-Wlogical-op',
|
||||
'-Wredundant-tags',
|
||||
'-Wvolatile', # enabled by default in C++20
|
||||
]
|
||||
|
||||
def getDebugFlags(self, conf):
|
||||
flags = super().getDebugFlags(conf)
|
||||
flags['CXXFLAGS'] += self.__cxxFlags
|
||||
if platform.machine() == 'armv7l':
|
||||
flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
|
||||
return flags
|
||||
|
||||
def getOptimizedFlags(self, conf):
|
||||
flags = super().getOptimizedFlags(conf)
|
||||
flags['CXXFLAGS'] += self.__cxxFlags
|
||||
if platform.machine() == 'armv7l':
|
||||
flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
|
||||
return flags
|
||||
|
||||
|
||||
class ClangFlags(GccClangCommonFlags):
|
||||
def getGeneralFlags(self, conf):
|
||||
flags = super().getGeneralFlags(conf)
|
||||
if Utils.unversioned_sys_platform() == 'darwin':
|
||||
# Bug #4296
|
||||
brewdir = '/opt/homebrew' if platform.machine() == 'arm64' else '/usr/local'
|
||||
flags['CXXFLAGS'] += [
|
||||
['-isystem', f'{brewdir}/include'], # for Homebrew
|
||||
['-isystem', '/opt/local/include'], # for MacPorts
|
||||
]
|
||||
elif Utils.unversioned_sys_platform() == 'freebsd':
|
||||
# Bug #4790
|
||||
flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
|
||||
return flags
|
||||
|
||||
__cxxFlags = [
|
||||
'-Wundefined-func-template',
|
||||
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
|
||||
]
|
||||
|
||||
def getDebugFlags(self, conf):
|
||||
flags = super().getDebugFlags(conf)
|
||||
flags['CXXFLAGS'] += self.__cxxFlags
|
||||
return flags
|
||||
|
||||
def getOptimizedFlags(self, conf):
|
||||
flags = super().getOptimizedFlags(conf)
|
||||
flags['CXXFLAGS'] += self.__cxxFlags
|
||||
return flags
|
||||
@@ -0,0 +1,214 @@
|
||||
#! /usr/bin/env python
|
||||
# encoding: UTF-8
|
||||
# Thomas Nagy 2008-2010 (ita)
|
||||
|
||||
"""
|
||||
|
||||
Doxygen support
|
||||
|
||||
Variables passed to bld():
|
||||
* doxyfile -- the Doxyfile to use
|
||||
|
||||
When using this tool, the wscript will look like:
|
||||
|
||||
def options(opt):
|
||||
opt.load('doxygen')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('doxygen')
|
||||
# check conf.env.DOXYGEN, if it is mandatory
|
||||
|
||||
def build(bld):
|
||||
if bld.env.DOXYGEN:
|
||||
bld(features="doxygen", doxyfile='Doxyfile', ...)
|
||||
|
||||
def doxygen(bld):
|
||||
if bld.env.DOXYGEN:
|
||||
bld(features="doxygen", doxyfile='Doxyfile', ...)
|
||||
"""
|
||||
|
||||
from fnmatch import fnmatchcase
|
||||
import os, os.path, re, stat
|
||||
from waflib import Task, Utils, Node, Logs, Errors, Build
|
||||
from waflib.TaskGen import feature
|
||||
|
||||
DOXY_STR = '"${DOXYGEN}" - '
|
||||
DOXY_FMTS = 'html latex man rft xml'.split()
|
||||
DOXY_FILE_PATTERNS = '*.' + ' *.'.join('''
|
||||
c cc cxx cpp c++ java ii ixx ipp i++ inl h hh hxx hpp h++ idl odl cs php php3
|
||||
inc m mm py f90c cc cxx cpp c++ java ii ixx ipp i++ inl h hh hxx
|
||||
'''.split())
|
||||
|
||||
re_rl = re.compile('\\\\\r*\n', re.MULTILINE)
|
||||
re_nl = re.compile('\r*\n', re.M)
|
||||
def parse_doxy(txt):
|
||||
tbl = {}
|
||||
txt = re_rl.sub('', txt)
|
||||
lines = re_nl.split(txt)
|
||||
for x in lines:
|
||||
x = x.strip()
|
||||
if not x or x.startswith('#') or x.find('=') < 0:
|
||||
continue
|
||||
if x.find('+=') >= 0:
|
||||
tmp = x.split('+=')
|
||||
key = tmp[0].strip()
|
||||
if key in tbl:
|
||||
tbl[key] += ' ' + '+='.join(tmp[1:]).strip()
|
||||
else:
|
||||
tbl[key] = '+='.join(tmp[1:]).strip()
|
||||
else:
|
||||
tmp = x.split('=')
|
||||
tbl[tmp[0].strip()] = '='.join(tmp[1:]).strip()
|
||||
return tbl
|
||||
|
||||
class doxygen(Task.Task):
|
||||
vars = ['DOXYGEN', 'DOXYFLAGS']
|
||||
color = 'BLUE'
|
||||
|
||||
def runnable_status(self):
|
||||
'''
|
||||
self.pars are populated in runnable_status - because this function is being
|
||||
run *before* both self.pars "consumers" - scan() and run()
|
||||
|
||||
set output_dir (node) for the output
|
||||
'''
|
||||
|
||||
for x in self.run_after:
|
||||
if not x.hasrun:
|
||||
return Task.ASK_LATER
|
||||
|
||||
if not getattr(self, 'pars', None):
|
||||
txt = self.inputs[0].read()
|
||||
self.pars = parse_doxy(txt)
|
||||
if not self.pars.get('OUTPUT_DIRECTORY'):
|
||||
self.pars['OUTPUT_DIRECTORY'] = self.inputs[0].parent.get_bld().abspath()
|
||||
|
||||
# Override with any parameters passed to the task generator
|
||||
if getattr(self.generator, 'pars', None):
|
||||
for k, v in self.generator.pars.items():
|
||||
self.pars[k] = v
|
||||
|
||||
self.doxy_inputs = getattr(self, 'doxy_inputs', [])
|
||||
if not self.pars.get('INPUT'):
|
||||
self.doxy_inputs.append(self.inputs[0].parent)
|
||||
else:
|
||||
for i in self.pars.get('INPUT').split():
|
||||
if os.path.isabs(i):
|
||||
node = self.generator.bld.root.find_node(i)
|
||||
else:
|
||||
node = self.generator.path.find_node(i)
|
||||
if not node:
|
||||
self.generator.bld.fatal('Could not find the doxygen input %r' % i)
|
||||
self.doxy_inputs.append(node)
|
||||
|
||||
if not getattr(self, 'output_dir', None):
|
||||
bld = self.generator.bld
|
||||
# First try to find an absolute path, then find or declare a relative path
|
||||
self.output_dir = bld.root.find_dir(self.pars['OUTPUT_DIRECTORY'])
|
||||
if not self.output_dir:
|
||||
self.output_dir = bld.path.find_or_declare(self.pars['OUTPUT_DIRECTORY'])
|
||||
|
||||
self.signature()
|
||||
return Task.Task.runnable_status(self)
|
||||
|
||||
def scan(self):
|
||||
exclude_patterns = self.pars.get('EXCLUDE_PATTERNS','').split()
|
||||
file_patterns = self.pars.get('FILE_PATTERNS','').split()
|
||||
if not file_patterns:
|
||||
file_patterns = DOXY_FILE_PATTERNS
|
||||
if self.pars.get('RECURSIVE') == 'YES':
|
||||
file_patterns = ["**/%s" % pattern for pattern in file_patterns]
|
||||
nodes = []
|
||||
names = []
|
||||
for node in self.doxy_inputs:
|
||||
if os.path.isdir(node.abspath()):
|
||||
for m in node.ant_glob(incl=file_patterns, excl=exclude_patterns):
|
||||
nodes.append(m)
|
||||
else:
|
||||
nodes.append(node)
|
||||
return (nodes, names)
|
||||
|
||||
def run(self):
|
||||
dct = self.pars.copy()
|
||||
dct['INPUT'] = ' '.join(['"%s"' % x.abspath() for x in self.doxy_inputs])
|
||||
code = '\n'.join(['%s = %s' % (x, dct[x]) for x in self.pars])
|
||||
code = code.encode() # for python 3
|
||||
#fmt = DOXY_STR % (self.inputs[0].parent.abspath())
|
||||
cmd = Utils.subst_vars(DOXY_STR, self.env)
|
||||
env = self.env.env or None
|
||||
proc = Utils.subprocess.Popen(cmd, shell=True, stdin=Utils.subprocess.PIPE, env=env, cwd=self.generator.bld.path.get_bld().abspath())
|
||||
proc.communicate(code)
|
||||
return proc.returncode
|
||||
|
||||
def post_run(self):
|
||||
nodes = self.output_dir.ant_glob('**/*', quiet=True)
|
||||
for x in nodes:
|
||||
x.sig = Utils.h_file(x.abspath())
|
||||
self.outputs += nodes
|
||||
return Task.Task.post_run(self)
|
||||
|
||||
class tar(Task.Task):
|
||||
"quick tar creation"
|
||||
run_str = '${TAR} ${TAROPTS} ${TGT} ${SRC}'
|
||||
color = 'RED'
|
||||
after = ['doxygen']
|
||||
def runnable_status(self):
|
||||
for x in getattr(self, 'input_tasks', []):
|
||||
if not x.hasrun:
|
||||
return Task.ASK_LATER
|
||||
|
||||
if not getattr(self, 'tar_done_adding', None):
|
||||
# execute this only once
|
||||
self.tar_done_adding = True
|
||||
for x in getattr(self, 'input_tasks', []):
|
||||
self.set_inputs(x.outputs)
|
||||
if not self.inputs:
|
||||
return Task.SKIP_ME
|
||||
return Task.Task.runnable_status(self)
|
||||
|
||||
def __str__(self):
|
||||
tgt_str = ' '.join([a.nice_path(self.env) for a in self.outputs])
|
||||
return '%s: %s\n' % (self.__class__.__name__, tgt_str)
|
||||
|
||||
@feature('doxygen')
|
||||
def process_doxy(self):
|
||||
if not getattr(self, 'doxyfile', None):
|
||||
self.generator.bld.fatal('no doxyfile??')
|
||||
|
||||
node = self.doxyfile
|
||||
if not isinstance(node, Node.Node):
|
||||
node = self.path.find_resource(node)
|
||||
if not node:
|
||||
raise ValueError('doxygen file not found')
|
||||
|
||||
# the task instance
|
||||
dsk = self.create_task('doxygen', node)
|
||||
|
||||
if getattr(self, 'doxy_tar', None):
|
||||
tsk = self.create_task('tar')
|
||||
tsk.input_tasks = [dsk]
|
||||
tsk.set_outputs(self.path.find_or_declare(self.doxy_tar))
|
||||
if self.doxy_tar.endswith('bz2'):
|
||||
tsk.env['TAROPTS'] = ['cjf']
|
||||
elif self.doxy_tar.endswith('gz'):
|
||||
tsk.env['TAROPTS'] = ['czf']
|
||||
else:
|
||||
tsk.env['TAROPTS'] = ['cf']
|
||||
|
||||
def configure(conf):
|
||||
'''
|
||||
Check if doxygen and tar commands are present in the system
|
||||
|
||||
If the commands are present, then conf.env.DOXYGEN and conf.env.TAR
|
||||
variables will be set. Detection can be controlled by setting DOXYGEN and
|
||||
TAR environmental variables.
|
||||
'''
|
||||
|
||||
conf.find_program('doxygen', var='DOXYGEN', mandatory=False)
|
||||
conf.find_program('tar', var='TAR', mandatory=False)
|
||||
|
||||
# doxygen docs
|
||||
from waflib.Build import BuildContext
|
||||
class doxy(BuildContext):
|
||||
cmd = "doxygen"
|
||||
fun = "doxygen"
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
def options(opt):
|
||||
opt.add_option('--with-sanitizer', action='store', default='', dest='sanitizers',
|
||||
help='Comma-separated list of compiler sanitizers to enable [default=none]')
|
||||
|
||||
def configure(conf):
|
||||
for san in conf.options.sanitizers.split(','):
|
||||
if not san:
|
||||
continue
|
||||
|
||||
sanflag = '-fsanitize=%s' % san
|
||||
conf.start_msg('Checking if compiler supports %s' % sanflag)
|
||||
|
||||
if conf.check_cxx(cxxflags=['-Werror', sanflag, '-fno-omit-frame-pointer'],
|
||||
linkflags=[sanflag], mandatory=False):
|
||||
conf.end_msg('yes')
|
||||
conf.env.append_unique('CXXFLAGS', [sanflag, '-fno-omit-frame-pointer'])
|
||||
conf.env.append_unique('LINKFLAGS', [sanflag])
|
||||
else:
|
||||
conf.end_msg('no', color='RED')
|
||||
conf.fatal('%s sanitizer is not supported by the current compiler' % san)
|
||||
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
# inspired by code by Hans-Martin von Gaudecker, 2012
|
||||
|
||||
import os
|
||||
from waflib import Node, Task, TaskGen, Errors, Logs, Build, Utils
|
||||
|
||||
class sphinx_build(Task.Task):
|
||||
color = 'BLUE'
|
||||
run_str = '${SPHINX_BUILD} -D ${VERSION} -D ${RELEASE} -q -b ${BUILDERNAME} -d ${DOCTREEDIR} ${SRCDIR} ${OUTDIR}'
|
||||
|
||||
def __str__(self):
|
||||
env = self.env
|
||||
src_str = ' '.join([a.path_from(a.ctx.launch_node()) for a in self.inputs])
|
||||
tgt_str = ' '.join([a.path_from(a.ctx.launch_node()) for a in self.outputs])
|
||||
if self.outputs: sep = ' -> '
|
||||
else: sep = ''
|
||||
return'%s [%s]: %s%s%s\n'%(self.__class__.__name__.replace('_task',''),
|
||||
self.env['BUILDERNAME'], src_str, sep, tgt_str)
|
||||
|
||||
@TaskGen.extension('.py', '.rst')
|
||||
def sig_hook(self, node):
|
||||
node.sig=Utils.h_file(node.abspath())
|
||||
|
||||
@TaskGen.feature("sphinx")
|
||||
@TaskGen.before_method("process_source")
|
||||
def apply_sphinx(self):
|
||||
"""Set up the task generator with a Sphinx instance and create a task."""
|
||||
|
||||
inputs = []
|
||||
for i in Utils.to_list(self.source):
|
||||
if not isinstance(i, Node.Node):
|
||||
node = self.path.find_node(node)
|
||||
else:
|
||||
node = i
|
||||
if not node:
|
||||
raise ValueError('[%s] file not found' % i)
|
||||
inputs.append(node)
|
||||
|
||||
task = self.create_task('sphinx_build', inputs)
|
||||
|
||||
conf = self.path.find_node(self.config)
|
||||
task.inputs.append(conf)
|
||||
|
||||
confdir = conf.parent.abspath()
|
||||
buildername = getattr(self, 'builder', 'html')
|
||||
srcdir = getattr(self, 'srcdir', confdir)
|
||||
outdir = self.path.find_or_declare(getattr(self, 'outdir', buildername)).get_bld()
|
||||
doctreedir = getattr(self, 'doctreedir', os.path.join(outdir.abspath(), '.doctrees'))
|
||||
|
||||
task.env['BUILDERNAME'] = buildername
|
||||
task.env['SRCDIR'] = srcdir
|
||||
task.env['DOCTREEDIR'] = doctreedir
|
||||
task.env['OUTDIR'] = outdir.abspath()
|
||||
task.env['VERSION'] = 'version=%s' % self.version
|
||||
task.env['RELEASE'] = 'release=%s' % getattr(self, 'release', self.version)
|
||||
|
||||
import imp
|
||||
confData = imp.load_source('sphinx_conf', conf.abspath())
|
||||
|
||||
if buildername == 'man':
|
||||
for i in confData.man_pages:
|
||||
target = outdir.find_or_declare('%s.%d' % (i[1], i[4]))
|
||||
task.outputs.append(target)
|
||||
|
||||
if self.install_path:
|
||||
self.bld.install_files('%s/man%d/' % (self.install_path, i[4]), target)
|
||||
else:
|
||||
task.outputs.append(outdir)
|
||||
|
||||
def configure(conf):
|
||||
conf.find_program('sphinx-build', var='SPHINX_BUILD', mandatory=False)
|
||||
|
||||
# sphinx docs
|
||||
from waflib.Build import BuildContext
|
||||
class sphinx(BuildContext):
|
||||
cmd = "sphinx"
|
||||
fun = "sphinx"
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
# NLSR Authors
|
||||
|
||||
The following lists maintainers, primary developers, and all much-appreciated contributors to NLSR in alphabetical order.
|
||||
The specific contributions of individual authors can be obtained from the git history of the [official NLSR repository](https://github.com/named-data/NLSR).
|
||||
If you would like to become a contributor to the official repository, please follow the recommendations in <https://github.com/named-data/.github/blob/main/CONTRIBUTING.md>.
|
||||
|
||||
* Alexander Afanasyev <https://users.cs.fiu.edu/~afanasyev>
|
||||
* Adam Alyyan <https://github.com/a64adam>
|
||||
* Syed Obaid Amin <http://obaidamin.weebly.com/>
|
||||
* Pedro David Arjona Villicaña <https://github.com/david-arjona>
|
||||
* Muktadir R. Chowdhury <https://github.com/alvyC>
|
||||
* Damian Coomes <https://github.com/dmcoomes>
|
||||
* ***(Maintainer)*** Saurab Dulal <https://dulalsaurab.github.io>
|
||||
* Laqin Fan <https://github.com/laqinfan>
|
||||
* Simon Fayer <https://github.com/sfayer>
|
||||
* ***(Former Maintainer)*** Ashlesh Gawande <https://www.linkedin.com/in/agawande>
|
||||
* ***(Former Maintainer)*** Nicholas Gordon <https://github.com/gorgonical>
|
||||
* ***(Former Maintainer)*** A. K. M. Mahmudul Hoque <https://sites.google.com/site/akmhoque/home>
|
||||
* ***(Former Maintainer)*** Vince Lehman <http://vslehman.com>
|
||||
* Tianxing Ma <https://github.com/matianxing1992>
|
||||
* Spyridon Mastorakis <https://sites.google.com/site/spyridonmastorakis>
|
||||
* Eric Newberry <https://ericnewberry.com>
|
||||
* João Pereira <http://website.jpereira.co.uk>
|
||||
* Davide Pesavento <https://github.com/Pesa>
|
||||
* Md Ashiqur Rahman <https://ashiqrahman.com>
|
||||
* Junxiao Shi <https://cs.arizona.edu/~shijunxiao>
|
||||
* Salvatore Signorello <https://wwwen.uni.lu/snt/people/salvatore_signorello>
|
||||
* Jiewen Tan <https://www.linkedin.com/in/jiewentan>
|
||||
* Alejandro Gil Torres <https://github.com/gltorres>
|
||||
* Ryan Wickman <http://rwickman.github.io>
|
||||
* Yingdi Yu <https://irl.cs.ucla.edu/~yingdi>
|
||||
* Minsheng Zhang <https://www.linkedin.com/in/minsheng-zhang-032023a1>
|
||||
|
||||
## Technical Advisors
|
||||
|
||||
* Lan Wang <http://www.cs.memphis.edu/~lanwang>
|
||||
* Beichuan Zhang <https://cs.arizona.edu/~bzhang>
|
||||
* Lixia Zhang <https://web.cs.ucla.edu/~lixia>
|
||||
+703
@@ -0,0 +1,703 @@
|
||||
NLSR is licensed under the terms of the GNU General Public License,
|
||||
version 3 or later.
|
||||
|
||||
NLSR relies on third-party software, licensed under the following licenses:
|
||||
|
||||
- The Boost libraries are licensed under the
|
||||
[Boost Software License 1.0](https://www.boost.org/users/license.html)
|
||||
|
||||
- ndn-cxx is licensed under the terms of the
|
||||
[GNU Lesser General Public License version 3](https://github.com/named-data/ndn-cxx/blob/master/COPYING.md)
|
||||
|
||||
- ChronoSync is licensed under the terms of the
|
||||
[GNU General Public License version 3](https://github.com/named-data/ChronoSync/blob/master/COPYING.md)
|
||||
|
||||
- PSync is licensed under the terms of the
|
||||
[GNU Lesser General Public License version 3](https://github.com/named-data/PSync/blob/master/COPYING.md)
|
||||
|
||||
- ndn-svs is licensed under the terms of the
|
||||
[GNU Lesser General Public License v2.1](https://github.com/named-data/ndn-svs/blob/master/COPYING.md)
|
||||
|
||||
- The waf build system is licensed under the terms of the
|
||||
[BSD license](https://github.com/named-data/NLSR/blob/master/waf)
|
||||
|
||||
The GPL license is provided below in this file.
|
||||
For more information, see <https://www.gnu.org/licenses/>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
### GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
### Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program--to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation, use
|
||||
the GNU General Public License for most of our software; it applies
|
||||
also to any other work released this way by its authors. You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
### TERMS AND CONDITIONS
|
||||
|
||||
#### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
#### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
#### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
#### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
#### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
#### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
#### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
#### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
#### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
#### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
#### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
#### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
#### 13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
#### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in
|
||||
detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of the GNU General Public
|
||||
License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
#### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
#### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
#### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands \`show w' and \`show c' should show the
|
||||
appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use the
|
||||
GNU Lesser General Public License instead of this License. But first,
|
||||
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -1,34 +0,0 @@
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -gdwarf-2 -g3
|
||||
LIBS = -lccn -lccnsync -lcrypto
|
||||
|
||||
PROGRAMS = nlsrc nlsr
|
||||
INSTALL_PATH=/usr/local/bin/
|
||||
|
||||
NLSR_SRCS=nlsr.c nlsr_ndn.c nlsr_npl.c nlsr_adl.c nlsr_lsdb.c nlsr_route.c nlsr_npt.c nlsr_fib.c nlsr_sync.c nlsr_face.c nlsr_km.c nlsr_km_util.c utility.c
|
||||
NLSRC_SRCS=nlsrc.c
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
nlsr: $(NLSR_SRCS)
|
||||
$(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr
|
||||
|
||||
nlsrc: $(NLSRC_SRCS)
|
||||
$(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc
|
||||
|
||||
install: $(PROGRAMS)
|
||||
cp $(PROGRAMS) $(INSTALL_PATH)
|
||||
cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS)
|
||||
|
||||
uninstall:
|
||||
cd $(INSTALL_PATH); rm -f $(PROGRAMS)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(PROGRAMS)
|
||||
rm -rf *.dSYM
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,126 +0,0 @@
|
||||
Installation:
|
||||
|
||||
1: Getting NLSR:
|
||||
|
||||
https://github.com/NDN-Routing/NLSR0.0
|
||||
|
||||
2: run make to compile.
|
||||
|
||||
3: Start ccnx daemon (ccnd) and Repo (ccnr).
|
||||
|
||||
4: Add '/ndn/keys' route to your neighboring testbed nodes.
|
||||
This can be done by adding routes in your ccnd.conf to all neigbors,
|
||||
e.g.
|
||||
add /ndn/keys udp 10.0.XX.XX
|
||||
add /ndn/keys udp 10.0.YY.YY ...
|
||||
add /ndn/keys udp 10.0.ZZ.ZZ
|
||||
|
||||
5: Create your keys and publish them through repo. Please have
|
||||
a look at https://github.com/named-data/ndn-testbed-key-suite for details.
|
||||
|
||||
6: create a nlsr configuration file, have a look at
|
||||
macbook.conf and 'Configuration Parameters' section for details
|
||||
|
||||
7: start nlsr
|
||||
|
||||
|
||||
Configuration Parameter:
|
||||
|
||||
1. router-name </name/prefix/of/the/router>
|
||||
It is a required configuration parameter that is used to set the router name.
|
||||
Name prefix of the router must start with `/ndn' and followed by a strict
|
||||
hierarchical order of name components up to the hostname of the router. For
|
||||
e.g. if router has a hostname host.dept.org.edu pollux.cs.memphis.edu then the
|
||||
router name can be `/ndn/org.edu/dept/host..
|
||||
|
||||
2. ccnneighbor </name/prefix/of/neighbor> [neighbor_ip_addrr]
|
||||
This parameter is used to configure the neighboring router. Name prefix of a
|
||||
neighbor must start with `/ndn. and followed by a strict hierarchical order of
|
||||
name component as mentioned for router-name. If a router has a neighbor having
|
||||
hostname `neighbor.dept.org.edu' then configuration command would be
|
||||
`ccnneighbor /ndn/org.edu/dept/neighbor. The optional parameter,
|
||||
[neighbor_ip_addrr], can be provided for explicitly connecting to a given
|
||||
IP. This is useful if there is no entry of the hostname in the DNS.
|
||||
|
||||
3. ccnname </name/prefix/to/be/advertised>
|
||||
ccnname is used to advertise the name prefix of the services hosted by the
|
||||
router. Name prefix must follow the ccnx naming convention.
|
||||
|
||||
4. topo-prefix <name/prefix/of/repo/topo>
|
||||
It is used to configure the topological prefix of the `sync. slice created for
|
||||
nlsr in a repo. Prefix must follow the ccnx naming convention. Default value
|
||||
for topo prefix is `/ndn/routing/nlsr'
|
||||
|
||||
5. slice-prefix <name/prefix/of/repo/slice>
|
||||
This parameter is used to set the sync's slice prefix. All nlsr nodes `must'
|
||||
have the same slice prefix and must follow the ccnx naming convention. Default
|
||||
value for slice prefix is `/ndn/routing/nlsr/LSA'
|
||||
|
||||
6. lsa-refresh-time <sec>
|
||||
It is the time in seconds, after which router will refresh its LSAs. Default
|
||||
value = 1800 sec, Min = 240 sec
|
||||
|
||||
7. router-dead-interval <sec>
|
||||
It is the time after which router will consider its neighbor dead if it does
|
||||
not hear anything for that amount of time. If an LSA generated by neighbor has
|
||||
a lifetime greater than router-dead-interval then router will simply discard
|
||||
the LSA and update name prefix table, routing table and ccnd FIB accordingly.
|
||||
Default value = 3600 sec, Min = 360 sec.
|
||||
|
||||
8. interest-retry <number>
|
||||
interest-retry is maximum number of times a router will send same interest if
|
||||
the interest is timed out. Default = 3, Min =1 and Max = 10
|
||||
|
||||
9. interest-resend-time <sec>
|
||||
When an interest is timed out, NLSR waits for `interest-resend-time. before
|
||||
sending another interest. The interest is retransmitted up to the value of
|
||||
`interest-retry.. If the interest doesn.t get satisfied during this time the
|
||||
neighbor will be considered as dead. Default value = 15 sec, Min = 1 sec, Max =
|
||||
60 sec
|
||||
|
||||
10. max-faces-per-prefix <number>
|
||||
By default NLSR calculates and add faces for all available faces to a prefix.
|
||||
Number of faces can be restricted with this parameter, if this is configured
|
||||
NLSR will add <number> or faces per prefixes in ccnd FIB.
|
||||
|
||||
11. debug <on/off>
|
||||
Enable nlsr debugging by printing out detail messages on the standard output.
|
||||
By default it is off.
|
||||
|
||||
12. logdir </directory/for/logging/>
|
||||
NLSR will start writing log in logdir folder. If logdir is not configured NLSR
|
||||
will create a log directory name nlsrLog in user home directory and write log
|
||||
into that folder.
|
||||
|
||||
13. tunnel-type <udp | tcp>
|
||||
This is used to specify the tunnel type that NLSR should create for building an
|
||||
overlay network. By default NLSR creates udp tunnels.
|
||||
|
||||
**Following Commands are only required for hyperbolic routing**
|
||||
|
||||
14. hyperbolic-routing <on|dry_run>
|
||||
This option enables hyperbolic routing. With option on, link state routing
|
||||
doesn't work while with dry_run option route is calculated by Link State
|
||||
routing and hyperbolic routes are just recorded only in log file.Following
|
||||
field is required if hyperbolic routing is on.
|
||||
|
||||
15. hyperbolic-cordinate <radius> <theta>
|
||||
Polar coordinates of a node in a form of radius and theta. Currently, calculation
|
||||
of the polar coordinates is an offline process and done by
|
||||
the operator of a site.
|
||||
|
||||
** Hyperbolic Commands End here **
|
||||
|
||||
16. keystore-path </path/to/keystore/file name(.ccnx_keystore)>
|
||||
Path to the keystore. The keystore folder is usually created by
|
||||
ccninitkeystore. Keys in this folder will be used by NLSR to sign the packets.
|
||||
|
||||
17. root-key-prefix </key/prefix>
|
||||
Name prefix of the root key; the site key should be signed by this key.
|
||||
e.g. root-key-prefix /ndn/keys
|
||||
|
||||
18. site-name </name/prefix/of/site>
|
||||
Name of the site of which this router is a part.
|
||||
|
||||
19. network </name/of/network>
|
||||
Name of the networks router belongs to
|
||||
@@ -0,0 +1,40 @@
|
||||
# Notes for NLSR developers
|
||||
|
||||
If you are new to the NDN software community, please read our
|
||||
[Contributor's Guide](https://github.com/named-data/.github/blob/main/CONTRIBUTING.md).
|
||||
|
||||
## Licensing requirements
|
||||
|
||||
Contributions to NLSR must be licensed under the GPL v3 or a compatible license.
|
||||
If you choose the GPL v3, please use the following license boilerplate in all `.hpp`
|
||||
and `.cpp` files:
|
||||
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) [Year(s)], [Copyright Holder(s)].
|
||||
*
|
||||
* This file is part of NLSR (Named-data Link State Routing).
|
||||
* See AUTHORS.md for complete list of NLSR authors and contributors.
|
||||
*
|
||||
* NLSR 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.
|
||||
*
|
||||
* NLSR 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
|
||||
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
If you are affiliated with an NSF-supported NDN project institution, please use the [NDN Team License
|
||||
Boilerplate](https://redmine.named-data.net/projects/nlsr/wiki/NDN_Team_License_Boilerplate_(NLSR)).
|
||||
|
||||
## Recommendations
|
||||
|
||||
NLSR code is subject to the code style defined
|
||||
[here](https://redmine.named-data.net/projects/nfd/wiki/CodeStyle).
|
||||
|
||||
NLSR Developer's guide can be found
|
||||
[here](https://github.com/named-data/NLSR/blob/developers-guide/NLSR-Developers-Guide.pdf).
|
||||
@@ -0,0 +1,51 @@
|
||||
# NLSR: Named Data Link State Routing Protocol
|
||||
|
||||
[](https://github.com/named-data/NLSR/actions/workflows/ci.yml)
|
||||
[](https://github.com/named-data/NLSR/actions/workflows/docs.yml)
|
||||

|
||||

|
||||
|
||||
> For more extensive documentation, please visit the [NLSR homepage](https://docs.named-data.net/NLSR/current/).
|
||||
|
||||
## Overview
|
||||
|
||||
NLSR is a routing protocol for Named Data Networking (NDN) that populates the Routing Information
|
||||
Base (RIB) of an NDN router, such as [NFD](https://github.com/named-data/NFD). NLSR continues to
|
||||
evolve alongside the core [NDN protocol](https://docs.named-data.net/NDN-packet-spec/current/).
|
||||
|
||||
The main design goal of NLSR is to provide a routing protocol to populate NDN's RIB.
|
||||
NLSR calculates the routing table using link-state or hyperbolic routing and produces
|
||||
multiple faces for each reachable name prefix in a single authoritative domain. NLSR
|
||||
will continue to evolve over time to include neighbor discovery and to become a full
|
||||
fledged inter-domain routing protocol for NDN.
|
||||
|
||||
NLSR was mainly developed by members of the NSF-sponsored [NDN project team](
|
||||
https://named-data.net/project/participants/). See [`AUTHORS.md`](AUTHORS.md) for details.
|
||||
|
||||
## Source releases
|
||||
|
||||
The source code and installation instructions are available at the following locations:
|
||||
|
||||
- [Installation](https://docs.named-data.net/NLSR/current/INSTALL.html)
|
||||
- [Getting started with NLSR](https://docs.named-data.net/NLSR/current/GETTING-STARTED.html)
|
||||
- [NLSR GitHub repository](https://github.com/named-data/NLSR)
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
Please submit any bug reports or feature requests to the
|
||||
[NLSR issue tracker](https://redmine.named-data.net/projects/nlsr/issues).
|
||||
|
||||
## Additional resources
|
||||
|
||||
- [Contributor's Guide](https://github.com/named-data/.github/blob/main/CONTRIBUTING.md)
|
||||
- [NLSR Wiki](https://redmine.named-data.net/projects/nlsr/wiki)
|
||||
- [NLSR Issue Tracker](https://redmine.named-data.net/projects/nlsr/issues)
|
||||
- [NLSR Mailing List Sign Up](https://listserv.memphis.edu/scripts/wa.exe?GETPW1)
|
||||
- [NLSR Mailing List](https://listserv.memphis.edu/scripts/wa.exe?SUBED1=NLSR-HELP-L&A=1)
|
||||
- [NLSR Mailing List Archives](https://listserv.memphis.edu/scripts/wa.exe?A0=NLSR-HELP-L)
|
||||
- [NLSR Developer's guide](https://github.com/named-data/NLSR/blob/developers-guide/NLSR-Developers-Guide.pdf)
|
||||
|
||||
## License
|
||||
|
||||
NLSR is free software distributed under the GNU General Public License version 3.
|
||||
See [`COPYING.md`](COPYING.md) for details.
|
||||
@@ -0,0 +1,87 @@
|
||||
Getting Started with NLSR
|
||||
=========================
|
||||
|
||||
.. toctree::
|
||||
..
|
||||
|
||||
Getting Source
|
||||
--------------
|
||||
|
||||
- `GitHub NLSR repository <https://github.com/named-data/NLSR>`__
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
:doc:`INSTALL`
|
||||
|
||||
Important Notes About Configuration
|
||||
-----------------------------------
|
||||
|
||||
Since v0.4.0, NLSR no longer creates Faces for the neighbors that are
|
||||
specified in ``nlsr.conf``. Instead, it relies on the pre-existence of
|
||||
the Faces in NFD. NLSR will obtain this information from NFD, and
|
||||
configure its neighbors using this information.
|
||||
|
||||
For users who were relying on NLSR to automagically configure their networks,
|
||||
this must now be done with ``nfdc``. See ``man nfdc`` for its documentation
|
||||
(`online version <https://docs.named-data.net/NFD/current/manpages/nfdc.html>`__).
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
After installing NLSR from source, you need to create a configuration file for
|
||||
NLSR. Please take a look at :doc:`manpages/nlsr.conf` for a sample configuration. For
|
||||
details on configuring a router, please refer to :doc:`ROUTER-CONFIG`. For details on
|
||||
security configuration, please refer to :doc:`SECURITY-CONFIG`.
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
Run nlsr with the following command:
|
||||
|
||||
::
|
||||
|
||||
nlsr
|
||||
|
||||
NLSR will look for the default configuration file, ``nlsr.conf``, in the current directory.
|
||||
|
||||
You can also run ``nlsr -f`` with the absolute path of the configuration file:
|
||||
|
||||
::
|
||||
|
||||
nlsr -f /usr/local/etc/ndn/nlsr.conf
|
||||
|
||||
Logging
|
||||
-------
|
||||
|
||||
NLSR uses the ndn-cxx logging facility. All levels listed below the selected log-level
|
||||
value are enabled.
|
||||
|
||||
::
|
||||
|
||||
Valid values:
|
||||
|
||||
TRACE trace messages (most verbose)
|
||||
DEBUG debugging messages
|
||||
INFO informational messages
|
||||
WARN warning messages
|
||||
ERROR error messages
|
||||
FATAL fatal (will be logged unconditionally)
|
||||
|
||||
To obtain logs for NLSR, set the ``NDN_LOG`` environment variable with the correct prefix
|
||||
and log-level settings. For example, running the following command will display all log
|
||||
messages in NLSR with a DEBUG level or below.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
NDN_LOG='nlsr.*=DEBUG' nlsr
|
||||
|
||||
If the user is presented with an error message "User does not have read and write
|
||||
permission on the directory" it can be circumvented by running the application with sudo:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo env NDN_LOG='nlsr.*=DEBUG' nlsr
|
||||
|
||||
See ``man ndn-log`` for more details (`online version
|
||||
<https://docs.named-data.net/ndn-cxx/current/manpages/ndn-log.html>`__).
|
||||
@@ -0,0 +1,61 @@
|
||||
NLSR Installation Instructions
|
||||
==============================
|
||||
|
||||
.. toctree::
|
||||
..
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- `NFD <https://github.com/named-data/NFD>`__ and its dependencies.
|
||||
|
||||
Check out the `documentation <https://docs.named-data.net/NFD/current/INSTALL.html>`__
|
||||
for detailed installation and running instructions.
|
||||
|
||||
- PSync library [optional but recommended, enabled by default]
|
||||
|
||||
Download the PSync library and build it according to the instructions available at
|
||||
https://github.com/named-data/PSync#build
|
||||
|
||||
- ChronoSync library [optional, deprecated]
|
||||
|
||||
For testing purposes, NLSR can be optionally built with ChronoSync support. Download
|
||||
the ChronoSync library and build it according to the instructions available at
|
||||
https://github.com/named-data/ChronoSync#build
|
||||
|
||||
- SVS library [optional]
|
||||
|
||||
NLSR can be used with State Vector Sync as the underlying Sync protocol. Download
|
||||
the ndn-svs library and build it according to the instructions available at
|
||||
https://github.com/named-data/ndn-svs#installation
|
||||
|
||||
Note that at least one Sync library must be enabled.
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
Execute the following commands to build NLSR:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
./waf configure
|
||||
./waf
|
||||
sudo ./waf install
|
||||
|
||||
Refer to ``./waf --help`` for more options that can be used during the configure stage and
|
||||
how to properly configure NLSR.
|
||||
|
||||
If your pkgconfig path is not set properly, you can do the following before running ``./waf
|
||||
configure``:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
# or
|
||||
export PKG_CONFIG_PATH=/path/to/pkgconfig/on/your/machine
|
||||
|
||||
If ChronoSync support is desired, NLSR needs to be configured with the following option:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
./waf configure --with-chronosync
|
||||
@@ -0,0 +1,301 @@
|
||||
Router Configuration
|
||||
====================
|
||||
|
||||
.. toctree::
|
||||
..
|
||||
|
||||
Example network and sample configuration
|
||||
----------------------------------------
|
||||
|
||||
Assume that three routers in the same network, but at three different sites
|
||||
(``memphis.edu``, ``arizona.edu``, and ``colostate.edu``), are connected to each other to
|
||||
construct the following topology:
|
||||
|
||||
::
|
||||
|
||||
+-------------------------------------+
|
||||
| /ndn/edu/memphis/%C1.Router/router1 |
|
||||
+-------------------------------------+
|
||||
/ 11 12\
|
||||
/ \
|
||||
route-cost = 25 / \ route-cost = 30
|
||||
/ \
|
||||
17 / \ 13
|
||||
+-----------------------------------+ 7 10 +-------------------------------------+
|
||||
|/ndn/edu/arizona/%C1.Router/router3|-------------------|/ndn/edu/colostate/%C1.Router/router2|
|
||||
+-----------------------------------+ route-cost = 28 +-------------------------------------+
|
||||
|
||||
Figure: Network Topology
|
||||
|
||||
The number represents the connecting face id. For example,
|
||||
``/ndn/edu/memphis/%C1.Router/router1`` is connected to
|
||||
``/ndn/edu/arizona/%C1.Router/router3`` via face 11 and the route cost is 25. To reach
|
||||
``/ndn/edu/colostate/%C1.Router/router2`` via face 12, the route cost is 30.
|
||||
|
||||
We will walk through setting up the faces and creating the configuration file for
|
||||
``/ndn/edu/memphis/%C1.Router/router1``.
|
||||
|
||||
It is recommended to configure security as described at :doc:`SECURITY-CONFIG`, before
|
||||
starting router configuration.
|
||||
|
||||
Step 1. Ensuring nfd is running
|
||||
-------------------------------
|
||||
|
||||
Type the following in the terminal:
|
||||
|
||||
::
|
||||
|
||||
nfd-status
|
||||
|
||||
If you see ``error while connecting to the forwarder (No such file or directory)``,
|
||||
``nfd`` is not running. Follow the instructions in `Getting started with NFD
|
||||
<https://docs.named-data.net/NFD/current/INSTALL.html>`_ to run nfd.
|
||||
|
||||
Since v0.4.0, NLSR no longer creates Faces for the neighbors that are
|
||||
specified in ``nlsr.conf``. Instead, it relies on the pre-existence of
|
||||
the Faces in NFD. NLSR will obtain this information from NFD, and
|
||||
configure its neighbors using this information.
|
||||
|
||||
To create faces it is now necessary to use the ``nfdc`` command. See ``man nfdc`` for
|
||||
its documentation (`online version <https://docs.named-data.net/NFD/current/manpages/nfdc.html>`__).
|
||||
|
||||
Step 2. Determining FaceUri
|
||||
---------------------------
|
||||
|
||||
Assume that ``/ndn/edu/arizona/%C1.Router/router3`` has hostname ``router3.arizona.edu`` and
|
||||
``/ndn/edu/colostate/%C1.Router/router2`` has IP address ``79.123.10.145``.
|
||||
``/ndn/edu/memphis/%C1.Router/router1`` will consider FaceUri
|
||||
``udp4://router3.arizona.edu`` for router ``/ndn/edu/arizona/%C1.Router/router3`` and
|
||||
FaceUri ``udp4://79.123.10.145`` for router ``/ndn/edu/colostate/%C1.Router/router2``.
|
||||
|
||||
Step 3: Creating configuration file
|
||||
-----------------------------------
|
||||
|
||||
Now, assume that ``/ndn/memphis.edu/router1`` wants to advertise three name prefixes
|
||||
(``/ndn/memphis/sports/basketball/grizzlies``, ``/ndn/memphis/entertainment/blues``,
|
||||
``/ndn/news/memphis/politics/lutherking``). The configuration file with the necessary
|
||||
configuration commands follows:
|
||||
|
||||
::
|
||||
|
||||
; nlsr.conf starts here
|
||||
; the general section contains all the general settings for router
|
||||
|
||||
general
|
||||
{
|
||||
; mandatory configuration command section network, site and router
|
||||
network /ndn/ ; name of the network the router belongs to in ndn URI format
|
||||
site /edu/memphis/ ; name of the site the router belongs to in ndn URI format
|
||||
router /%C1.Router/router1 ; name of the network the router belongs to in ndn URI format
|
||||
|
||||
; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs
|
||||
lsa-refresh-time 1800 ; default value 1800. Valid values 240-7200
|
||||
|
||||
; InterestLifetime (in seconds) for LSA fetching
|
||||
lsa-interest-lifetime 4 ; default value 4. Valid values 1-60
|
||||
|
||||
state-dir /var/lib/nlsr/ ; state directory to store all dynamic changes to NLSR
|
||||
}
|
||||
|
||||
; the neighbors section contains the configuration for router's neighbors and hello's behavior
|
||||
|
||||
neighbors
|
||||
{
|
||||
; in case hello interest timed out, router will try 'hello-retries' times at 'hello-time-out'
|
||||
; seconds interval before giving up for any neighbors (deciding link is down)
|
||||
|
||||
hello-retries 3 ; interest retries number in integer. Default value 3
|
||||
; valid values 1-10
|
||||
|
||||
hello-timeout 1 ; interest time out value in integer. Default value 1
|
||||
; Valid values 1-15
|
||||
|
||||
hello-interval 60 ; interest sending interval in seconds. Default value 60
|
||||
; valid values 30-90
|
||||
|
||||
; adj-lsa-build-interval is the time to wait in seconds after an Adjacency LSA
|
||||
; build is scheduled before actually building the Adjacency LSA
|
||||
|
||||
adj-lsa-build-interval 5 ; default value 5. Valid values 0-5. It is recommended that
|
||||
; adj-lsa-build-interval have a lower value than
|
||||
; routing-calc-interval
|
||||
|
||||
; first-hello-interval is the time to wait in seconds before sending the first Hello Interest
|
||||
|
||||
first-hello-interval 10 ; Default value 10. Valid values 0-10
|
||||
|
||||
; neighbor command is used to configure router's neighbor. Each neighbor will need
|
||||
; one block of neighbor command
|
||||
|
||||
neighbor
|
||||
{
|
||||
name /ndn/edu/arizona/%C1.Router/router3 ; name prefix of the neighbor router consists
|
||||
; of network, site-name and router-name
|
||||
|
||||
face-uri udp4://router3.arizona.edu ; face uri of the face connected to the neighbor
|
||||
link-cost 25 ; cost of the connecting link to neighbor
|
||||
}
|
||||
|
||||
neighbor
|
||||
{
|
||||
name /ndn/edu/colostate/%C1.Router/router2 ; name prefix of the neighbor router consists
|
||||
; of network, site-name and router-name
|
||||
|
||||
face-uri udp4://79.123.10.145 ; face uri of the face connected to the neighbor
|
||||
link-cost 30 ; cost of the connecting link to neighbor
|
||||
}
|
||||
}
|
||||
|
||||
; the hyperbolic section contains the configuration settings of enabling
|
||||
a router to calculate ; routing table using `hyperbolic routing table
|
||||
calculation`_ method
|
||||
|
||||
hyperbolic
|
||||
{
|
||||
; commands in this section follows a strict order
|
||||
; the switch is used to set hyperbolic routing calculation in NLSR
|
||||
|
||||
state off ; default value 'off', set value 'on' to enable hyperbolic routing table
|
||||
; calculation which turns link state routing 'off'. set value to 'dry-run'
|
||||
; to test hyperbolic routing and compare with link state routing.
|
||||
|
||||
|
||||
radius 123.456 ; radius of the router in hyperbolic coordinate system
|
||||
angle 1.45 ; angle of the router in hyperbolic coordinate system
|
||||
}
|
||||
|
||||
|
||||
; the fib section is used to configure fib entry's type to ndn FIB updated by NLSR
|
||||
|
||||
fib
|
||||
{
|
||||
; the max-faces-per-prefix is used to limit the number of faces for each name prefixes
|
||||
; by NLSR in ndn FIB
|
||||
|
||||
max-faces-per-prefix 3 ; default value 0. Valid value 0-60. By default (value 0) NLSR adds
|
||||
; all available faces for each reachable name prefixes in NDN FIB
|
||||
|
||||
}
|
||||
|
||||
; the advertising section contains the configuration settings of the
|
||||
name prefixes ; hosted by this router
|
||||
|
||||
advertising
|
||||
{
|
||||
; the ndnname is used to advertised name from the router. To advertise each name prefix
|
||||
; configure one block of ndnname configuration command for every name prefix.
|
||||
|
||||
prefix /ndn/memphis/sports/basketball/grizzlies
|
||||
prefix /ndn/memphis/entertainment/blues
|
||||
prefix /ndn/news/memphis/politics/lutherking
|
||||
}
|
||||
|
||||
By default NLSR's sequence file directory is set to ``/var/lib/nlsr/``. User must create this
|
||||
directory before starting NLSR. Since this is a system directory, NLSR must either be executed
|
||||
as root, or NLSR can be run as user "nlsr" after configuring the filesystem to grant "nlsr"
|
||||
read and write permissions. If user lacks permissions, the following error will occur:
|
||||
|
||||
::
|
||||
|
||||
User does not have read and write permission on the directory
|
||||
Error in configuration file processing! Exiting from NLSR
|
||||
|
||||
To avoid this, the directory can be set in a user-owned directory. For example:
|
||||
|
||||
::
|
||||
|
||||
general
|
||||
{
|
||||
...
|
||||
|
||||
state-dir /home/username/nlsr/log ; path for sequence directory and other dynamic changes (Absolute path)
|
||||
|
||||
}
|
||||
...
|
||||
|
||||
The user will encounter errors such as the following if security is not configured:
|
||||
|
||||
::
|
||||
|
||||
Cannot read certificate from file: /home/username/NLSR/root.cert
|
||||
|
||||
To get rid of this and similar errors relating to security one has to configure security
|
||||
as described in :doc:`SECURITY-CONFIG`. Security can be disabled for testing purposes as follows:
|
||||
|
||||
::
|
||||
|
||||
...
|
||||
trust-anchor
|
||||
{
|
||||
type any
|
||||
;file-name "root.cert"
|
||||
}
|
||||
...
|
||||
trust-anchor
|
||||
{
|
||||
type any
|
||||
;file-name "site.cert"
|
||||
}
|
||||
; cert-to-publish "root.cert"
|
||||
; cert-to-publish "router.cert"
|
||||
; cert-to-publish "site.cert"
|
||||
; cert-to-publish "router.cert"
|
||||
|
||||
Or by simply replacing the whole security section with:
|
||||
|
||||
::
|
||||
|
||||
security
|
||||
{
|
||||
validator
|
||||
{
|
||||
trust-anchor
|
||||
{
|
||||
type any
|
||||
}
|
||||
}
|
||||
prefix-update-validator
|
||||
{
|
||||
trust-anchor
|
||||
{
|
||||
type any
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Step 4: Running NLSR on /ndn/memphis.edu/router1
|
||||
-------------------------------------------------
|
||||
|
||||
Assuming the configuration file is saved as ``nlsr.conf``, type the following to run nlsr:
|
||||
|
||||
::
|
||||
|
||||
$ nlsr -f nlsr.conf
|
||||
|
||||
NLSR will look for nlsr.conf in the current directory. If nlsr.conf is not in the current
|
||||
directory, please provide the absolute path with the file name as the value. If
|
||||
``nlsr.conf`` resides in ``/home/ndnuser/configuration`` directory, type ``nlsr -f
|
||||
/home/ndnuser/configuration/nlsr.conf`` to run nlsr.
|
||||
|
||||
The same process needs to be followed for ``/ndn/arizona.edu/router3`` and
|
||||
``/ndn/colostate.edu/router2`` to run NLSR on these routers.
|
||||
|
||||
Expected Output
|
||||
----------------
|
||||
|
||||
Assuming that all three routers are configured correctly and routing has converged,
|
||||
``nfd-status`` in ``/ndn/edu/colostate/%C1.Router/router2`` will have the following (or similar)
|
||||
entries for the name advertised by ``/ndn/edu/memphis/%C1.Router/router1``:
|
||||
|
||||
RIB:
|
||||
|
||||
::
|
||||
|
||||
/ndn/memphis/entertainment/blues route={faceid=17 (origin=128 cost=25 ChildInherit), faceid=7 (origin=128 cost=58 ChildInherit)}
|
||||
/ndn/memphis/sports/basketball/grizzlies route={faceid=17 (origin=128 cost=25 ChildInherit), faceid=7 (origin=128 cost=58 ChildInherit)}
|
||||
/ndn/news/memphis/politics/lutherking route={faceid=17 (origin=128 cost=25 ChildInherit, faceid=7 (origin=128 cost=58 ChildInherit)}
|
||||
|
||||
This output can be seen by typing ``nfdc route list`` in the terminal. Please refer to the
|
||||
network figure for face IDs.
|
||||
|
||||
.. _hyperbolic routing table calculation: http://arxiv.org/abs/0805.1266
|
||||
@@ -0,0 +1,70 @@
|
||||
Security Configuration
|
||||
=======================
|
||||
|
||||
.. toctree::
|
||||
..
|
||||
|
||||
The trust model of NLSR is semi-hierarchical. An example certificate signing hierarchy is:
|
||||
|
||||
::
|
||||
|
||||
root
|
||||
|
|
||||
+--------------+---------------+
|
||||
site1 site2
|
||||
| |
|
||||
+---------+---------+ +
|
||||
operator1 operator2 operator3
|
||||
| | |
|
||||
+-----+-----+ +----+-----+ +-----+-----+--------+
|
||||
router1 router2 router3 router4 router5 router6 router7
|
||||
| | | | | | |
|
||||
+ + + + + + +
|
||||
NLSR NLSR NLSR NLSR NLSR NLSR NLSR
|
||||
|
||||
Each entity's name and corresponding certificate name follow the
|
||||
convention below:
|
||||
|
||||
======== ===================================================== ================================= ===============================================
|
||||
Entity Identity Name Example Certificate Name Example
|
||||
-------- ----------------------------------------------------- --------------------------------- -----------------------------------------------
|
||||
root /\<network\> /ndn /ndn/KEY/1/%00/%01
|
||||
site /\<network\>/\<site\> /ndn/edu/ucla /ndn/edu/ucla/KEY/2/%00/%01
|
||||
operator /\<network\>/\<site\>/%C1.Operator/\<operator-name\> /ndn/edu/ucla/%C1.Operator/op1 /ndn/edu/ucla/%C1.Operator/op1/KEY/3/%00/%01
|
||||
router /\<network\>/\<site\>/%C1.Router/\<router-name\> /ndn/edu/ucla/%C1.Router/rt1 /ndn/edu/ucla/%C1.Router/rt1/KEY/4/%00/%01
|
||||
NLSR /\<network\>/\<site\>/%C1.Router/\<router-name\>/NLSR /ndn/edu/ucla/%C1.Router/rt1/NLSR /ndn/edu/ucla/%C1.Router/rt1/NLSR/KEY/5/%00/%01
|
||||
======== ===================================================== ================================= ===============================================
|
||||
|
||||
Users should create keys according to the naming and signing hierarchies above. The
|
||||
``%C1.Operator`` and ``%C1.Router`` labels are NDN keywords that should not be modified
|
||||
by the user.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
Detailed information about key setup is given in NLSR Developer's Guide and the
|
||||
:doc:`beginners-guide`.
|
||||
|
||||
Certificate Publishing
|
||||
----------------------
|
||||
|
||||
In a network, every router should have the root certificate configured as a trust
|
||||
anchor. For each site, at least one router should publish the site certificate, and at
|
||||
least one router should publish the certificate of the site operator. Each router should
|
||||
publish its own certificate. All this information should be explicitly specified in the
|
||||
nlsr.conf file. For example, the following configuration file indicates that NLSR should
|
||||
publish the site certificate and the router certificate:
|
||||
|
||||
::
|
||||
|
||||
...
|
||||
security
|
||||
{
|
||||
validator
|
||||
{
|
||||
...
|
||||
}
|
||||
cert-to-publish "site.cert" ; name of the file which contains the site certificate (optional).
|
||||
cert-to-publish "router.cert" ; name of the file which contains the router certificate (required).
|
||||
...
|
||||
}
|
||||
@@ -0,0 +1,887 @@
|
||||
==========================================================
|
||||
A beginners guide to installing and testing NLSR on Fedora
|
||||
==========================================================
|
||||
|
||||
:Authors: David Arjona-Villicaña, Octavio Renteria-Vidales, Ashlesh Gawande
|
||||
:Date: November, 2018
|
||||
:Abstract: This is an easy to follow guide on how to install and test the NLSR routing protocol for NDN using two Fedora 28 machines. The commands and the paths used in this guide have been tested only in Fedora, although a similar procedure should be used for other linux systems. Specifically, the testing section (§ `5 <#test>`__) is platform independent. Therefore users who have NLSR already installed may skip to this section. Since neither NDN, NLSR nor Fedora are static software developments, it is expected that some commands and features in this guide will change over time. However, this guide is as accurate as it could be at the time it was published.
|
||||
|
||||
.. role:: raw-latex(raw)
|
||||
:format: latex
|
||||
|
||||
|
||||
.. _intro:
|
||||
|
||||
1. Introduction
|
||||
===============
|
||||
|
||||
The following instructions are based on the information provided at the
|
||||
Named Data Networking project web page [NDNmain]_.
|
||||
Before installing NLSR it is necessary to install different libraries and
|
||||
programs: ndn-cxx, NFD, ChronoSync [optional], ndn-svs [optional] and PSync.
|
||||
This document describes the necessary steps to correctly install these
|
||||
programs (§ `2 <#ndncxx>`__, `3 <#nfd>`__ and `4 <#nlsr>`__) and a brief
|
||||
guide on how to configure and test NLSR using a simple two-node
|
||||
network (§ `5 <#test>`__).
|
||||
|
||||
Many of the commands in this guide need to be executed as *root*.
|
||||
Starting from Fedora 28, there is no need to set a root user
|
||||
[Kolman2018]_. However it is possible to define it,
|
||||
using the following command:
|
||||
|
||||
::
|
||||
|
||||
$ sudo -i
|
||||
|
||||
And then using the ``passwd`` command to set up a password. After setting
|
||||
up the root user, it is possible to become root by employing the
|
||||
following command and providing the root password when prompted:
|
||||
|
||||
::
|
||||
|
||||
$ su -
|
||||
|
||||
Fedora employs the ``dnf`` command to install and verify installed
|
||||
packages. The following commands may become useful during the
|
||||
installation process and should be executed as root:
|
||||
|
||||
- To verify that all installed packages are up to date
|
||||
|
||||
::
|
||||
|
||||
$ dnf update
|
||||
|
||||
- To verify if a package is already installed in the system
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed <package-name>
|
||||
|
||||
- To search for information about a package or family of packages (not
|
||||
necessarily installed in the system).
|
||||
|
||||
::
|
||||
|
||||
$ dnf info <package-name>
|
||||
|
||||
- To install a package in the system.
|
||||
|
||||
::
|
||||
|
||||
$ dnf install <package-name>
|
||||
|
||||
It is also a good installation practice to download and install all the
|
||||
NDN programs in a common directory. Therefore, it is recommended to
|
||||
create a directory at the home directory where all the following
|
||||
programs may get installed. The name of this directory is not important.
|
||||
However, the following are provided as suggestions: project, NDNproject,
|
||||
NDNprograms. Each of the programs in the following sections should be
|
||||
downloaded to their own directory using the ``git`` command, and then
|
||||
compiled in this directory.
|
||||
|
||||
.. _ndncxx:
|
||||
|
||||
2. Installing ndn-cxx
|
||||
=====================
|
||||
|
||||
2.1 Before installing ndn-cxx
|
||||
-----------------------------
|
||||
|
||||
An updated list of the packages and programs that need to be installed
|
||||
before installing ndn-cxx, is provided at [NDN-cxx]_.
|
||||
This list is also reproduced below with the commands to verify that all
|
||||
the packages have been installed in the system. The following commands
|
||||
should be run as root:
|
||||
|
||||
#. gcc and gcc-c++
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed gcc
|
||||
$ dnf list --installed gcc-c++
|
||||
|
||||
#. Python version 3.8 or later
|
||||
|
||||
::
|
||||
|
||||
$ python3 -V
|
||||
|
||||
#. SQLite 3.x
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed sqlite-devel
|
||||
|
||||
#. OpenSSL version 1.1.1 or later
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed openssl-devel
|
||||
|
||||
#. pkgconf that replaces pkg-config
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed pkgconf*
|
||||
|
||||
#. Boost libraries version 1.71.0 or later
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed boost-devel
|
||||
|
||||
#. git
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed git
|
||||
|
||||
#. doxygen (optional)
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed doxygen
|
||||
|
||||
#. graphviz (optional)
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed graphviz
|
||||
|
||||
#. python3-pip (optional)
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed python3-pip
|
||||
|
||||
#. After verifying that the python3-pip package has been installed, it
|
||||
is necessary to run the following command:
|
||||
|
||||
::
|
||||
|
||||
$ pip install sphinx sphinxcontrib-doxylink
|
||||
|
||||
2.2 Downloading and installing ndn-cxx
|
||||
--------------------------------------
|
||||
|
||||
The ``git`` command allows to download the ndn-cxx library in its own
|
||||
folder, also called *ndn-cxx*. Therefore it is recommended to execute
|
||||
this command at the directory created at § `1 <#intro>`__:
|
||||
|
||||
::
|
||||
|
||||
$ git clone --depth 1 https://github.com/named-data/ndn-cxx.git
|
||||
|
||||
Move to the ndn-cxx directory:
|
||||
|
||||
::
|
||||
|
||||
$ cd ndn-cxx
|
||||
|
||||
Use the following command to verify that everything is ready to compile.
|
||||
If an error message displays, it is necessary to fix it before
|
||||
continuing:
|
||||
|
||||
::
|
||||
|
||||
$ ./waf configure --with-examples
|
||||
|
||||
Compile the ndn-cxx library and install the compiled files at the
|
||||
system's directories:
|
||||
|
||||
::
|
||||
|
||||
$ ./waf
|
||||
$ sudo ./waf install
|
||||
|
||||
2.3 Configuring ndn-cxx
|
||||
-----------------------
|
||||
|
||||
The commands in this subsection need to be run as root. First, it is
|
||||
necessary to create file *local.conf*, which contains a line with the
|
||||
location for the ndn-cxx library:
|
||||
|
||||
::
|
||||
|
||||
$ echo /usr/local/lib64 >> /etc/ld.so.conf.d/local.conf
|
||||
|
||||
The following command configures the libraries:
|
||||
|
||||
::
|
||||
|
||||
$ ldconfig -v | grep ndn
|
||||
|
||||
This command should display a line similar to the following:
|
||||
|
||||
::
|
||||
|
||||
libndn-cxx.so.0.6.1 -> libndn-cxx.so.0.6.1
|
||||
|
||||
Configure the NDN path:
|
||||
|
||||
::
|
||||
|
||||
$ echo export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig >> /etc/profile.d/ndn.sh
|
||||
|
||||
After this command has been executed, it is necessary to apply the
|
||||
changes by either logging out and back in, and then running the
|
||||
following command:
|
||||
|
||||
::
|
||||
|
||||
$ printenv | grep PKG
|
||||
|
||||
Or by executing the following command:
|
||||
|
||||
::
|
||||
|
||||
$ ./etc/profile.d/ndn.sh
|
||||
|
||||
For more information and examples about how to compile and configure
|
||||
this library, users should read the ndn-cxx guide at
|
||||
[NDN-cxx]_.
|
||||
|
||||
.. _nfd:
|
||||
|
||||
3. Installing NFD
|
||||
=================
|
||||
|
||||
3.1 Before installing NFD
|
||||
-------------------------
|
||||
|
||||
An updated list of the packages and programs that need to be installed
|
||||
before NFD is provided at [NDNNFD]_. Before installing
|
||||
NFD it is necessary to verify that the following packages are installed:
|
||||
|
||||
#. pcap library
|
||||
|
||||
::
|
||||
|
||||
$ dnf list --installed libpcap-devel
|
||||
|
||||
3.2 Downloading and installing NFD
|
||||
----------------------------------
|
||||
|
||||
This software is downloaded and installed in a folder called *NFD*, which
|
||||
should be created at the directory defined at § `1 <#intro>`__. The
|
||||
following commands need to be run as a regular user:
|
||||
|
||||
::
|
||||
|
||||
$ git clone --depth 1 https://github.com/named-data/NFD.git
|
||||
$ cd NFD
|
||||
$ ./waf configure
|
||||
|
||||
If the previous command prints an error message saying that waf cannot
|
||||
find WebSocket, it is necessary to follow the instructions provided by
|
||||
this same output, which tells the user to run the following command:
|
||||
|
||||
::
|
||||
|
||||
$ git submodule update --init
|
||||
|
||||
After executing these instructions, complete the configuration by running
|
||||
``./waf configure`` again. Then complete the installation by means of the
|
||||
following commands:
|
||||
|
||||
::
|
||||
|
||||
$ ./waf
|
||||
$ sudo ./waf install
|
||||
|
||||
3.3 Configuring NFD
|
||||
-------------------
|
||||
|
||||
Create a configuration file by running the following command as root:
|
||||
|
||||
::
|
||||
|
||||
$ cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf
|
||||
|
||||
After the configuration file has been created, NFD's behavior may be
|
||||
changed by modifying this file. Once the configuration file has been
|
||||
created, it is recommended to start NFD by using the following command:
|
||||
|
||||
::
|
||||
|
||||
$ nfd-start
|
||||
|
||||
This command does not properly allow to employ the command window to
|
||||
enter new commands; however it displays the NFD logs. Therefore, it is
|
||||
recommended to open a new command window. This second window may be used
|
||||
to verify NDF's status and then stop NFD by using the following
|
||||
commands:
|
||||
|
||||
::
|
||||
|
||||
$ nfd-status
|
||||
$ nfd-stop
|
||||
|
||||
.. _nlsr:
|
||||
|
||||
4. Installing NLSR
|
||||
==================
|
||||
|
||||
4.1 Installing PSync
|
||||
--------------------
|
||||
|
||||
Before installing NLSR, it is also necessary to download and install
|
||||
PSync. PSync is a synchronization library which allows NLSR to synchronize LSAs
|
||||
similar to ChronoSync. More information about PSync may be found at [PSync]_.
|
||||
This library may be installed by running the following commands as a regular
|
||||
user and at the directory defined at § `1 <#intro>`__:
|
||||
|
||||
::
|
||||
|
||||
$ git clone --depth 1 https://github.com/named-data/PSync.git
|
||||
$ cd PSync
|
||||
$ ./waf configure
|
||||
$ ./waf
|
||||
$ sudo ./waf install
|
||||
|
||||
The following command needs to be used again to configure the libraries:
|
||||
|
||||
::
|
||||
|
||||
$ sudo ldconfig -v | grep -i psync
|
||||
|
||||
This command should display a line similar to the following:
|
||||
|
||||
::
|
||||
|
||||
libPSync.so.0.1.0 -> libPSync.so.0.1.0
|
||||
|
||||
4.2 [Optional] Installing ChronoSync
|
||||
------------------------------------
|
||||
|
||||
By default NLSR no longer builds with ChronoSync support.
|
||||
Since ChronoSync is deprecated, only install it for testing purposes.
|
||||
|
||||
Before installing NLSR, it is necessary to first download and install
|
||||
ChronoSync, which is a synchronization library which allows NLSR routers
|
||||
to synchronize Link State Advertisements (LSAs). More information about
|
||||
ChronoSync may be found at [Chronosync]_. This library may be
|
||||
installed by running the following commands as a regular user and at the
|
||||
directory defined at § `1 <#intro>`__:
|
||||
|
||||
::
|
||||
|
||||
$ git clone --depth 1 https://github.com/named-data/ChronoSync.git
|
||||
$ cd ChronoSync
|
||||
$ ./waf configure
|
||||
$ ./waf
|
||||
$ sudo ./waf install
|
||||
|
||||
The following command needs to be used again to configure the libraries:
|
||||
|
||||
::
|
||||
|
||||
$ sudo ldconfig -v | grep -i chronosync
|
||||
|
||||
This command should display a line similar to the following:
|
||||
|
||||
::
|
||||
|
||||
libChronoSync.so.0.5.0 -> libChronoSync.so.0.5.0
|
||||
|
||||
4.3 [Optional] Installing SVS
|
||||
-----------------------------
|
||||
|
||||
NLSR can also use State Vector Sync as the underlying Sync protocol,
|
||||
using the ndn-svs library.
|
||||
|
||||
This library may be installed by running the following commands as a
|
||||
regular user and at the directory defined at § `1 <#intro>`__:
|
||||
|
||||
::
|
||||
|
||||
$ git clone --depth 1 https://github.com/named-data/ndn-svs.git
|
||||
$ cd ndn-svs
|
||||
$ ./waf configure
|
||||
$ ./waf
|
||||
$ sudo ./waf install
|
||||
|
||||
The following command needs to be used again to configure the libraries:
|
||||
|
||||
::
|
||||
|
||||
$ sudo ldconfig -v | grep ndn-svs
|
||||
|
||||
This command should display a line similar to the following:
|
||||
|
||||
::
|
||||
|
||||
libndn-svs.so.0.0.1 -> libndn-svs.so.0.0.1
|
||||
|
||||
4.4 Downloading and installing NLSR
|
||||
-----------------------------------
|
||||
|
||||
NLSR is downloaded and installed in a folder called *NLSR* which should
|
||||
be created at the directory defined at § `1 <#intro>`__. The following
|
||||
commands need to be run as a regular user:
|
||||
|
||||
::
|
||||
|
||||
$ git clone --depth 1 https://github.com/named-data/NLSR.git
|
||||
$ cd NLSR
|
||||
$ ./waf configure
|
||||
$ ./waf
|
||||
$ sudo ./waf install
|
||||
|
||||
If ChronoSync support is needed for testing, please configure NLSR with:
|
||||
|
||||
::
|
||||
|
||||
$ ./waf configure --with-chronosync
|
||||
|
||||
4.5 Configuring NLSR
|
||||
--------------------
|
||||
|
||||
Create and configure the following directory by running the following
|
||||
commands as root:
|
||||
|
||||
::
|
||||
|
||||
$ mkdir /var/lib/nlsr
|
||||
$ chmod 777 /var/lib/nlsr
|
||||
|
||||
.. _test:
|
||||
|
||||
5. Configuring and Testing NLSR
|
||||
===============================
|
||||
|
||||
To test NLSR, the first step is to configure the keys and certificates
|
||||
that implement a secure communication between the routers. Then it is
|
||||
necessary to verify that the computers in the test network are
|
||||
connected, that NFD is running and the faces between the computers are
|
||||
configured. Finally, the NLSR configuration file has to be edited before
|
||||
running NLSR. The following subsections are provided as a guide to
|
||||
define and configure a simple computer network between two computers:
|
||||
router1 and router2.
|
||||
|
||||
.. _security:
|
||||
|
||||
5.1 Setting up the security
|
||||
---------------------------
|
||||
|
||||
Configuring security in an NDN network requires to generate, exchange
|
||||
and install, keys and certificates between the root, site, operator and
|
||||
router computers that form the network
|
||||
[NLSRsecconf]_, [NLSRdevguide]_, although in practice, it
|
||||
is possible to keep more than one of these entities in a single machine.
|
||||
The following example and *Figure 1* show how to configure security
|
||||
for a single router, called Router X. In this example, the root, site,
|
||||
operator and Router X are in different computers:
|
||||
|
||||
.. figure:: security_comp.png
|
||||
:alt: Security configuration example for Router X.
|
||||
:width: 19cm
|
||||
:align: center
|
||||
|
||||
Fig. 1. Security configuration example for Router X.
|
||||
|
||||
|
||||
#. At the root server, generate the root key:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-key-gen /ndn/ > root.key
|
||||
|
||||
#. Generate the certificate for the root key at the root server:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-dump -i /ndn/ > root.cert
|
||||
|
||||
#. Install the root certificate at the root server:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-install -f root.cert
|
||||
|
||||
#. At the site server, generate the site key:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-key-gen /ndn/edu/uaslp > site.key
|
||||
|
||||
#. Copy the site key to the root server and generate the certificate for
|
||||
the site server:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-gen -s /ndn/ site.key > site.cert
|
||||
|
||||
#. Copy the site certificate to the site server and install it:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-install -f site.cert
|
||||
|
||||
#. At the operator server, generate the operator key:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-key-gen /ndn/edu/uaslp/%C1.Operator/op > op.key
|
||||
|
||||
#. Copy the operator key to the site server and generate the certificate
|
||||
for the operator server:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-gen -s /ndn/edu/uaslp op.key > op.cert
|
||||
|
||||
#. Copy the operator certificate to the operator server and install it:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-install -f op.cert
|
||||
|
||||
#. At the router, generate the router key:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-key-gen /ndn/edu/uaslp/%C1.Router/routerX > routerX.key
|
||||
|
||||
#. Copy the router key to the operator server and generate the
|
||||
certificate for the router:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-gen -s /ndn/edu/uaslp/%C1.Operator/op routerX.key >
|
||||
routerX.cert
|
||||
|
||||
#. Copy the router certificate to the router and install it:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-cert-install -f routerX.cert
|
||||
|
||||
In the previous steps, the *%C1.Router* and *%C1.Operator* labels are
|
||||
NDN keywords and should not be changed. These labels will be also used
|
||||
by the configuration file (§ `5.4 <#configfile>`__)
|
||||
|
||||
The following command may be used to verify that the certificates have
|
||||
been installed in a computer:
|
||||
|
||||
::
|
||||
|
||||
$ ndnsec-list
|
||||
|
||||
This guide recommends that one machine functions as the root, site,
|
||||
operator and router1, while a different computer only functions as
|
||||
router2. *Figure 2* shows this
|
||||
configuration. For router1, the twelve steps described before need to be
|
||||
executed except for exchanging files between computers. For the router2,
|
||||
only steps 10 to 12 are needed to generate this router's certificate.
|
||||
|
||||
Additionally, the following command may be used to print a list and a
|
||||
brief description of all the ``ndnsec`` commands:
|
||||
|
||||
::
|
||||
|
||||
$ man ndnsec
|
||||
|
||||
|
||||
.. figure:: netwk1.png
|
||||
:alt: Example network.
|
||||
:width: 19cm
|
||||
:align: center
|
||||
|
||||
Fig. 2. Example network.
|
||||
|
||||
|
||||
5.2 Configuring the network
|
||||
---------------------------
|
||||
|
||||
The first step is to configure the physical network. If two computers
|
||||
are going to get connected using a single Ethernet cable, it is
|
||||
necessary to verify that this cable is a crossover. The other option is
|
||||
to employ a switch between two computers that are then connected using
|
||||
two regular Ethernet cables.
|
||||
|
||||
After the physical network has been assembled, it is necessary to
|
||||
configure the network addresses and cards for all the computers in the
|
||||
network. It is important to remember that computers that are connected
|
||||
to each other should use the same subnetwork address. It is possible to
|
||||
verify the network configuration in a Linux computer by means of the
|
||||
``ip addr`` command.
|
||||
|
||||
Once the physical network and network cards have been configured, it is
|
||||
necessary to verify that the computers can communicate with each other.
|
||||
The simplest way to do this is by using the ``ping`` command:
|
||||
|
||||
::
|
||||
|
||||
$ ping <remote-ip-address>
|
||||
|
||||
5.3 Starting and configuring NFD
|
||||
--------------------------------
|
||||
|
||||
To start and configure NFD it is necessary to open two terminal windows.
|
||||
The first one will be used to start NFD by means of the ``nfd-start``
|
||||
command. This terminal will also display the logs that NFD generates. By
|
||||
default, NFD only generates informational logs (INFO). However, it is
|
||||
possible to obtain different levels of verbosity for these logs. These
|
||||
levels can be set before NFD starts by editing the
|
||||
*/usr/local/etc/ndn/nfd.conf* file. Open this file using a regular text
|
||||
editor, read the information provided about logging and then modify the
|
||||
*default-level* variable at the *log* section according to the
|
||||
instructions provided in the file. Additional information about NFD
|
||||
configuration may be found at [NDNNFDusage]_.
|
||||
|
||||
The second terminal will be used to monitor the NFD status:
|
||||
|
||||
::
|
||||
|
||||
$ nfd-status
|
||||
|
||||
Employ the following command to configure each face that a computer uses
|
||||
to connect to a neighboring computer:
|
||||
|
||||
::
|
||||
|
||||
$ nfdc face create udp4://<remote-ip-address>
|
||||
|
||||
The face id may be displayed by running:
|
||||
|
||||
::
|
||||
|
||||
$ nfdc face list
|
||||
|
||||
The status of the face may be verified by using the following command:
|
||||
|
||||
::
|
||||
|
||||
$ nfdc face show id <face-id>
|
||||
|
||||
After finishing NLSR testing, it is necessary to destroy the face before
|
||||
stopping NFD. This operation is described at § `5.6 <#turn_off>`__. For
|
||||
the two computer network provided as an example (*Figure 2*), it is necessary that both
|
||||
machines run NFD and that each one configures a face that connects to
|
||||
the other machine.
|
||||
|
||||
.. _configfile:
|
||||
|
||||
5.4 Setting up the configuration file
|
||||
-------------------------------------
|
||||
|
||||
Instructions on how to use the configuration file are already provided
|
||||
at the NLSR's Router Configuration page [NLSRrtrconf]_.
|
||||
Read the information in this page to understand NLSR router
|
||||
configuration. The following text describes the instructions that have
|
||||
been modified at the default nlsr.conf file for router1:
|
||||
|
||||
::
|
||||
|
||||
; AT general SECTION:
|
||||
{
|
||||
network /ndn/ ; name of the network
|
||||
site /edu/uaslp ; name of the site
|
||||
router /%C1.Router/router1 ; name of the router: router1
|
||||
}
|
||||
|
||||
;AT neighbors SECTION:
|
||||
neighbors
|
||||
{
|
||||
neighbor
|
||||
{
|
||||
name /ndn/edu/uaslp/%C1.Router/router2 ; Neighbor router: router2
|
||||
face-uri udp://140.220.80.124 ; face to the neighbor
|
||||
link-cost 30 ; cost of the link
|
||||
}
|
||||
}
|
||||
|
||||
; AT advertising SECTION:
|
||||
advertising
|
||||
{
|
||||
prefix /ndn/edu/uaslp/office/bldg1 ; Advertising destinations
|
||||
prefix /ndn/edu/uaslp/office/bldg2 ; for router1
|
||||
}
|
||||
|
||||
; AT security SECTION:
|
||||
security
|
||||
{
|
||||
validator
|
||||
{
|
||||
...
|
||||
trust-anchor
|
||||
{
|
||||
type file
|
||||
file-name "root.cert" ; root certificate file
|
||||
}
|
||||
}
|
||||
|
||||
prefix-update-validator
|
||||
{
|
||||
...
|
||||
trust-anchor
|
||||
{
|
||||
type file
|
||||
file-name "site.cert" ; site certificate file
|
||||
}
|
||||
}
|
||||
|
||||
cert-to-publish "root.cert" ; root certificate file
|
||||
|
||||
cert-to-publish "site.cert" ; site certificate file
|
||||
|
||||
cert-to-publish "op.cert" ; operator certificate file
|
||||
|
||||
cert-to-publish "router1.cert" ; router1 certificate file
|
||||
}
|
||||
|
||||
The following text shows the modified instructions for router2:
|
||||
|
||||
::
|
||||
|
||||
; AT general SECTION:
|
||||
{
|
||||
network /ndn/ ; name of the network
|
||||
site /edu/uaslp ; name of the site
|
||||
router /%C1.Router/router2 ; name of the router: router2
|
||||
}
|
||||
|
||||
;AT neighbors SECTION:
|
||||
neighbors
|
||||
{
|
||||
neighbor
|
||||
{
|
||||
name /ndn/edu/uaslp/%C1.Router/router1 ; Neighbor router: router1
|
||||
face-uri udp://140.220.80.121 ; face to the neighbor
|
||||
link-cost 30 ; cost of the link
|
||||
}
|
||||
}
|
||||
|
||||
; AT advertising SECTION:
|
||||
advertising
|
||||
{
|
||||
prefix /ndn/edu/uaslp/labs/networks ; Advertising destinations
|
||||
prefix /ndn/edu/uaslp/labs/hardware ; for router2
|
||||
}
|
||||
|
||||
; AT security SECTION:
|
||||
security
|
||||
{
|
||||
validator
|
||||
{
|
||||
...
|
||||
trust-anchor
|
||||
{
|
||||
type file
|
||||
file-name "root.cert" ; root certificate file
|
||||
} ; this file needs to be copied to
|
||||
} ; router2
|
||||
|
||||
prefix-update-validator
|
||||
{
|
||||
...
|
||||
trust-anchor
|
||||
{
|
||||
type file
|
||||
file-name "site.cert" ; site certificate file
|
||||
} ; this file needs to be copied to
|
||||
} ; router2
|
||||
|
||||
...
|
||||
cert-to-publish "router2.cert" ; router2 certificate file
|
||||
}
|
||||
|
||||
Notice that files *root.cert* and *site.cert*, which were generated at
|
||||
router1, need to be copied to router2. Also notice that the *%C1.Router*
|
||||
and *%C1.Operator* keywords employed at § `5.1 <#security>`__ are also
|
||||
referenced by these configuration files.
|
||||
|
||||
.. _starting_nlsr:
|
||||
|
||||
5.5 Starting NLSR
|
||||
-----------------
|
||||
|
||||
It is recommended to open a third command terminal and run NLSR in this
|
||||
window. After the NLSR configuration file has been edited and saved as
|
||||
*nlsr.conf*, it is possible to start NLSR by running either of the
|
||||
following two commands:
|
||||
|
||||
::
|
||||
|
||||
$ nlsr
|
||||
$ nlsr -f <configuration-file>
|
||||
|
||||
However, to verify what is NLSR doing, it becomes necessary to employ
|
||||
NLSR's logging facility [NLSRstarting]_. A brief
|
||||
description on how to use NDN's logging facility may be displayed by
|
||||
entering the ``man ndn-log`` command. This guide recommends using one
|
||||
of the following two instructions to start NLSR:
|
||||
|
||||
::
|
||||
|
||||
$ export NDN_LOG=nlsr.*=TRACE && nlsr
|
||||
$ export NDN_LOG=nlsr.*=TRACE && nlsr -f <configuration-file>
|
||||
|
||||
The second terminal window may be used to run ``nfd-status`` again and
|
||||
it should be possible to verify that the status has changed, specially
|
||||
at the FIB and RIB sections of the generated report.
|
||||
|
||||
.. _turn_off:
|
||||
|
||||
5.6 Turning everything off
|
||||
--------------------------
|
||||
|
||||
In order to stop NLSR and NFD, the following sequence of events is
|
||||
recommended:
|
||||
|
||||
#. Stop NLSR by pressing the Ctrl+C keys at the third terminal window.
|
||||
|
||||
#. Destroy the face to the remote computers using either of the
|
||||
following two commands at the second terminal window:
|
||||
|
||||
::
|
||||
|
||||
$ nfdc face destroy <face-id>
|
||||
$ nfdc face destroy udp4://<remote-ip-address>
|
||||
|
||||
#. Stop NFD by entering the following command at the second terminal
|
||||
window:
|
||||
|
||||
::
|
||||
|
||||
$ nfd-stop
|
||||
|
||||
#. The crossover Ethernet cable may be unplugged and the computers'
|
||||
network configuration restored to its original settings.
|
||||
|
||||
5.7 Where to go from here
|
||||
-------------------------
|
||||
|
||||
Users interested in building and configuring larger networks may want to
|
||||
take a look at the NDN Ansible repository
|
||||
[NDNAnsible]_. This repository uses Ansible, which is a
|
||||
configuration management tool, to manage the official NDN testbed
|
||||
deployment [NDNTestbed]_.
|
||||
|
||||
|
||||
.. [NDNmain] *Named Data Networking*, https://named-data.net/, March 2018.
|
||||
|
||||
.. [Kolman2018] M. Kolman. *Anaconda improvements in Fedora 28*, Fedora Magazine, June 2018.
|
||||
|
||||
.. [NDN-cxx] *Getting started with ndn-cxx*, https://docs.named-data.net/ndn-cxx/current/INSTALL.html, April 2018.
|
||||
|
||||
.. [NDNNFD] *Getting started with NFD*, https://docs.named-data.net/NFD/current/INSTALL.html, April 2018.
|
||||
|
||||
.. [NDNNFDusage] *NFD usage*, https://docs.named-data.net/NFD/current/manpages/nfd.html, May 2018.
|
||||
|
||||
.. [Chronosync] Z. Zhu and A. Afanasyev. *Let's ChronoSync: Decentralized dataset state synchronization in Named Data Networking*, in IEEE ICNP, October 2013.
|
||||
|
||||
.. [PSync] M. Zhang, V. Lehman, and L. Wang. *Scalable Name-based Data Synchronization for Named Data Networking*, in IEEE INFOCOM, May 2017.
|
||||
|
||||
.. [NLSRsecconf] *NLSR Security Configuration*, https://docs.named-data.net/NLSR/current/SECURITY-CONFIG.html June 2018.
|
||||
|
||||
.. [NLSRdevguide] V. Lehman, M. Chowdhury, N. Gordon, A. Gawande. *NLSR Developer's Guide*, University of Memphis, November 2017.
|
||||
|
||||
.. [NLSRrtrconf] *NLSR Router Configuration*, https://docs.named-data.net/NLSR/current/ROUTER-CONFIG.html, April 2018.
|
||||
|
||||
.. [NLSRstarting] *Getting Started with NLSR*, https://docs.named-data.net/NLSR/current/GETTING-STARTED.html, May 2018.
|
||||
|
||||
.. [NDNAnsible] *NDN Ansible repository*, https://github.com/WU-ARL/NDN_Ansible, October 2018.
|
||||
|
||||
.. [NDNTestbed] *NDN Testbed*, https://named-data.net/ndn-testbed/, October 2018.
|
||||
@@ -0,0 +1,92 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import importlib.util
|
||||
import sys
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = 'Named Data Link State Routing Protocol (NLSR)'
|
||||
copyright = 'Copyright © 2014-2023 Named Data Networking Project.'
|
||||
author = 'Named Data Networking Project'
|
||||
|
||||
# The short X.Y version.
|
||||
#version = ''
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
#release = ''
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
today_fmt = '%Y-%m-%d'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
needs_sphinx = '4.0'
|
||||
extensions = [
|
||||
'sphinx.ext.extlinks',
|
||||
'sphinx.ext.todo',
|
||||
]
|
||||
|
||||
def addExtensionIfExists(extension: str):
|
||||
try:
|
||||
if importlib.util.find_spec(extension) is None:
|
||||
raise ModuleNotFoundError(extension)
|
||||
except (ImportError, ValueError):
|
||||
sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
|
||||
'Some documentation may not build correctly.\n')
|
||||
else:
|
||||
extensions.append(extension)
|
||||
|
||||
addExtensionIfExists('sphinxcontrib.doxylink')
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['Thumbs.db', '.DS_Store']
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
html_theme = 'named_data_theme'
|
||||
html_theme_path = ['.']
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
html_copy_source = False
|
||||
html_show_sourcelink = False
|
||||
|
||||
# Disable syntax highlighting of code blocks by default.
|
||||
highlight_language = 'none'
|
||||
|
||||
|
||||
# -- Options for manual page output ------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('manpages/nlsr', 'nlsr', 'Named Data Link State Routing daemon', [], 1),
|
||||
('manpages/nlsr.conf', 'nlsr.conf', 'Named Data Link State Routing daemon configuration file', [], 5),
|
||||
('manpages/nlsrc', 'nlsrc', 'command-line utility to interact with and collect statistics from NLSR', [], 1),
|
||||
]
|
||||
|
||||
|
||||
# -- Misc options ------------------------------------------------------------
|
||||
|
||||
doxylink = {
|
||||
'nlsr': ('NLSR.tag', 'doxygen/'),
|
||||
}
|
||||
|
||||
extlinks = {
|
||||
'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,89 @@
|
||||
NLSR: Named Data Link State Routing Protocol
|
||||
============================================
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:maxdepth: 2
|
||||
|
||||
GETTING-STARTED
|
||||
INSTALL
|
||||
SECURITY-CONFIG
|
||||
ROUTER-CONFIG
|
||||
beginners-guide
|
||||
manpages
|
||||
release-notes
|
||||
releases
|
||||
|
||||
**NLSR** is a routing protocol for Named Data Networking (NDN) that populates the Routing
|
||||
Information Base (RIB) of an NDN router, such as `NFD`_. NLSR continues to evolve alongside
|
||||
the core `NDN protocol`_.
|
||||
|
||||
The main design goal of NLSR is to provide a routing protocol to populate NDN's FIB. NLSR
|
||||
calculates the routing table using link-state or hyperbolic routing and produces multiple
|
||||
faces for each reachable name prefix in a single authoritative domain. NLSR will continue
|
||||
to evolve over time to include neighbor discovery and to become a full fledged
|
||||
inter-domain routing protocol for NDN. The protocol design is presented in full detail in
|
||||
the `NLSR Paper`_.
|
||||
|
||||
NLSR was mainly developed by members of the NSF-sponsored `NDN project team
|
||||
<https://named-data.net/project/participants/>`__. See `AUTHORS.md
|
||||
<https://github.com/named-data/NLSR/blob/master/AUTHORS.md>`__ for details.
|
||||
|
||||
Bug reports and feedback are highly appreciated and can be made through the `NLSR Redmine`_.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
- :doc:`GETTING-STARTED`
|
||||
- :doc:`INSTALL`
|
||||
- :doc:`SECURITY-CONFIG`
|
||||
- :doc:`ROUTER-CONFIG`
|
||||
- :doc:`beginners-guide`
|
||||
- :doc:`manpages`
|
||||
- :doc:`release-notes`
|
||||
- :doc:`releases`
|
||||
|
||||
Downloading
|
||||
-----------
|
||||
|
||||
- `Source code git repository <https://github.com/named-data/NLSR>`__
|
||||
|
||||
NLSR mailing list
|
||||
-----------------
|
||||
|
||||
- `NLSR Mailing List`_
|
||||
- `NLSR Mailing List Archives`_
|
||||
|
||||
`Sign up`_ is needed to post to the list or access the archives.
|
||||
|
||||
Additional resources
|
||||
--------------------
|
||||
|
||||
- `NLSR Wiki`_
|
||||
|
||||
- `NLSR Redmine`_
|
||||
Feature requests and bug reports
|
||||
|
||||
- `NLSR Paper`_
|
||||
Detailed explanation of NLSR's design
|
||||
|
||||
- `NLSR Developer's Guide`_
|
||||
For NLSR development
|
||||
|
||||
- `API documentation (doxygen) <doxygen/annotated.html>`__
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
NLSR is free software distributed under the GNU General Public License version 3.
|
||||
See `COPYING.md <https://github.com/named-data/NLSR/blob/master/COPYING.md>`__ for details.
|
||||
|
||||
.. _NDN protocol: https://docs.named-data.net/NDN-packet-spec/current/
|
||||
.. _NFD: https://github.com/named-data/NFD
|
||||
.. _NLSR Wiki: https://redmine.named-data.net/projects/nlsr/wiki
|
||||
.. _NLSR Paper: https://named-data.net/wp-content/uploads/2016/01/ndn-0037-1-nlsr.pdf
|
||||
.. _NLSR Mailing List: https://listserv.memphis.edu/scripts/wa.exe?SUBED1=NLSR-HELP-L&A=1
|
||||
.. _NLSR Mailing List Archives: https://listserv.memphis.edu/scripts/wa.exe?A0=NLSR-HELP-L
|
||||
.. _NLSR Developer's Guide: https://github.com/named-data/NLSR/blob/developers-guide/NLSR-Developers-Guide.pdf
|
||||
.. _Sign up: https://listserv.memphis.edu/scripts/wa.exe?GETPW1
|
||||
.. _NLSR Redmine: https://redmine.named-data.net/projects/nlsr
|
||||
@@ -0,0 +1,8 @@
|
||||
Man pages
|
||||
=========
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 1
|
||||
|
||||
manpages/*
|
||||
@@ -0,0 +1,13 @@
|
||||
nlsr.conf
|
||||
=========
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
NLSR config file
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
.. literalinclude:: ../../nlsr.conf
|
||||
:linenos:
|
||||
@@ -0,0 +1,37 @@
|
||||
nlsr
|
||||
====
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
::
|
||||
|
||||
nlsr [options]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``nlsr`` is a process that implements routing protocol in NDN to populate NDN's Routing
|
||||
Information Base.
|
||||
|
||||
Options:
|
||||
--------
|
||||
|
||||
``-f <FILE>``
|
||||
Specify configuration file name (default: ``./nlsr.conf``)
|
||||
|
||||
``-V``
|
||||
Display version information
|
||||
|
||||
``-h``
|
||||
Display this help message
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
To run NLSR and use a configuration file from the ``/path/to`` directory.
|
||||
|
||||
::
|
||||
|
||||
nlsr -f /path/to/nlsr.conf
|
||||
@@ -0,0 +1,94 @@
|
||||
nlsrc
|
||||
=====
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
::
|
||||
|
||||
nlsrc [-h | -V]
|
||||
nlsrc [-R <router prefix> [-c <nlsr.conf path> | -k]] COMMAND [<Command Options>]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``nlsrc`` is a tool to retrieve link-state database (LSDB) status information from NLSR and
|
||||
announce/withdraw Name prefixes advertised by NLSR.
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
``-h``
|
||||
Print usage information
|
||||
|
||||
``-V``
|
||||
Show NLSRC version information
|
||||
|
||||
``-R <router prefix>``
|
||||
Target a remote NLSR instance.
|
||||
The default is the local NLSR instance ``/localhost``.
|
||||
|
||||
``-c <nlsr.conf path>``
|
||||
Verify remote status information with the trust schema loaded from ``security.validator`` section of specified nlsr.conf config file.
|
||||
The default is loading from ``/etc/ndn/nlsr.conf``.
|
||||
|
||||
``-k``
|
||||
Insecure: do not verify signature on status information retrieved from remote router.
|
||||
|
||||
``COMMAND``
|
||||
|
||||
``lsdb``
|
||||
Retrieve LSDB status information
|
||||
|
||||
``routing``
|
||||
Retrieve routing table status information
|
||||
|
||||
``status``
|
||||
Retrieve LSDB status and routing table status information
|
||||
|
||||
``advertise``
|
||||
Add a Name prefix to be advertised by NLSR
|
||||
|
||||
``advertise <name>``
|
||||
|
||||
``name``
|
||||
The Name prefix to be advertised
|
||||
|
||||
``advertise <name> save``
|
||||
|
||||
``save``
|
||||
Advertise a prefix and also save it to the nlsr.conf file residing in the state-dir for the next start of NLSR that operator may copy and use for the next start of NLSR
|
||||
|
||||
``withdraw``
|
||||
Remove a Name prefix advertised through NLSR
|
||||
|
||||
``withdraw <name>``
|
||||
|
||||
``name``
|
||||
The Name prefix to be withdrawn
|
||||
|
||||
``withdraw <name> delete``
|
||||
|
||||
``delete``
|
||||
Withdraw a prefix and also delete it from the nlsr.conf file residing in the state-dir
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
When security is enabled, NLSR will not be allowed to successfully
|
||||
advertise/withdraw names without first setting a default identity of operator.
|
||||
If default identity is not set as operator, the user will be presented with the
|
||||
error message: "Name prefix update error (code: 403)". To remedy this
|
||||
issue, use the command ``ndnsec set-default``. Example::
|
||||
|
||||
ndnsec set-default /ndn/a-site/%C1.Operator/op
|
||||
|
||||
Exit Status
|
||||
-----------
|
||||
|
||||
nlsrc exits with one of the following values::
|
||||
|
||||
0 nlsrc exited successfully
|
||||
1 generic error
|
||||
2 bad command line
|
||||
@@ -0,0 +1,86 @@
|
||||
{#
|
||||
named_data_theme/layout.html
|
||||
~~~~~~~~~~~~~~~~~
|
||||
#}
|
||||
{% extends "basic/layout.html" %}
|
||||
|
||||
{% block header %}
|
||||
<!--headercontainer-->
|
||||
<div id="header_container">
|
||||
|
||||
<!--header-->
|
||||
<div class="row">
|
||||
<div class="three columns">
|
||||
<div id="logo">
|
||||
<a href="https://named-data.net" title="A Future Internet Architecture"><img src="https://named-data.net/wp-content/uploads/cropped-20130722_Logo2.png" alt="" /></a>
|
||||
</div><!--logo end-->
|
||||
</div>
|
||||
|
||||
<!--top menu-->
|
||||
<div class="nine columns" id="menu_container" >
|
||||
<h1><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--header container end-->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<div class="document">
|
||||
{%- block document %}
|
||||
{{ super() }}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
{%- block sidebartoc %}
|
||||
<h3>{{ _('Table Of Contents') }}</h3>
|
||||
{{ toctree(includehidden=True) }}
|
||||
|
||||
<h3>{{ _('Developer documentation') }}</h3>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="doxygen/annotated.html">API documentation (doxygen)</a></li>
|
||||
<li class="toctree-l1"><a class="reference external" href="https://redmine.named-data.net/projects/nlsr/wiki">NLSR Wiki</a></li>
|
||||
</ul>
|
||||
{%- endblock %}
|
||||
|
||||
{%- block sidebarsearch %}
|
||||
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
|
||||
<form class="search" action="{{ pathto('search') }}" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="{{ _('Go') }}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
{{ _('Enter search terms or a module, class or function name.') }}
|
||||
</p>
|
||||
{%- endblock %}
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<div id="footer-container">
|
||||
<!--footer container-->
|
||||
<div class="row">
|
||||
</div><!-- footer container-->
|
||||
</div>
|
||||
|
||||
<div id="footer-info">
|
||||
<!--footer container-->
|
||||
<div class="row">
|
||||
<div class="twelve columns">
|
||||
|
||||
<div id="copyright">This research is partially supported by NSF (Award <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=1040868" target="_blank>">CNS-1040868</a>)<br/><br/><a rel="license" href="https://creativecommons.org/licenses/by/3.0/deed.en_US" target="_blank">Creative Commons Attribution 3.0 Unported License</a> except where noted.</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!--footer info end-->
|
||||
{% endblock %}
|
||||
|
||||
{% block relbar1 %}{% endblock %}
|
||||
{% block relbar2 %}{% endblock %}
|
||||
@@ -0,0 +1,32 @@
|
||||
<!-- start footer part -->
|
||||
<!--BEGIN GENERATE_TREEVIEW-->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
$navpath
|
||||
<li class="footer">$generatedby
|
||||
<a href="https://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--END GENERATE_TREEVIEW-->
|
||||
<!--BEGIN !GENERATE_TREEVIEW-->
|
||||
<hr class="footer"/>
|
||||
<address class="footer"><small>
|
||||
$generatedby  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
|
||||
</a> $doxygenversion
|
||||
</small></address>
|
||||
<!--END !GENERATE_TREEVIEW-->
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '@GOOGLE_ANALYTICS@', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<!-- start footer part -->
|
||||
<!--BEGIN GENERATE_TREEVIEW-->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
$navpath
|
||||
<li class="footer">$generatedby
|
||||
<a href="https://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--END GENERATE_TREEVIEW-->
|
||||
<!--BEGIN !GENERATE_TREEVIEW-->
|
||||
<hr class="footer"/>
|
||||
<address class="footer"><small>
|
||||
$generatedby  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
|
||||
</a> $doxygenversion
|
||||
</small></address>
|
||||
<!--END !GENERATE_TREEVIEW-->
|
||||
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="https://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="$relpath$jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath$dynsections.js"></script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="$relpath$named_data_doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="$relpath$favicon.ico" rel="shortcut icon" type="image/ico" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<!--headercontainer-->
|
||||
<div id="header_container">
|
||||
|
||||
<!--header-->
|
||||
<div class="row">
|
||||
<div class="three columns">
|
||||
<div id="logo">
|
||||
<a href="https://named-data.net" title="A Future Internet Architecture"><img src="https://named-data.net/wp-content/uploads/cropped-20130722_Logo2.png" alt="" /></a>
|
||||
</div><!--logo end-->
|
||||
</div>
|
||||
|
||||
<!--top menu-->
|
||||
<div class="nine columns" id="menu_container" >
|
||||
<h1><a href="https://named-data.net/doc/NLSR/$projectnumber/">$projectname $projectnumber documentation</a></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--header container end-->
|
||||
<!--END TITLEAREA-->
|
||||
|
||||
<!-- end header part -->
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 362 B |
@@ -0,0 +1,71 @@
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
html { font-size: 62.5%; }
|
||||
|
||||
body {
|
||||
font-family: "Verdana", Arial, sans-serif;
|
||||
background-color: #eeeeec;
|
||||
color: #777;
|
||||
border-top: 4px solid #fd7800;
|
||||
}
|
||||
|
||||
body { background: white; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }
|
||||
|
||||
.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
font-family: "Georgia", "Times New Roman", serif;
|
||||
font-weight: normal;
|
||||
color: #3465a4;
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #204a87;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-bottom: .5em;
|
||||
border-bottom: 1px solid #3465a4;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
color: #dddddd;
|
||||
padding-left: .3em;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
@@ -0,0 +1,459 @@
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
html { font-size: 62.5%; }
|
||||
|
||||
body {
|
||||
font-family: {{ theme_bodyfont }};
|
||||
background-color: {{ theme_bgcolor }};
|
||||
color: #777;
|
||||
border-top: 4px solid #fd7800;
|
||||
}
|
||||
|
||||
body { background: white; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }
|
||||
|
||||
/* Page layout */
|
||||
|
||||
div.header, div.content, div.footer {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
div.header-wrapper {
|
||||
background: {{ theme_headerbg }};
|
||||
border-bottom: 3px solid #2e3436;
|
||||
}
|
||||
|
||||
|
||||
/* Default body styles */
|
||||
a {
|
||||
color: {{ theme_linkcolor }};
|
||||
}
|
||||
|
||||
div.bodywrapper a, div.footer a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
font-family: {{ theme_headerfont }};
|
||||
font-weight: normal;
|
||||
color: {{ theme_headercolor2 }};
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: {{ theme_headercolor1 }};
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-bottom: .5em;
|
||||
border-bottom: 1px solid {{ theme_headercolor2 }};
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
color: #dddddd;
|
||||
padding-left: .3em;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
div.admonition {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 2px 7px 1px 7px;
|
||||
border-left: 0.2em solid black;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
margin: 0px 10px 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dt:target, .highlighted {
|
||||
background-color: #fbe54e;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
div.header {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
div.header .headertitle {
|
||||
font-family: {{ theme_headerfont }};
|
||||
font-weight: normal;
|
||||
font-size: 180%;
|
||||
letter-spacing: .08em;
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
|
||||
div.header .headertitle a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.header div.rel {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
div.header div.rel a {
|
||||
color: {{ theme_headerlinkcolor }};
|
||||
letter-spacing: .1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
p.logo {
|
||||
float: right;
|
||||
}
|
||||
|
||||
img.logo {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Content */
|
||||
div.content-wrapper {
|
||||
background-color: white;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
div.document {
|
||||
width: 70%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.body {
|
||||
padding-right: 2em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.document h1 {
|
||||
line-height: 120%;
|
||||
}
|
||||
|
||||
div.document ul {
|
||||
margin-left: 1.5em;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
div.document dd {
|
||||
margin-left: 1.2em;
|
||||
margin-top: .4em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
div.document .section {
|
||||
margin-top: 1.7em;
|
||||
}
|
||||
div.document .section:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
div.document div.highlight {
|
||||
padding: 3px;
|
||||
background-color: #eeeeec;
|
||||
border-top: 2px solid #dddddd;
|
||||
border-bottom: 2px solid #dddddd;
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
|
||||
div.document h2 {
|
||||
margin-top: .7em;
|
||||
}
|
||||
|
||||
div.document p {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
div.document li.toctree-l1 {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
div.document .descname {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.document .docutils.literal {
|
||||
background-color: #eeeeec;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
div.document .docutils.xref.literal {
|
||||
background-color: transparent;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.document ol {
|
||||
margin: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar */
|
||||
|
||||
div.sidebar {
|
||||
width: 20%;
|
||||
float: right;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
div.sidebar a, div.header a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.sidebar a:hover, div.header a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.sidebar h3 {
|
||||
color: #2e3436;
|
||||
text-transform: uppercase;
|
||||
font-size: 130%;
|
||||
letter-spacing: .1em;
|
||||
}
|
||||
|
||||
div.sidebar ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
div.sidebar li.toctree-l1 a {
|
||||
display: block;
|
||||
padding: 1px;
|
||||
border: 1px solid #dddddd;
|
||||
background-color: #eeeeec;
|
||||
margin-bottom: .4em;
|
||||
padding-left: 3px;
|
||||
color: #2e3436;
|
||||
}
|
||||
|
||||
div.sidebar li.toctree-l2 a {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
margin-left: 1em;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
div.sidebar li.toctree-l3 a {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
margin-left: 2em;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
div.sidebar li.toctree-l2:last-child a {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
div.sidebar li.toctree-l1.current a {
|
||||
border-right: 5px solid {{ theme_headerlinkcolor }};
|
||||
}
|
||||
|
||||
div.sidebar li.toctree-l1.current li.toctree-l2 a {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
div.sidebar input[type="text"] {
|
||||
width: 170px;
|
||||
}
|
||||
|
||||
div.sidebar input[type="submit"] {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
|
||||
/* Footer */
|
||||
|
||||
div.footer-wrapper {
|
||||
background: {{ theme_footerbg }};
|
||||
border-top: 4px solid #babdb6;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
div.footer, div.footer a {
|
||||
color: #888a85;
|
||||
}
|
||||
|
||||
div.footer .right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.footer .left {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
/* Styles copied from basic theme */
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul.keywordmatches li.goodmatch a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* -- index page ------------------------------------------------------------ */
|
||||
|
||||
table.contentstable {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
table.contentstable p.biglink {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
a.biglink {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
span.linkdescr {
|
||||
font-style: italic;
|
||||
padding-top: 5px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* -- general index --------------------------------------------------------- */
|
||||
|
||||
table.indextable td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.indextable dl, table.indextable dd {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table.indextable tr.pcap {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
margin-top: 10px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
img.toggler {
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* -- viewcode extension ---------------------------------------------------- */
|
||||
|
||||
.viewcode-link {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
float: right;
|
||||
font-family:: {{ theme_bodyfont }};
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
margin: -1px -3px;
|
||||
padding: 0 3px;
|
||||
background-color: #f4debf;
|
||||
border-top: 1px solid #ac9;
|
||||
border-bottom: 1px solid #ac9;
|
||||
}
|
||||
|
||||
td.linenos pre {
|
||||
padding: 5px 0px;
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
color: #aaa;
|
||||
margin-top: -10pt;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 635 B |
@@ -0,0 +1,14 @@
|
||||
@import url("agogo.css");
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
background-color: #fafafa;
|
||||
color: #222;
|
||||
line-height: 1.2em;
|
||||
border: 2px solid #C6C9CB;
|
||||
font-size: 1.1em;
|
||||
/* margin: 1.5em 0 1.5em 0; */
|
||||
margin: 0;
|
||||
border-right-style: none;
|
||||
border-left-style: none;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
+788
@@ -0,0 +1,788 @@
|
||||
.c-1, .c-2, .c-3, .c-4, .c-5, .c-6, .c-7, .c-8, .c-9, .c-10, .c-11, .c-12 { float: left; }
|
||||
|
||||
.c-1, .c-2, .c-3, .c-4, .c-5, .c-6, .c-7, .c-8, .c-9, .c-10, .c-11, .c-12 { position: relative; min-height: 1px; padding: 0 15px; }
|
||||
|
||||
.c-1 { width: 8.33333%; }
|
||||
|
||||
.c-2 { width: 16.66667%; }
|
||||
|
||||
.c-3 { width: 25%; }
|
||||
|
||||
.c-4 { width: 33.33333%; }
|
||||
|
||||
.c-5 { width: 41.66667%; }
|
||||
|
||||
.c-6 { width: 50%; }
|
||||
|
||||
.c-7 { width: 58.33333%; }
|
||||
|
||||
.c-8 { width: 66.66667%; }
|
||||
|
||||
.c-9 { width: 75%; }
|
||||
|
||||
.c-10 { width: 83.33333%; }
|
||||
|
||||
.c-11 { width: 91.66667%; }
|
||||
|
||||
.c-12 { width: 100%; }
|
||||
|
||||
/* Requires: normalize.css */
|
||||
/* Global Reset & Standards ---------------------- */
|
||||
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
||||
|
||||
html { font-size: 62.5%; }
|
||||
|
||||
body { background: white; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }
|
||||
|
||||
/* Links ---------------------- */
|
||||
a { color: #fd7800; text-decoration: none; line-height: inherit; }
|
||||
|
||||
a:hover { color: #2795b6; }
|
||||
|
||||
a:focus { color: #fd7800; outline: none; }
|
||||
|
||||
p a, p a:visited { line-height: inherit; }
|
||||
|
||||
/* Misc ---------------------- */
|
||||
.left { float: left; }
|
||||
@media only screen and (max-width: 767px) { .left { float: none; } }
|
||||
|
||||
.right { float: right; }
|
||||
@media only screen and (max-width: 767px) { .right { float: none; } }
|
||||
|
||||
.text-left { text-align: left; }
|
||||
|
||||
.text-right { text-align: right; }
|
||||
|
||||
.text-center { text-align: center; }
|
||||
|
||||
.hide { display: none; }
|
||||
|
||||
.highlight { background: #ffff99; }
|
||||
|
||||
#googlemap img, object, embed { max-width: none; }
|
||||
|
||||
#map_canvas embed { max-width: none; }
|
||||
|
||||
#map_canvas img { max-width: none; }
|
||||
|
||||
#map_canvas object { max-width: none; }
|
||||
|
||||
/* Reset for strange margins by default on <figure> elements */
|
||||
figure { margin: 0; }
|
||||
|
||||
/* Base Type Styles Using Modular Scale ---------------------- */
|
||||
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 14px; direction: ltr; }
|
||||
|
||||
p { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-size: 14px; line-height: 1.6; margin-bottom: 17px; }
|
||||
p.lead { font-size: 17.5px; line-height: 1.6; margin-bottom: 17px; }
|
||||
|
||||
aside p { font-size: 13px; line-height: 1.35; font-style: italic; }
|
||||
|
||||
h1, h2, h3, h4, h5, h6 { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: bold; color: #222222; text-rendering: optimizeLegibility; line-height: 1.0; margin-bottom: 14px; margin-top: 14px; }
|
||||
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; }
|
||||
|
||||
h1 { font-size: 24px; }
|
||||
|
||||
h2 { font-size: 18px; }
|
||||
|
||||
h3 { font-size: 14px; }
|
||||
|
||||
h4 { font-size: 12px; }
|
||||
|
||||
h5 { font-weight: bold; font-size: 12px; }
|
||||
|
||||
h6 { font-style: italic; font-size: 12px; }
|
||||
|
||||
hr { border: solid #c6c6c6; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0; }
|
||||
|
||||
.subheader { line-height: 1.3; color: #6f6f6f; font-weight: 300; margin-bottom: 17px; }
|
||||
|
||||
em, i { font-style: italic; line-height: inherit; }
|
||||
|
||||
strong, b { font-weight: bold; line-height: inherit; }
|
||||
|
||||
small { font-size: 60%; line-height: inherit; }
|
||||
|
||||
code { font-weight: bold; background: #ffff99; }
|
||||
|
||||
/* Lists ---------------------- */
|
||||
ul, ol { font-size: 14px; line-height: 1.6; margin-bottom: 17px; list-style-position: inside; }
|
||||
|
||||
ul li ul, ul li ol { margin-left: 20px; margin-bottom: 0; }
|
||||
ul.square, ul.circle, ul.disc { margin-left: 17px; }
|
||||
ul.square { list-style-type: square; }
|
||||
ul.square li ul { list-style: inherit; }
|
||||
ul.circle { list-style-type: circle; }
|
||||
ul.circle li ul { list-style: inherit; }
|
||||
ul.disc { list-style-type: disc; }
|
||||
ul.disc li ul { list-style: inherit; }
|
||||
ul.no-bullet { list-style: none; }
|
||||
ul.large li { line-height: 21px; }
|
||||
|
||||
ol li ul, ol li ol { margin-left: 20px; margin-bottom: 0; }
|
||||
|
||||
/* Blockquotes ---------------------- */
|
||||
blockquote, blockquote p { line-height: 1.5; }
|
||||
|
||||
blockquote { margin: 0 0 17px; padding: 9px 20px 0 19px; }
|
||||
blockquote cite { display: block; font-size: 13pt; color: #555555; }
|
||||
blockquote cite:before { content: "\2014 \0020"; }
|
||||
blockquote cite a, blockquote cite a:visited { color: #555555; }
|
||||
|
||||
abbr, acronym { text-transform: uppercase; font-size: 90%; color: #222222; border-bottom: 1px solid #ddd; cursor: help; }
|
||||
|
||||
abbr { text-transform: none; }
|
||||
|
||||
/* Print styles. Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
|
||||
*/
|
||||
.print-only { display: none !important; }
|
||||
|
||||
@media print { * { background: transparent !important; color: black !important; box-shadow: none !important; text-shadow: none !important; filter: none !important; -ms-filter: none !important; }
|
||||
/* Black prints faster: h5bp.com/s */
|
||||
a, a:visited { text-decoration: underline; }
|
||||
a[href]:after { content: " (" attr(href) ")"; }
|
||||
abbr[title]:after { content: " (" attr(title) ")"; }
|
||||
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
|
||||
/* Don't show links for images, or javascript/internal links */
|
||||
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
|
||||
thead { display: table-header-group; }
|
||||
/* h5bp.com/t */
|
||||
tr, img { page-break-inside: avoid; }
|
||||
img { max-width: 100% !important; }
|
||||
@page { margin: 0.5cm; }
|
||||
p, h2, h3 { orphans: 3; widows: 3; }
|
||||
h2, h3 { page-break-after: avoid; }
|
||||
.hide-on-print { display: none !important; }
|
||||
.print-only { display: block !important; } }
|
||||
/* Requires globals.css */
|
||||
/* Standard Forms ---------------------- */
|
||||
form { margin: 0 0 19.41641px; }
|
||||
|
||||
.row form .row { margin: 0 -6px; }
|
||||
.row form .row .column, .row form .row .columns { padding: 0 6px; }
|
||||
.row form .row.collapse { margin: 0; }
|
||||
.row form .row.collapse .column, .row form .row.collapse .columns { padding: 0; }
|
||||
|
||||
label { font-size: 14px; color: #4d4d4d; cursor: pointer; display: block; font-weight: 500; margin-bottom: 3px; }
|
||||
label.right { float: none; text-align: right; }
|
||||
label.inline { line-height: 32px; margin: 0 0 12px 0; }
|
||||
|
||||
@media only screen and (max-width: 767px) { label.right { text-align: left; } }
|
||||
.prefix, .postfix { display: block; position: relative; z-index: 2; text-align: center; width: 100%; padding-top: 0; padding-bottom: 0; height: 32px; line-height: 31px; }
|
||||
|
||||
a.button.prefix, a.button.postfix { padding-left: 0; padding-right: 0; text-align: center; }
|
||||
|
||||
span.prefix, span.postfix { background: #f2f2f2; border: 1px solid #cccccc; }
|
||||
|
||||
.prefix { left: 2px; -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; overflow: hidden; }
|
||||
|
||||
.postfix { right: 2px; -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; }
|
||||
|
||||
input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], textarea { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; border: 1px solid #cccccc; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.75); display: block; font-size: 14px; margin: 0 0 12px 0; padding: 6px; height: 32px; width: 100%; -webkit-transition: all 0.15s linear; -moz-transition: all 0.15s linear; -o-transition: all 0.15s linear; transition: all 0.15s linear; }
|
||||
input[type="text"].oversize, input[type="password"].oversize, input[type="date"].oversize, input[type="datetime"].oversize, input[type="email"].oversize, input[type="number"].oversize, input[type="search"].oversize, input[type="tel"].oversize, input[type="time"].oversize, input[type="url"].oversize, textarea.oversize { font-size: 17px; padding: 4px 6px; }
|
||||
input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, textarea:focus { background: #fafafa; outline: none !important; border-color: #b3b3b3; }
|
||||
input[type="text"][disabled], input[type="password"][disabled], input[type="date"][disabled], input[type="datetime"][disabled], input[type="email"][disabled], input[type="number"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="time"][disabled], input[type="url"][disabled], textarea[disabled] { background-color: #ddd; }
|
||||
|
||||
textarea { height: auto; }
|
||||
|
||||
select { width: 100%; }
|
||||
|
||||
/* Fieldsets */
|
||||
fieldset { border: solid 1px #ddd; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; padding: 12px 12px 0; margin: 18px 0; }
|
||||
fieldset legend { font-weight: bold; background: white; padding: 0 3px; margin: 0; margin-left: -3px; }
|
||||
|
||||
/* Errors */
|
||||
.error input, input.error, .error textarea, textarea.error { border-color: #c60f13; background-color: rgba(198, 15, 19, 0.1); }
|
||||
|
||||
.error label, label.error { color: #c60f13; }
|
||||
|
||||
.error small, small.error { display: block; padding: 6px 4px; margin-top: -13px; margin-bottom: 12px; background: #c60f13; color: #fff; font-size: 12px; font-size: 1.2rem; font-weight: bold; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; }
|
||||
|
||||
@media only screen and (max-width: 767px) { input[type="text"].one, input[type="password"].one, input[type="date"].one, input[type="datetime"].one, input[type="email"].one, input[type="number"].one, input[type="search"].one, input[type="tel"].one, input[type="time"].one, input[type="url"].one, textarea.one, .row textarea.one { width: 100% !important; }
|
||||
input[type="text"].two, .row input[type="text"].two, input[type="password"].two, .row input[type="password"].two, input[type="date"].two, .row input[type="date"].two, input[type="datetime"].two, .row input[type="datetime"].two, input[type="email"].two, .row input[type="email"].two, input[type="number"].two, .row input[type="number"].two, input[type="search"].two, .row input[type="search"].two, input[type="tel"].two, .row input[type="tel"].two, input[type="time"].two, .row input[type="time"].two, input[type="url"].two, .row input[type="url"].two, textarea.two, .row textarea.two { width: 100% !important; }
|
||||
input[type="text"].three, .row input[type="text"].three, input[type="password"].three, .row input[type="password"].three, input[type="date"].three, .row input[type="date"].three, input[type="datetime"].three, .row input[type="datetime"].three, input[type="email"].three, .row input[type="email"].three, input[type="number"].three, .row input[type="number"].three, input[type="search"].three, .row input[type="search"].three, input[type="tel"].three, .row input[type="tel"].three, input[type="time"].three, .row input[type="time"].three, input[type="url"].three, .row input[type="url"].three, textarea.three, .row textarea.three { width: 100% !important; }
|
||||
input[type="text"].four, .row input[type="text"].four, input[type="password"].four, .row input[type="password"].four, input[type="date"].four, .row input[type="date"].four, input[type="datetime"].four, .row input[type="datetime"].four, input[type="email"].four, .row input[type="email"].four, input[type="number"].four, .row input[type="number"].four, input[type="search"].four, .row input[type="search"].four, input[type="tel"].four, .row input[type="tel"].four, input[type="time"].four, .row input[type="time"].four, input[type="url"].four, .row input[type="url"].four, textarea.four, .row textarea.four { width: 100% !important; }
|
||||
input[type="text"].five, .row input[type="text"].five, input[type="password"].five, .row input[type="password"].five, input[type="date"].five, .row input[type="date"].five, input[type="datetime"].five, .row input[type="datetime"].five, input[type="email"].five, .row input[type="email"].five, input[type="number"].five, .row input[type="number"].five, input[type="search"].five, .row input[type="search"].five, input[type="tel"].five, .row input[type="tel"].five, input[type="time"].five, .row input[type="time"].five, input[type="url"].five, .row input[type="url"].five, textarea.five, .row textarea.five { width: 100% !important; }
|
||||
input[type="text"].six, .row input[type="text"].six, input[type="password"].six, .row input[type="password"].six, input[type="date"].six, .row input[type="date"].six, input[type="datetime"].six, .row input[type="datetime"].six, input[type="email"].six, .row input[type="email"].six, input[type="number"].six, .row input[type="number"].six, input[type="search"].six, .row input[type="search"].six, input[type="tel"].six, .row input[type="tel"].six, input[type="time"].six, .row input[type="time"].six, input[type="url"].six, .row input[type="url"].six, textarea.six, .row textarea.six { width: 100% !important; }
|
||||
input[type="text"].seven, .row input[type="text"].seven, input[type="password"].seven, .row input[type="password"].seven, input[type="date"].seven, .row input[type="date"].seven, input[type="datetime"].seven, .row input[type="datetime"].seven, input[type="email"].seven, .row input[type="email"].seven, input[type="number"].seven, .row input[type="number"].seven, input[type="search"].seven, .row input[type="search"].seven, input[type="tel"].seven, .row input[type="tel"].seven, input[type="time"].seven, .row input[type="time"].seven, input[type="url"].seven, .row input[type="url"].seven, textarea.seven, .row textarea.seven { width: 100% !important; }
|
||||
input[type="text"].eight, .row input[type="text"].eight, input[type="password"].eight, .row input[type="password"].eight, input[type="date"].eight, .row input[type="date"].eight, input[type="datetime"].eight, .row input[type="datetime"].eight, input[type="email"].eight, .row input[type="email"].eight, input[type="number"].eight, .row input[type="number"].eight, input[type="search"].eight, .row input[type="search"].eight, input[type="tel"].eight, .row input[type="tel"].eight, input[type="time"].eight, .row input[type="time"].eight, input[type="url"].eight, .row input[type="url"].eight, textarea.eight, .row textarea.eight { width: 100% !important; }
|
||||
input[type="text"].nine, .row input[type="text"].nine, input[type="password"].nine, .row input[type="password"].nine, input[type="date"].nine, .row input[type="date"].nine, input[type="datetime"].nine, .row input[type="datetime"].nine, input[type="email"].nine, .row input[type="email"].nine, input[type="number"].nine, .row input[type="number"].nine, input[type="search"].nine, .row input[type="search"].nine, input[type="tel"].nine, .row input[type="tel"].nine, input[type="time"].nine, .row input[type="time"].nine, input[type="url"].nine, .row input[type="url"].nine, textarea.nine, .row textarea.nine { width: 100% !important; }
|
||||
input[type="text"].ten, .row input[type="text"].ten, input[type="password"].ten, .row input[type="password"].ten, input[type="date"].ten, .row input[type="date"].ten, input[type="datetime"].ten, .row input[type="datetime"].ten, input[type="email"].ten, .row input[type="email"].ten, input[type="number"].ten, .row input[type="number"].ten, input[type="search"].ten, .row input[type="search"].ten, input[type="tel"].ten, .row input[type="tel"].ten, input[type="time"].ten, .row input[type="time"].ten, input[type="url"].ten, .row input[type="url"].ten, textarea.ten, .row textarea.ten { width: 100% !important; }
|
||||
input[type="text"].eleven, .row input[type="text"].eleven, input[type="password"].eleven, .row input[type="password"].eleven, input[type="date"].eleven, .row input[type="date"].eleven, input[type="datetime"].eleven, .row input[type="datetime"].eleven, input[type="email"].eleven, .row input[type="email"].eleven, input[type="number"].eleven, .row input[type="number"].eleven, input[type="search"].eleven, .row input[type="search"].eleven, input[type="tel"].eleven, .row input[type="tel"].eleven, input[type="time"].eleven, .row input[type="time"].eleven, input[type="url"].eleven, .row input[type="url"].eleven, textarea.eleven, .row textarea.eleven { width: 100% !important; }
|
||||
input[type="text"].twelve, .row input[type="text"].twelve, input[type="password"].twelve, .row input[type="password"].twelve, input[type="date"].twelve, .row input[type="date"].twelve, input[type="datetime"].twelve, .row input[type="datetime"].twelve, input[type="email"].twelve, .row input[type="email"].twelve, input[type="number"].twelve, .row input[type="number"].twelve, input[type="search"].twelve, .row input[type="search"].twelve, input[type="tel"].twelve, .row input[type="tel"].twelve, input[type="time"].twelve, .row input[type="time"].twelve, input[type="url"].twelve, .row input[type="url"].twelve, textarea.twelve, .row textarea.twelve { width: 100% !important; } }
|
||||
/* Custom Forms ---------------------- */
|
||||
form.custom { /* Custom input, disabled */ }
|
||||
form.custom span.custom { display: inline-block; width: 16px; height: 16px; position: relative; top: 2px; border: solid 1px #ccc; background: #fff; }
|
||||
form.custom span.custom.radio { -webkit-border-radius: 100px; -moz-border-radius: 100px; -ms-border-radius: 100px; -o-border-radius: 100px; border-radius: 100px; }
|
||||
form.custom span.custom.checkbox:before { content: ""; display: block; line-height: 0.8; height: 14px; width: 14px; text-align: center; position: absolute; top: 0; left: 0; font-size: 14px; color: #fff; }
|
||||
form.custom span.custom.radio.checked:before { content: ""; display: block; width: 8px; height: 8px; -webkit-border-radius: 100px; -moz-border-radius: 100px; -ms-border-radius: 100px; -o-border-radius: 100px; border-radius: 100px; background: #222; position: relative; top: 3px; left: 3px; }
|
||||
form.custom span.custom.checkbox.checked:before { content: "\00d7"; color: #222; }
|
||||
form.custom div.custom.dropdown { display: block; position: relative; width: auto; height: 28px; margin-bottom: 9px; margin-top: 2px; }
|
||||
form.custom div.custom.dropdown a.current { display: block; width: auto; line-height: 26px; min-height: 28px; padding: 0; padding-left: 6px; padding-right: 38px; border: solid 1px #ddd; color: #141414; background-color: #fff; white-space: nowrap; }
|
||||
form.custom div.custom.dropdown a.selector { position: absolute; width: 27px; height: 28px; display: block; right: 0; top: 0; border: solid 1px #ddd; }
|
||||
form.custom div.custom.dropdown a.selector:after { content: ""; display: block; content: ""; display: block; width: 0; height: 0; border: solid 5px; border-color: #aaaaaa transparent transparent transparent; position: absolute; left: 50%; top: 50%; margin-top: -2px; margin-left: -5px; }
|
||||
form.custom div.custom.dropdown:hover a.selector:after, form.custom div.custom.dropdown.open a.selector:after { content: ""; display: block; width: 0; height: 0; border: solid 5px; border-color: #222222 transparent transparent transparent; }
|
||||
form.custom div.custom.dropdown.open ul { display: block; z-index: 10; }
|
||||
form.custom div.custom.dropdown.small { width: 134px !important; }
|
||||
form.custom div.custom.dropdown.medium { width: 254px !important; }
|
||||
form.custom div.custom.dropdown.large { width: 434px !important; }
|
||||
form.custom div.custom.dropdown.expand { width: 100% !important; }
|
||||
form.custom div.custom.dropdown.open.small ul { width: 134px !important; }
|
||||
form.custom div.custom.dropdown.open.medium ul { width: 254px !important; }
|
||||
form.custom div.custom.dropdown.open.large ul { width: 434px !important; }
|
||||
form.custom div.custom.dropdown.open.expand ul { width: 100% !important; }
|
||||
form.custom div.custom.dropdown ul { position: absolute; width: auto; display: none; margin: 0; left: 0; top: 27px; margin: 0; padding: 0; background: #fff; background: rgba(255, 255, 255, 0.95); border: solid 1px #cccccc; }
|
||||
form.custom div.custom.dropdown ul li { color: #555; font-size: 13px; cursor: pointer; padding: 3px; padding-left: 6px; padding-right: 38px; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none; }
|
||||
form.custom div.custom.dropdown ul li.selected { background: #cdebf5; color: #000; }
|
||||
form.custom div.custom.dropdown ul li.selected:after { content: "\2013"; position: absolute; right: 10px; }
|
||||
form.custom div.custom.dropdown ul li:hover { background-color: #e3f4f9; color: #222; }
|
||||
form.custom div.custom.dropdown ul li:hover:after { content: "\2013"; position: absolute; right: 10px; color: #8ed3e7; }
|
||||
form.custom div.custom.dropdown ul li.selected:hover { background: #cdebf5; cursor: default; color: #000; }
|
||||
form.custom div.custom.dropdown ul li.selected:hover:after { color: #000; }
|
||||
form.custom div.custom.dropdown ul.show { display: block; }
|
||||
form.custom .custom.disabled { background-color: #ddd; }
|
||||
|
||||
/* Correct FF custom dropdown height */
|
||||
@-moz-document url-prefix() { form.custom div.custom.dropdown a.selector { height: 30px; } }
|
||||
|
||||
.lt-ie9 form.custom div.custom.dropdown a.selector { height: 30px; }
|
||||
|
||||
/* The Grid ---------------------- */
|
||||
.row { width: 1000px; max-width: 100%; min-width: 768px; margin: 0 auto; }
|
||||
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
|
||||
.row.collapse .column, .row.collapse .columns { padding: 0; }
|
||||
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
|
||||
.row .row.collapse { margin: 0; }
|
||||
|
||||
.column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
|
||||
.column.centered, .columns.centered { float: none; margin: 0 auto; }
|
||||
|
||||
[class*="column"] + [class*="column"]:last-child { float: right; }
|
||||
|
||||
[class*="column"] + [class*="column"].end { float: left; }
|
||||
|
||||
.one, .row .one { width: 8.33333%; }
|
||||
|
||||
.two, .row .two { width: 16.66667%; }
|
||||
|
||||
.three, .row .three { width: 25%; }
|
||||
|
||||
.four, .row .four { width: 33.33333%; }
|
||||
|
||||
.five, .row .five { width: 41.66667%; }
|
||||
|
||||
.six, .row .six { width: 50%; }
|
||||
|
||||
.seven, .row .seven { width: 58.33333%; }
|
||||
|
||||
.eight, .row .eight { width: 66.66667%; }
|
||||
|
||||
.nine, .row .nine { width: 75%; }
|
||||
|
||||
.ten, .row .ten { width: 83.33333%; }
|
||||
|
||||
.eleven, .row .eleven { width: 91.66667%; }
|
||||
|
||||
.twelve, .row .twelve { width: 100%; }
|
||||
|
||||
.row .offset-by-one { margin-left: 8.33333%; }
|
||||
|
||||
.row .offset-by-two { margin-left: 16.66667%; }
|
||||
|
||||
.row .offset-by-three { margin-left: 25%; }
|
||||
|
||||
.row .offset-by-four { margin-left: 33.33333%; }
|
||||
|
||||
.row .offset-by-five { margin-left: 41.66667%; }
|
||||
|
||||
.row .offset-by-six { margin-left: 50%; }
|
||||
|
||||
.row .offset-by-seven { margin-left: 58.33333%; }
|
||||
|
||||
.row .offset-by-eight { margin-left: 66.66667%; }
|
||||
|
||||
.row .offset-by-nine { margin-left: 75%; }
|
||||
|
||||
.row .offset-by-ten { margin-left: 83.33333%; }
|
||||
|
||||
.push-two { left: 16.66667%; }
|
||||
|
||||
.pull-two { right: 16.66667%; }
|
||||
|
||||
.push-three { left: 25%; }
|
||||
|
||||
.pull-three { right: 25%; }
|
||||
|
||||
.push-four { left: 33.33333%; }
|
||||
|
||||
.pull-four { right: 33.33333%; }
|
||||
|
||||
.push-five { left: 41.66667%; }
|
||||
|
||||
.pull-five { right: 41.66667%; }
|
||||
|
||||
.push-six { left: 50%; }
|
||||
|
||||
.pull-six { right: 50%; }
|
||||
|
||||
.push-seven { left: 58.33333%; }
|
||||
|
||||
.pull-seven { right: 58.33333%; }
|
||||
|
||||
.push-eight { left: 66.66667%; }
|
||||
|
||||
.pull-eight { right: 66.66667%; }
|
||||
|
||||
.push-nine { left: 75%; }
|
||||
|
||||
.pull-nine { right: 75%; }
|
||||
|
||||
.push-ten { left: 83.33333%; }
|
||||
|
||||
.pull-ten { right: 83.33333%; }
|
||||
|
||||
img, object, embed { max-width: 100%; height: auto; }
|
||||
|
||||
object, embed { height: 100%; }
|
||||
|
||||
img { -ms-interpolation-mode: bicubic; }
|
||||
|
||||
#map_canvas img, .map_canvas img { max-width: none!important; }
|
||||
|
||||
/* Nicolas Gallagher's micro clearfix */
|
||||
.row { *zoom: 1; }
|
||||
.row:before, .row:after { content: ""; display: table; }
|
||||
.row:after { clear: both; }
|
||||
|
||||
/* Mobile Grid and Overrides ---------------------- */
|
||||
@media only screen and (max-width: 767px) { body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
|
||||
.row { width: auto; min-width: 0; margin-left: 0; margin-right: 0; }
|
||||
.column, .columns { width: auto !important; float: none; }
|
||||
.column:last-child, .columns:last-child { float: none; }
|
||||
[class*="column"] + [class*="column"]:last-child { float: none; }
|
||||
.column:before, .columns:before, .column:after, .columns:after { content: ""; display: table; }
|
||||
.column:after, .columns:after { clear: both; }
|
||||
.offset-by-one, .offset-by-two, .offset-by-three, .offset-by-four, .offset-by-five, .offset-by-six, .offset-by-seven, .offset-by-eight, .offset-by-nine, .offset-by-ten { margin-left: 0 !important; }
|
||||
.push-two, .push-three, .push-four, .push-five, .push-six, .push-seven, .push-eight, .push-nine, .push-ten { left: auto; }
|
||||
.pull-two, .pull-three, .pull-four, .pull-five, .pull-six, .pull-seven, .pull-eight, .pull-nine, .pull-ten { right: auto; }
|
||||
/* Mobile 4-column Grid */
|
||||
.row .mobile-one { width: 25% !important; float: left; padding: 0 15px; }
|
||||
.row .mobile-one:last-child { float: right; }
|
||||
.row.collapse .mobile-one { padding: 0; }
|
||||
.row .mobile-two { width: 50% !important; float: left; padding: 0 15px; }
|
||||
.row .mobile-two:last-child { float: right; }
|
||||
.row.collapse .mobile-two { padding: 0; }
|
||||
.row .mobile-three { width: 75% !important; float: left; padding: 0 15px; }
|
||||
.row .mobile-three:last-child { float: right; }
|
||||
.row.collapse .mobile-three { padding: 0; }
|
||||
.row .mobile-four { width: 100% !important; float: left; padding: 0 15px; }
|
||||
.row .mobile-four:last-child { float: right; }
|
||||
.row.collapse .mobile-four { padding: 0; }
|
||||
.push-one-mobile { left: 25%; }
|
||||
.pull-one-mobile { right: 25%; }
|
||||
.push-two-mobile { left: 50%; }
|
||||
.pull-two-mobile { right: 50%; }
|
||||
.push-three-mobile { left: 75%; }
|
||||
.pull-three-mobile { right: 75%; } }
|
||||
/* Block Grids ---------------------- */
|
||||
/* These are 2-up, 3-up, 4-up and 5-up ULs, suited
|
||||
for repeating blocks of content. Add 'mobile' to
|
||||
them to switch them just like the layout grid
|
||||
(one item per line) on phones
|
||||
|
||||
For IE7/8 compatibility block-grid items need to be
|
||||
the same height. You can optionally uncomment the
|
||||
lines below to support arbitrary height, but know
|
||||
that IE7/8 do not support :nth-child.
|
||||
-------------------------------------------------- */
|
||||
.block-grid { display: block; overflow: hidden; padding: 0; }
|
||||
.block-grid > li { display: block; height: auto; float: left; }
|
||||
.block-grid.one-up { margin: 0; }
|
||||
.block-grid.one-up > li { width: 100%; padding: 0 0 15px; }
|
||||
.block-grid.two-up { margin: 0 -15px; }
|
||||
.block-grid.two-up > li { width: 50%; padding: 0 15px 15px; }
|
||||
.block-grid.two-up > li:nth-child(2n+1) { clear: both; }
|
||||
.block-grid.three-up { margin: 0 -12px; }
|
||||
.block-grid.three-up > li { width: 33.33%; padding: 0 12px 12px; }
|
||||
.block-grid.three-up > li:nth-child(3n+1) { clear: both; }
|
||||
.block-grid.four-up { margin: 0 -10px; }
|
||||
.block-grid.four-up > li { width: 25%; padding: 0 10px 10px; }
|
||||
.block-grid.four-up > li:nth-child(4n+1) { clear: both; }
|
||||
.block-grid.five-up { margin: 0 -8px; }
|
||||
.block-grid.five-up > li { width: 20%; padding: 0 8px 8px; }
|
||||
.block-grid.five-up > li:nth-child(5n+1) { clear: both; }
|
||||
|
||||
/* Mobile Block Grids */
|
||||
@media only screen and (max-width: 767px) { .block-grid.mobile > li { float: none; width: 100%; margin-left: 0; }
|
||||
.block-grid > li { clear: none !important; }
|
||||
.block-grid.mobile-two-up > li { width: 50%; }
|
||||
.block-grid.mobile-two-up > li:nth-child(2n+1) { clear: both; }
|
||||
.block-grid.mobile-three-up > li { width: 33.33%; }
|
||||
.block-grid.mobile-three-up > li:nth-child(3n+1) { clear: both !important; }
|
||||
.block-grid.mobile-four-up > li { width: 25%; }
|
||||
.block-grid.mobile-four-up > li:nth-child(4n+1) { clear: both; }
|
||||
.block-grid.mobile-five-up > li:nth-child(5n+1) { clear: both; } }
|
||||
/* Requires globals.css */
|
||||
/* Normal Buttons ---------------------- */
|
||||
.button { width: auto; background: #fd7800; border: 1px solid #ce6200; -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; color: white; cursor: pointer; display: inline-block; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; line-height: 1; margin: 0; outline: none; padding: 10px 20px 11px; position: relative; text-align: center; text-decoration: none; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; /* Hovers */ /* Sizes */ /* Colors */ /* Radii */ /* Layout */ /* Disabled ---------- */ }
|
||||
.button:hover { color: white; background-color: #ce6200; }
|
||||
.button:active { -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; }
|
||||
.button:focus { -webkit-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; color: white; }
|
||||
.button.large { font-size: 17px; padding: 15px 30px 16px; }
|
||||
.button.medium { font-size: 14px; }
|
||||
.button.small { font-size: 11px; padding: 7px 14px 8px; }
|
||||
.button.tiny { font-size: 10px; padding: 5px 10px 6px; }
|
||||
.button.expand { width: 100%; text-align: center; }
|
||||
.button.primary { background-color: #fd7800; border: 1px solid #1e728c; }
|
||||
.button.primary:hover { background-color: #2284a1; }
|
||||
.button.primary:focus { -webkit-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
|
||||
.button.success { background-color: #5da423; border: 1px solid #396516; }
|
||||
.button.success:hover { background-color: #457a1a; }
|
||||
.button.success:focus { -webkit-box-shadow: 0 0 5px #5da423, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 5px #5da423, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 5px #5da423, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
|
||||
.button.alert { background-color: #c60f13; border: 1px solid #7f0a0c; }
|
||||
.button.alert:hover { background-color: #970b0e; }
|
||||
.button.alert:focus { -webkit-box-shadow: 0 0 4px #c60f13, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 4px #c60f13, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 4px #c60f13, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
|
||||
.button.secondary { background-color: #e9e9e9; color: #1d1d1d; border: 1px solid #c3c3c3; }
|
||||
.button.secondary:hover { background-color: #d0d0d0; }
|
||||
.button.secondary:focus { -webkit-box-shadow: 0 0 5px #e9e9e9, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 5px #e9e9e9, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 5px #e9e9e9, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
|
||||
.button.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
.button.round { -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
|
||||
.button.full-width { width: 100%; text-align: center; padding-left: 0px !important; padding-right: 0px !important; }
|
||||
.button.left-align { text-align: left; text-indent: 12px; }
|
||||
.button.disabled, .button[disabled] { opacity: 0.6; cursor: default; background: #fd7800; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
||||
.button.disabled :hover, .button[disabled] :hover { background: #fd7800; }
|
||||
.button.disabled.success, .button[disabled].success { background-color: #5da423; }
|
||||
.button.disabled.success:hover, .button[disabled].success:hover { background-color: #5da423; }
|
||||
.button.disabled.alert, .button[disabled].alert { background-color: #c60f13; }
|
||||
.button.disabled.alert:hover, .button[disabled].alert:hover { background-color: #c60f13; }
|
||||
.button.disabled.secondary, .button[disabled].secondary { background-color: #e9e9e9; }
|
||||
.button.disabled.secondary:hover, .button[disabled].secondary:hover { background-color: #e9e9e9; }
|
||||
|
||||
/* Don't use native buttons on iOS */
|
||||
input[type=submit].button, button.button { -webkit-appearance: none; }
|
||||
|
||||
@media only screen and (max-width: 767px) { .button { display: block; }
|
||||
button.button, input[type="submit"].button { width: 100%; padding-left: 0; padding-right: 0; } }
|
||||
/* Correct FF button padding */
|
||||
@-moz-document url-prefix() { button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner { border: none; padding: 0; }
|
||||
input[type="submit"].tiny.button { padding: 3px 10px 4px; }
|
||||
input[type="submit"].small.button { padding: 5px 14px 6px; }
|
||||
input[type="submit"].button, input[type=submit].medium.button { padding: 8px 20px 9px; }
|
||||
input[type="submit"].large.button { padding: 13px 30px 14px; } }
|
||||
|
||||
/* Buttons with Dropdowns ---------------------- */
|
||||
.button.dropdown { position: relative; padding-right: 44px; /* Sizes */ /* Triangles */ /* Flyout List */ /* Split Dropdown Buttons */ }
|
||||
.button.dropdown.large { padding-right: 60px; }
|
||||
.button.dropdown.small { padding-right: 28px; }
|
||||
.button.dropdown.tiny { padding-right: 20px; }
|
||||
.button.dropdown:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: white transparent transparent transparent; position: absolute; top: 50%; right: 20px; margin-top: -2px; }
|
||||
.button.dropdown.large:after { content: ""; display: block; width: 0; height: 0; border: solid 7px; border-color: white transparent transparent transparent; margin-top: -3px; right: 30px; }
|
||||
.button.dropdown.small:after { content: ""; display: block; width: 0; height: 0; border: solid 5px; border-color: white transparent transparent transparent; margin-top: -2px; right: 14px; }
|
||||
.button.dropdown.tiny:after { content: ""; display: block; width: 0; height: 0; border: solid 4px; border-color: white transparent transparent transparent; margin-top: -1px; right: 10px; }
|
||||
.button.dropdown > ul { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; display: none; position: absolute; left: -1px; background: #fff; background: rgba(255, 255, 255, 0.95); list-style: none; margin: 0; padding: 0; border: 1px solid #cccccc; border-top: none; min-width: 100%; z-index: 40; }
|
||||
.button.dropdown > ul li { width: 100%; cursor: pointer; padding: 0; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none; }
|
||||
.button.dropdown > ul li a { display: block; color: #555; font-size: 13px; font-weight: normal; padding: 6px 14px; text-align: left; }
|
||||
.button.dropdown > ul li:hover { background-color: #e3f4f9; color: #222; }
|
||||
.button.dropdown > ul li.divider { min-height: 0; padding: 0; height: 1px; margin: 4px 0; background: #ededed; }
|
||||
.button.dropdown.up > ul { border-top: 1px solid #cccccc; border-bottom: none; }
|
||||
.button.dropdown ul.no-hover.show-dropdown { display: block !important; }
|
||||
.button.dropdown:hover > ul.no-hover { display: none; }
|
||||
.button.dropdown.split { padding: 0; position: relative; /* Sizes */ /* Triangle Spans */ /* Colors */ }
|
||||
.button.dropdown.split:after { display: none; }
|
||||
.button.dropdown.split:hover { background-color: #fd7800; }
|
||||
.button.dropdown.split.alert:hover { background-color: #c60f13; }
|
||||
.button.dropdown.split.success:hover { background-color: #5da423; }
|
||||
.button.dropdown.split.secondary:hover { background-color: #e9e9e9; }
|
||||
.button.dropdown.split > a { color: white; display: block; padding: 10px 50px 11px 20px; padding-left: 20px; padding-right: 50px; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; }
|
||||
.button.dropdown.split > a:hover { background-color: #2284a1; }
|
||||
.button.dropdown.split.large > a { padding: 15px 75px 16px 30px; padding-left: 30px; padding-right: 75px; }
|
||||
.button.dropdown.split.small > a { padding: 7px 35px 8px 14px; padding-left: 14px; padding-right: 35px; }
|
||||
.button.dropdown.split.tiny > a { padding: 5px 25px 6px 10px; padding-left: 10px; padding-right: 25px; }
|
||||
.button.dropdown.split > span { background-color: #fd7800; position: absolute; right: 0; top: 0; height: 100%; width: 30px; border-left: 1px solid #1e728c; -webkit-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; }
|
||||
.button.dropdown.split > span:hover { background-color: #2284a1; }
|
||||
.button.dropdown.split > span:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: white transparent transparent transparent; position: absolute; top: 50%; left: 50%; margin-left: -6px; margin-top: -2px; }
|
||||
.button.dropdown.split.secondary > span:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: #1d1d1d transparent transparent transparent; }
|
||||
.button.dropdown.split.large span { width: 45px; }
|
||||
.button.dropdown.split.small span { width: 21px; }
|
||||
.button.dropdown.split.tiny span { width: 15px; }
|
||||
.button.dropdown.split.large span:after { content: ""; display: block; width: 0; height: 0; border: solid 7px; border-color: white transparent transparent transparent; margin-top: -3px; margin-left: -7px; }
|
||||
.button.dropdown.split.small span:after { content: ""; display: block; width: 0; height: 0; border: solid 4px; border-color: white transparent transparent transparent; margin-top: -1px; margin-left: -4px; }
|
||||
.button.dropdown.split.tiny span:after { content: ""; display: block; width: 0; height: 0; border: solid 3px; border-color: white transparent transparent transparent; margin-top: -1px; margin-left: -3px; }
|
||||
.button.dropdown.split.alert > span { background-color: #c60f13; border-left-color: #7f0a0c; }
|
||||
.button.dropdown.split.success > span { background-color: #5da423; border-left-color: #396516; }
|
||||
.button.dropdown.split.secondary > span { background-color: #e9e9e9; border-left-color: #c3c3c3; }
|
||||
.button.dropdown.split.secondary > a { color: #1d1d1d; }
|
||||
.button.dropdown.split.alert > a:hover, .button.dropdown.split.alert > span:hover { background-color: #970b0e; }
|
||||
.button.dropdown.split.success > a:hover, .button.dropdown.split.success > span:hover { background-color: #457a1a; }
|
||||
.button.dropdown.split.secondary > a:hover, .button.dropdown.split.secondary > span:hover { background-color: #d0d0d0; }
|
||||
|
||||
/* Button Groups ---------------------- */
|
||||
ul.button-group { list-style: none; padding: 0; margin: 0 0 12px; *zoom: 1; }
|
||||
ul.button-group:before, ul.button-group:after { content: ""; display: table; }
|
||||
ul.button-group:after { clear: both; }
|
||||
ul.button-group li { padding: 0; margin: 0 0 0 -1px; float: left; }
|
||||
ul.button-group li:first-child { margin-left: 0; }
|
||||
ul.button-group.radius li a.button, ul.button-group.radius li a.button.radius, ul.button-group.radius li a.button-rounded { -webkit-border-radius: 0px; -moz-border-radius: 0px; -ms-border-radius: 0px; -o-border-radius: 0px; border-radius: 0px; }
|
||||
ul.button-group.radius li:first-child a.button, ul.button-group.radius li:first-child a.button.radius { -moz-border-radius-left3px: 5px; -webkit-border-left-3px-radius: 5px; border-left-3px-radius: 5px; }
|
||||
ul.button-group.radius li:first-child a.button.rounded { -moz-border-radius-left1000px: 5px; -webkit-border-left-1000px-radius: 5px; border-left-1000px-radius: 5px; }
|
||||
ul.button-group.radius li:last-child a.button, ul.button-group.radius li:last-child a.button.radius { -moz-border-radius-right3px: 5px; -webkit-border-right-3px-radius: 5px; border-right-3px-radius: 5px; }
|
||||
ul.button-group.radius li:last-child a.button.rounded { -moz-border-radius-right1000px: 5px; -webkit-border-right-1000px-radius: 5px; border-right-1000px-radius: 5px; }
|
||||
ul.button-group.even a.button { width: 100%; }
|
||||
ul.button-group.even.two-up li { width: 50%; }
|
||||
ul.button-group.even.three-up li { width: 33.3%; }
|
||||
ul.button-group.even.three-up li:first-child { width: 33.4%; }
|
||||
ul.button-group.even.four-up li { width: 25%; }
|
||||
ul.button-group.even.five-up li { width: 20%; }
|
||||
|
||||
@media only screen and (max-width: 767px) { .button-group button.button, .button-group input[type="submit"].button { width: auto; padding: 10px 20px 11px; }
|
||||
.button-group button.button.large, .button-group input[type="submit"].button.large { padding: 15px 30px 16px; }
|
||||
.button-group button.button.medium, .button-group input[type="submit"].button.medium { padding: 10px 20px 11px; }
|
||||
.button-group button.button.small, .button-group input[type="submit"].button.small { padding: 7px 14px 8px; }
|
||||
.button-group button.button.tiny, .button-group input[type="submit"].button.tiny { padding: 5px 10px 6px; }
|
||||
.button-group.even button.button, .button-group.even input[type="submit"].button { width: 100%; padding-left: 0; padding-right: 0; } }
|
||||
div.button-bar { overflow: hidden; }
|
||||
div.button-bar ul.button-group { float: left; margin-right: 8px; }
|
||||
div.button-bar ul.button-group:last-child { margin-left: 0; }
|
||||
|
||||
/* CSS for jQuery Reveal Plugin Maintained for Foundation. foundation.zurb.com Free to use under the MIT license. http://www.opensource.org/licenses/mit-license.php */
|
||||
/* Reveal Modals ---------------------- */
|
||||
.reveal-modal-bg { position: fixed; height: 100%; width: 100%; background: #000; background: rgba(0, 0, 0, 0.45); z-index: 40; display: none; top: 0; left: 0; }
|
||||
|
||||
.reveal-modal { background: white; visibility: hidden; display: none; top: 100px; left: 50%; margin-left: -260px; width: 520px; position: absolute; z-index: 41; padding: 30px; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }
|
||||
.reveal-modal *:first-child { margin-top: 0; }
|
||||
.reveal-modal *:last-child { margin-bottom: 0; }
|
||||
.reveal-modal .close-reveal-modal { font-size: 22px; font-size: 2.2rem; line-height: .5; position: absolute; top: 8px; right: 11px; color: #aaa; text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6); font-weight: bold; cursor: pointer; }
|
||||
.reveal-modal.small { width: 30%; margin-left: -15%; }
|
||||
.reveal-modal.medium { width: 40%; margin-left: -20%; }
|
||||
.reveal-modal.large { width: 60%; margin-left: -30%; }
|
||||
.reveal-modal.xlarge { width: 70%; margin-left: -35%; }
|
||||
.reveal-modal.expand { width: 90%; margin-left: -45%; }
|
||||
.reveal-modal .row { min-width: 0; margin-bottom: 10px; }
|
||||
|
||||
/* Mobile */
|
||||
@media only screen and (max-width: 767px) { .reveal-modal-bg { position: absolute; }
|
||||
.reveal-modal, .reveal-modal.small, .reveal-modal.medium, .reveal-modal.large, .reveal-modal.xlarge { width: 80%; top: 15px; left: 50%; margin-left: -40%; padding: 20px; height: auto; } }
|
||||
/* NOTES Close button entity is ×
|
||||
Example markup <div id="myModal" class="reveal-modal"> <h2>Awesome. I have it.</h2> <p class="lead">Your couch. I it's mine.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ultrices aliquet placerat. Duis pulvinar orci et nisi euismod vitae tempus lorem consectetur. Duis at magna quis turpis mattis venenatis eget id diam. </p> <a class="close-reveal-modal">×</a> </div> */
|
||||
/* Requires -globals.css -app.js */
|
||||
/* Tabs ---------------------- */
|
||||
dl.tabs { border-bottom: solid 1px #e6e6e6; display: block; height: 40px; padding: 0; margin-bottom: 20px; }
|
||||
dl.tabs.contained { margin-bottom: 0; }
|
||||
dl.tabs dt { color: #b3b3b3; cursor: default; display: block; float: left; font-size: 12px; height: 40px; line-height: 40px; padding: 0; padding-right: 9px; padding-left: 20px; width: auto; text-transform: uppercase; }
|
||||
dl.tabs dt:first-child { padding: 0; padding-right: 9px; }
|
||||
dl.tabs dd { display: block; float: left; padding: 0; margin: 0; }
|
||||
dl.tabs dd a { color: #6f6f6f; display: block; font-size: 14px; height: 40px; line-height: 40px; padding: 0px 23.8px; }
|
||||
dl.tabs dd a:focus { font-weight: bold; color: #fd7800; }
|
||||
dl.tabs dd.active { border-top: 3px solid #fd7800; margin-top: -3px; }
|
||||
dl.tabs dd.active a { cursor: default; color: #3c3c3c; background: #fff; border-left: 1px solid #e6e6e6; border-right: 1px solid #e6e6e6; font-weight: bold; }
|
||||
dl.tabs dd:first-child { margin-left: 0; }
|
||||
dl.tabs.vertical { height: auto; border-bottom: 1px solid #e6e6e6; }
|
||||
dl.tabs.vertical dt, dl.tabs.vertical dd { float: none; height: auto; }
|
||||
dl.tabs.vertical dd { border-left: 3px solid #cccccc; }
|
||||
dl.tabs.vertical dd a { background: #f2f2f2; border: none; border: 1px solid #e6e6e6; border-width: 1px 1px 0 0; color: #555; display: block; font-size: 14px; height: auto; line-height: 1; padding: 15px 20px; -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
|
||||
dl.tabs.vertical dd.active { margin-top: 0; border-top: 1px solid #4d4d4d; border-left: 4px solid #1a1a1a; }
|
||||
dl.tabs.vertical dd.active a { background: #4d4d4d; border: none; color: #fff; height: auto; margin: 0; position: static; top: 0; -webkit-box-shadow: 0 0 0; -moz-box-shadow: 0 0 0; box-shadow: 0 0 0; }
|
||||
dl.tabs.vertical dd:first-child a.active { margin: 0; }
|
||||
dl.tabs.pill { border-bottom: none; margin-bottom: 10px; }
|
||||
dl.tabs.pill dd { margin-right: 10px; }
|
||||
dl.tabs.pill dd:last-child { margin-right: 0; }
|
||||
dl.tabs.pill dd a { -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; background: #e6e6e6; height: 26px; line-height: 26px; color: #666; }
|
||||
dl.tabs.pill dd.active { border: none; margin-top: 0; }
|
||||
dl.tabs.pill dd.active a { background-color: #fd7800; border: none; color: #fff; }
|
||||
dl.tabs.pill.contained { border-bottom: solid 1px #eee; margin-bottom: 0; }
|
||||
dl.tabs.pill.two-up dd, dl.tabs.pill.three-up dd, dl.tabs.pill.four-up dd, dl.tabs.pill.five-up dd { margin-right: 0; }
|
||||
dl.tabs.two-up dt a, dl.tabs.two-up dd a, dl.tabs.three-up dt a, dl.tabs.three-up dd a, dl.tabs.four-up dt a, dl.tabs.four-up dd a, dl.tabs.five-up dt a, dl.tabs.five-up dd a { padding: 0 17px; text-align: center; overflow: hidden; }
|
||||
dl.tabs.two-up dt, dl.tabs.two-up dd { width: 50%; }
|
||||
dl.tabs.three-up dt, dl.tabs.three-up dd { width: 33.33%; }
|
||||
dl.tabs.four-up dt, dl.tabs.four-up dd { width: 25%; }
|
||||
dl.tabs.five-up dt, dl.tabs.five-up dd { width: 20%; }
|
||||
|
||||
ul.tabs-content { display: block; margin: 0 0 20px; padding: 0; }
|
||||
ul.tabs-content > li { display: none; }
|
||||
ul.tabs-content > li.active { display: block; }
|
||||
ul.tabs-content.contained { padding: 0; }
|
||||
ul.tabs-content.contained > li { border: solid 0 #e6e6e6; border-width: 0 1px 1px 1px; padding: 20px; }
|
||||
ul.tabs-content.contained.vertical > li { border-width: 1px 1px 1px 1px; }
|
||||
|
||||
.no-js ul.tabs-content > li { display: block; }
|
||||
|
||||
@media only screen and (max-width: 767px) { dl.tabs.mobile { width: auto; margin: 20px -20px 40px; height: auto; }
|
||||
dl.tabs.mobile dt, dl.tabs.mobile dd { float: none; height: auto; }
|
||||
dl.tabs.mobile dd a { display: block; width: auto; height: auto; padding: 18px 20px; line-height: 1; border: solid 0 #ccc; border-width: 1px 0 0; margin: 0; color: #555; background: #eee; font-size: 15px; font-size: 1.5rem; }
|
||||
dl.tabs.mobile dd a.active { height: auto; margin: 0; border-width: 1px 0 0; }
|
||||
.tabs.mobile { border-bottom: solid 1px #ccc; height: auto; }
|
||||
.tabs.mobile dd a { padding: 18px 20px; border: none; border-left: none; border-right: none; border-top: 1px solid #ccc; background: #fff; }
|
||||
.tabs.mobile dd a.active { border: none; background: #fd7800; color: #fff; margin: 0; position: static; top: 0; height: auto; }
|
||||
.tabs.mobile dd:first-child a.active { margin: 0; }
|
||||
dl.contained.mobile { margin-bottom: 0; }
|
||||
dl.contained.tabs.mobile dd a { padding: 18px 20px; }
|
||||
dl.tabs.mobile + ul.contained { margin-left: -20px; margin-right: -20px; border-width: 0 0 1px 0; } }
|
||||
/* Requires: globals.css */
|
||||
/* Table of Contents
|
||||
|
||||
:: Visibility
|
||||
:: Alerts
|
||||
:: Labels
|
||||
:: Tooltips
|
||||
:: Panels
|
||||
:: Accordion
|
||||
:: Side Nav
|
||||
:: Sub Nav
|
||||
:: Pagination
|
||||
:: Breadcrumbs
|
||||
:: Lists
|
||||
:: Link Lists
|
||||
:: Keystroke Chars
|
||||
:: Image Thumbnails
|
||||
:: Video
|
||||
:: Tables
|
||||
:: Microformats
|
||||
:: Progress Bars
|
||||
|
||||
*/
|
||||
/* Visibility Classes ---------------------- */
|
||||
/* Standard (large) display targeting */
|
||||
.show-for-small, .show-for-medium, .show-for-medium-down, .hide-for-large, .hide-for-large-up, .show-for-xlarge { display: none !important; }
|
||||
|
||||
.hide-for-xlarge, .show-for-large, .show-for-large-up, .hide-for-small, .hide-for-medium, .hide-for-medium-down { display: block !important; }
|
||||
|
||||
/* Very large display targeting */
|
||||
@media only screen and (min-width: 1441px) { .hide-for-small, .hide-for-medium, .hide-for-medium-down, .hide-for-large, .show-for-large-up, .show-for-xlarge { display: block !important; }
|
||||
.show-for-small, .show-for-medium, .show-for-medium-down, .show-for-large, .hide-for-large-up, .hide-for-xlarge { display: none !important; } }
|
||||
/* Medium display targeting */
|
||||
@media only screen and (max-width: 1279px) and (min-width: 768px) { .hide-for-small, .show-for-medium, .show-for-medium-down, .hide-for-large, .hide-for-large-up, .hide-for-xlarge { display: block !important; }
|
||||
.show-for-small, .hide-for-medium, .hide-for-medium-down, .show-for-large, .show-for-large-up, .show-for-xlarge { display: none !important; } }
|
||||
/* Small display targeting */
|
||||
@media only screen and (max-width: 767px) { .show-for-small, .hide-for-medium, .show-for-medium-down, .hide-for-large, .hide-for-large-up, .hide-for-xlarge { display: block !important; }
|
||||
.hide-for-small, .show-for-medium, .hide-for-medium-down, .show-for-large, .show-for-large-up, .show-for-xlarge { display: none !important; } }
|
||||
/* Orientation targeting */
|
||||
.show-for-landscape, .hide-for-portrait { display: block !important; }
|
||||
|
||||
.hide-for-landscape, .show-for-portrait { display: none !important; }
|
||||
|
||||
@media screen and (orientation: landscape) { .show-for-landscape, .hide-for-portrait { display: block !important; }
|
||||
.hide-for-landscape, .show-for-portrait { display: none !important; } }
|
||||
@media screen and (orientation: portrait) { .show-for-portrait, .hide-for-landscape { display: block !important; }
|
||||
.hide-for-portrait, .show-for-landscape { display: none !important; } }
|
||||
/* Touch-enabled device targeting */
|
||||
.show-for-touch { display: none !important; }
|
||||
|
||||
.hide-for-touch { display: block !important; }
|
||||
|
||||
.touch .show-for-touch { display: block !important; }
|
||||
|
||||
.touch .hide-for-touch { display: none !important; }
|
||||
|
||||
/* Specific overrides for elements that require something other than display: block */
|
||||
table.show-for-xlarge, table.show-for-large, table.hide-for-small, table.hide-for-medium { display: table !important; }
|
||||
|
||||
@media only screen and (max-width: 1279px) and (min-width: 768px) { .touch table.hide-for-xlarge, .touch table.hide-for-large, .touch table.hide-for-small, .touch table.show-for-medium { display: table !important; } }
|
||||
@media only screen and (max-width: 767px) { table.hide-for-xlarge, table.hide-for-large, table.hide-for-medium, table.show-for-small { display: table !important; } }
|
||||
/* Alerts ---------------------- */
|
||||
div.alert-box { display: block; padding: 6px 7px 7px; font-weight: bold; font-size: 14px; color: white; background-color: #fd7800; border: 1px solid rgba(0, 0, 0, 0.1); margin-bottom: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); position: relative; }
|
||||
div.alert-box.success { background-color: #5da423; color: #fff; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); }
|
||||
div.alert-box.alert { background-color: #c60f13; color: #fff; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); }
|
||||
div.alert-box.secondary { background-color: #e9e9e9; color: #505050; text-shadow: 0 1px rgba(255, 255, 255, 0.3); }
|
||||
div.alert-box a.close { color: #333; position: absolute; right: 4px; top: -1px; font-size: 17px; opacity: 0.2; padding: 4px; }
|
||||
div.alert-box a.close:hover, div.alert-box a.close:focus { opacity: 0.4; }
|
||||
|
||||
/* Labels ---------------------- */
|
||||
|
||||
|
||||
/* Tooltips ---------------------- */
|
||||
.has-tip { border-bottom: dotted 1px #cccccc; cursor: help; font-weight: bold; color: #333333; }
|
||||
.has-tip:hover { border-bottom: dotted 1px #196177; color: #fd7800; }
|
||||
.has-tip.tip-left, .has-tip.tip-right { float: none !important; }
|
||||
|
||||
.tooltip { display: none; background: black; background: rgba(0, 0, 0, 0.85); position: absolute; color: white; font-weight: bold; font-size: 12px; font-size: 1.2rem; padding: 5px; z-index: 999; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; line-height: normal; }
|
||||
.tooltip > .nub { display: block; width: 0; height: 0; border: solid 5px; border-color: transparent transparent black transparent; border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent; position: absolute; top: -10px; left: 10px; }
|
||||
.tooltip.tip-override > .nub { border-color: transparent transparent black transparent !important; border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent !important; top: -10px !important; }
|
||||
.tooltip.tip-top > .nub { border-color: black transparent transparent transparent; border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent; top: auto; bottom: -10px; }
|
||||
.tooltip.tip-left, .tooltip.tip-right { float: none !important; }
|
||||
.tooltip.tip-left > .nub { border-color: transparent transparent transparent black; border-color: transparent transparent transparent rgba(0, 0, 0, 0.85); right: -10px; left: auto; }
|
||||
.tooltip.tip-right > .nub { border-color: transparent black transparent transparent; border-color: transparent rgba(0, 0, 0, 0.85) transparent transparent; right: auto; left: -10px; }
|
||||
.tooltip.noradius { -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; }
|
||||
.tooltip.opened { color: #fd7800 !important; border-bottom: dotted 1px #196177 !important; }
|
||||
|
||||
.tap-to-close { display: block; font-size: 10px; font-size: 1rem; color: #888888; font-weight: normal; }
|
||||
|
||||
@media only screen and (max-width: 767px) { .tooltip { font-size: 14px; font-size: 1.4rem; line-height: 1.4; padding: 7px 10px 9px 10px; }
|
||||
.tooltip > .nub, .tooltip.top > .nub, .tooltip.left > .nub, .tooltip.right > .nub { border-color: transparent transparent black transparent; border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent; top: -12px; left: 10px; } }
|
||||
/* Panels ---------------------- */
|
||||
.panel { background: #f2f2f2; border: solid 1px #e6e6e6; margin: 0 0 22px 0; padding: 20px; }
|
||||
.panel > :first-child { margin-top: 0; }
|
||||
.panel > :last-child { margin-bottom: 0; }
|
||||
.panel.callout { background: #fd7800; color: #fff; border-color: #2284a1; -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); }
|
||||
.panel.callout a { color: #fff; }
|
||||
.panel.callout .button { background: white; border: none; color: #fd7800; text-shadow: none; }
|
||||
.panel.callout .button:hover { background: rgba(255, 255, 255, 0.8); }
|
||||
.panel.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
|
||||
/* Accordion ---------------------- */
|
||||
ul.accordion { margin: 0 0 22px 0; border-bottom: 1px solid #e9e9e9; }
|
||||
ul.accordion > li { list-style: none; margin: 0; padding: 0; border-top: 1px solid #e9e9e9; }
|
||||
ul.accordion > li .title { cursor: pointer; background: #f6f6f6; padding: 15px; margin: 0; position: relative; border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; -webkit-transition: 0.15s background linear; -moz-transition: 0.15s background linear; -o-transition: 0.15s background linear; transition: 0.15s background linear; }
|
||||
ul.accordion > li .title h1, ul.accordion > li .title h2, ul.accordion > li .title h3, ul.accordion > li .title h4, ul.accordion > li .title h5 { margin: 0; }
|
||||
ul.accordion > li .title:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: transparent #9d9d9d transparent transparent; position: absolute; right: 15px; top: 21px; }
|
||||
ul.accordion > li .content { display: none; padding: 15px; }
|
||||
ul.accordion > li.active { border-top: 3px solid #fd7800; }
|
||||
ul.accordion > li.active .title { background: white; padding-top: 13px; }
|
||||
ul.accordion > li.active .title:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: #9d9d9d transparent transparent transparent; }
|
||||
ul.accordion > li.active .content { background: white; display: block; border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; }
|
||||
|
||||
/* Side Nav ---------------------- */
|
||||
ul.side-nav { display: block; list-style: none; margin: 0; padding: 17px 0; }
|
||||
ul.side-nav li { display: block; list-style: none; margin: 0 0 7px 0; }
|
||||
ul.side-nav li a { display: block; }
|
||||
ul.side-nav li.active a { color: #4d4d4d; font-weight: bold; }
|
||||
ul.side-nav li.divider { border-top: 1px solid #e6e6e6; height: 0; padding: 0; }
|
||||
|
||||
/* Sub Navs http://www.zurb.com/article/292/how-to-create-simple-and-effective-sub-na ---------------------- */
|
||||
dl.sub-nav { display: block; width: auto; overflow: hidden; margin: -4px 0 18px; margin-right: 0; margin-left: -9px; padding-top: 4px; }
|
||||
dl.sub-nav dt, dl.sub-nav dd { float: left; display: inline; margin-left: 9px; margin-bottom: 10px; }
|
||||
dl.sub-nav dt { color: #999; font-weight: normal; }
|
||||
dl.sub-nav dd a { text-decoration: none; -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
|
||||
dl.sub-nav dd.active a { font-weight: bold; background: #fd7800; color: #fff; padding: 3px 9px; cursor: default; }
|
||||
|
||||
/* Pagination ---------------------- */
|
||||
ul.pagination { display: block; height: 24px; margin-left: -5px; }
|
||||
ul.pagination li { float: left; display: block; height: 24px; color: #999; font-size: 14px; margin-left: 5px; }
|
||||
ul.pagination li a { display: block; padding: 1px 7px 1px; color: #555; }
|
||||
ul.pagination li:hover a, ul.pagination li a:focus { background: #e6e6e6; }
|
||||
ul.pagination li.unavailable a { cursor: default; color: #999; }
|
||||
ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus { background: transparent; }
|
||||
ul.pagination li.current a { background: #fd7800; color: white; font-weight: bold; cursor: default; }
|
||||
ul.pagination li.current a:hover { background: #fd7800; }
|
||||
|
||||
/* Breadcrums ---------------------- */
|
||||
ul.breadcrumbs { display: block; background: #f6f6f6; padding: 6px 10px 7px; border: 1px solid #e9e9e9; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; overflow: hidden; }
|
||||
ul.breadcrumbs li { margin: 0; padding: 0 12px 0 0; float: left; list-style: none; }
|
||||
ul.breadcrumbs li a, ul.breadcrumbs li span { text-transform: uppercase; font-size: 11px; font-size: 1.1rem; padding-left: 12px; }
|
||||
ul.breadcrumbs li:first-child a, ul.breadcrumbs li:first-child span { padding-left: 0; }
|
||||
ul.breadcrumbs li:before { content: "/"; color: #aaa; }
|
||||
ul.breadcrumbs li:first-child:before { content: " "; }
|
||||
ul.breadcrumbs li.current a { cursor: default; color: #333; }
|
||||
ul.breadcrumbs li:hover a, ul.breadcrumbs li a:focus { text-decoration: underline; }
|
||||
ul.breadcrumbs li.current:hover a, ul.breadcrumbs li.current a:focus { text-decoration: none; }
|
||||
ul.breadcrumbs li.unavailable a { color: #999; }
|
||||
ul.breadcrumbs li.unavailable:hover a, ul.breadcrumbs li.unavailable a:focus { text-decoration: none; color: #999; cursor: default; }
|
||||
|
||||
/* Link List */
|
||||
ul.link-list { margin: 0 0 17px -22px; padding: 0; list-style: none; overflow: hidden; }
|
||||
ul.link-list li { list-style: none; float: left; margin-left: 22px; display: block; }
|
||||
ul.link-list li a { display: block; }
|
||||
|
||||
/* Keytroke Characters ---------------------- */
|
||||
.keystroke, kbd { font-family: "Consolas", "Menlo", "Courier", monospace; font-size: 13px; padding: 2px 4px 0px; margin: 0; background: #ededed; border: solid 1px #dbdbdb; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
|
||||
/* Image Thumbnails ---------------------- */
|
||||
.th { display: block; }
|
||||
.th img { display: block; border: solid 4px #fff; -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-transition-property: border, box-shadow; -moz-transition-property: border, box-shadow; -o-transition-property: border, box-shadow; transition-property: border, box-shadow; -webkit-transition-duration: 300ms; -moz-transition-duration: 300ms; -o-transition-duration: 300ms; transition-duration: 300ms; }
|
||||
.th:hover img { -webkit-box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); -moz-box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); }
|
||||
|
||||
/* Video - Mad props to http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ ---------------------- */
|
||||
.flex-video { position: relative; padding-top: 25px; padding-bottom: 67.5%; height: 0; margin-bottom: 16px; overflow: hidden; }
|
||||
.flex-video.widescreen { padding-bottom: 57.25%; }
|
||||
.flex-video.vimeo { padding-top: 0; }
|
||||
.flex-video iframe, .flex-video object, .flex-video embed, .flex-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
@@ -0,0 +1,776 @@
|
||||
@import url("base.css");
|
||||
|
||||
@import url("foundation.css");
|
||||
|
||||
table {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
background-color: #fafafa;
|
||||
color: #222;
|
||||
line-height: 1.0em;
|
||||
border: 2px solid #C6C9CB;
|
||||
font-size: 0.9em;
|
||||
/* margin: 1.5em 0 1.5em 0; */
|
||||
margin: 0;
|
||||
border-right-style: none;
|
||||
border-left-style: none;
|
||||
}
|
||||
|
||||
/* General */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
color: #000;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
h1 { font-weight: normal; font-size: 24px; line-height: 24px; }
|
||||
h2 { font-weight: normal; font-size: 18px; line-height: 18px; }
|
||||
h3 { font-weight: bold; font-size: 18px; line-height: 18px; }
|
||||
h4 { font-weight: normal; font-size: 18px; line-height: 178px; }
|
||||
|
||||
hr {
|
||||
background-color: #c6c6c6;
|
||||
border:0;
|
||||
height: 1px;
|
||||
margin-bottom: 18px;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
div.hr {
|
||||
height: 1px;
|
||||
background: #c6c6c6;
|
||||
}
|
||||
|
||||
div.hr2 {
|
||||
height: 1px;
|
||||
background: #c6c6c6;
|
||||
}
|
||||
|
||||
div.hr hr, div.hr2 hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0 0 0.5em;
|
||||
line-height:1.6em;
|
||||
}
|
||||
ul {
|
||||
list-style: square;
|
||||
margin: 0 0 18px 0;
|
||||
}
|
||||
ol {
|
||||
list-style: decimal;
|
||||
margin: 0 0 18px 1.5em;
|
||||
}
|
||||
ol ol {
|
||||
list-style:upper-alpha;
|
||||
}
|
||||
ol ol ol {
|
||||
list-style:lower-roman;
|
||||
}
|
||||
ol ol ol ol {
|
||||
list-style:lower-alpha;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom:0;
|
||||
}
|
||||
dl {
|
||||
margin:0 0 24px 0;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
cite,
|
||||
em,
|
||||
i {
|
||||
font-style: italic;
|
||||
border: none;
|
||||
}
|
||||
big {
|
||||
font-size: 131.25%;
|
||||
}
|
||||
ins {
|
||||
background: #FFFFCC;
|
||||
border: none;
|
||||
color: #333;
|
||||
}
|
||||
del {
|
||||
text-decoration: line-through;
|
||||
color: #555;
|
||||
}
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
padding: 0 3em;
|
||||
}
|
||||
blockquote cite,
|
||||
blockquote em,
|
||||
blockquote i {
|
||||
font-style: normal;
|
||||
}
|
||||
pre {
|
||||
background: #f7f7f7;
|
||||
color: #222;
|
||||
padding: 1.5em;
|
||||
}
|
||||
abbr,
|
||||
acronym {
|
||||
border-bottom: 1px solid #666;
|
||||
cursor: help;
|
||||
}
|
||||
ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
sup,
|
||||
sub {
|
||||
height: 0;
|
||||
line-height: 1;
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
font-size: 10px;
|
||||
}
|
||||
sup {
|
||||
bottom: 1ex;
|
||||
}
|
||||
sub {
|
||||
top: .5ex;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
dd,
|
||||
hr {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom:0;
|
||||
}
|
||||
pre,
|
||||
kbd,
|
||||
tt,
|
||||
var {
|
||||
}
|
||||
code {
|
||||
font-size: 13px;
|
||||
}
|
||||
strong,
|
||||
b,
|
||||
dt,
|
||||
th {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
/* main_container */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#wrapper {
|
||||
padding: 0px 0px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* header*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#search-header{
|
||||
margin-top:15px;
|
||||
padding-bottom:13px;
|
||||
}
|
||||
|
||||
#search-header #search{
|
||||
background: #222;
|
||||
|
||||
}
|
||||
|
||||
#search-header #search #s{
|
||||
background: #222;
|
||||
font-size:12px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
#header_container{
|
||||
padding-bottom: 25px;
|
||||
padding-top: 0px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#header {
|
||||
|
||||
}
|
||||
|
||||
#header2 {
|
||||
|
||||
}
|
||||
|
||||
#content_container{
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
#left-col {
|
||||
padding: 10px 20px;
|
||||
padding-left: 0px;
|
||||
background: #fff;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*footer*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
#footer {
|
||||
padding: 5px 20px;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#footer-container{
|
||||
padding: 5px 20px;
|
||||
background: #303030;
|
||||
border-top: 8px solid #000;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#footer-info {
|
||||
color:#ccc;
|
||||
text-align:left;
|
||||
background: #1b1b1b;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
|
||||
#footer-info a{
|
||||
text-decoration:none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#footer-info a:hover{
|
||||
color: #ebebeb;
|
||||
}
|
||||
|
||||
#copyright{float: left;}
|
||||
|
||||
.scroll-top {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
#footer-widget{
|
||||
padding: 8px 0px 8px 0px;
|
||||
color:#6f6f6f;
|
||||
}
|
||||
|
||||
#footer-widget #search {
|
||||
width:120px;
|
||||
height:28px;
|
||||
background: #222;
|
||||
margin-left: 0px;
|
||||
position: relative;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
#footer-widget #search #s {
|
||||
width:110px;
|
||||
height:23px;
|
||||
border:0px;
|
||||
margin-left:7px;
|
||||
margin-right:10px;
|
||||
margin-top:3px;
|
||||
color:#fff;
|
||||
display: inline;
|
||||
background: #222;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#footer-widget #calendar_wrap {
|
||||
padding: 8px 0px;
|
||||
}
|
||||
|
||||
#footer-widget #wp-calendar td{
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
|
||||
#footer-widget .textwidget {
|
||||
padding: 5px 0px;
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
|
||||
#footer-widget .widget_tag_cloud a{
|
||||
text-decoration: none;
|
||||
margin: 5px;
|
||||
line-height: 24px;
|
||||
margin-left: 0px;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
|
||||
#footer-widget .widget_tag_cloud a:hover{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container ul li a {
|
||||
color:#fd7800;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container ul li a:hover {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container h3 {
|
||||
color: #a5a5a5;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 0px;
|
||||
padding-top: 10px;
|
||||
padding-left: 0px;
|
||||
font-size: 25px;
|
||||
padding-bottom: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container ul li {
|
||||
padding: 5px 0px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
#footer-widget ul {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#footer-bar1 {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#footer-bar2 {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#footer-bar3 {
|
||||
}
|
||||
#footer-bar4 {
|
||||
}
|
||||
|
||||
span#follow-box{
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
|
||||
span#follow-box img{
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
/*logo*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#logo {
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#logo2 {
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#logo img{
|
||||
border: none;
|
||||
}
|
||||
|
||||
#logo2{
|
||||
text-decoration: none;
|
||||
font-size: 42px;
|
||||
letter-spacing: -1pt;
|
||||
font-weight: bold;
|
||||
font-family:arial, "Times New Roman", Times, serif;
|
||||
text-align: left;
|
||||
line-height: 57px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
#logo2 a, #slogan{
|
||||
color: #fd7800;
|
||||
}
|
||||
|
||||
#slogan{
|
||||
text-align: left;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
/*search*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#search {
|
||||
width:180px;
|
||||
height:28px;
|
||||
border: 1px solid #ccc;
|
||||
margin-left: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#sidebar #search {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#search #searchsubmit {
|
||||
background:url(images/go-btn.png) no-repeat top right;
|
||||
width:28px;
|
||||
height:28px;
|
||||
border:0px;
|
||||
position:absolute;
|
||||
right: -35px;
|
||||
}
|
||||
|
||||
#search #s {
|
||||
width:170px;
|
||||
height:23px;
|
||||
border:0px;
|
||||
margin-left:7px;
|
||||
margin-right:10px;
|
||||
margin-top:3px;
|
||||
color:#000;
|
||||
display: inline;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/*menu bar*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#menu_container{
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
/*responsive menu*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
/* default style */
|
||||
.selectnav { display: none; }
|
||||
|
||||
/* small screen */
|
||||
@media screen and (max-width: 600px) {
|
||||
.js #nav { display: none; }
|
||||
.js #nav2 { display: none; }
|
||||
.js .selectnav { display: block; }
|
||||
}
|
||||
|
||||
|
||||
/*welcome*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
#welcome_container h1{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
/*homepage boxes*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#box_container{
|
||||
padding-top: 35px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.box-head {
|
||||
float: left;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.box-head img{
|
||||
|
||||
}
|
||||
|
||||
.title-head{
|
||||
padding-top:2px;
|
||||
}
|
||||
|
||||
.title-box{
|
||||
color: #333;
|
||||
line-height: 15px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.title-box h1 {
|
||||
font-size: 18px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.box-content {
|
||||
float: left;
|
||||
padding-top: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* POST */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
.post {
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.post-shadow{
|
||||
background: url("images/post_shadow.png") no-repeat bottom;
|
||||
height: 9px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.post ol{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.post ul {
|
||||
margin-left: 15px;
|
||||
}
|
||||
.post-entry ul { margin: 0 0 10px 10px; }
|
||||
.post-entry ul li {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
padding: 0 0 0 20px;
|
||||
/*background: url(images/bullet.png) no-repeat 0 7px;*/
|
||||
}
|
||||
|
||||
.post-entry ol {
|
||||
list-style: decimal;
|
||||
margin: 0 0 18px 1.6em;
|
||||
}
|
||||
.post-entry ol li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.post-entry {
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.post-head {
|
||||
margin-bottom: 5px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.post-head h1 a, .post-head h1 {
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
margin: 0px;
|
||||
font-size: 27px;
|
||||
}
|
||||
|
||||
.post-head h1 a:hover {
|
||||
color:#777;
|
||||
}
|
||||
|
||||
|
||||
.post-head-notfound h1, .post-head-404 h1, .post-head-archive h1, .post-head-search h1 {
|
||||
margin-bottom: 10px;
|
||||
font-weight:normal;
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
font-size: 27px;
|
||||
}
|
||||
|
||||
.post-thumb img {
|
||||
border: 0px solid #ebebeb;
|
||||
}
|
||||
|
||||
.post-entry img{
|
||||
margin-bottom: 10px;
|
||||
height:auto;
|
||||
max-width:100% !important;
|
||||
}
|
||||
|
||||
.meta-data{
|
||||
line-height: 16px;
|
||||
padding: 6px 3px;
|
||||
margin-bottom: 3px;
|
||||
font-size: 11px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.meta-data a{
|
||||
color: #fd7800;
|
||||
}
|
||||
|
||||
.meta-data a:hover{
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.read-more {
|
||||
color: #000;
|
||||
background: #fff;
|
||||
padding: 4px 8px;
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-transform: capitalize;
|
||||
cursor: pointer;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.read-more:hover{
|
||||
background: #fff;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
|
||||
}
|
||||
|
||||
/* content */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
#content_container table {
|
||||
border: 1px solid #e7e7e7;
|
||||
margin: 0 -1px 24px 0;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
#content_container tr th,
|
||||
#content_container thead th {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
padding: 9px 10px;
|
||||
}
|
||||
#content_container tr td {
|
||||
|
||||
padding: 6px 10px;
|
||||
}
|
||||
#content_container tr.odd td {
|
||||
background: #f2f7fc;
|
||||
}
|
||||
|
||||
/*--navigation--*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
.navigation {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
|
||||
.navigation .alignleft a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navigation .alignright a {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#nav-single {
|
||||
overflow:hidden;
|
||||
margin-top:20px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.nav-previous {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
.nav-next {
|
||||
float: right;
|
||||
text-align: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/*--sub head and breadcrumbs--*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#subhead_container{
|
||||
padding: 7px 0px;
|
||||
}
|
||||
|
||||
#subhead h1{
|
||||
color: #000;
|
||||
padding-top: 10px;
|
||||
padding-left: 0px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
#breadcrumbs {
|
||||
padding-left: 25px;
|
||||
margin-bottom: 15px;
|
||||
color: #9e9e9e;
|
||||
margin:0 auto;
|
||||
width: 964px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#breadcrumbs a{
|
||||
text-decoration: none;
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
||||
/*Alignments */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
.alignleft,
|
||||
img.alignleft {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: 22px;
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.alignright,
|
||||
img.alignright {
|
||||
display: inline;
|
||||
float: right;
|
||||
margin-left: 22px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.aligncenter,
|
||||
img.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.alignleft,
|
||||
.alignright,
|
||||
.aligncenter,
|
||||
img.alignleft,
|
||||
img.alignright,
|
||||
img.aligncenter
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
a img.aligncenter {
|
||||
display:block;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
img { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; }
|
||||
@@ -0,0 +1,813 @@
|
||||
@import url("base.css");
|
||||
|
||||
@import url("foundation.css");
|
||||
|
||||
table {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
background-color: #fafafa;
|
||||
color: #222;
|
||||
/* line-height: 1.0em; */
|
||||
border: 2px solid #C6C9CB;
|
||||
font-size: 0.9em;
|
||||
/* margin: 1.5em 0 1.5em 0; */
|
||||
margin: 0;
|
||||
border-right-style: none;
|
||||
border-left-style: none;
|
||||
}
|
||||
|
||||
/* General */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
color: #000;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
h1 { font-weight: bold; font-size: 24px; }
|
||||
h2 { font-weight: bold; font-size: 18px; }
|
||||
h3 { font-weight: bold; font-size: 16px; }
|
||||
h4 { font-weight: bold; font-size: 14px; }
|
||||
|
||||
hr {
|
||||
background-color: #c6c6c6;
|
||||
border:0;
|
||||
height: 1px;
|
||||
margin-bottom: 18px;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
div.hr {
|
||||
height: 1px;
|
||||
background: #c6c6c6;
|
||||
}
|
||||
|
||||
div.hr2 {
|
||||
height: 1px;
|
||||
background: #c6c6c6;
|
||||
}
|
||||
|
||||
div.hr hr, div.hr2 hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
line-height:1.6em;
|
||||
}
|
||||
ul {
|
||||
list-style: square;
|
||||
margin: 0 0 18px 0;
|
||||
}
|
||||
ol {
|
||||
list-style: decimal;
|
||||
margin: 0 0 18px 1.5em;
|
||||
}
|
||||
ol ol {
|
||||
list-style:upper-alpha;
|
||||
}
|
||||
ol ol ol {
|
||||
list-style:lower-roman;
|
||||
}
|
||||
ol ol ol ol {
|
||||
list-style:lower-alpha;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom:0;
|
||||
}
|
||||
dl {
|
||||
margin:0 0 24px 0;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
cite,
|
||||
em,
|
||||
i {
|
||||
font-style: italic;
|
||||
border: none;
|
||||
}
|
||||
big {
|
||||
font-size: 131.25%;
|
||||
}
|
||||
ins {
|
||||
background: #FFFFCC;
|
||||
border: none;
|
||||
color: #333;
|
||||
}
|
||||
del {
|
||||
text-decoration: line-through;
|
||||
color: #555;
|
||||
}
|
||||
blockquote {
|
||||
padding: 0 3em;
|
||||
}
|
||||
blockquote cite,
|
||||
blockquote em,
|
||||
blockquote i {
|
||||
font-style: normal;
|
||||
}
|
||||
pre {
|
||||
background: #f7f7f7;
|
||||
color: #222;
|
||||
padding: 1.5em;
|
||||
}
|
||||
abbr,
|
||||
acronym {
|
||||
border-bottom: 1px solid #666;
|
||||
cursor: help;
|
||||
}
|
||||
ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
sup,
|
||||
sub {
|
||||
height: 0;
|
||||
line-height: 1;
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
font-size: 10px;
|
||||
}
|
||||
sup {
|
||||
bottom: 1ex;
|
||||
}
|
||||
sub {
|
||||
top: .5ex;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
dd,
|
||||
hr {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom:0;
|
||||
}
|
||||
pre,
|
||||
kbd,
|
||||
tt,
|
||||
var {
|
||||
}
|
||||
code {
|
||||
font-size: 13px;
|
||||
}
|
||||
strong,
|
||||
b,
|
||||
dt,
|
||||
th {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
/* main_container */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#wrapper {
|
||||
padding: 0px 0px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* header*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#search-header{
|
||||
margin-top:15px;
|
||||
padding-bottom:13px;
|
||||
}
|
||||
|
||||
#search-header #search{
|
||||
background: #222;
|
||||
|
||||
}
|
||||
|
||||
#search-header #search #s{
|
||||
background: #222;
|
||||
font-size:12px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
#header_container{
|
||||
padding-bottom: 25px;
|
||||
padding-top: 0px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#header {
|
||||
|
||||
}
|
||||
|
||||
#header2 {
|
||||
|
||||
}
|
||||
|
||||
#content_container{
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
#left-col {
|
||||
padding: 10px 20px;
|
||||
padding-left: 0px;
|
||||
background: #fff;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*footer*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
#footer {
|
||||
padding: 5px 20px;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#footer-container{
|
||||
padding: 5px 20px;
|
||||
background: #303030;
|
||||
border-top: 8px solid #000;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#footer-info {
|
||||
color:#ccc;
|
||||
text-align:left;
|
||||
background: #1b1b1b;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
|
||||
#footer-info a{
|
||||
text-decoration:none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#footer-info a:hover{
|
||||
color: #ebebeb;
|
||||
}
|
||||
|
||||
#copyright{float: left;}
|
||||
|
||||
.scroll-top {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
#footer-widget{
|
||||
padding: 8px 0px 8px 0px;
|
||||
color:#6f6f6f;
|
||||
}
|
||||
|
||||
#footer-widget #search {
|
||||
width:120px;
|
||||
height:28px;
|
||||
background: #222;
|
||||
margin-left: 0px;
|
||||
position: relative;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
#footer-widget #search #s {
|
||||
width:110px;
|
||||
height:23px;
|
||||
border:0px;
|
||||
margin-left:7px;
|
||||
margin-right:10px;
|
||||
margin-top:3px;
|
||||
color:#fff;
|
||||
display: inline;
|
||||
background: #222;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#footer-widget #calendar_wrap {
|
||||
padding: 8px 0px;
|
||||
}
|
||||
|
||||
#footer-widget #wp-calendar td{
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
|
||||
#footer-widget .textwidget {
|
||||
padding: 5px 0px;
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
|
||||
#footer-widget .widget_tag_cloud a{
|
||||
text-decoration: none;
|
||||
margin: 5px;
|
||||
line-height: 24px;
|
||||
margin-left: 0px;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
|
||||
#footer-widget .widget_tag_cloud a:hover{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container ul li a {
|
||||
color:#fd7800;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container ul li a:hover {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container h3 {
|
||||
color: #a5a5a5;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 0px;
|
||||
padding-top: 10px;
|
||||
padding-left: 0px;
|
||||
font-size: 25px;
|
||||
padding-bottom: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#footer-widget .widget-container ul li {
|
||||
padding: 5px 0px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
#footer-widget ul {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#footer-bar1 {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#footer-bar2 {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#footer-bar3 {
|
||||
}
|
||||
#footer-bar4 {
|
||||
}
|
||||
|
||||
span#follow-box{
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
|
||||
span#follow-box img{
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
/*logo*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#logo {
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#logo2 {
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#logo img{
|
||||
border: none;
|
||||
}
|
||||
|
||||
#logo2{
|
||||
text-decoration: none;
|
||||
font-size: 42px;
|
||||
letter-spacing: -1pt;
|
||||
font-weight: bold;
|
||||
font-family:arial, "Times New Roman", Times, serif;
|
||||
text-align: left;
|
||||
line-height: 57px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
#logo2 a, #slogan{
|
||||
color: #fd7800;
|
||||
}
|
||||
|
||||
#slogan{
|
||||
text-align: left;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
/*search*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#search {
|
||||
width:180px;
|
||||
height:28px;
|
||||
border: 1px solid #ccc;
|
||||
margin-left: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#sidebar #search {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#search #searchsubmit {
|
||||
background:url(images/go-btn.png) no-repeat top right;
|
||||
width:28px;
|
||||
height:28px;
|
||||
border:0px;
|
||||
position:absolute;
|
||||
right: -35px;
|
||||
}
|
||||
|
||||
#search #s {
|
||||
width:170px;
|
||||
height:23px;
|
||||
border:0px;
|
||||
margin-left:7px;
|
||||
margin-right:10px;
|
||||
margin-top:3px;
|
||||
color:#000;
|
||||
display: inline;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/*menu bar*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#menu_container{
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
/*responsive menu*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
/* default style */
|
||||
.selectnav { display: none; }
|
||||
|
||||
/* small screen */
|
||||
@media screen and (max-width: 600px) {
|
||||
.js #nav { display: none; }
|
||||
.js #nav2 { display: none; }
|
||||
.js .selectnav { display: block; }
|
||||
}
|
||||
|
||||
|
||||
/*welcome*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
#welcome_container h1{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
/*homepage boxes*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#box_container{
|
||||
padding-top: 35px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.box-head {
|
||||
float: left;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.box-head img{
|
||||
|
||||
}
|
||||
|
||||
.title-head{
|
||||
padding-top:2px;
|
||||
}
|
||||
|
||||
.title-box{
|
||||
color: #333;
|
||||
line-height: 15px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.title-box h1 {
|
||||
font-size: 18px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.box-content {
|
||||
float: left;
|
||||
padding-top: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* POST */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
.post {
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.post-shadow{
|
||||
background: url("images/post_shadow.png") no-repeat bottom;
|
||||
height: 9px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.post ol{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.post ul {
|
||||
margin-left: 15px;
|
||||
}
|
||||
.post-entry ul { margin: 0 0 10px 10px; }
|
||||
.post-entry ul li {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
padding: 0 0 0 20px;
|
||||
/*background: url(images/bullet.png) no-repeat 0 7px;*/
|
||||
}
|
||||
|
||||
.post-entry ol {
|
||||
list-style: decimal;
|
||||
margin: 0 0 18px 1.6em;
|
||||
}
|
||||
.post-entry ol li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.post-entry {
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.post-head {
|
||||
margin-bottom: 5px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.post-head h1 a, .post-head h1 {
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
margin: 0px;
|
||||
font-size: 27px;
|
||||
}
|
||||
|
||||
.post-head h1 a:hover {
|
||||
color:#777;
|
||||
}
|
||||
|
||||
|
||||
.post-head-notfound h1, .post-head-404 h1, .post-head-archive h1, .post-head-search h1 {
|
||||
margin-bottom: 10px;
|
||||
font-weight:normal;
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
font-size: 27px;
|
||||
}
|
||||
|
||||
.post-thumb img {
|
||||
border: 0px solid #ebebeb;
|
||||
}
|
||||
|
||||
.post-entry img{
|
||||
margin-bottom: 10px;
|
||||
height:auto;
|
||||
max-width:100% !important;
|
||||
}
|
||||
|
||||
.meta-data{
|
||||
line-height: 16px;
|
||||
padding: 6px 3px;
|
||||
margin-bottom: 3px;
|
||||
font-size: 11px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.meta-data a{
|
||||
color: #fd7800;
|
||||
}
|
||||
|
||||
.meta-data a:hover{
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.read-more {
|
||||
color: #000;
|
||||
background: #fff;
|
||||
padding: 4px 8px;
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-transform: capitalize;
|
||||
cursor: pointer;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.read-more:hover{
|
||||
background: #fff;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
|
||||
}
|
||||
|
||||
/* content */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
#content_container table {
|
||||
border: 1px solid #e7e7e7;
|
||||
margin: 0 -1px 24px 0;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
#content_container tr th,
|
||||
#content_container thead th {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
padding: 9px 10px;
|
||||
}
|
||||
#content_container tr td {
|
||||
|
||||
padding: 6px 10px;
|
||||
}
|
||||
#content_container tr.odd td {
|
||||
background: #f2f7fc;
|
||||
}
|
||||
|
||||
/* sidebar*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#sidebar {
|
||||
padding:0px 20px 20px 0px;
|
||||
}
|
||||
|
||||
#sidebar ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#sidebar { word-wrap: break-word;}
|
||||
|
||||
|
||||
/*--navigation--*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
.navigation {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
|
||||
.navigation .alignleft a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navigation .alignright a {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#nav-single {
|
||||
overflow:hidden;
|
||||
margin-top:20px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.nav-previous {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
.nav-next {
|
||||
float: right;
|
||||
text-align: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/*--slider--*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#slider_container {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.flex-caption{
|
||||
background: #232323;
|
||||
color: #fff;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.flexslider p{
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/*--sub head and breadcrumbs--*/
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#subhead_container{
|
||||
padding: 7px 0px;
|
||||
}
|
||||
|
||||
#subhead h1{
|
||||
color: #000;
|
||||
padding-top: 10px;
|
||||
padding-left: 0px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
#breadcrumbs {
|
||||
padding-left: 25px;
|
||||
margin-bottom: 15px;
|
||||
color: #9e9e9e;
|
||||
margin:0 auto;
|
||||
width: 964px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#breadcrumbs a{
|
||||
text-decoration: none;
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
||||
/*Alignments */
|
||||
/*////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
.alignleft,
|
||||
img.alignleft {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: 22px;
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.alignright,
|
||||
img.alignright {
|
||||
display: inline;
|
||||
float: right;
|
||||
margin-left: 22px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.aligncenter,
|
||||
img.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.alignleft,
|
||||
.alignright,
|
||||
.aligncenter,
|
||||
img.alignleft,
|
||||
img.alignright,
|
||||
img.aligncenter
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
a img.aligncenter {
|
||||
display:block;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 134 B |
Binary file not shown.
|
After Width: | Height: | Size: 146 B |
@@ -0,0 +1,15 @@
|
||||
[theme]
|
||||
inherit = agogo
|
||||
stylesheet = named_data_style.css
|
||||
# pygments_style = sphinx
|
||||
|
||||
theme_bodyfont = "normal 12px Verdana, sans-serif"
|
||||
theme_bgcolor = "#ccc"
|
||||
|
||||
theme_documentwidth = "100%"
|
||||
theme_textalign = "left"
|
||||
|
||||
[options]
|
||||
|
||||
stickysidebar = true
|
||||
collapsiblesidebar = true
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,4 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
.. include:: release-notes/release-notes-0.7.0.rst
|
||||
@@ -0,0 +1,31 @@
|
||||
NLSR version 0.1.0 (initial release)
|
||||
++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: August 25, 2014
|
||||
|
||||
The main design goal of NLSR is to provide a routing protocol to populate `NFD's
|
||||
<https://github.com/named-data/NFD>`__ RIB. NLSR calculates the routing table using
|
||||
link-state or hyperbolic routing and produces multiple faces for each reachable name
|
||||
prefix in a single authoritative domain.
|
||||
|
||||
Included features
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Advertise availability of content through the configured router
|
||||
|
||||
- Use `ChronoSync <https://github.com/named-data/ChronoSync>`__ to synchronize routers' LSA sequence numbers and Interest/Data to retrieve LSAs
|
||||
|
||||
- Produce a list of ranked forwarding options for each name prefix to facilitate NDN's adaptive forwarding strategies
|
||||
|
||||
- Configure maximum number of faces per prefix in NFD's RIB
|
||||
|
||||
- Set up NFD tunnels to neighbors automatically and maintain the tunnels to neighbors
|
||||
|
||||
- Provide two routing protocols:
|
||||
|
||||
+ Link State routing: calculate route cost based on link costs
|
||||
+ Hyperbolic routing: calculate route cost based on hyperbolic coordinates
|
||||
|
||||
- Use a hierarchical trust model for routing within a single administrative domain
|
||||
|
||||
- Keep NFD's RIB updated on failure and recovery
|
||||
@@ -0,0 +1,94 @@
|
||||
NLSR version 0.2.0 (changes since version 0.1.0)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: April 30, 2015
|
||||
|
||||
**Build**:
|
||||
|
||||
- The code now requires C++11. The minimum supported gcc version is 4.6, as earlier versions do not have proper support for C++11 features. (:issue:`1930`)
|
||||
|
||||
- Require OpenSSL (:issue:`2375`)
|
||||
|
||||
**New features**:
|
||||
|
||||
- Add nlsrc command-line tool (:issue:`1834`)
|
||||
|
||||
- Advertise/Withdraw name prefixes at runtime (:issue:`1834`)
|
||||
|
||||
- Assign zero cost to hyperbolic direct neighbors (:issue:`1975`)
|
||||
|
||||
- Only hyperbolic costs are adjusted before registering (:issue:`1974`)
|
||||
|
||||
- Add ability to specify different logging levels (:issue:`1935`)
|
||||
|
||||
- Add LSDB dataset publishers (:issue:`2280`)
|
||||
|
||||
- Add LSDB dataset tlv abstractions (:issue:`2280`)
|
||||
|
||||
- Allow zero cost neighbors for hyperbolic routing table calculation (:issue:`1982`)
|
||||
|
||||
- Faces are now created with canonical Face URI (:issue:`1911`)
|
||||
|
||||
- Add configurable router event intervals (:issue:`2071`)
|
||||
|
||||
- Add router-dead-interval configuration setting (:issue:`1878`)
|
||||
|
||||
- Add log formatting specified by log4cxx configuration file (:issue:`1950`)
|
||||
|
||||
- Face URIs in configuration file are checked for validity on load (:issue:`2070`)
|
||||
|
||||
- Configuration variables with default values are now optional (:issue:`1949`)
|
||||
|
||||
- Recalculate routing table after face destroy event (:issue:`2635`)
|
||||
|
||||
- Add Travis-CI build script
|
||||
|
||||
**Code changes**:
|
||||
|
||||
- Change adjacency status from uint32_t to enum (:issue:`1946`)
|
||||
|
||||
- Remove scheduler from NLSR class (:issue:`1981`)
|
||||
|
||||
- Change hyperbolic cost adjustment factor from 100 to 1000 (:issue:`1974`)
|
||||
|
||||
- Remove use of outdated namespace ``ndn::Tlv`` (:issue:`2079`)
|
||||
|
||||
- Remove use of deprecated ``ndn::nfd::Controller(Face&)`` constructor (:issue:`2133`)
|
||||
|
||||
- Routing update publishing is abstracted to SyncLogicHandler (:issue:`2289`)
|
||||
|
||||
- Make ConfParameter variable types consistent with min and max values (:issue:`2084`)
|
||||
|
||||
- Replace LSA string literals with constants (:issue:`2310`)
|
||||
|
||||
- Subscribe to FaceMonitor notifications using connect (:issue:`2350`)
|
||||
|
||||
- Log exceptions thrown in event loop
|
||||
|
||||
- Change ``ndn::ptr_lib::shared_ptr`` to ``std::shared_ptr`` (:issue:`2110`)
|
||||
|
||||
- Avoid deprecated ``ndn::Name::set`` method (:issue:`2505`)
|
||||
|
||||
- Update waf to version 1.8.8-dev
|
||||
|
||||
- Add sorting tiebreaker to NexthopList (:issue:`2715`)
|
||||
|
||||
- Update Jenkins-CI build scripts
|
||||
|
||||
**Bug fixes**:
|
||||
|
||||
- Fix python3 build error (:issue:`1956`)
|
||||
|
||||
- Fix typos in nlsr.conf security section (:issue:`1985`)
|
||||
|
||||
- Stop SyncLogicHandler from fetching a router’s own LSAs (:issue:`2005`)
|
||||
|
||||
- Fix Name LSA comparison which could cause incorrect advertised names to be removed (:issue:`2029`)
|
||||
|
||||
- Fix issue where more faces than max-faces-per-prefix could be applied to a prefix (:issue:`2018`)
|
||||
|
||||
- Stop LSDB from retrieving and out of date LSA when a new one is detected (:issue:`1987`)
|
||||
|
||||
- Correct mistakes in documentation
|
||||
|
||||
- Correct bitmask used to copy Name LSA sequence number (:issue:`2323`)
|
||||
@@ -0,0 +1,20 @@
|
||||
NLSR version 0.2.1 (changes since version 0.2.0)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: June 30, 2015
|
||||
|
||||
**Code changes**:
|
||||
|
||||
- Using a configuration file without ``prefix-update-validator`` disables runtime advertise/withdraw instead of exiting (:issue:`2814`)
|
||||
|
||||
**Bug fixes**:
|
||||
|
||||
- Prevent incomplete removal of NPT entry (:issue:`2785`)
|
||||
|
||||
- Correct bidirectional links with differing costs (:issue:`2801`)
|
||||
|
||||
- Fix non-incrementing Adjacency number in AdjLsa::writeLog (:issue:`2594`)
|
||||
|
||||
- Remove FaceDestroyEvent test's reliance on nlsrSeqNo.txt (:issue:`2881`)
|
||||
|
||||
- Test ACTIVE/INACTIVE Adjacencies in LSA construction (:issue:`2735`)
|
||||
@@ -0,0 +1,8 @@
|
||||
NLSR version 0.2.2 (changes since version 0.2.1)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: January 5, 2016
|
||||
|
||||
**Code changes**:
|
||||
|
||||
- Adapt code to changes in NFD/ndn-cxx version 0.4.0 release
|
||||
@@ -0,0 +1,26 @@
|
||||
NLSR version 0.3.0 (changes since version 0.2.2)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: August 1, 2016
|
||||
|
||||
**Code changes**:
|
||||
|
||||
- Updated validation checker for LSA rule in the configuration file (:issue:`2965`)
|
||||
|
||||
- Do not advertise Adjacency LSAs when hyperbolic routing is enabled (:issue:`2402`)
|
||||
|
||||
- Do not distribute coordinate LSAs when using link-state routing. (:issue:`3661`)
|
||||
|
||||
- LSAs should be segmented before they are published (:issue:`2965`)
|
||||
|
||||
- Don't use DummyClientFace::sentDatas (:issue:`3383`)
|
||||
|
||||
- Remove disabled security files (:issue:`2960`)
|
||||
|
||||
- Lsa type should be argument for base class LSA constructor (:issue:`2788`)
|
||||
|
||||
- Use ndn-cxx/DummyClientFace (:issue:`2637`)
|
||||
|
||||
**Bug fixes**:
|
||||
|
||||
- Unit tests cases are installed with `./waf install` (:issue:`3359`)
|
||||
@@ -0,0 +1,34 @@
|
||||
NLSR version 0.3.1 (changes since version 0.3.0)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: January 22, 2017
|
||||
|
||||
**Changes**
|
||||
|
||||
- **breaking change** Sync uses /localhop component in prefix to reduce duplicate NACKs (:issue:`3627`)
|
||||
|
||||
- **breaking change** LSA uses /localhop component in prefix to reduce duplicate NACKs (:issue:`3899`)
|
||||
|
||||
**Code Changes**:
|
||||
|
||||
- Fib and FaceMap use std::map instead of std::list (:issue:`2781`)
|
||||
|
||||
- NamePrefixTableEntries store RoutingTableEntries using a pointer (:issue:`2863`)
|
||||
|
||||
- Namespace closing comments are now consistent with ndn-cxx guidelines (:issue:`3735`)
|
||||
|
||||
- Update copyright date across all files (:issue:`3736`, `3909`, `3923`)
|
||||
|
||||
- Improve formatting of FaceMap and FaceMapEntry (:issue:`3737`)
|
||||
|
||||
- Sort NextHops on NexthopList insertion (:issue:`2721`)
|
||||
|
||||
**Bug fixes**:
|
||||
|
||||
- HR now recalculates paths after status change of a neighbor (:issue:`3874`)
|
||||
|
||||
- NLSR no longer sets strategies multiple times (:issue:`3743`)
|
||||
|
||||
- NLSR should enable use of ndn-cxx dispatcher (:issue:`3930`)
|
||||
|
||||
- Fix typos in the sample configuration file (:issue:`3113`)
|
||||
@@ -0,0 +1,20 @@
|
||||
NLSR version 0.3.2 (changes since version 0.3.1)
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Release date: March 15, 2017
|
||||
|
||||
**Changes**
|
||||
|
||||
- NLSR constructor now accept a KeyChain argument. (:issue:`3742`)
|
||||
|
||||
- Fix security rule for /localhop LSA prefix (:issue:`3899`)
|
||||
|
||||
- Use ndn::nfd::ROUTE_ORIGIN_NLSR instead of a magic number. (:issue:`3903`)
|
||||
|
||||
- Handle "Face Already Exists" error (error code 409) in NFD. (:issue:`3976`)
|
||||
|
||||
- Enable NLSR to register localhost prefix with dispatcher before top-level prefix. (:issue:`3938`)
|
||||
|
||||
- Don't use ndn aliases provided by ndn-cxx/common.hpp. (:issue:`3983`)
|
||||
|
||||
- Remove use of deprecated code. (:issue:`3988`)
|
||||
@@ -0,0 +1,79 @@
|
||||
NLSR version 0.4.0
|
||||
++++++++++++++++++
|
||||
|
||||
**New features**:
|
||||
|
||||
- **breaking change** Discover Faces from NFD (:issue:`2954`)
|
||||
|
||||
- **breaking change** Accommodate n-Dimensional HR coordinates (:issue:`3751`)
|
||||
|
||||
**Changes**:
|
||||
|
||||
- **breaking change** Make chronosync a dependency (:issue:`2400`)
|
||||
|
||||
- **breaking change** Use separate name prefix and sequence number
|
||||
for each LSA type (:issue:`3964`)
|
||||
|
||||
- **breaking change** Convert to ``v2::security`` and adapt to ndn-cxx changes (:issue:`3964`)
|
||||
|
||||
- Use unix timestamp as default (:issue:`4187`)
|
||||
|
||||
**Bug Fixes**:
|
||||
|
||||
- Add support for sources to NamePrefixList (:issue:`4177`)
|
||||
|
||||
- Fix incorrect error on face-dataset-fetch-interval valid values (:issue:`4211`)
|
||||
|
||||
- Fix prefix advertise runtime error (:issue:`4215`)
|
||||
|
||||
- Fix heap buffer overflow error (:issue:`4217`)
|
||||
|
||||
**Code Changes**:
|
||||
|
||||
- LSA getData() now uses ostream instead of manually building the string (:issue:`2346`)
|
||||
|
||||
- Refresh FIB entries independently of routing table calculation (:issue:`2778`)
|
||||
|
||||
- Change configuration parameter output level to info (:issue:`2850`)
|
||||
|
||||
- Updates to name prefixes are more efficient (:issue:`2864`)
|
||||
|
||||
- Implement statistics collector/recorder (:issue:`2956`)
|
||||
|
||||
- Implement ``NameLsa::isEqualContent`` (:issue:`2962`)
|
||||
|
||||
- Refactor ``Fib::removeOldNextHopsFromFibEntryAndNfd()`` for simplicity, readability. (:issue:`3820`)
|
||||
|
||||
- Improve logging throughout lsdb.cpp and others (:issue:`3934`)
|
||||
|
||||
- Enable dispatcher for LOCALHOST_PREFIX (:issue:`3938`)
|
||||
|
||||
- Don't use ndn aliases provided by ndn-cxx/common.hpp (:issue:`3983`)
|
||||
|
||||
- Canonize Adjacent FaceURIs on startup (:issue:`4063`)
|
||||
|
||||
- Refactor AdjacencyList to use iterators instead of bare ptrs (:issue:`4068`)
|
||||
|
||||
- Merge redundant functions (:issue:`4105`)
|
||||
|
||||
- Remove writeLog in NamePrefixList (:issue:`4131`)
|
||||
|
||||
- Check for self in ChronoSync updates (:issue:`4134`)
|
||||
|
||||
- Install nlsr.conf as sample in the system (:issue:`4197`)
|
||||
|
||||
- Enable AddressSanitizer and LeakSanitizer for unit tests (:issue:`4206`)
|
||||
|
||||
- Resolve all ASan errors in unit tests (:issue:`4230`)
|
||||
|
||||
- Simplified LSDB dataset interest handler. (:issue:`4235`)
|
||||
|
||||
- Made map more container-agnostic (:issue:`4239`)
|
||||
|
||||
- Improved routing map data structure. (:issue:`4240`)
|
||||
|
||||
- Increased independence of SyncLogicHandler (:issue:`4264`)
|
||||
|
||||
- Use unique_ptr for signal container (:issue:`4268`)
|
||||
|
||||
- Use network name in sync prefix to avoid sync leaks from other networks (:issue:`4101`)
|
||||
@@ -0,0 +1,24 @@
|
||||
NLSR version 0.4.1
|
||||
++++++++++++++++++
|
||||
|
||||
**New features**:
|
||||
|
||||
- The routing table dataset publisher (:issue:`3630`)
|
||||
|
||||
- Use ndn-cxx logging facility, remove log4cxx dependency (:issue:`3949`)
|
||||
|
||||
- Automatic serving of other routers' certificates (:issue:`4448`)
|
||||
|
||||
**Bug Fixes**:
|
||||
|
||||
- Hard-code a fixed session name for ChronoSync sockets (:issue:`4513`)
|
||||
|
||||
- Fix encoding bug in the routing table publisher (:issue:`4453`)
|
||||
|
||||
- Fix NLSR not converging without content store (:issue:`4430`)
|
||||
|
||||
**Miscellaneous Changes**:
|
||||
|
||||
- Make ChronoSync's sync interest lifetime configurable (:issue:`4490`)
|
||||
|
||||
- Print labels on adjacency matrix when logging (:issue:`2045`)
|
||||
@@ -0,0 +1,6 @@
|
||||
NLSR version 0.4.2
|
||||
++++++++++++++++++
|
||||
|
||||
**Bug Fixes**:
|
||||
|
||||
- Fix segfault in scheduled erase of lsa segment (:issue:`4520`)
|
||||
@@ -0,0 +1,14 @@
|
||||
NLSR version 0.4.3
|
||||
++++++++++++++++++
|
||||
|
||||
**Changes**:
|
||||
|
||||
- **breaking change** Change NLSR to nlsr for various prefixes (:issue:`4543`)
|
||||
|
||||
**Bug Fixes**:
|
||||
|
||||
- Fix dry-run mode not working (:issue:`4394`)
|
||||
- Fix convergence w/o content store (:issue:`4430`)
|
||||
- Register router prefix to fix remote requests (:issue:`4543`)
|
||||
- Fix build with clang-5.0 (:issue:`4547`)
|
||||
- Avoid misaligned memory access (:issue:`4609`)
|
||||
@@ -0,0 +1,35 @@
|
||||
NLSR version 0.5.0
|
||||
++++++++++++++++++
|
||||
|
||||
**New Features**
|
||||
|
||||
- Set CanBePrefix to false on Hello Interest (:issue:`4581`)
|
||||
- Optionally write prefixes to a copy of config file via nlsrc advertise (:issue:`4303`)
|
||||
- Use SegmentPublisher utility from PSync to publish LSA data (:issue:`4760`)
|
||||
- Add PSync as a dependency and switch it as default in conf file. (:issue:`4082`)
|
||||
|
||||
**Changes**
|
||||
|
||||
- Decouple classes from Nlsr object for easier unit testing (:issue:`1952`)
|
||||
- Set sequence number file in SequencingManager constructor. (:issue:`4288`)
|
||||
- Read conf file in test prefix update processor instead of static string (:issue:`3960`)
|
||||
- Canonize FaceUri in conf file processor (:issue:`4817`)
|
||||
- Remove redundant function "calculateHypDryRoutingTable" (:issue:`4811`)
|
||||
- In dry run mode, print HR and LS routing table in nlsrc separately (:issue:`4452`)
|
||||
- Fix ASan memory leaks in unit tests (:issue:`4682`)
|
||||
- Systemd service files dependency corrections for Ubuntu 18.04 (:issue:`4594`)
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- Fix processing of interest w/ segments for segmented LSA data (:issue:`4784`)
|
||||
- Fib: don't refresh neighbor router's FIB entry (:issue:`4799`)
|
||||
- Disable Interest filter loopback where ever not needed (:issue:`4768`)
|
||||
- Avoid crash when ndn-cxx is compiled with tests by setting canBePrefix (:issue:`4691`)
|
||||
- Make sure NLSR is not using any deprecated API (:issue:`4679`)
|
||||
- Fix crash in equals operator of adjacency-list (:issue:`4705`)
|
||||
- Fix error handling and normalize exit codes
|
||||
|
||||
**Miscellaneous**
|
||||
|
||||
- Improving documentation for NLSR
|
||||
- A beginners' guide to installing and testing on Fedora
|
||||
@@ -0,0 +1,15 @@
|
||||
NLSR version 0.5.1
|
||||
++++++++++++++++++
|
||||
|
||||
**Changes**
|
||||
|
||||
- Set best-route strategy for certificate prefixes (:issue:`4881`)
|
||||
- Use ndn-cxx InMemoryStorage for LsaSegmentStorage (:issue:`4788`)
|
||||
- Switch from ndn::EventId to ndn::scheduler::EventId (:issue:`4883`)
|
||||
- Add FreshnessPeriod where MustBeFresh is used (:issue:`4913`)
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- Fix canonization by resetting io service after each neighbor (:issue:`4872`)
|
||||
- Disable network interest in while fetching NLSR certificate (:issue:`4879`)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
NLSR version 0.5.2
|
||||
++++++++++++++++++
|
||||
|
||||
**Breaking Changes**
|
||||
|
||||
The following breaking changes make this release incompatible with the previous version.
|
||||
|
||||
- Use PSync version 0.2.0, sync data compression in full sync is enabled by default (:issue:`5061`, :issue:`4917`)
|
||||
- Use the floating point encoding/decoding functions for hyperbolic coordinates (:issue:`4615`)
|
||||
|
||||
**New Features**
|
||||
|
||||
- Handle zero cost links in Link State Routing (:issue:`4978`)
|
||||
|
||||
**Improvements and Bug Fixes**
|
||||
|
||||
- Remove support for old combined seq no file (:issue:`4143`)
|
||||
- Sync common test infrastructure with ndn-cxx
|
||||
- Refactor Certificate Storage class (:issue:`5075`)
|
||||
- Avoid crashing NLSR if identity cannot be created
|
||||
- Change init order to register sync routes after hello data has been verified (:issue:`5009`)
|
||||
- Fix empty file creation if conf file is same as dynamic (:issue:`5071`)
|
||||
- On face event notification, only proceed if face id was zero or updated (:issue:`4394`)
|
||||
@@ -0,0 +1,12 @@
|
||||
NLSR version 0.6.0
|
||||
------------------
|
||||
|
||||
Improvements and bug fixes
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- *(breaking change)* Major changes in the TLV structure and classes. Reduced codebase size and
|
||||
improved compilation times. LSA de/serialize functions are replaced by wireEncode/Decode.
|
||||
Updated LSA wire formats and TLV assignments. Updated nlsrc to print using the new encoding.
|
||||
(:issue:`4787`, :issue:`5116`)
|
||||
- LSDB refactor: switch to ``boost::multi_index`` to replace 3 LSA lists (:issue:`4127`)
|
||||
- Fix wrong reaction on hello Interest timeout (:issue:`5139`)
|
||||
@@ -0,0 +1,44 @@
|
||||
NLSR version 0.7.0
|
||||
------------------
|
||||
|
||||
Release date: August 18, 2023
|
||||
|
||||
New features
|
||||
^^^^^^^^^^^^
|
||||
|
||||
- Add experimental support for State Vector Sync (SVS) (:issue:`5248`)
|
||||
- ``nlsrc``: Add an option to query the status from remote routers (:issue:`4544`)
|
||||
|
||||
Notable changes and improvements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- **Deprecate ChronoSync support**: ChronoSync support is now optional and excluded from the
|
||||
default build; it remains available mainly for testing purposes (:issue:`5147`)
|
||||
- Switched to the C++17 standard
|
||||
- The minimum build requirements have been increased as follows:
|
||||
|
||||
- Either GCC >= 7.4.0 or Clang >= 6.0 is required on Linux
|
||||
- On macOS, Xcode 11.3 or later is recommended; older versions may still work but are not
|
||||
officially supported
|
||||
- Boost >= 1.65.1 and ndn-cxx >= 0.8.1 are required on all platforms
|
||||
- Sphinx 4.0 or later is required to build the documentation
|
||||
|
||||
- Refactor LSDB for readability and add signals to notify of modifications (:issue:`4127`)
|
||||
- Retrieve LSA from the face that triggered the notification of LSA changes
|
||||
- Accommodate certificate name in ``KeyLocator`` (:issue:`5195`)
|
||||
- Change ``sig-type`` to ``ecdsa-sha256`` in ``nlsr.conf`` as ndn-cxx now has strict checking for it
|
||||
- Improve error handling and reporting
|
||||
- Stop using the ``gold`` linker on Linux; prefer instead linking with ``lld`` if installed
|
||||
- Update waf build system to version 2.0.24
|
||||
- Various test suite and documentation improvements
|
||||
|
||||
Bug fixes
|
||||
^^^^^^^^^
|
||||
|
||||
- lsdb: Fix for issues involving incorrect retransmission behavior in segment fetcher
|
||||
- Prevent NLSR from unregistering route during update for router that advertised it initially
|
||||
(:issue:`5179`)
|
||||
- NameLsa: fix LSDB update bug by sorting the NPLs before difference
|
||||
- Fix recurring sync prefix registration on every hello data (:issue:`5157`)
|
||||
- Return the appropriate exit codes when executing ``nlsrc`` advertise/withdraw commands
|
||||
(:issue:`5271`)
|
||||
@@ -0,0 +1,106 @@
|
||||
All NLSR Releases
|
||||
=================
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:hidden:
|
||||
:maxdepth: 1
|
||||
:reversed:
|
||||
|
||||
release-notes/*
|
||||
|
||||
* **NLSR version 0.7.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.7.0>`, `Documentation <https://docs.named-data.net/NLSR/0.7.0/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.7.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.7.0.tar.xz>`__ (`checksum <https://named-data.net/downloads/nlsr-0.7.0.tar.xz.sha256>`__)
|
||||
|
||||
* **NLSR version 0.6.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.6.0>`, `Documentation <https://docs.named-data.net/NLSR/0.6.0/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.6.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.6.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.6.0.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.5.2**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.5.2>`, `Documentation <https://docs.named-data.net/NLSR/0.5.2/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.5.2>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.5.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.5.2.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.5.1**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.5.1>`, `Documentation <https://docs.named-data.net/NLSR/0.5.1/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.5.1>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.5.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.5.1.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.5.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.5.0>`, `Documentation <https://docs.named-data.net/NLSR/0.5.0/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.5.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.5.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.5.0.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.4.3**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.4.3>`, `Documentation <https://docs.named-data.net/NLSR/0.4.3/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.3>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.3.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.3.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.4.2**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.4.2>`, `Documentation <https://docs.named-data.net/NLSR/0.4.2/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.2>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.2.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.4.1**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.4.1>`, `Documentation <https://docs.named-data.net/NLSR/0.4.1/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.1>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.1.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.4.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.4.0>`, `Documentation <https://docs.named-data.net/NLSR/0.4.0/>`__)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.0.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.3.2**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.3.2>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.3.2>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.3.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.3.2.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.3.1**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.3.1>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.3.1>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.3.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.3.1.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.3.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.3.0>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.3.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.3.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.3.0.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.2.2**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.2.2>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.2.2>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.2.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.2.2.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.2.1**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.2.1>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.2.1>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.2.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.2.1.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.2.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.2.0>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.2.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.2.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.2.0.tar.bz2.sha256>`__)
|
||||
|
||||
* **NLSR version 0.1.0**
|
||||
(:doc:`Release Notes <release-notes/release-notes-0.1.0>`)
|
||||
|
||||
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.1.0>`__,
|
||||
`src (tarball) <https://named-data.net/downloads/nlsr-0.1.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.1.0.tar.bz2.sha256>`__)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -1,75 +0,0 @@
|
||||
#Use this script to setup your keys.
|
||||
#!/bin/bash
|
||||
|
||||
EXPECTED_ARGS=3 #site, operator, router
|
||||
E_BADARGS=65
|
||||
if [ $# -ne $EXPECTED_ARGS ]
|
||||
then
|
||||
echo "Usage: `basename $0` <site name> <operator name> <router name>"
|
||||
echo "Example: `basename $0` memphis.edu user1 memphis.edu/cs/rtr1 (full router name without /ndn/ prefix"
|
||||
exit $E_BADARGS
|
||||
fi
|
||||
|
||||
|
||||
RESULT=`ps -a | sed -n /ccnr/p`
|
||||
|
||||
if [ "${RESULT:-null}" = null ]; then
|
||||
echo "ccnr not running, quitting"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
KSUITE=${HOME}/ndn-testbed-key-suite
|
||||
echo $KSUITE
|
||||
if [ ! -d ${KSUITE} ]; then
|
||||
echo "This script requires key signing suite available at:"
|
||||
echo "git://github.com/named-data/ndn-testbed-key-suite.git"
|
||||
echo "If you already have it, set the variable KSUITE of the script accordingly"
|
||||
exit
|
||||
fi
|
||||
|
||||
SITE=$1
|
||||
OP=$2
|
||||
RTR=$3
|
||||
|
||||
if [ ! -d ${SITE}_key ]; then
|
||||
mkdir ${SITE}_key
|
||||
ccninitkeystore ${SITE}_key
|
||||
fi
|
||||
|
||||
if [ ! -d ${OP}_key ]; then
|
||||
mkdir ${OP}_key
|
||||
ccninitkeystore ${OP}_key
|
||||
fi
|
||||
|
||||
if [ ! -d "router_key" ]; then
|
||||
mkdir router_key
|
||||
ccninitkeystore router_key
|
||||
fi
|
||||
|
||||
if [ ! -d "nlsr_key" ]; then
|
||||
mkdir nlsr_key
|
||||
ccninitkeystore nlsr_key
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
$KSUITE/bin/ndn-extract-public-key.sh -i ${SITE}_key/.ccnx/.ccnx_keystore -o ${SITE}_key/$SITE.pem
|
||||
$KSUITE/bin/ndn-extract-public-key.sh -i ${OP}_key/.ccnx/.ccnx_keystore -o ${OP}_key/$OP.pem
|
||||
$KSUITE/bin/ndn-extract-public-key.sh -i router_key/.ccnx/.ccnx_keystore -o router_key/router.pem
|
||||
$KSUITE/bin/ndn-extract-public-key.sh -i nlsr_key/.ccnx/.ccnx_keystore -o nlsr_key/nlsr.pem
|
||||
|
||||
.$KSUITE/sign.sh -s
|
||||
|
||||
#signing operator key
|
||||
echo "$KSUITE/bin/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365"
|
||||
$KSUITE/bin/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365
|
||||
|
||||
#signing routing key
|
||||
echo "$KSUITE/bin/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR -x 365"
|
||||
$KSUITE/bin/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR -x 365
|
||||
|
||||
#signing nlsr key
|
||||
echo "$KSUITE/bin/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR/nlsr -x 365"
|
||||
$KSUITE/bin/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR/nlsr -x 365
|
||||
@@ -1,28 +0,0 @@
|
||||
#----configuration file for macbook----------
|
||||
#
|
||||
router-name /ndn/memphis.edu/cs/pollux
|
||||
ccnneighbor /ndn/memphis.edu/cs/gemeni
|
||||
ccnneighbor /ndn/memphis.edu/cs/altair
|
||||
#ccnneighbor /ndn/memphis.edu/cs/pollux 141.225.11.132
|
||||
ccnname /ndn/memphis.edu/macbook/patterson
|
||||
ccnname /ndn/memphis.edu/macbook/houston/
|
||||
#------lsdb-synch-interval-----
|
||||
#lsdb-synch-interval 350
|
||||
interest-retry 2
|
||||
interest-resend-time 5
|
||||
lsa-refresh-time 600
|
||||
router-dead-interval 900
|
||||
max-faces-per-prefix 1
|
||||
debug on
|
||||
#hyperbolic-routing on
|
||||
hyperbolic-cordinate 1234.0 0.875
|
||||
tunnel-type udp
|
||||
|
||||
keystore-path /Users/akmhoque/CCN_KEY/nlsr_key_store/.ccnx/.ccnx_keystore
|
||||
root-key-prefix /ndn/keys
|
||||
site-name memphis.edu
|
||||
|
||||
topo-prefix /ndn/routing/nlsr/
|
||||
slice-prefix /ndn/routing/nlsr/LSA
|
||||
|
||||
logdir /Users/akmhoque/NLSR2.0
|
||||
@@ -1,10 +1,332 @@
|
||||
router-name /ndn/memphis.edu/netlab/macbook
|
||||
ccnneighbor /ndn/memphis.edu/netlab/pollux face2 10
|
||||
ccnneighbor /ndn/memphis.edu/netlab/castor face3 8
|
||||
ccnname /ndn/memphis.edu/netlab/macbook/name1
|
||||
ccnname /ndn/memphis.edu/netlab/macbook/test
|
||||
lsdb-synch-interval 310
|
||||
interest-retry 4
|
||||
interest-resend-time 5
|
||||
; the general section contains all the general settings for router
|
||||
|
||||
general
|
||||
{
|
||||
; mandatory configuration command section network, site and router
|
||||
|
||||
network /ndn ; name of the network the router belongs to in ndn URI format
|
||||
site /edu/memphis ; name of the site the router belongs to in ndn URI format
|
||||
router /%C1.Router/cs/pollux ; name of the router in ndn URI format
|
||||
|
||||
; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs
|
||||
lsa-refresh-time 1800 ; default value 1800. Valid values 240-7200
|
||||
|
||||
; router-dead-interval is the time in seconds after which an inactive routers
|
||||
; LSAs are removed
|
||||
;router-dead-interval 3600 ; default value: 2*lsa-refresh-time. Value must be larger
|
||||
; than lsa-refresh-time
|
||||
|
||||
; InterestLifetime (in seconds) for LSA fetching
|
||||
lsa-interest-lifetime 4 ; default value 4. Valid values 1-60
|
||||
|
||||
; select sync protocol: chronosync / psync / svs
|
||||
sync-protocol psync
|
||||
|
||||
; sync interest lifetime of ChronoSync/PSync in milliseconds
|
||||
sync-interest-lifetime 60000 ; default value 60000. Valid values 1000-120,000
|
||||
|
||||
state-dir /var/lib/nlsr ; path for intermediate state files including sequence directory (Absolute path)
|
||||
}
|
||||
|
||||
; the neighbors section contains the configuration for router's neighbors and hello protocol behavior
|
||||
|
||||
neighbors
|
||||
{
|
||||
; in case hello interest timed out, router will try 'hello-retries' times at 'hello-timeout'
|
||||
; seconds interval before giving up for any neighbors (deciding link is down)
|
||||
|
||||
hello-retries 3 ; interest retries number in integer. Default value 3
|
||||
; valid values 1-10
|
||||
|
||||
hello-timeout 1 ; interest time out value in seconds. Default value 1
|
||||
; Valid values 1-15
|
||||
|
||||
hello-interval 60 ; interest sending interval in seconds. Default value 60
|
||||
; valid values 30-90
|
||||
|
||||
; adj-lsa-build-interval is the time to wait in seconds after an Adjacency LSA build is scheduled
|
||||
; before actually building the Adjacency LSA
|
||||
|
||||
adj-lsa-build-interval 10 ; default value 10. Valid values 5-30.
|
||||
|
||||
face-dataset-fetch-tries 3 ; default is 3. Valid values 1-10. The FaceDataset is
|
||||
; gotten from NFD, and is needed to configure NLSR
|
||||
; correctly. It is recommended not to set this
|
||||
; variable too high, because it could cause
|
||||
; congestion for NFD.
|
||||
|
||||
face-dataset-fetch-interval 3600 ; default is 3600. Valid values 1800-5400.
|
||||
; This controls how often (in seconds) NLSR will attempt to
|
||||
; fetch a FaceStatus dataset from NFD.
|
||||
|
||||
; neighbor command is used to configure router's neighbor. Each neighbor will need
|
||||
; one block of neighbor command
|
||||
|
||||
neighbor
|
||||
{
|
||||
name /ndn/edu/memphis/%C1.Router/cs/castor ; name prefix of the neighbor router consists
|
||||
; of network, site-name and router-name
|
||||
|
||||
face-uri udp://castor.cs.memphis.edu ; face uri of the face connected to the neighbor
|
||||
link-cost 25 ; cost of the connecting link to neighbor
|
||||
}
|
||||
|
||||
neighbor
|
||||
{
|
||||
name /ndn/edu/memphis/%C1.Router/cs/mira ; name prefix of the neighbor router consists
|
||||
; of network, site-name and router-name
|
||||
|
||||
face-uri udp://mira.cs.memphis.edu ; face uri of the face connected to the neighbor
|
||||
link-cost 30 ; cost of the connecting link to neighbor
|
||||
}
|
||||
}
|
||||
|
||||
; the hyperbolic section contains the configuration settings of enabling a router to calculate
|
||||
; routing table using [hyperbolic routing table calculation](http://arxiv.org/abs/0805.1266) method
|
||||
|
||||
hyperbolic
|
||||
{
|
||||
; commands in this section follows a strict order
|
||||
; the switch is used to set hyperbolic routing calculation in NLSR
|
||||
|
||||
state off ; default value 'off', set value 'on' to enable hyperbolic routing table
|
||||
; calculation which turns link state routing 'off'. set value to 'dry-run'
|
||||
; to test hyperbolic routing and compare with link state routing.
|
||||
|
||||
|
||||
radius 123.456 ; radius of the router in hyperbolic coordinate system
|
||||
angle 1.45,2.36 ; angle of the router in hyperbolic coordinate system
|
||||
}
|
||||
|
||||
|
||||
; the fib section is used to configure fib entrys type to ndn FIB updated by NLSR
|
||||
|
||||
fib
|
||||
{
|
||||
; the max-faces-per-prefix is used to limit the number of faces for each name prefixes
|
||||
; by NLSR in ndn FIB
|
||||
|
||||
max-faces-per-prefix 3 ; default value 0. Valid value 0-60. By default (value 0) NLSR adds
|
||||
; all available faces for each reachable name prefixes in NDN FIB
|
||||
|
||||
; routing-calc-interval is the time to wait in seconds after a routing table calculation is
|
||||
; scheduled before actually performing the routing table calculation
|
||||
|
||||
routing-calc-interval 15 ; default value 15. Valid values 0-15. It is recommended that
|
||||
; routing-calc-interval have a higher value than adj-lsa-build-interval
|
||||
}
|
||||
|
||||
; the advertising section contains the configuration settings of the name prefixes
|
||||
; hosted by this router
|
||||
|
||||
advertising
|
||||
{
|
||||
; the ndnname is used to advertised name from the router. To advertise each name prefix
|
||||
; configure one block of ndnname configuration command for every name prefix.
|
||||
|
||||
prefix /ndn/edu/memphis/cs/netlab ; name in ndn URI format
|
||||
prefix /ndn/edu/memphis/sports/basketball
|
||||
}
|
||||
|
||||
security
|
||||
{
|
||||
validator
|
||||
{
|
||||
rule
|
||||
{
|
||||
id "NLSR Hello Rule"
|
||||
for data
|
||||
filter
|
||||
{
|
||||
type name
|
||||
regex ^[^<nlsr><INFO>]*<nlsr><INFO><><>$
|
||||
}
|
||||
checker
|
||||
{
|
||||
type customized
|
||||
sig-type ecdsa-sha256
|
||||
key-locator
|
||||
{
|
||||
type name
|
||||
hyper-relation
|
||||
{
|
||||
k-regex ^([^<KEY><nlsr>]*)<nlsr><KEY><>{1,3}$
|
||||
k-expand \\1
|
||||
h-relation equal
|
||||
p-regex ^([^<nlsr><INFO>]*)<nlsr><INFO><><>$
|
||||
p-expand \\1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule
|
||||
{
|
||||
id "NLSR LSA Rule"
|
||||
for data
|
||||
filter
|
||||
{
|
||||
type name
|
||||
regex ^[^<nlsr><LSA>]*<nlsr><LSA>
|
||||
}
|
||||
checker
|
||||
{
|
||||
type customized
|
||||
sig-type ecdsa-sha256
|
||||
key-locator
|
||||
{
|
||||
type name
|
||||
hyper-relation
|
||||
{
|
||||
k-regex ^([^<KEY><nlsr>]*)<nlsr><KEY><>{1,3}$
|
||||
k-expand \\1
|
||||
h-relation equal
|
||||
; the last four components in the prefix should be <lsaType><seqNo><version><segmentNo>
|
||||
p-regex ^<localhop>([^<nlsr><LSA>]*)<nlsr><LSA>(<>*)<><><><>$
|
||||
p-expand \\1\\2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule
|
||||
{
|
||||
id "NLSR datasets"
|
||||
for data
|
||||
filter
|
||||
{
|
||||
type name
|
||||
regex ^[^<nlsr>]*<nlsr>[<lsdb><routing-table>]
|
||||
}
|
||||
checker
|
||||
{
|
||||
type customized
|
||||
sig-type ecdsa-sha256
|
||||
key-locator
|
||||
{
|
||||
type name
|
||||
hyper-relation
|
||||
{
|
||||
k-regex ^([^<KEY>]*)<KEY><>{1,3}$ ; router key or certificate
|
||||
k-expand \\1
|
||||
h-relation equal
|
||||
p-regex ^([^<nlsr>]*)<nlsr>[<lsdb><routing-table>]
|
||||
p-expand \\1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule
|
||||
{
|
||||
id "NLSR Hierarchy Exception Rule"
|
||||
for data
|
||||
filter
|
||||
{
|
||||
type name
|
||||
regex ^[^<KEY><%C1.Router>]*<%C1.Router>[^<KEY><nlsr>]*<KEY><><><>$
|
||||
}
|
||||
checker
|
||||
{
|
||||
type customized
|
||||
sig-type ecdsa-sha256
|
||||
key-locator
|
||||
{
|
||||
type name
|
||||
hyper-relation
|
||||
{
|
||||
k-regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><>{1,3}$
|
||||
k-expand \\1
|
||||
h-relation equal
|
||||
p-regex ^([^<KEY><%C1.Router>]*)<%C1.Router>[^<KEY>]*<KEY><><><>$
|
||||
p-expand \\1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule
|
||||
{
|
||||
id "NLSR Hierarchical Rule"
|
||||
for data
|
||||
filter
|
||||
{
|
||||
type name
|
||||
regex ^[^<KEY>]*<KEY><><><>$
|
||||
}
|
||||
checker
|
||||
{
|
||||
type hierarchical
|
||||
sig-type ecdsa-sha256
|
||||
}
|
||||
}
|
||||
|
||||
trust-anchor
|
||||
{
|
||||
type file
|
||||
file-name "root.cert"
|
||||
}
|
||||
}
|
||||
|
||||
prefix-update-validator
|
||||
{
|
||||
rule
|
||||
{
|
||||
id "NLSR ControlCommand Rule"
|
||||
for interest
|
||||
filter
|
||||
{
|
||||
type name
|
||||
; /<prefix>/<management-module>/<command-verb>/<control-parameters>
|
||||
; /<timestamp>/<random-value>/<signed-interests-components>
|
||||
regex ^<localhost><nlsr><prefix-update>[<advertise><withdraw>]<><><>$
|
||||
}
|
||||
checker
|
||||
{
|
||||
type customized
|
||||
sig-type ecdsa-sha256
|
||||
key-locator
|
||||
{
|
||||
type name
|
||||
regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><>{1,3}$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule
|
||||
{
|
||||
id "NLSR Hierarchy Rule"
|
||||
for data
|
||||
filter
|
||||
{
|
||||
type name
|
||||
regex ^[^<KEY>]*<KEY><><><>$
|
||||
}
|
||||
checker
|
||||
{
|
||||
type hierarchical
|
||||
sig-type ecdsa-sha256
|
||||
}
|
||||
}
|
||||
|
||||
trust-anchor
|
||||
{
|
||||
type file
|
||||
file-name "site.cert"
|
||||
}
|
||||
}
|
||||
|
||||
; cert-to-publish "root.cert" ; optional, a file containing the root certificate
|
||||
; Only the router that is designated to publish the root cert
|
||||
; needs to specify this
|
||||
|
||||
; cert-to-publish "site.cert" ; optional, a file containing the site certificate
|
||||
; Only the router that is designated to publish the site cert
|
||||
; needs to specify this
|
||||
|
||||
; cert-to-publish "operator.cert" ; optional, a file containing the operator certificate
|
||||
; Only the router that is designated to publish the operator
|
||||
; cert needs to specify this
|
||||
|
||||
cert-to-publish "router.cert" ; required, a file containing the router certificate.
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
#ifndef _NLSR_H_
|
||||
#define _NLSR_H_
|
||||
|
||||
|
||||
#define LSDB_SYNCH_INTERVAL 300
|
||||
#define INTEREST_RETRY 3
|
||||
#define INTEREST_RESEND_TIME 15
|
||||
#define NLSR_LOCKED 1
|
||||
#define NLSR_UNLOCKED 0
|
||||
#define LSA_REFRESH_TIME 1800
|
||||
#define ROUTER_DEAD_INTERVAL 3600
|
||||
#define MAX_FACES_PER_PREFIX 0
|
||||
|
||||
#define LINK_METRIC 10
|
||||
|
||||
#define NAME_LSA_VALID 1
|
||||
#define NAME_LSA_INVALID 0
|
||||
|
||||
#define API_PORT 9999
|
||||
|
||||
|
||||
struct name_prefix
|
||||
{
|
||||
char *name;
|
||||
int length;
|
||||
};
|
||||
|
||||
struct linkStateDatabase
|
||||
{
|
||||
struct hashtb *name_lsdb;
|
||||
struct hashtb *adj_lsdb;
|
||||
struct hashtb *cor_lsdb;
|
||||
|
||||
char *lsdb_version;
|
||||
};
|
||||
|
||||
struct pending_interest
|
||||
{
|
||||
char *int_name;
|
||||
int timed_out;
|
||||
};
|
||||
|
||||
struct nlsr
|
||||
{
|
||||
|
||||
struct ccn_closure in_interest;
|
||||
struct ccn_closure in_content;
|
||||
|
||||
struct ccns_name_closure *closure;
|
||||
struct ccns_slice *slice;
|
||||
struct ccns_handle *ccns;
|
||||
|
||||
struct ccn_schedule *sched;
|
||||
struct ccn_scheduled_event *event;
|
||||
struct ccn_scheduled_event *event_send_info_interest;
|
||||
struct ccn_scheduled_event *event_send_lsdb_interest;
|
||||
struct ccn_scheduled_event *event_build_adj_lsa;
|
||||
struct ccn_scheduled_event *event_calculate_route;
|
||||
|
||||
struct hashtb *adl;
|
||||
struct hashtb *npl;
|
||||
struct hashtb *map;
|
||||
struct hashtb *rev_map;
|
||||
struct hashtb *npt;
|
||||
struct hashtb *routing_table;
|
||||
struct hashtb *keys;
|
||||
|
||||
|
||||
struct linkStateDatabase *lsdb;
|
||||
|
||||
struct ccn *ccn;
|
||||
char *router_name;
|
||||
|
||||
|
||||
|
||||
int is_synch_init;
|
||||
long int nlsa_id;
|
||||
int adj_build_flag;
|
||||
long int adj_build_count;
|
||||
int is_build_adj_lsa_sheduled;
|
||||
int is_send_lsdb_interest_scheduled;
|
||||
int is_route_calculation_scheduled;
|
||||
|
||||
int interest_retry;
|
||||
long int interest_resend_time;
|
||||
long int lsa_refresh_time;
|
||||
long int router_dead_interval;
|
||||
|
||||
long int max_faces_per_prefix;
|
||||
char *logDir;
|
||||
int detailed_logging;
|
||||
int debugging;
|
||||
|
||||
int semaphor;
|
||||
|
||||
int nlsr_api_server_sock_fd;
|
||||
fd_set readfds;
|
||||
int api_port;
|
||||
|
||||
char *topo_prefix;
|
||||
char *slice_prefix;
|
||||
|
||||
char *root_key_prefix;
|
||||
char *keystore_path;
|
||||
char *keystore_passphrase;
|
||||
char *site_name;
|
||||
|
||||
int is_hyperbolic_calc;
|
||||
double cor_r;
|
||||
double cor_theta;
|
||||
|
||||
int isStrictHierchicalKeyCheck;
|
||||
|
||||
int tunnel_type;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct nlsr *nlsr;
|
||||
|
||||
void process_command_ccnneighbor(char *command);
|
||||
void process_command_ccnname(char *command);
|
||||
void process_command_lsdb_synch_interval(char *command);
|
||||
void process_command_interest_retry(char *command);
|
||||
void process_command_interest_resend_time(char *command);
|
||||
void process_conf_command(char *command);
|
||||
int readConfigFile(const char *filename);
|
||||
|
||||
void nlsr_lock(void);
|
||||
void nlsr_unlock(void);
|
||||
|
||||
int init_nlsr(void);
|
||||
void nlsr_destroy( void );
|
||||
void nlsr_stop_signal_handler(int sig);
|
||||
|
||||
#endif
|
||||
-769
@@ -1,769 +0,0 @@
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include<math.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/time.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/keystore.h>
|
||||
#include <ccn/signing.h>
|
||||
#include <ccn/schedule.h>
|
||||
#include <ccn/hashtb.h>
|
||||
|
||||
#include "nlsr.h"
|
||||
#include "nlsr_npl.h"
|
||||
#include "nlsr_adl.h"
|
||||
#include "utility.h"
|
||||
#include "nlsr_npt.h"
|
||||
|
||||
void
|
||||
add_nbr_to_adl(struct name_prefix *new_nbr,int face,char *ip)
|
||||
{
|
||||
struct ndn_neighbor *nbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
int res;
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, new_nbr->name, new_nbr->length, 0);
|
||||
|
||||
if(res == HT_NEW_ENTRY )
|
||||
{
|
||||
|
||||
nbr = e->data;
|
||||
|
||||
nbr->neighbor=(struct name_prefix *)malloc(sizeof( struct name_prefix ));
|
||||
nbr->neighbor->name=(char *)malloc(new_nbr->length);
|
||||
memcpy(nbr->neighbor->name,new_nbr->name,new_nbr->length);
|
||||
nbr->neighbor->length=new_nbr->length;
|
||||
nbr->face=face;
|
||||
nbr->status=NBR_DOWN;
|
||||
nbr->info_interest_timed_out=0;
|
||||
nbr->lsdb_interest_timed_out=0;
|
||||
nbr->lsdb_random_time_component=(int)(LSDB_SYNCH_INTERVAL/2);
|
||||
nbr->lsdb_synch_interval=LSDB_SYNCH_INTERVAL;
|
||||
nbr->metric=LINK_METRIC;
|
||||
nbr->is_lsdb_send_interest_scheduled=0;
|
||||
|
||||
nbr->ip_address=(char *)calloc(strlen(ip)+1,sizeof(char));
|
||||
memcpy(nbr->ip_address,ip,strlen(ip)+1);
|
||||
|
||||
char *time_stamp=(char *)malloc(20);
|
||||
get_current_timestamp_micro(time_stamp);
|
||||
nbr->last_lsdb_version=(char *)calloc(strlen(time_stamp)+1,sizeof(char));
|
||||
memcpy(nbr->last_lsdb_version,"0000000000000000",16);
|
||||
nbr->last_info_version=(char *)calloc(strlen(time_stamp)+1,sizeof(char));
|
||||
memcpy(nbr->last_info_version,"0000000000000000",16);
|
||||
free(time_stamp);
|
||||
|
||||
nbr->last_lsdb_requested=0;
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
print_adjacent(struct ndn_neighbor *nbr)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf("print_adjacent called\n");
|
||||
printf("--------Neighbor---------------------------\n");
|
||||
printf(" Neighbor: %s \n",nbr->neighbor->name);
|
||||
printf(" Length : %d \n",nbr->neighbor->length);
|
||||
printf(" Ip Address: %s \n",nbr->ip_address);
|
||||
printf(" Face : %d \n",nbr->face);
|
||||
printf(" Metric : %d \n",nbr->metric);
|
||||
printf(" Status : %d \n",nbr->status);
|
||||
printf(" LSDB Version: %s \n",nbr->last_lsdb_version);
|
||||
printf(" Info Version: %s \n",nbr->last_info_version);
|
||||
printf(" Info Interest Timed Out : %d \n",nbr->info_interest_timed_out);
|
||||
printf(" LSDB Interest Timed Out : %d \n",nbr->lsdb_interest_timed_out);
|
||||
printf(" LSDB Synch Interval : %ld \n",nbr->lsdb_synch_interval);
|
||||
printf(" LSDB Random Time comp : %d \n",nbr->lsdb_random_time_component);
|
||||
printf(" Las Time LSDB Requested: %ld \n",nbr->last_lsdb_requested);
|
||||
printf(" IS_lsdb_send_interest_scheduled : %d \n",nbr->is_lsdb_send_interest_scheduled);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
if ( nlsr->detailed_logging )
|
||||
{
|
||||
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_adjacent called\n");
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"--------Neighbor---------------------------\n");
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Neighbor: %s \n",nbr->neighbor->name);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Length : %d \n",nbr->neighbor->length);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Face : %d \n",nbr->face);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Metric : %d \n",nbr->metric);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Status : %d \n",nbr->status);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Version: %s \n",nbr->last_lsdb_version);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Info Version: %s \n",nbr->last_info_version);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Info Interest Timed Out : %d \n",nbr->info_interest_timed_out);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Interest Timed Out : %d \n",nbr->lsdb_interest_timed_out);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Synch Interval : %ld \n",nbr->lsdb_synch_interval);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Random Time comp : %d \n",nbr->lsdb_random_time_component);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," Las Time LSDB Requested: %ld \n",nbr->last_lsdb_requested);
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__," IS_lsdb_send_interest_scheduled : %d \n",nbr->is_lsdb_send_interest_scheduled);
|
||||
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
print_adjacent_from_adl(void)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("print_adjacent_from_adl called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_adjacent_from_adl called \n");
|
||||
|
||||
int i, adl_element;
|
||||
struct ndn_neighbor *nbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
adl_element=hashtb_n(nlsr->adl);
|
||||
|
||||
for(i=0;i<adl_element;i++)
|
||||
{
|
||||
nbr=e->data;
|
||||
print_adjacent(nbr);
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
get_adjacent_status(struct name_prefix *nbr)
|
||||
{
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("get_adjacent_status called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"get_adjacent_status called \n");
|
||||
|
||||
int res;
|
||||
int status=-1;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
if (res == HT_OLD_ENTRY)
|
||||
{
|
||||
nnbr=e->data;
|
||||
status=nnbr->status;
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
get_timed_out_number(struct name_prefix *nbr)
|
||||
{
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("get_timed_out_number called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"get_timed_out_number called \n");
|
||||
|
||||
|
||||
int res,ret=-1;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
nnbr=e->data;
|
||||
ret=nnbr->info_interest_timed_out;
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
get_lsdb_interest_timed_out_number(struct name_prefix *nbr)
|
||||
{
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("get_lsdb_interest_timed_out_number called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"get_lsdb_interest_timed_out_number called \n");
|
||||
|
||||
int res,ret=-1;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
nnbr=e->data;
|
||||
ret=nnbr->lsdb_interest_timed_out;
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
update_adjacent_timed_out_to_adl(struct name_prefix *nbr, int increment)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("update_adjacent_timed_out_to_adl called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_timed_out_to_adl called \n");
|
||||
|
||||
int res;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
nnbr=e->data;
|
||||
nnbr->info_interest_timed_out += increment;
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
void
|
||||
update_adjacent_timed_out_zero_to_adl(struct name_prefix *nbr)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("update_adjacent_timed_out_zero_to_adl called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_timed_out_zero_to_adl called \n");
|
||||
|
||||
int time_out_number=get_timed_out_number(nbr);
|
||||
update_adjacent_timed_out_to_adl(nbr,-time_out_number);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
update_lsdb_interest_timed_out_to_adl(struct name_prefix *nbr, int increment)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("update_lsdb_interest_timed_out_to_adl called\n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_lsdb_interest_timed_out_to_adl called \n");
|
||||
|
||||
int res;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
nnbr=e->data;
|
||||
nnbr->lsdb_interest_timed_out += increment;
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
void
|
||||
update_lsdb_interest_timed_out_zero_to_adl(struct name_prefix *nbr)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("update_adjacent_timed_out_zero_to_adl called\n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_timed_out_zero_to_adl called\n");
|
||||
|
||||
int time_out_number=get_lsdb_interest_timed_out_number(nbr);
|
||||
update_lsdb_interest_timed_out_to_adl(nbr,-time_out_number);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
update_adjacent_status_to_adl(struct name_prefix *nbr, int status)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("update_adjacent_status_to_adl called\n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_status_to_adl called \n");
|
||||
|
||||
int res;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
|
||||
if (res == HT_OLD_ENTRY)
|
||||
{
|
||||
nnbr=e->data;
|
||||
if ( nnbr->status!=status )
|
||||
{
|
||||
nnbr->status=status;
|
||||
nlsr->adj_build_flag++;
|
||||
}
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
delete_nbr_from_adl(struct name_prefix *nbr)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("delete_nbr_from_adl called\n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"delete_nbr_from_adl called \n");
|
||||
|
||||
int res;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
|
||||
if (res == HT_OLD_ENTRY)
|
||||
{
|
||||
struct ndn_neighbor *nbr=e->data;
|
||||
/*free(nbr->neighbor->name);
|
||||
free(nbr->neighbor);
|
||||
free(nbr->last_lsdb_version);
|
||||
free(nbr->last_info_version);
|
||||
free(nbr->ip_address);
|
||||
*/
|
||||
destroy_nbr_component(nbr);
|
||||
hashtb_delete(e);
|
||||
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
void
|
||||
update_lsdb_synch_interval_to_adl(struct name_prefix *nbr, long int interval)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("update_lsdb_synch_interval_to_adl called\n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_lsdb_synch_interval_to_adl called \n");
|
||||
|
||||
int res;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr->name, nbr->length, 0);
|
||||
|
||||
|
||||
if (res == HT_OLD_ENTRY)
|
||||
{
|
||||
nnbr=e->data;
|
||||
if ( nnbr->lsdb_synch_interval!= interval )
|
||||
{
|
||||
nnbr->lsdb_synch_interval=interval;
|
||||
nnbr->lsdb_random_time_component=(int)(interval/2);
|
||||
|
||||
}
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
no_active_nbr(void)
|
||||
{
|
||||
int i, adl_element;
|
||||
int no_link=0;
|
||||
struct ndn_neighbor *nbr;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
hashtb_start(nlsr->adl, e);
|
||||
adl_element=hashtb_n(nlsr->adl);
|
||||
|
||||
for(i=0;i<adl_element;i++)
|
||||
{
|
||||
nbr=e->data;
|
||||
if( nbr->status == 1 )
|
||||
no_link++;
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
return no_link;
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
is_adj_lsa_build(void)
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
int nbr_count=0;
|
||||
|
||||
int i, adl_element;
|
||||
struct ndn_neighbor *nbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
adl_element=hashtb_n(nlsr->adl);
|
||||
|
||||
for(i=0;i<adl_element;i++)
|
||||
{
|
||||
nbr=e->data;
|
||||
if(nbr->status == 1 )
|
||||
{
|
||||
nbr_count++;
|
||||
}
|
||||
else if ( (nbr->status == 0) && (nbr->info_interest_timed_out >= nlsr->interest_retry || nbr->lsdb_interest_timed_out >= nlsr->interest_retry))
|
||||
{
|
||||
nbr_count++;
|
||||
}
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
if(nbr_count == adl_element)
|
||||
ret=1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
get_active_nbr_adj_data(struct ccn_charbuf *c)
|
||||
{
|
||||
|
||||
int i, adl_element;
|
||||
struct ndn_neighbor *nbr;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
hashtb_start(nlsr->adl, e);
|
||||
adl_element=hashtb_n(nlsr->adl);
|
||||
|
||||
for(i=0;i<adl_element;i++)
|
||||
{
|
||||
nbr=e->data;
|
||||
if( nbr->status == 1 )
|
||||
{
|
||||
ccn_charbuf_append_string(c,nbr->neighbor->name);
|
||||
ccn_charbuf_append_string(c,"|");
|
||||
|
||||
char *temp_length=(char *)malloc(20);
|
||||
memset(temp_length,0,20);
|
||||
sprintf(temp_length,"%d",nbr->neighbor->length);
|
||||
ccn_charbuf_append_string(c,temp_length);
|
||||
free(temp_length);
|
||||
ccn_charbuf_append_string(c,"|");
|
||||
|
||||
char *temp_metric=(char *)malloc(20);
|
||||
memset(temp_metric,0,20);
|
||||
sprintf(temp_metric,"%d",nbr->metric);
|
||||
ccn_charbuf_append_string(c,temp_metric);
|
||||
free(temp_metric);
|
||||
ccn_charbuf_append_string(c,"|");
|
||||
|
||||
}
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
get_next_hop_face_from_adl(char *nbr)
|
||||
{
|
||||
int res;
|
||||
int connecting_face=NO_FACE;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
nnbr=e->data;
|
||||
connecting_face=nnbr->face;
|
||||
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
return connecting_face;
|
||||
}
|
||||
|
||||
void
|
||||
update_face_to_adl_for_nbr(char *nbr, int face)
|
||||
{
|
||||
int res;
|
||||
struct ndn_neighbor *nnbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
nnbr=e->data;
|
||||
nnbr->face=face;
|
||||
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
int
|
||||
is_neighbor(char *nbr)
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
int res;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
ret=1;
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
is_active_neighbor(char *nbr)
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
int res;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
|
||||
|
||||
if( res == HT_OLD_ENTRY )
|
||||
{
|
||||
struct ndn_neighbor *nnbr;
|
||||
nnbr=e->data;
|
||||
if (nnbr->status == NBR_ACTIVE )
|
||||
{
|
||||
ret=1;
|
||||
}
|
||||
}
|
||||
else if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
get_host_name_from_command_string(struct name_prefix *name_part,
|
||||
char *nbr_name_uri, int offset)
|
||||
{
|
||||
|
||||
|
||||
|
||||
int res,i;
|
||||
int len=0;
|
||||
const unsigned char *comp_ptr1;
|
||||
size_t comp_size;
|
||||
|
||||
struct ccn_charbuf *name=ccn_charbuf_create();
|
||||
res = ccn_name_from_uri(name,nbr_name_uri);
|
||||
if (res < 0) {
|
||||
fprintf(stderr, "Bad ccn URI: %s\n", nbr_name_uri);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//struct ccn_indexbuf cid={0};
|
||||
|
||||
//struct ccn_indexbuf *components=&cid;
|
||||
struct ccn_indexbuf *components=ccn_indexbuf_create();
|
||||
ccn_name_split (name, components);
|
||||
|
||||
for(i=components->n-2;i> (0+offset);i--)
|
||||
{
|
||||
res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
|
||||
len+=1;
|
||||
len+=(int)comp_size;
|
||||
}
|
||||
len++;
|
||||
|
||||
char *neighbor=(char *)malloc(len);
|
||||
memset(neighbor,0,len);
|
||||
|
||||
for(i=components->n-2;i> (0+offset);i--)
|
||||
{
|
||||
res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
|
||||
if ( i != components->n-2)
|
||||
memcpy(neighbor+strlen(neighbor),".",1);
|
||||
memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,
|
||||
strlen((char *)comp_ptr1));
|
||||
|
||||
}
|
||||
|
||||
name_part->name=(char *)calloc(strlen(neighbor)+1,sizeof(char));
|
||||
memcpy(name_part->name,neighbor,strlen(neighbor)+1);
|
||||
name_part->length=strlen(neighbor)+1;
|
||||
|
||||
// 01/31/2013
|
||||
free(neighbor);
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_indexbuf_destroy(&components);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
destroy_nbr_component(struct ndn_neighbor *nbr)
|
||||
{
|
||||
if ( nbr->neighbor->name )
|
||||
free(nbr->neighbor->name);
|
||||
if ( nbr->neighbor )
|
||||
free(nbr->neighbor);
|
||||
if ( nbr->last_lsdb_version)
|
||||
free(nbr->last_lsdb_version);
|
||||
if ( nbr->last_info_version)
|
||||
free(nbr->last_info_version);
|
||||
if ( nbr->ip_address)
|
||||
free(nbr->ip_address);
|
||||
}
|
||||
|
||||
void
|
||||
destroy_adl(void)
|
||||
{
|
||||
int i, adl_element;
|
||||
struct ndn_neighbor *nbr;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->adl, e);
|
||||
adl_element=hashtb_n(nlsr->adl);
|
||||
|
||||
for(i=0;i<adl_element;i++)
|
||||
{
|
||||
nbr=e->data;
|
||||
destroy_nbr_component(nbr);
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
if( nlsr->adl )
|
||||
hashtb_destroy(&nlsr->adl);
|
||||
|
||||
}
|
||||
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
#ifndef _NLSR_ADL_H_
|
||||
#define _NLSR_ADL_H_
|
||||
|
||||
#define NBR_DOWN 0
|
||||
#define NBR_ACTIVE 1
|
||||
|
||||
struct ndn_neighbor
|
||||
{
|
||||
struct name_prefix *neighbor;
|
||||
int face;
|
||||
int status;
|
||||
char * last_lsdb_version;
|
||||
char * last_info_version;
|
||||
char *ip_address;
|
||||
int info_interest_timed_out;
|
||||
int lsdb_interest_timed_out;
|
||||
int lsdb_random_time_component;
|
||||
long int lsdb_synch_interval;
|
||||
long int last_lsdb_requested;
|
||||
int is_lsdb_send_interest_scheduled;
|
||||
int metric;
|
||||
};
|
||||
|
||||
void add_nbr_to_adl(struct name_prefix *new_nbr,int face,char *ip);
|
||||
void delete_nbr_from_adl(struct name_prefix *nbr);
|
||||
void print_adjacent(struct ndn_neighbor *nbr);
|
||||
void print_adjacent_from_adl(void);
|
||||
int get_adjacent_status(struct name_prefix *nbr);
|
||||
int get_timed_out_number(struct name_prefix *nbr);
|
||||
int get_lsdb_interest_timed_out_number(struct name_prefix *nbr);
|
||||
void update_adjacent_timed_out_to_adl(struct name_prefix *nbr, int increment);
|
||||
void update_adjacent_timed_out_zero_to_adl(struct name_prefix *nbr);
|
||||
void update_lsdb_interest_timed_out_to_adl(struct name_prefix *nbr, int increment);
|
||||
void update_lsdb_interest_timed_out_zero_to_adl(struct name_prefix *nbr);
|
||||
void update_adjacent_status_to_adl(struct name_prefix *nbr, int status);
|
||||
void update_lsdb_synch_interval_to_adl(struct name_prefix *nbr, long int interval);
|
||||
int no_active_nbr(void);
|
||||
int is_adj_lsa_build(void);
|
||||
void get_active_nbr_adj_data(struct ccn_charbuf *c);
|
||||
long int get_nbr_time_diff_lsdb_req(char *nbr);
|
||||
long int get_nbr_last_lsdb_requested(char *nbr);
|
||||
long int get_nbr_last_lsdb_requested(char *nbr);
|
||||
long int get_lsdb_synch_interval(char *nbr);
|
||||
int get_nbr_random_time_component(char *nbr);
|
||||
char * get_nbr_lsdb_version(char *nbr);
|
||||
void update_adjacent_last_lsdb_requested_to_adl(char *nbr, long int timestamp);
|
||||
void set_is_lsdb_send_interest_scheduled_to_zero(char *nbr);
|
||||
void update_adjacent_lsdb_version_to_adl(struct name_prefix *nbr, char *version);
|
||||
void adjust_adjacent_last_lsdb_requested_to_adl(char *nbr, long int sec);
|
||||
int get_next_hop_face_from_adl(char *nbr);
|
||||
int is_neighbor(char *nbr);
|
||||
int is_active_neighbor(char *nbr);
|
||||
void update_face_to_adl_for_nbr(char *nbr, int face);
|
||||
|
||||
void get_host_name_from_command_string(struct name_prefix *name_part,char *nbr_name_uri, int offset);
|
||||
void destroy_nbr_component(struct ndn_neighbor *nbr);
|
||||
void destroy_adl(void);
|
||||
#endif
|
||||
-410
@@ -1,410 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/face_mgmt.h>
|
||||
#include <ccn/reg_mgmt.h>
|
||||
#include <ccn/charbuf.h>
|
||||
|
||||
|
||||
|
||||
#include "nlsr_face.h"
|
||||
|
||||
static void
|
||||
ccn_fib_warn(int lineno, const char *format, ...)
|
||||
{
|
||||
struct timeval t;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
gettimeofday(&t, NULL);
|
||||
fprintf(stderr, "%d.%06d ccn_fib[%d]:%d: ", (int)t.tv_sec, (unsigned)t.tv_usec, (int)getpid(), lineno);
|
||||
vfprintf(stderr, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
static void
|
||||
ccn_fib_fatal(int lineno, const char *format, ...)
|
||||
{
|
||||
struct timeval t;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
gettimeofday(&t, NULL);
|
||||
fprintf(stderr, "%d.%06d ccn_fib[%d]:%d: ", (int)t.tv_sec, (unsigned)t.tv_usec, (int)getpid(), lineno);
|
||||
vfprintf(stderr, format, ap);
|
||||
va_end(ap);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#define ON_ERROR_EXIT(resval, msg) on_error_exit((resval), __LINE__, msg)
|
||||
|
||||
static void
|
||||
on_error_exit(int res, int lineno, const char *msg)
|
||||
{
|
||||
if (res >= 0)
|
||||
return;
|
||||
ccn_fib_fatal(lineno, "fatal error, res = %d, %s\n", res, msg);
|
||||
}
|
||||
|
||||
#define ON_ERROR_CLEANUP(resval) \
|
||||
{ \
|
||||
if ((resval) < 0) { \
|
||||
ccn_fib_warn (__LINE__, "OnError cleanup\n"); \
|
||||
goto cleanup; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ON_NULL_CLEANUP(resval) \
|
||||
{ \
|
||||
if ((resval) == NULL) { \
|
||||
ccn_fib_warn(__LINE__, "OnNull cleanup\n"); \
|
||||
goto cleanup; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Bind a prefix to a face
|
||||
*
|
||||
*/
|
||||
static int
|
||||
register_unregister_prefix(struct ccn *h, struct ccn_charbuf *local_scope_template,
|
||||
struct ccn_charbuf *no_name, struct ccn_charbuf *name_prefix,
|
||||
struct ccn_face_instance *face_instance, int operation)
|
||||
{
|
||||
struct ccn_charbuf *temp = NULL;
|
||||
struct ccn_charbuf *resultbuf = NULL;
|
||||
struct ccn_charbuf *signed_info = NULL;
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_charbuf *prefixreg = NULL;
|
||||
struct ccn_parsed_ContentObject pcobuf = {0};
|
||||
struct ccn_forwarding_entry forwarding_entry_storage = {0};
|
||||
struct ccn_forwarding_entry *forwarding_entry = &forwarding_entry_storage;
|
||||
struct ccn_forwarding_entry *new_forwarding_entry;
|
||||
const unsigned char *ptr = NULL;
|
||||
size_t length = 0;
|
||||
int res;
|
||||
|
||||
/* Register or unregister the prefix */
|
||||
forwarding_entry->action = (operation == OP_REG) ? "prefixreg" : "unreg";
|
||||
forwarding_entry->name_prefix = name_prefix;
|
||||
forwarding_entry->ccnd_id = face_instance->ccnd_id;
|
||||
forwarding_entry->ccnd_id_size = face_instance->ccnd_id_size;
|
||||
forwarding_entry->faceid = face_instance->faceid;
|
||||
forwarding_entry->flags = -1;
|
||||
forwarding_entry->lifetime = (~0U) >> 1;
|
||||
|
||||
prefixreg = ccn_charbuf_create();
|
||||
ccnb_append_forwarding_entry(prefixreg, forwarding_entry);
|
||||
temp = ccn_charbuf_create();
|
||||
res = ccn_sign_content(h, temp, no_name, NULL, prefixreg->buf, prefixreg->length);
|
||||
resultbuf = ccn_charbuf_create();
|
||||
|
||||
/* construct Interest containing prefixreg request */
|
||||
name = ccn_charbuf_create();
|
||||
ccn_name_init(name);
|
||||
ccn_name_append_str(name, "ccnx");
|
||||
ccn_name_append(name, face_instance->ccnd_id, face_instance->ccnd_id_size);
|
||||
ccn_name_append_str(name, (operation == OP_REG) ? "prefixreg" : "unreg");
|
||||
ccn_name_append(name, temp->buf, temp->length);
|
||||
|
||||
/* send Interest, get Data */
|
||||
res = ccn_get(h, name, local_scope_template, 1000, resultbuf, &pcobuf, NULL, 0);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
res = ccn_content_get_value(resultbuf->buf, resultbuf->length, &pcobuf, &ptr, &length);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
/* extract new forwarding entry from Data */
|
||||
new_forwarding_entry = ccn_forwarding_entry_parse(ptr, length);
|
||||
ON_NULL_CLEANUP(new_forwarding_entry);
|
||||
|
||||
res = new_forwarding_entry->faceid;
|
||||
|
||||
ccn_forwarding_entry_destroy(&new_forwarding_entry);
|
||||
ccn_charbuf_destroy(&signed_info);
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_charbuf_destroy(&prefixreg);
|
||||
|
||||
return res;
|
||||
|
||||
cleanup:
|
||||
ccn_forwarding_entry_destroy(&new_forwarding_entry);
|
||||
ccn_charbuf_destroy(&signed_info);
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_charbuf_destroy(&prefixreg);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Create new face by sending out a request Interest
|
||||
* The actual new face instance is returned
|
||||
*
|
||||
*/
|
||||
static
|
||||
struct ccn_face_instance *create_face(struct ccn *h, struct ccn_charbuf *local_scope_template,
|
||||
struct ccn_charbuf *no_name, struct ccn_face_instance *face_instance)
|
||||
{
|
||||
struct ccn_charbuf *newface = NULL;
|
||||
struct ccn_charbuf *signed_info = NULL;
|
||||
struct ccn_charbuf *temp = NULL;
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_charbuf *resultbuf = NULL;
|
||||
struct ccn_parsed_ContentObject pcobuf = {0};
|
||||
struct ccn_face_instance *new_face_instance = NULL;
|
||||
const unsigned char *ptr = NULL;
|
||||
size_t length = 0;
|
||||
int res = 0;
|
||||
|
||||
/* Encode the given face instance */
|
||||
newface = ccn_charbuf_create();
|
||||
ccnb_append_face_instance(newface, face_instance);
|
||||
|
||||
temp = ccn_charbuf_create();
|
||||
res = ccn_sign_content(h, temp, no_name, NULL, newface->buf, newface->length);
|
||||
resultbuf = ccn_charbuf_create();
|
||||
|
||||
/* Construct the Interest name that will create the face */
|
||||
name = ccn_charbuf_create();
|
||||
ccn_name_init(name);
|
||||
ccn_name_append_str(name, "ccnx");
|
||||
ccn_name_append(name, face_instance->ccnd_id, face_instance->ccnd_id_size);
|
||||
ccn_name_append_str(name, face_instance->action);
|
||||
ccn_name_append(name, temp->buf, temp->length);
|
||||
|
||||
/* send Interest to retrieve Data that contains the newly created face */
|
||||
res = ccn_get(h, name, local_scope_template, 1000, resultbuf, &pcobuf, NULL, 0);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
/* decode Data to get the actual face instance */
|
||||
res = ccn_content_get_value(resultbuf->buf, resultbuf->length, &pcobuf, &ptr, &length);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
new_face_instance = ccn_face_instance_parse(ptr, length);
|
||||
|
||||
ccn_charbuf_destroy(&newface);
|
||||
ccn_charbuf_destroy(&signed_info);
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&name);
|
||||
|
||||
return new_face_instance;
|
||||
|
||||
cleanup:
|
||||
ccn_charbuf_destroy(&newface);
|
||||
ccn_charbuf_destroy(&signed_info);
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get ccnd id
|
||||
*
|
||||
*/
|
||||
static int
|
||||
get_ccndid(struct ccn *h, struct ccn_charbuf *local_scope_template,
|
||||
unsigned char *ccndid)
|
||||
{
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_charbuf *resultbuf = NULL;
|
||||
struct ccn_parsed_ContentObject pcobuf = {0};
|
||||
char ccndid_uri[] = "ccnx:/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY";
|
||||
const unsigned char *ccndid_result;
|
||||
static size_t ccndid_result_size;
|
||||
int res;
|
||||
|
||||
name = ccn_charbuf_create();
|
||||
resultbuf = ccn_charbuf_create();
|
||||
|
||||
res = ccn_name_from_uri(name, ccndid_uri);
|
||||
ON_ERROR_EXIT(res, "Unable to parse service locator URI for ccnd key\n");
|
||||
|
||||
/* get Data */
|
||||
res = ccn_get(h, name, local_scope_template, 4500, resultbuf, &pcobuf, NULL, 0);
|
||||
ON_ERROR_EXIT(res, "Unable to get key from ccnd\n");
|
||||
|
||||
/* extract from Data */
|
||||
res = ccn_ref_tagged_BLOB(CCN_DTAG_PublisherPublicKeyDigest,
|
||||
resultbuf->buf,
|
||||
pcobuf.offset[CCN_PCO_B_PublisherPublicKeyDigest],
|
||||
pcobuf.offset[CCN_PCO_E_PublisherPublicKeyDigest],
|
||||
&ccndid_result, &ccndid_result_size);
|
||||
ON_ERROR_EXIT(res, "Unable to parse ccnd response for ccnd id\n");
|
||||
|
||||
memcpy((void *)ccndid, ccndid_result, ccndid_result_size);
|
||||
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
|
||||
return (ccndid_result_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new face instance based on the given address and port
|
||||
* This face instance is only used to send new face request
|
||||
*/
|
||||
static struct
|
||||
ccn_face_instance *construct_face(const unsigned char *ccndid, size_t ccndid_size,
|
||||
const char *address, const char *port, unsigned int tunnel_proto)
|
||||
{
|
||||
struct ccn_face_instance *fi = calloc(1, sizeof(*fi));
|
||||
char rhostnamebuf[NI_MAXHOST];
|
||||
char rhostportbuf[NI_MAXSERV];
|
||||
struct addrinfo hints = {.ai_family = AF_UNSPEC, .ai_flags = (AI_ADDRCONFIG),
|
||||
.ai_socktype = SOCK_DGRAM};
|
||||
struct addrinfo *raddrinfo = NULL;
|
||||
struct ccn_charbuf *store = ccn_charbuf_create();
|
||||
int host_off = -1;
|
||||
int port_off = -1;
|
||||
int res;
|
||||
|
||||
res = getaddrinfo(address, port, &hints, &raddrinfo);
|
||||
if (res != 0 || raddrinfo == NULL)
|
||||
{
|
||||
fprintf(stderr, "Error: getaddrinfo\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
res = getnameinfo(raddrinfo->ai_addr, raddrinfo->ai_addrlen,
|
||||
rhostnamebuf, sizeof(rhostnamebuf),
|
||||
rhostportbuf, sizeof(rhostportbuf),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
freeaddrinfo(raddrinfo);
|
||||
if (res != 0)
|
||||
{
|
||||
fprintf(stderr, "Error: getnameinfo\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fi->store = store;
|
||||
fi->descr.ipproto = tunnel_proto;
|
||||
fi->descr.mcast_ttl = CCN_FIB_MCASTTTL;
|
||||
fi->lifetime = CCN_FIB_LIFETIME;
|
||||
|
||||
ccn_charbuf_append(store, "newface", strlen("newface") + 1);
|
||||
host_off = store->length;
|
||||
ccn_charbuf_append(store, rhostnamebuf, strlen(rhostnamebuf) + 1);
|
||||
port_off = store->length;
|
||||
ccn_charbuf_append(store, rhostportbuf, strlen(rhostportbuf) + 1);
|
||||
|
||||
char *b = (char *)store->buf;
|
||||
fi->action = b;
|
||||
fi->descr.address = b + host_off;
|
||||
fi->descr.port = b + port_off;
|
||||
fi->descr.source_address = NULL;
|
||||
fi->ccnd_id = ccndid;
|
||||
fi->ccnd_id_size = ccndid_size;
|
||||
|
||||
return fi;
|
||||
}
|
||||
|
||||
/**
|
||||
* initialize local data
|
||||
*/
|
||||
static void
|
||||
init_data(struct ccn_charbuf *local_scope_template,
|
||||
struct ccn_charbuf *no_name)
|
||||
{
|
||||
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Interest, CCN_DTAG);
|
||||
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Name, CCN_DTAG);
|
||||
ccn_charbuf_append_closer(local_scope_template); /* </Name> */
|
||||
ccnb_tagged_putf(local_scope_template, CCN_DTAG_Scope, "1");
|
||||
ccn_charbuf_append_closer(local_scope_template); /* </Interest> */
|
||||
|
||||
ccn_name_init(no_name);
|
||||
}
|
||||
|
||||
static int
|
||||
add_delete_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int p, int operation,unsigned int tunnel_proto)
|
||||
{
|
||||
struct ccn_charbuf *prefix;
|
||||
char port[6];
|
||||
struct ccn_charbuf *local_scope_template = ccn_charbuf_create();
|
||||
struct ccn_charbuf *no_name = ccn_charbuf_create();
|
||||
unsigned char ccndid_storage[32] = {0};
|
||||
unsigned char *ccndid = ccndid_storage;
|
||||
size_t ccndid_size = 0;
|
||||
struct ccn_face_instance *fi;
|
||||
struct ccn_face_instance *nfi;
|
||||
int res;
|
||||
|
||||
prefix = ccn_charbuf_create();
|
||||
res = ccn_name_from_uri(prefix, uri);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
memset(port, 0, 6);
|
||||
sprintf(port, "%d", p);
|
||||
|
||||
init_data(local_scope_template, no_name);
|
||||
|
||||
ccndid_size = get_ccndid(h, local_scope_template, ccndid);
|
||||
if (ccndid_size != sizeof(ccndid_storage))
|
||||
{
|
||||
fprintf(stderr, "Incorrect size for ccnd id in response\n");
|
||||
ON_ERROR_CLEANUP(-1);
|
||||
}
|
||||
|
||||
/* construct a face instance for new face request */
|
||||
fi = construct_face(ccndid, ccndid_size, address, port,tunnel_proto);
|
||||
ON_NULL_CLEANUP(fi);
|
||||
|
||||
/* send new face request to actually create a new face */
|
||||
nfi = create_face(h, local_scope_template, no_name, fi);
|
||||
ON_NULL_CLEANUP(nfi);
|
||||
|
||||
|
||||
res = register_unregister_prefix(h, local_scope_template, no_name, prefix, nfi, operation);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
int faceid=nfi->faceid;
|
||||
|
||||
ccn_charbuf_destroy(&local_scope_template);
|
||||
ccn_charbuf_destroy(&no_name);
|
||||
ccn_face_instance_destroy(&fi);
|
||||
ccn_face_instance_destroy(&nfi);
|
||||
ccn_charbuf_destroy(&prefix);
|
||||
|
||||
|
||||
return faceid;
|
||||
|
||||
cleanup:
|
||||
ccn_charbuf_destroy(&prefix);
|
||||
ccn_charbuf_destroy(&local_scope_template);
|
||||
ccn_charbuf_destroy(&no_name);
|
||||
ccn_face_instance_destroy(&fi);
|
||||
ccn_face_instance_destroy(&nfi);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
add_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port, unsigned int tunnel_proto)
|
||||
{
|
||||
return add_delete_ccn_face(h, uri, address, port, OP_REG,tunnel_proto);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
delete_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port,unsigned int tunnel_proto)
|
||||
{
|
||||
return add_delete_ccn_face(h, uri, address, port, OP_UNREG,tunnel_proto);
|
||||
}
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
#ifndef _NLSR_FACE_H_
|
||||
#define _NLSR_FACE_H_
|
||||
|
||||
#define CCN_FIB_LIFETIME ((~0U) >> 1)
|
||||
#define CCN_FIB_MCASTTTL (-1)
|
||||
#define OP_REG 0
|
||||
#define OP_UNREG 1
|
||||
|
||||
int add_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port,unsigned int tunnel_proto);
|
||||
int delete_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port,unsigned int tunnel_proto);
|
||||
|
||||
#endif
|
||||
-236
@@ -1,236 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/face_mgmt.h>
|
||||
#include <ccn/reg_mgmt.h>
|
||||
#include <ccn/charbuf.h>
|
||||
|
||||
#include "nlsr_fib.h"
|
||||
#include "nlsr.h"
|
||||
|
||||
|
||||
static void
|
||||
ccn_fib_warn(int lineno, const char *format, ...)
|
||||
{
|
||||
struct timeval t;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
gettimeofday(&t, NULL);
|
||||
fprintf(stderr, "%d.%06d ccn_fib[%d]:%d: ", (int)t.tv_sec, (unsigned)t.tv_usec, (int)getpid(), lineno);
|
||||
vfprintf(stderr, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#define ON_ERROR_CLEANUP(resval) \
|
||||
{ \
|
||||
if ((resval) < 0) { \
|
||||
ccn_fib_warn (__LINE__, "OnError cleanup\n"); \
|
||||
goto cleanup; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ON_NULL_CLEANUP(resval) \
|
||||
{ \
|
||||
if ((resval) == NULL) { \
|
||||
ccn_fib_warn(__LINE__, "OnNull cleanup\n"); \
|
||||
goto cleanup; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
register_unregister_prefix(struct ccn *h, struct ccn_charbuf *local_scope_template,
|
||||
struct ccn_charbuf *no_name, struct ccn_charbuf *name_prefix,
|
||||
const unsigned char *ccndid, size_t ccnd_id_size, int faceid,
|
||||
int operation, long int lifetime)
|
||||
{
|
||||
struct ccn_charbuf *temp = NULL;
|
||||
struct ccn_charbuf *resultbuf = NULL;
|
||||
struct ccn_charbuf *signed_info = NULL;
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_charbuf *prefixreg = NULL;
|
||||
struct ccn_parsed_ContentObject pcobuf = {0};
|
||||
struct ccn_forwarding_entry forwarding_entry_storage = {0};
|
||||
struct ccn_forwarding_entry *forwarding_entry = &forwarding_entry_storage;
|
||||
struct ccn_forwarding_entry *new_forwarding_entry;
|
||||
const unsigned char *ptr = NULL;
|
||||
size_t length = 0;
|
||||
int res;
|
||||
|
||||
/* Register or unregister the prefix */
|
||||
forwarding_entry->action = (operation == OP_REG) ? "prefixreg" : "unreg";
|
||||
forwarding_entry->name_prefix = name_prefix;
|
||||
forwarding_entry->ccnd_id = ccndid;
|
||||
forwarding_entry->ccnd_id_size =ccnd_id_size;
|
||||
forwarding_entry->faceid = faceid;
|
||||
forwarding_entry->flags = -1;
|
||||
forwarding_entry->lifetime = lifetime;
|
||||
|
||||
prefixreg = ccn_charbuf_create();
|
||||
ccnb_append_forwarding_entry(prefixreg, forwarding_entry);
|
||||
temp = ccn_charbuf_create();
|
||||
res = ccn_sign_content(h, temp, no_name, NULL, prefixreg->buf, prefixreg->length);
|
||||
resultbuf = ccn_charbuf_create();
|
||||
|
||||
/* construct Interest containing prefixreg request */
|
||||
name = ccn_charbuf_create();
|
||||
ccn_name_init(name);
|
||||
ccn_name_append_str(name, "ccnx");
|
||||
ccn_name_append(name, ccndid, ccnd_id_size);
|
||||
ccn_name_append_str(name, (operation == OP_REG) ? "prefixreg" : "unreg");
|
||||
ccn_name_append(name, temp->buf, temp->length);
|
||||
|
||||
/* send Interest, get Data */
|
||||
res = ccn_get(h, name, local_scope_template, 1000, resultbuf, &pcobuf, NULL, 0);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
res = ccn_content_get_value(resultbuf->buf, resultbuf->length, &pcobuf, &ptr, &length);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
/* extract new forwarding entry from Data */
|
||||
new_forwarding_entry = ccn_forwarding_entry_parse(ptr, length);
|
||||
ON_NULL_CLEANUP(new_forwarding_entry);
|
||||
|
||||
res = new_forwarding_entry->faceid;
|
||||
|
||||
ccn_forwarding_entry_destroy(&new_forwarding_entry);
|
||||
ccn_charbuf_destroy(&signed_info);
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_charbuf_destroy(&prefixreg);
|
||||
|
||||
return res;
|
||||
|
||||
cleanup:
|
||||
if ( signed_info )
|
||||
ccn_charbuf_destroy(&signed_info);
|
||||
if ( temp )
|
||||
ccn_charbuf_destroy(&temp);
|
||||
if ( resultbuf )
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&name);
|
||||
if ( prefixreg )
|
||||
ccn_charbuf_destroy(&prefixreg);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
get_ccndid(struct ccn *h, struct ccn_charbuf *local_scope_template,
|
||||
unsigned char *ccndid)
|
||||
{
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_charbuf *resultbuf = NULL;
|
||||
struct ccn_parsed_ContentObject pcobuf = {0};
|
||||
char ccndid_uri[] = "ccnx:/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY";
|
||||
const unsigned char *ccndid_result;
|
||||
static size_t ccndid_result_size;
|
||||
int res;
|
||||
|
||||
name = ccn_charbuf_create();
|
||||
resultbuf = ccn_charbuf_create();
|
||||
|
||||
res = ccn_name_from_uri(name, ccndid_uri);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
/* get Data */
|
||||
res = ccn_get(h, name, local_scope_template, 4500, resultbuf, &pcobuf, NULL, 0);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
/* extract from Data */
|
||||
res = ccn_ref_tagged_BLOB(CCN_DTAG_PublisherPublicKeyDigest,
|
||||
resultbuf->buf,
|
||||
pcobuf.offset[CCN_PCO_B_PublisherPublicKeyDigest],
|
||||
pcobuf.offset[CCN_PCO_E_PublisherPublicKeyDigest],
|
||||
&ccndid_result, &ccndid_result_size);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
memcpy((void *)ccndid, ccndid_result, ccndid_result_size);
|
||||
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
|
||||
return (ccndid_result_size);
|
||||
|
||||
cleanup:
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
init_data(struct ccn_charbuf *local_scope_template,
|
||||
struct ccn_charbuf *no_name)
|
||||
{
|
||||
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Interest, CCN_DTAG);
|
||||
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Name, CCN_DTAG);
|
||||
ccn_charbuf_append_closer(local_scope_template); /* </Name> */
|
||||
ccnb_tagged_putf(local_scope_template, CCN_DTAG_Scope, "1");
|
||||
ccn_charbuf_append_closer(local_scope_template); /* </Interest> */
|
||||
|
||||
ccn_name_init(no_name);
|
||||
}
|
||||
|
||||
int
|
||||
add_delete_ccn_face_by_face_id(struct ccn *h, const char *uri, int operation, int faceid, long int lifetime)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf("add_delete_ccn_face_by_face_id called\n");
|
||||
printf("Uri: %s Face: %d Operation: %s \n",(char *)uri , faceid, operation == OP_REG ? "Registration" : "Unregistration");
|
||||
}
|
||||
|
||||
struct ccn_charbuf *prefix;
|
||||
struct ccn_charbuf *local_scope_template = ccn_charbuf_create();
|
||||
struct ccn_charbuf *no_name = ccn_charbuf_create();
|
||||
unsigned char ccndid_storage[32] = {0};
|
||||
unsigned char *ccndid = ccndid_storage;
|
||||
size_t ccndid_size = 0;
|
||||
int res;
|
||||
|
||||
prefix = ccn_charbuf_create();
|
||||
res = ccn_name_from_uri(prefix, uri);
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
|
||||
init_data(local_scope_template, no_name);
|
||||
|
||||
ccndid_size = get_ccndid(h, local_scope_template, ccndid);
|
||||
if (ccndid_size != sizeof(ccndid_storage))
|
||||
{
|
||||
fprintf(stderr, "Incorrect size for ccnd id in response\n");
|
||||
ON_ERROR_CLEANUP(-1);
|
||||
}
|
||||
|
||||
res = register_unregister_prefix(h, local_scope_template, no_name, prefix,ccndid, ccndid_size,faceid, operation,lifetime);
|
||||
|
||||
ON_ERROR_CLEANUP(res);
|
||||
|
||||
ccn_charbuf_destroy(&local_scope_template);
|
||||
ccn_charbuf_destroy(&no_name);
|
||||
ccn_charbuf_destroy(&prefix);
|
||||
|
||||
return 0;
|
||||
|
||||
cleanup:
|
||||
ccn_charbuf_destroy(&prefix);
|
||||
ccn_charbuf_destroy(&local_scope_template);
|
||||
ccn_charbuf_destroy(&no_name);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
#ifndef _NLSR_FIB_H_
|
||||
#define _NLSR_FIB_H_
|
||||
|
||||
#define CCN_FIB_LIFETIME ((~0U) >> 1)
|
||||
#define CCN_FIB_MCASTTTL (-1)
|
||||
#define OP_REG 0
|
||||
#define OP_UNREG 1
|
||||
|
||||
int add_delete_ccn_face_by_face_id(struct ccn *h, const char *uri, int operation,
|
||||
int faceid, long int lifetime);
|
||||
|
||||
#endif
|
||||
@@ -1,564 +0,0 @@
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/keystore.h>
|
||||
#include <ccn/signing.h>
|
||||
#include <ccn/schedule.h>
|
||||
#include <ccn/hashtb.h>
|
||||
|
||||
#include "nlsr.h"
|
||||
#include "nlsr_km.h"
|
||||
#include "nlsr_km_util.h"
|
||||
#include "utility.h"
|
||||
|
||||
int
|
||||
sign_content_with_user_defined_keystore(struct ccn_charbuf *content_name,
|
||||
struct ccn_charbuf *resultbuf,
|
||||
const void *data,
|
||||
size_t data_size,
|
||||
char *keystore_path,
|
||||
char *keystore_passphrase,
|
||||
char *key_repo_name,
|
||||
char *site_name,
|
||||
char *router_name,
|
||||
long int freshness){
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("sign_content_with_user_defined_keystore called\n");
|
||||
|
||||
|
||||
int res;
|
||||
|
||||
|
||||
struct ccn_charbuf * pubid_out=ccn_charbuf_create();
|
||||
struct ccn_charbuf * keyname;
|
||||
|
||||
|
||||
struct ccn_keystore *keystore = NULL;
|
||||
keystore=ccn_keystore_create();
|
||||
res=ccn_keystore_init(keystore, keystore_path,keystore_passphrase );
|
||||
if ( res < 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Error in initiating keystore :(\n");
|
||||
ccn_keystore_destroy(&keystore);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
res=ccn_load_private_key (nlsr->ccn,
|
||||
keystore_path,
|
||||
keystore_passphrase,
|
||||
pubid_out);
|
||||
|
||||
if(res < 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Error in loading keystore :( \n");
|
||||
ccn_charbuf_destroy(&pubid_out);
|
||||
return -1;
|
||||
}
|
||||
|
||||
char *baseuri=(char *)calloc(strlen(key_repo_name)+strlen(site_name)+
|
||||
strlen(router_name)+strlen("/%C1.R.N.Start")+5,sizeof(char));
|
||||
memcpy(baseuri,key_repo_name,strlen(key_repo_name)+1);
|
||||
if ( site_name[0] != '/')
|
||||
memcpy(baseuri+strlen(baseuri),"/",1);
|
||||
memcpy(baseuri+strlen(baseuri),site_name,strlen(site_name)+1);
|
||||
memcpy(baseuri+strlen(baseuri),"/%C1.R.N.Start",strlen("/%C1.R.N.Start"));
|
||||
memcpy(baseuri+strlen(baseuri),router_name,strlen(router_name)+1);
|
||||
baseuri[strlen(baseuri)]='\0';
|
||||
|
||||
|
||||
keyname=ccn_charbuf_create();
|
||||
if(keyname == NULL ){
|
||||
ccn_charbuf_destroy(&pubid_out);
|
||||
free(baseuri);
|
||||
return -1;
|
||||
}
|
||||
ccn_name_from_uri(keyname,baseuri);
|
||||
if ( res < 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Bad URI format: %s\n",baseuri);
|
||||
ccn_charbuf_destroy(&pubid_out);
|
||||
ccn_charbuf_destroy(&keyname);
|
||||
free(baseuri);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ccn_name_append_str(keyname,"nlsr");
|
||||
struct ccn_charbuf *keyid = ccn_charbuf_create();
|
||||
ccn_charbuf_append_value(keyid, CCN_MARKER_CONTROL, 1);
|
||||
ccn_charbuf_append_string(keyid, ".M.K");
|
||||
ccn_charbuf_append_value(keyid, 0, 1);
|
||||
ccn_charbuf_append_charbuf(keyid, pubid_out);
|
||||
ccn_name_append(keyname, keyid->buf, keyid->length);
|
||||
|
||||
|
||||
|
||||
struct ccn_charbuf *uri = ccn_charbuf_create();
|
||||
ccn_uri_append(uri, keyname->buf, keyname->length, 0);
|
||||
if ( nlsr->debugging )
|
||||
printf("Key Name Included when processing content: %s\n", ccn_charbuf_as_string(uri));
|
||||
ccn_charbuf_destroy(&uri);
|
||||
|
||||
struct ccn_signing_params sp = CCN_SIGNING_PARAMS_INIT;
|
||||
sp.type = CCN_CONTENT_DATA;
|
||||
sp.template_ccnb = ccn_charbuf_create();
|
||||
ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_SignedInfo, CCN_DTAG);
|
||||
ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_KeyLocator, CCN_DTAG);
|
||||
ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_KeyName, CCN_DTAG);
|
||||
ccn_charbuf_append(sp.template_ccnb, keyname->buf, keyname->length);
|
||||
ccn_charbuf_append_closer(sp.template_ccnb); // KeyName closer
|
||||
ccn_charbuf_append_closer(sp.template_ccnb); // KeyLocator closer
|
||||
ccn_charbuf_append_closer(sp.template_ccnb); // SignedInfo closer
|
||||
|
||||
|
||||
sp.sp_flags |= CCN_SP_TEMPL_KEY_LOCATOR;
|
||||
sp.sp_flags |= CCN_SP_FINAL_BLOCK;
|
||||
sp.freshness = freshness;
|
||||
|
||||
|
||||
if (pubid_out->length != sizeof(sp.pubid)){
|
||||
if ( nlsr->debugging )
|
||||
printf("Size of pubid and sp.pubid is not equal");
|
||||
ccn_charbuf_destroy(&keyname);
|
||||
ccn_charbuf_destroy(&pubid_out);
|
||||
free(baseuri);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(sp.pubid, pubid_out->buf, pubid_out->length);
|
||||
|
||||
|
||||
|
||||
res=ccn_sign_content(nlsr->ccn,resultbuf,content_name,&sp,data,data_size);
|
||||
if( res < 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content signing error \n");
|
||||
ccn_charbuf_destroy(&sp.template_ccnb);
|
||||
ccn_charbuf_destroy(&keyid);
|
||||
ccn_charbuf_destroy(&keyname);
|
||||
ccn_charbuf_destroy(&pubid_out);
|
||||
free(baseuri);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ccn_keystore_destroy(&keystore);
|
||||
ccn_charbuf_destroy(&sp.template_ccnb);
|
||||
ccn_charbuf_destroy(&keyid);
|
||||
ccn_charbuf_destroy(&keyname);
|
||||
ccn_charbuf_destroy(&pubid_out);
|
||||
|
||||
free(baseuri);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
get_orig_router_from_lsa_name(struct ccn_charbuf * content_name)
|
||||
{
|
||||
int start=0;
|
||||
|
||||
size_t comp_size;
|
||||
const unsigned char *second_last_comp;
|
||||
char *second_comp_type;
|
||||
char *sep=".";
|
||||
char *rem;
|
||||
|
||||
struct ccn_indexbuf *components=ccn_indexbuf_create();
|
||||
struct ccn_charbuf *name=ccn_charbuf_create();
|
||||
ccn_name_from_uri(name,nlsr->slice_prefix);
|
||||
ccn_name_split (name, components);
|
||||
start=components->n-2;
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_indexbuf_destroy(&components);
|
||||
|
||||
struct ccn_indexbuf *comps=ccn_indexbuf_create();
|
||||
ccn_name_split (content_name, comps);
|
||||
ccn_name_comp_get( content_name->buf, comps,
|
||||
comps->n-1-2, &second_last_comp, &comp_size);
|
||||
|
||||
second_comp_type=strtok_r((char *)second_last_comp, sep, &rem);
|
||||
if ( strcmp( second_comp_type, "lsId" ) == 0 ){
|
||||
ccn_name_chop(content_name,comps,-3);
|
||||
}
|
||||
else{
|
||||
ccn_name_chop(content_name,comps,-2);
|
||||
}
|
||||
|
||||
|
||||
struct ccn_charbuf *temp=ccn_charbuf_create();
|
||||
ccn_name_init(temp);
|
||||
ccn_name_append_components( temp, content_name->buf,
|
||||
comps->buf[start+1],
|
||||
comps->buf[comps->n - 1]);
|
||||
|
||||
struct ccn_charbuf *temp1=ccn_charbuf_create();
|
||||
ccn_uri_append(temp1, temp->buf, temp->length, 0);
|
||||
|
||||
char *orig_router=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
|
||||
sizeof(char));
|
||||
memcpy(orig_router,ccn_charbuf_as_string(temp1),
|
||||
strlen(ccn_charbuf_as_string(temp1)));
|
||||
orig_router[strlen(orig_router)]='\0';
|
||||
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&temp1);
|
||||
ccn_indexbuf_destroy(&comps);
|
||||
return orig_router;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
get_orig_router_from_info_content_name(struct ccn_charbuf * content_name)
|
||||
{
|
||||
int start,end;
|
||||
|
||||
start=0;
|
||||
|
||||
struct ccn_indexbuf *comps=ccn_indexbuf_create();
|
||||
ccn_name_split (content_name, comps);
|
||||
|
||||
end=check_for_name_component_in_name(content_name,comps,"nlsr");
|
||||
|
||||
|
||||
struct ccn_charbuf *temp=ccn_charbuf_create();
|
||||
ccn_name_init(temp);
|
||||
ccn_name_append_components( temp, content_name->buf,
|
||||
comps->buf[start],
|
||||
comps->buf[end]);
|
||||
|
||||
struct ccn_charbuf *temp1=ccn_charbuf_create();
|
||||
ccn_uri_append(temp1, temp->buf, temp->length, 0);
|
||||
|
||||
char *orig_router=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
|
||||
sizeof(char));
|
||||
memcpy(orig_router,ccn_charbuf_as_string(temp1),
|
||||
strlen(ccn_charbuf_as_string(temp1)));
|
||||
orig_router[strlen(orig_router)]='\0';
|
||||
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_charbuf_destroy(&temp1);
|
||||
ccn_indexbuf_destroy(&comps);
|
||||
return orig_router;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
check_key_name_hierarchy(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco,
|
||||
int key_type, int content_type){
|
||||
if ( nlsr->debugging )
|
||||
printf("check_key_name_hierarchy called\n");
|
||||
if (key_type == UNKNOWN_KEY ){
|
||||
return 1;
|
||||
}
|
||||
//int res;
|
||||
struct ccn_charbuf *key_name=get_key_name(ccnb, pco);
|
||||
|
||||
struct ccn_charbuf *key_uri = ccn_charbuf_create();
|
||||
ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
|
||||
if ( nlsr->debugging )
|
||||
printf("Key Name: %s\n",ccn_charbuf_as_string(key_uri));
|
||||
ccn_charbuf_destroy(&key_uri);
|
||||
|
||||
struct ccn_charbuf *content_name=ccn_charbuf_create();
|
||||
ccn_charbuf_append(content_name, ccnb + pco->offset[CCN_PCO_B_Name],
|
||||
pco->offset[CCN_PCO_E_Name] - pco->offset[CCN_PCO_B_Name]);
|
||||
|
||||
struct ccn_charbuf *content_uri = ccn_charbuf_create();
|
||||
ccn_uri_append(content_uri, content_name->buf, content_name->length, 0);
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Name: %s\n",ccn_charbuf_as_string(content_uri));
|
||||
ccn_charbuf_destroy(&content_uri);
|
||||
|
||||
if ( key_type == NLSR_KEY){
|
||||
char *orig_router_key_name=get_orig_router_from_key_name(key_name,0,0);
|
||||
char *orig_router_content_name;
|
||||
if ( content_type == 1 ){
|
||||
orig_router_content_name=get_orig_router_from_lsa_name(content_name);
|
||||
}
|
||||
else if ( content_type == 0 ){
|
||||
orig_router_content_name=get_orig_router_from_info_content_name(content_name);
|
||||
}
|
||||
if ( nlsr->debugging ){
|
||||
printf("Orig Router (Key Name):%s\n",orig_router_key_name);
|
||||
printf("Orig Router (Content Name):%s\n",orig_router_content_name);
|
||||
}
|
||||
|
||||
if (strcmp(orig_router_key_name,orig_router_content_name) == 0 ){
|
||||
free(orig_router_key_name);
|
||||
free(orig_router_content_name);
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( key_type == ROUTING_KEY){
|
||||
char *orig_router_key_name=get_orig_router_from_key_name(key_name,1,0);
|
||||
char *orig_router_content_name=get_orig_router_from_key_name(content_name,1,1);
|
||||
if ( nlsr->debugging ){
|
||||
printf("Orig Router (Key Name):%s\n",orig_router_key_name);
|
||||
printf("Orig Router (Content Name):%s\n",orig_router_content_name);
|
||||
}
|
||||
|
||||
if (strcmp(orig_router_key_name,orig_router_content_name) == 0 ){
|
||||
free(orig_router_key_name);
|
||||
free(orig_router_content_name);
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if ( key_type == OPERATOR_KEY){
|
||||
struct ccn_indexbuf *key_name_comps;
|
||||
key_name_comps = ccn_indexbuf_create();
|
||||
ccn_name_split(key_name, key_name_comps);
|
||||
int last_indx=check_for_tag_component_in_name(key_name,key_name_comps,"O.N.Start");
|
||||
char *site_key_prefix_key=get_name_segments_from_name(key_name,0,last_indx);
|
||||
if ( nlsr->debugging )
|
||||
printf("Site key prefix(key Name):%s\n",site_key_prefix_key);
|
||||
ccn_indexbuf_destroy(&key_name_comps);
|
||||
|
||||
struct ccn_indexbuf *content_name_comps;
|
||||
content_name_comps = ccn_indexbuf_create();
|
||||
ccn_name_split(content_name, content_name_comps);
|
||||
int last_indx_rtr=check_for_tag_component_in_name(content_name,content_name_comps,"R.N.Start");
|
||||
char *site_key_prefix_content=get_name_segments_from_name(key_name,0,last_indx_rtr);
|
||||
if ( nlsr->debugging )
|
||||
printf("Site key prefix(Content Name):%s\n",site_key_prefix_content);
|
||||
ccn_indexbuf_destroy(&content_name_comps);
|
||||
|
||||
if( strcmp(site_key_prefix_key,site_key_prefix_content) == 0 ){
|
||||
free(site_key_prefix_key);
|
||||
free(site_key_prefix_content);
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( key_type == SITE_KEY){
|
||||
struct ccn_indexbuf *key_name_comps;
|
||||
key_name_comps = ccn_indexbuf_create();
|
||||
ccn_name_split(key_name, key_name_comps);
|
||||
int last_indx=check_for_tag_component_in_name(key_name,key_name_comps,"M.K");
|
||||
char *site_key_prefix_key=get_name_segments_from_name(key_name,0,last_indx);
|
||||
if ( nlsr->debugging )
|
||||
printf("Site key prefix(key Name):%s\n",site_key_prefix_key);
|
||||
ccn_indexbuf_destroy(&key_name_comps);
|
||||
|
||||
struct ccn_indexbuf *content_name_comps;
|
||||
content_name_comps = ccn_indexbuf_create();
|
||||
ccn_name_split(content_name, content_name_comps);
|
||||
int last_indx_rtr=check_for_tag_component_in_name(content_name,content_name_comps,"O.N.Start");
|
||||
char *site_key_prefix_content=get_name_segments_from_name(key_name,0,last_indx_rtr);
|
||||
if ( nlsr->debugging )
|
||||
printf("Site key prefix(Content Name):%s\n",site_key_prefix_content);
|
||||
ccn_indexbuf_destroy(&content_name_comps);
|
||||
|
||||
if( strcmp(site_key_prefix_key,site_key_prefix_content) == 0 ){
|
||||
free(site_key_prefix_key);
|
||||
free(site_key_prefix_content);
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( key_type == ROOT_KEY){
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
verify_key(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco,
|
||||
int content_type){
|
||||
if ( nlsr->debugging )
|
||||
printf("verify key called\n");
|
||||
int ret=-1;
|
||||
|
||||
if ( contain_key_name(ccnb, pco) == 1){
|
||||
|
||||
struct ccn_charbuf *key_name=get_key_name(ccnb, pco);
|
||||
struct ccn_charbuf *key_uri = ccn_charbuf_create();
|
||||
ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
|
||||
if ( nlsr->debugging )
|
||||
printf("Key Name from Incoming Content: %s\n",ccn_charbuf_as_string(key_uri));
|
||||
int key_type=get_key_type_from_key_name(key_name);
|
||||
if ( nlsr->debugging )
|
||||
printf("Key Type: %d \n",key_type);
|
||||
|
||||
struct ccn_charbuf *result = ccn_charbuf_create();
|
||||
struct ccn_parsed_ContentObject temp_pco = {0};
|
||||
int get_flags = 0;
|
||||
get_flags |= CCN_GET_NOKEYWAIT;
|
||||
int counter = 0;
|
||||
while(ccn_get(nlsr->ccn, key_name, NULL, 500, result, &temp_pco, NULL,
|
||||
get_flags) < 0 && counter < 3) counter++;
|
||||
|
||||
int chk_verify=ccn_verify_content(nlsr->ccn,ccnb,pco);
|
||||
|
||||
if ( chk_verify == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content verification Successful :)\n");
|
||||
|
||||
if ( counter == 3){
|
||||
if ( nlsr->debugging )
|
||||
printf("Could not retrieve key by name !!!\n");
|
||||
}
|
||||
else{
|
||||
if ( key_type == ROOT_KEY ){
|
||||
ret=0;
|
||||
}
|
||||
else{
|
||||
if ( nlsr->isStrictHierchicalKeyCheck ){
|
||||
int key_name_test=check_key_name_hierarchy(ccnb,
|
||||
pco,
|
||||
key_type,
|
||||
content_type);
|
||||
if ( key_name_test == 1){
|
||||
ret=verify_key(result->buf,&temp_pco,content_type);
|
||||
}
|
||||
}
|
||||
else{
|
||||
ret=verify_key(result->buf,&temp_pco,content_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ccn_charbuf_destroy(&result);
|
||||
ccn_charbuf_destroy(&key_uri);
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
destroy_keys(void)
|
||||
{
|
||||
int i, key_element;
|
||||
struct nlsr_key *key;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->keys, e);
|
||||
key_element=hashtb_n(nlsr->keys);
|
||||
|
||||
for(i=0;i<key_element;i++)
|
||||
{
|
||||
key=e->data;
|
||||
free(key->key_name);
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
if( nlsr->keys )
|
||||
hashtb_destroy(&nlsr->keys);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
print_keys(void){
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("print_keys called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_keys called \n");
|
||||
|
||||
int i, key_element;
|
||||
struct nlsr_key *key;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->keys, e);
|
||||
key_element=hashtb_n(nlsr->keys);
|
||||
|
||||
for(i=0;i<key_element;i++)
|
||||
{
|
||||
key=e->data;
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("Key : %s \n",key->key_name);
|
||||
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
does_key_exist(char *keyname){
|
||||
if (nlsr->debugging)
|
||||
{
|
||||
printf("does_key_exist called\n");
|
||||
printf("Keyname : %s \n",keyname);
|
||||
}
|
||||
|
||||
int ret=0;
|
||||
|
||||
unsigned *v;
|
||||
v = hashtb_lookup(nlsr->keys, keyname, strlen(keyname));
|
||||
if (v != NULL){
|
||||
ret = 1;
|
||||
if (nlsr->debugging)
|
||||
printf("Key Found\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
add_key(char *keyname){
|
||||
if (nlsr->debugging)
|
||||
{
|
||||
printf("add_key called\n");
|
||||
printf("Keyname : %s \n",keyname);
|
||||
}
|
||||
|
||||
struct nlsr_key *key;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
int res;
|
||||
|
||||
hashtb_start(nlsr->keys, e);
|
||||
res = hashtb_seek(e, keyname, strlen(keyname), 0);
|
||||
|
||||
if(res == HT_NEW_ENTRY )
|
||||
{
|
||||
key=e->data;
|
||||
key->key_name=(char *)calloc(strlen(keyname)+1,sizeof(char));
|
||||
memcpy(key->key_name,keyname,strlen(keyname)+1);
|
||||
}
|
||||
|
||||
if (nlsr->debugging)
|
||||
print_keys();
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
#ifndef _NLSR_KM_H_
|
||||
#define _NLSR_KM_H_
|
||||
|
||||
enum key_type{
|
||||
ROOT_KEY, //0
|
||||
SITE_KEY, //1
|
||||
OPERATOR_KEY,//2
|
||||
ROUTING_KEY,//3
|
||||
NLSR_KEY,//4
|
||||
UNKNOWN_KEY//5
|
||||
};
|
||||
|
||||
|
||||
struct nlsr_key{
|
||||
char *key_name;
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
sign_content_with_user_defined_keystore(struct ccn_charbuf *content_name,
|
||||
struct ccn_charbuf *resultbuf,
|
||||
const void *data,
|
||||
size_t data_size,
|
||||
char *keystore_path,
|
||||
char *keystore_passphrase,
|
||||
char *key_repo_name,
|
||||
char *site_name,
|
||||
char *router_name,
|
||||
long int freshness);
|
||||
|
||||
int contain_key_name(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco);
|
||||
struct ccn_charbuf * get_key_name(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco);
|
||||
|
||||
int verify_key(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco,
|
||||
int content_type);
|
||||
|
||||
void add_key(char *keyname);
|
||||
int does_key_exist(char *keyname);
|
||||
|
||||
void destroy_keys(void);
|
||||
|
||||
#endif
|
||||
-265
@@ -1,265 +0,0 @@
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/keystore.h>
|
||||
#include <ccn/signing.h>
|
||||
#include <ccn/schedule.h>
|
||||
#include <ccn/hashtb.h>
|
||||
|
||||
|
||||
#include "nlsr.h"
|
||||
#include "nlsr_km_util.h"
|
||||
#include "nlsr_km.h"
|
||||
|
||||
int
|
||||
appendLifetime(struct ccn_charbuf *cb, int lifetime)
|
||||
{
|
||||
unsigned char buf[sizeof(int32_t)];
|
||||
int32_t dreck = lifetime << 12;
|
||||
int pos = sizeof(int32_t);
|
||||
int res = 0;
|
||||
while (dreck > 0 && pos > 0)
|
||||
{
|
||||
pos--;
|
||||
buf[pos] = dreck & 255;
|
||||
dreck = dreck >> 8;
|
||||
}
|
||||
res |= ccnb_append_tagged_blob(cb, CCN_DTAG_InterestLifetime, buf+pos,
|
||||
sizeof(buf)-pos);
|
||||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
contain_key_name(const unsigned char *ccnb, struct ccn_parsed_ContentObject *pco)
|
||||
{
|
||||
if (pco->offset[CCN_PCO_B_KeyLocator] == pco->offset[CCN_PCO_E_KeyLocator])
|
||||
return -1;
|
||||
|
||||
struct ccn_buf_decoder decoder;
|
||||
struct ccn_buf_decoder *d;
|
||||
d = ccn_buf_decoder_start(&decoder, ccnb +
|
||||
pco->offset[CCN_PCO_B_Key_Certificate_KeyName],
|
||||
pco->offset[CCN_PCO_E_Key_Certificate_KeyName] -
|
||||
pco->offset[CCN_PCO_B_Key_Certificate_KeyName]);
|
||||
if (ccn_buf_match_dtag(d, CCN_DTAG_KeyName))
|
||||
return 1;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct ccn_charbuf *
|
||||
get_key_name(const unsigned char *ccnb, struct ccn_parsed_ContentObject *pco)
|
||||
{
|
||||
struct ccn_charbuf *key_name = ccn_charbuf_create();
|
||||
ccn_charbuf_append(key_name, ccnb + pco->offset[CCN_PCO_B_KeyName_Name],
|
||||
pco->offset[CCN_PCO_E_KeyName_Name] - pco->offset[CCN_PCO_B_KeyName_Name]);
|
||||
|
||||
return key_name;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
check_for_name_component_in_name(const struct ccn_charbuf *name,
|
||||
const struct ccn_indexbuf *indx,
|
||||
const char *component){
|
||||
|
||||
int res,i;
|
||||
int result_position=0;
|
||||
int name_comps=(int)indx->n;
|
||||
|
||||
for(i=0;i<name_comps;i++){
|
||||
res=ccn_name_comp_strcmp(name->buf,indx,i,component);
|
||||
if( res == 0){
|
||||
|
||||
result_position=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result_position;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
check_for_tag_component_in_name(const struct ccn_charbuf *name,
|
||||
const struct ccn_indexbuf *indx,
|
||||
const char *component){
|
||||
|
||||
int res,i;
|
||||
int result_position=0;
|
||||
int name_comps=(int)indx->n;
|
||||
|
||||
for(i=0;i<name_comps;i++){
|
||||
const unsigned char *comp_ptr;
|
||||
size_t comp_size;
|
||||
res=ccn_name_comp_get(name->buf, indx,i,&comp_ptr, &comp_size);
|
||||
if( res == 0){
|
||||
if ( strstr((char *)comp_ptr,component) != NULL ){
|
||||
result_position=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result_position;
|
||||
}
|
||||
|
||||
enum key_type
|
||||
get_key_type_from_key_name(struct ccn_charbuf *keyname)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("get_key_type_from_key_name called\n");
|
||||
|
||||
int res;
|
||||
int return_key=UNKNOWN_KEY;
|
||||
|
||||
struct ccn_indexbuf *indx=ccn_indexbuf_create();
|
||||
if ( indx == NULL ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Error in creating index for key name \n");
|
||||
return UNKNOWN_KEY;
|
||||
}
|
||||
|
||||
res=ccn_name_split(keyname,indx);
|
||||
if ( res < 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Error in parsing key name \n");
|
||||
ccn_indexbuf_destroy(&indx);
|
||||
return UNKNOWN_KEY;
|
||||
}
|
||||
else if ( res == 3){
|
||||
int chk_ndn=check_for_name_component_in_name(keyname,indx,"ndn");
|
||||
int chk_key=check_for_name_component_in_name(keyname,indx,"keys");
|
||||
if ( chk_ndn == 0 && chk_key == 1)
|
||||
return_key=ROOT_KEY;
|
||||
}
|
||||
else{
|
||||
int check_op,check_rt;
|
||||
check_op=check_for_tag_component_in_name(keyname,indx,
|
||||
"O.N.Start");
|
||||
check_rt=check_for_tag_component_in_name(keyname,indx,
|
||||
"R.N.Start");
|
||||
if ( check_op > 0){
|
||||
return_key=OPERATOR_KEY;
|
||||
}
|
||||
else if(check_rt >0){
|
||||
int check_nlsr;
|
||||
check_nlsr=check_for_name_component_in_name(keyname,indx,
|
||||
"nlsr");
|
||||
if ( check_rt > 0 ){
|
||||
if ( check_nlsr > 0){
|
||||
return_key=NLSR_KEY;
|
||||
}
|
||||
else{
|
||||
return_key=ROUTING_KEY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( check_rt == 0 && check_op == 0 && res > 3){
|
||||
return_key=SITE_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
ccn_indexbuf_destroy(&indx);
|
||||
return return_key;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
get_name_segments_from_name(struct ccn_charbuf *name, int start_indx, int end_indx)
|
||||
{
|
||||
int res;
|
||||
struct ccn_indexbuf *name_comps;
|
||||
struct ccn_charbuf *orig_router;
|
||||
char *name_seg=NULL;
|
||||
|
||||
name_comps = ccn_indexbuf_create();
|
||||
res = ccn_name_split(name, name_comps);
|
||||
if ( res < 0 ){
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
return name_seg;
|
||||
}
|
||||
else{
|
||||
orig_router=ccn_charbuf_create();
|
||||
ccn_name_init(orig_router);
|
||||
ccn_name_append_components(orig_router,name->buf,
|
||||
name_comps->buf[start_indx],
|
||||
name_comps->buf[end_indx]);
|
||||
struct ccn_charbuf *temp1=ccn_charbuf_create();
|
||||
ccn_uri_append(temp1, orig_router->buf, orig_router->length, 0);
|
||||
|
||||
name_seg=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
|
||||
sizeof(char));
|
||||
memcpy(name_seg,ccn_charbuf_as_string(temp1),
|
||||
strlen(ccn_charbuf_as_string(temp1)));
|
||||
name_seg[strlen(name_seg)]='\0';
|
||||
ccn_charbuf_destroy(&orig_router);
|
||||
ccn_charbuf_destroy(&temp1);
|
||||
|
||||
}
|
||||
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
return name_seg;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
get_orig_router_from_key_name(struct ccn_charbuf *name, int more, int type)
|
||||
{
|
||||
int res;
|
||||
struct ccn_indexbuf *name_comps;
|
||||
struct ccn_charbuf *orig_router;
|
||||
char *router=NULL;
|
||||
|
||||
name_comps = ccn_indexbuf_create();
|
||||
res = ccn_name_split(name, name_comps);
|
||||
if ( res < 0 ){
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
return router;
|
||||
}
|
||||
else{
|
||||
res=ccn_name_chop(name, name_comps, -(2-more));
|
||||
if ( more > 0 && type==1)
|
||||
res=ccn_name_chop(name, name_comps, -3);
|
||||
if ( res < 0 ){
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
return NULL;
|
||||
}
|
||||
else{
|
||||
res=check_for_tag_component_in_name(name,name_comps,"R.N.Start");
|
||||
if ( res > 0 ){
|
||||
orig_router=ccn_charbuf_create();
|
||||
ccn_name_init(orig_router);
|
||||
ccn_name_append_components(orig_router,name->buf,
|
||||
name_comps->buf[res+1],
|
||||
name_comps->buf[name_comps->n - 1]);
|
||||
struct ccn_charbuf *temp1=ccn_charbuf_create();
|
||||
ccn_uri_append(temp1, orig_router->buf, orig_router->length, 0);
|
||||
|
||||
router=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
|
||||
sizeof(char));
|
||||
memcpy(router,ccn_charbuf_as_string(temp1),
|
||||
strlen(ccn_charbuf_as_string(temp1)));
|
||||
router[strlen(router)]='\0';
|
||||
ccn_charbuf_destroy(&temp1);
|
||||
ccn_charbuf_destroy(&orig_router);
|
||||
}
|
||||
else{
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
return router;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#ifndef _NLSR_KM_UTIL_H_
|
||||
#define _NLSR_KM_UTIL_H_
|
||||
|
||||
int
|
||||
contain_key_name(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco);
|
||||
|
||||
struct ccn_charbuf *
|
||||
get_key_name(const unsigned char *ccnb,
|
||||
struct ccn_parsed_ContentObject *pco);
|
||||
|
||||
int
|
||||
check_for_name_component_in_name(const struct ccn_charbuf *name,
|
||||
const struct ccn_indexbuf *indx,
|
||||
const char *component);
|
||||
int
|
||||
check_for_tag_component_in_name(const struct ccn_charbuf *name,
|
||||
const struct ccn_indexbuf *indx,
|
||||
const char *component);
|
||||
enum key_type
|
||||
get_key_type_from_key_name(struct ccn_charbuf *keyname);
|
||||
|
||||
|
||||
int
|
||||
appendLifetime(struct ccn_charbuf *cb, int lifetime);
|
||||
|
||||
char *
|
||||
get_orig_router_from_key_name(struct ccn_charbuf *name, int more, int type);
|
||||
|
||||
|
||||
|
||||
char *
|
||||
get_name_segments_from_name(struct ccn_charbuf *name,
|
||||
int start_indx, int end_indx);
|
||||
|
||||
#endif
|
||||
-2862
File diff suppressed because it is too large.
Load diff
-110
@@ -1,110 +0,0 @@
|
||||
#ifndef _NLSR_LSDB_H_
|
||||
#define _NLSR_LSDB_H_
|
||||
|
||||
#define LS_TYPE_ADJ 1
|
||||
#define LS_TYPE_NAME 2
|
||||
#define LS_TYPE_COR 3
|
||||
|
||||
struct link
|
||||
{
|
||||
struct name_prefix *nbr;
|
||||
int face;
|
||||
int metric;
|
||||
};
|
||||
|
||||
|
||||
struct alsa_header
|
||||
{
|
||||
unsigned int ls_type;
|
||||
char *orig_time;
|
||||
struct name_prefix *orig_router;
|
||||
|
||||
};
|
||||
|
||||
struct alsa
|
||||
{
|
||||
struct alsa_header *header;
|
||||
int no_link;
|
||||
struct link *links;
|
||||
char * body;
|
||||
};
|
||||
|
||||
struct nlsa_header
|
||||
{
|
||||
unsigned int ls_type;
|
||||
char *orig_time;
|
||||
long int ls_id;
|
||||
struct name_prefix *orig_router;
|
||||
unsigned int isValid;
|
||||
|
||||
};
|
||||
|
||||
struct nlsa
|
||||
{
|
||||
struct nlsa_header *header;
|
||||
struct name_prefix *name_prefix;
|
||||
};
|
||||
|
||||
struct clsa
|
||||
{
|
||||
struct alsa_header *header;
|
||||
double cor_r;
|
||||
double cor_theta;
|
||||
};
|
||||
|
||||
|
||||
void set_new_lsdb_version(void);
|
||||
void build_and_install_name_lsas(void);
|
||||
void build_and_install_single_name_lsa(struct name_prefix *np);
|
||||
void build_name_lsa(struct nlsa *name_lsa, struct name_prefix *np);
|
||||
void install_name_lsa(struct nlsa *name_lsa);
|
||||
void print_name_lsa(struct nlsa *name_lsa);
|
||||
void write_log_for_name_lsa(struct nlsa *name_lsa);
|
||||
void print_name_lsdb(void);
|
||||
void build_and_install_others_name_lsa(char *orig_router,int ls_type,long int ls_id,char *orig_time, int isValid,char *np);
|
||||
void build_others_name_lsa(struct nlsa *name_lsa, char *orig_router,int ls_type,long int ls_id, char *orig_time, int isValid, char *np);
|
||||
void make_name_lsa_key(char *key, char *orig_router, int ls_type, long int ls_id);
|
||||
int refresh_lsdb(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
|
||||
|
||||
int build_and_install_adj_lsa(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
|
||||
void build_adj_lsa(struct alsa * adj_lsa);
|
||||
void install_adj_lsa(struct alsa * adj_lsa);
|
||||
void print_adj_lsa_body(const char *body, int no_link);
|
||||
void print_adj_lsa(struct alsa * adj_lsa);
|
||||
void write_log_for_adj_lsa(struct alsa * adj_lsa);
|
||||
void print_adj_lsdb(void);
|
||||
void make_adj_lsa_key(char *key,struct alsa *adj_lsa);
|
||||
void build_and_install_others_adj_lsa(char *orig_router,int ls_type,char *orig_time, int no_link,char *data);
|
||||
void build_others_adj_lsa(struct alsa *adj_lsa,char *orig_router,int ls_type,char *orig_time,int no_link,char *data);
|
||||
|
||||
long int get_name_lsdb_num_element(void);
|
||||
long int get_adj_lsdb_num_element(void);
|
||||
|
||||
int check_is_new_name_lsa(char *orig_router,char *lst,char *lsid,char *orig_time);
|
||||
int check_is_new_adj_lsa(char *orig_router,char *lst,char *orig_time);
|
||||
int check_is_new_cor_lsa(char *orig_router,char *lst,char *orig_time);
|
||||
|
||||
void get_name_lsa_data(struct ccn_charbuf *lsa_data,struct name_prefix *lsaId);
|
||||
void get_adj_lsa_data(struct ccn_charbuf *lsa_data,struct name_prefix *lsaId);
|
||||
|
||||
void make_name_lsa_invalid(struct name_prefix *np,int ls_type, long int ls_id);
|
||||
|
||||
void build_and_install_cor_lsa();
|
||||
void print_cor_lsdb();
|
||||
|
||||
void write_name_lsdb_to_repo(char *slice_prefix);
|
||||
void write_name_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id);
|
||||
void make_name_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, long int ls_id,char *orig_time,char *slice_prefix);
|
||||
void write_adj_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id);
|
||||
|
||||
void write_cor_lsa_to_repo(struct clsa *cor_lsa);
|
||||
void build_and_install_others_cor_lsa(char *orig_router,int ls_type,char *orig_time, double cor_r, double cor_theta);
|
||||
double get_hyperbolic_r(char *router);
|
||||
double get_hyperbolic_theta(char *router);
|
||||
|
||||
void destroy_lsdb(void);
|
||||
|
||||
void
|
||||
get_lsdb_summary(struct ccn_charbuf *lsdb_data);
|
||||
|
||||
#endif
|
||||
-1301
File diff suppressed because it is too large.
Load diff
-31
@@ -1,31 +0,0 @@
|
||||
#ifndef _NLSR_NDN_H_
|
||||
#define _NLSR_NDN_H_
|
||||
|
||||
int appendLifetime(struct ccn_charbuf *cb, int lifetime);
|
||||
void get_nbr(struct name_prefix *nbr,struct ccn_closure *selfp, struct ccn_upcall_info *info);
|
||||
void get_lsa_identifier(struct name_prefix *lsaId,struct ccn_closure *selfp, struct ccn_upcall_info *info,int offset);
|
||||
//void get_lsdb_version(char *lsdb_version,struct ccn_closure *selfp, struct ccn_upcall_info *info );
|
||||
//int get_ls_type(struct ccn_closure *selfp, struct ccn_upcall_info *info);
|
||||
|
||||
enum ccn_upcall_res incoming_interest(struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info);
|
||||
void process_incoming_interest(struct ccn_closure *selfp, struct ccn_upcall_info *info);
|
||||
void process_incoming_interest_info(struct ccn_closure *selfp, struct ccn_upcall_info *info);
|
||||
|
||||
enum ccn_upcall_res incoming_content(struct ccn_closure* selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info* info);
|
||||
void process_incoming_content(struct ccn_closure *selfp, struct ccn_upcall_info* info);
|
||||
void process_incoming_content_info(struct ccn_closure *selfp, struct ccn_upcall_info* info);
|
||||
|
||||
void process_incoming_timed_out_interest(struct ccn_closure* selfp, struct ccn_upcall_info* info);
|
||||
void process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct ccn_upcall_info* info);
|
||||
|
||||
int send_info_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
|
||||
void send_info_interest_to_neighbor(struct name_prefix *nbr);
|
||||
|
||||
|
||||
|
||||
void process_incoming_interest_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info *info);
|
||||
void process_incoming_interest_lsa(struct ccn_closure *selfp, struct ccn_upcall_info *info);
|
||||
|
||||
int send_lsdb_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
|
||||
|
||||
#endif
|
||||
-199
@@ -1,199 +0,0 @@
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/time.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/keystore.h>
|
||||
#include <ccn/signing.h>
|
||||
#include <ccn/schedule.h>
|
||||
#include <ccn/hashtb.h>
|
||||
|
||||
#include "nlsr.h"
|
||||
#include "nlsr_npl.h"
|
||||
#include "utility.h"
|
||||
|
||||
|
||||
|
||||
void
|
||||
add_name_to_npl(struct name_prefix *np)
|
||||
{
|
||||
struct name_prefix_list_entry *npe;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
int res;
|
||||
|
||||
hashtb_start(nlsr->npl, e);
|
||||
res = hashtb_seek(e, np->name, np->length, 0);
|
||||
|
||||
if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
npe=e->data;
|
||||
npe->np=(struct name_prefix *)calloc(1,sizeof(struct name_prefix ));
|
||||
npe->np->length=np->length;
|
||||
npe->np->name=(char *)calloc(np->length,sizeof(char));
|
||||
memcpy(npe->np->name,np->name,np->length);
|
||||
npe->name_lsa_id=0;
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
does_name_exist_in_npl(struct name_prefix *np)
|
||||
{
|
||||
int ret=0;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
int res;
|
||||
|
||||
hashtb_start(nlsr->npl, e);
|
||||
res = hashtb_seek(e, np->name, np->length, 0);
|
||||
|
||||
if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
ret=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret=1;
|
||||
}
|
||||
hashtb_end(e);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
long int
|
||||
get_lsa_id_from_npl(struct name_prefix *np)
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
struct name_prefix_list_entry *npe;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
int res;
|
||||
|
||||
hashtb_start(nlsr->npl, e);
|
||||
res = hashtb_seek(e, np->name, np->length, 0);
|
||||
|
||||
if(res == HT_NEW_ENTRY)
|
||||
{
|
||||
hashtb_delete(e);
|
||||
ret=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
npe=e->data;
|
||||
ret=npe->name_lsa_id;
|
||||
}
|
||||
hashtb_end(e);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
print_name_prefix_from_npl(void)
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("print_name_prefix_from_npl called \n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_name_prefix_from_npl called\n");
|
||||
int i, npl_element;
|
||||
//struct name_prefix *np;
|
||||
struct name_prefix_list_entry *npe;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->npl, e);
|
||||
npl_element=hashtb_n(nlsr->npl);
|
||||
|
||||
for(i=0;i<npl_element;i++)
|
||||
{
|
||||
npe=e->data;
|
||||
if ( nlsr->debugging )
|
||||
printf("Name Prefix: %s and Length: %d and LSA Id: %ld\n",npe->np->name,npe->np->length,npe->name_lsa_id);
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Name Prefix: %s and Length: %d \n",npe->np->name,npe->np->length);
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("\n");
|
||||
if ( nlsr->detailed_logging )
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
|
||||
}
|
||||
|
||||
void
|
||||
update_nlsa_id_for_name_in_npl(struct name_prefix *np, long int nlsa_id)
|
||||
{
|
||||
struct name_prefix_list_entry *npe;
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
int res;
|
||||
|
||||
hashtb_start(nlsr->npl, e);
|
||||
res = hashtb_seek(e, np->name, np->length, 0);
|
||||
|
||||
if(res == HT_OLD_ENTRY)
|
||||
{
|
||||
npe=e->data;
|
||||
npe->name_lsa_id=nlsa_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
hashtb_delete(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
}
|
||||
|
||||
void
|
||||
destroy_npl_entry_component(struct name_prefix_list_entry *npe)
|
||||
{
|
||||
if (npe->np->name)
|
||||
free(npe->np->name);
|
||||
if(npe->np)
|
||||
free(npe->np);
|
||||
}
|
||||
|
||||
void
|
||||
destroy_npl(void)
|
||||
{
|
||||
int i, npl_element;
|
||||
struct name_prefix_list_entry *npe;
|
||||
|
||||
struct hashtb_enumerator ee;
|
||||
struct hashtb_enumerator *e = ⅇ
|
||||
|
||||
hashtb_start(nlsr->npl, e);
|
||||
npl_element=hashtb_n(nlsr->npl);
|
||||
|
||||
for(i=0;i<npl_element;i++)
|
||||
{
|
||||
npe=e->data;
|
||||
destroy_npl_entry_component(npe);
|
||||
hashtb_next(e);
|
||||
}
|
||||
|
||||
hashtb_end(e);
|
||||
|
||||
if ( nlsr->npl)
|
||||
hashtb_destroy(&nlsr->npl);
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
#ifndef _NLSR_NPL_H_
|
||||
#define _NLSR_NPL_H_
|
||||
|
||||
struct name_prefix_list_entry
|
||||
{
|
||||
struct name_prefix *np;
|
||||
long int name_lsa_id;
|
||||
};
|
||||
|
||||
void add_name_to_npl(struct name_prefix *np);
|
||||
void print_name_prefix_from_npl(void);
|
||||
int does_name_exist_in_npl(struct name_prefix *np);
|
||||
void update_nlsa_id_for_name_in_npl(struct name_prefix *np, long int nlsa_id);
|
||||
long int get_lsa_id_from_npl(struct name_prefix *np);
|
||||
void destroy_npl(void);
|
||||
void destroy_npl_entry_component(struct name_prefix_list_entry *npe);
|
||||
#endif
|
||||
-1152
File diff suppressed because it is too large.
Load diff
-33
@@ -1,33 +0,0 @@
|
||||
#ifndef _NLSR_NPT_H_
|
||||
#define _NLSR_NPT_H_
|
||||
|
||||
#define NO_FACE -12345
|
||||
#define ZERO_FACE 0
|
||||
|
||||
struct npt_entry
|
||||
{
|
||||
char *orig_router;
|
||||
struct hashtb *name_list;
|
||||
struct hashtb *face_list;
|
||||
};
|
||||
|
||||
struct name_list_entry
|
||||
{
|
||||
char *name;
|
||||
};
|
||||
|
||||
|
||||
int add_npt_entry(char *orig_router, char *name_prefix, int num_face, int *faces, int *route_costs);
|
||||
int delete_npt_entry_by_router_and_name_prefix(char *orig_router, char *name_prefix);
|
||||
void print_npt(void);
|
||||
void delete_orig_router_from_npt(char *orig_router);
|
||||
void update_npt_with_new_route(void);
|
||||
void destroy_all_face_by_nlsr(void);
|
||||
void sort_faces_by_distance(int *faces,int *route_costs,int start,int element);
|
||||
void update_ccnd_fib_for_orig_router(char *orig_router);
|
||||
void get_all_faces_for_orig_router_from_npt(char *orig_router, int *faces, int *route_costs, int num_faces);
|
||||
void destroy_name_list(struct hashtb *name_list);
|
||||
void destroy_face_list(struct hashtb *face_list);
|
||||
void destroy_npt(void);
|
||||
|
||||
#endif
|
||||
-1489
File diff suppressed because it is too large.
Load diff
@@ -1,76 +0,0 @@
|
||||
#ifndef _NLSR_ROUTE_H_
|
||||
#define _NLSR_ROUTE_H_
|
||||
|
||||
#define EMPTY_PARENT -12345
|
||||
#define INF_DISTANCE 2147483647
|
||||
|
||||
#define NO_NEXT_HOP -12345
|
||||
#define NO_MAPPING_NUM -1
|
||||
|
||||
struct map_entry
|
||||
{
|
||||
char *router;
|
||||
int mapping;
|
||||
};
|
||||
|
||||
|
||||
struct routing_table_entry
|
||||
{
|
||||
char *dest_router;
|
||||
struct hashtb *face_list;
|
||||
};
|
||||
|
||||
struct face_list_entry
|
||||
{
|
||||
int next_hop_face;
|
||||
double route_cost;
|
||||
};
|
||||
|
||||
int route_calculate(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
|
||||
void make_map(void);
|
||||
void add_map_entry(char *router);
|
||||
void add_adj_data_to_map(char *orig_router, char *body, int no_link);
|
||||
void print_map(void);
|
||||
void assign_mapping_number(void);
|
||||
void make_adj_matrix(int **adj_matrix,int map_element);
|
||||
void init_adj_matrix(int **adj_matrix,int map_element);
|
||||
void print_adj_matrix(int **adj_matrix, int map_element);
|
||||
int get_mapping_no(char *router);
|
||||
void calculate_path(int **adj_matrix, long int *parent,long int *dist, long int V, long int S);
|
||||
void sort_queue_by_distance(long int *Q,long int *dist,long int start,long int element);
|
||||
int is_not_explored(long int *Q, long int u,long int start, long int element);
|
||||
void print_path(long int *parent, long int dest);
|
||||
void print_all_path_from_source(long int *parent,long int source);
|
||||
void add_rev_map_entry(long int mapping_number, char *router);
|
||||
void print_rev_map(void);
|
||||
char * get_router_from_rev_map(long int mapping_number);
|
||||
int get_no_link_from_adj_matrix(int **adj_matrix,long int V, long int S);
|
||||
void get_links_from_adj_matrix(int **adj_matrix, long int V ,long int *links, long int *link_costs,long int S);
|
||||
void adjust_adj_matrix(int **adj_matrix, long int V, long int S, long int link,long int link_cost);
|
||||
|
||||
/* Routing Table Relates function */
|
||||
|
||||
int get_next_hop(char *dest_router,int *faces, int *route_costs);
|
||||
int get_number_of_next_hop(char *dest_router);
|
||||
void add_next_hop_router(char *dest_router);
|
||||
void add_next_hop_from_lsa_adj_body(char *body, int no_link);
|
||||
void print_routing_table(void);
|
||||
void do_old_routing_table_updates(void);
|
||||
void clear_old_routing_table(void);
|
||||
void update_routing_table_with_new_route(long int *parent,long int *dist, long int source);
|
||||
|
||||
long int get_next_hop_from_calculation(long int *parent, long int dest,long int source);
|
||||
void print_all_next_hop(long int *parent,long int source);
|
||||
int does_face_exist_for_router(char *dest_router, int face_id);
|
||||
|
||||
double get_hyperbolic_distance(long int source, long int dest);
|
||||
void sort_hyperbolic_route(double *dist_dest,double *dist_nbr, long int *faces,long int start,long int element);
|
||||
void update_routing_table_with_new_hyperbolic_route(long int dest_router_rev_map_index, long int face, double nbr_to_dest_dist);
|
||||
|
||||
void destroy_routing_table_entry_comp(struct routing_table_entry *rte);
|
||||
void destroy_routing_table_entry(struct routing_table_entry *rte);
|
||||
void destroy_routing_table(void);
|
||||
void destroy_map(void);
|
||||
void destroy_rev_map(void);
|
||||
|
||||
#endif
|
||||
-874
@@ -1,874 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <ccn/ccn.h>
|
||||
#include <ccn/uri.h>
|
||||
#include <ccn/keystore.h>
|
||||
#include <ccn/signing.h>
|
||||
#include <ccn/schedule.h>
|
||||
#include <ccn/hashtb.h>
|
||||
#include <ccn/sync.h>
|
||||
#include <ccn/seqwriter.h>
|
||||
|
||||
#include "nlsr.h"
|
||||
#include "nlsr_sync.h"
|
||||
#include "nlsr_lsdb.h"
|
||||
#include "utility.h"
|
||||
#include "nlsr_km.h"
|
||||
#include "nlsr_km_util.h"
|
||||
|
||||
|
||||
char *
|
||||
hex_string(unsigned char *s, size_t l)
|
||||
{
|
||||
const char *hex_digits = "0123456789abcdef";
|
||||
char *r;
|
||||
int i;
|
||||
r = calloc(1, 1 + 2 * l);
|
||||
for (i = 0; i < l; i++) {
|
||||
r[2*i] = hex_digits[(s[i]>>4) & 0xf];
|
||||
r[1+2*i] = hex_digits[s[i] & 0xf];
|
||||
}
|
||||
return(r);
|
||||
}
|
||||
|
||||
/**
|
||||
* call back function from sync. Receive notification of updates in sync.
|
||||
* This function calls process_content_from_sync to handle incoming content
|
||||
* from sync.
|
||||
*/
|
||||
|
||||
int
|
||||
sync_cb(struct ccns_name_closure *nc,
|
||||
struct ccn_charbuf *lhash,
|
||||
struct ccn_charbuf *rhash,
|
||||
struct ccn_charbuf *name)
|
||||
{
|
||||
nlsr_lock();
|
||||
int res;
|
||||
struct ccn_charbuf *content_name;
|
||||
struct ccn_indexbuf *content_comps;
|
||||
struct ccn_indexbuf *name_comps;
|
||||
|
||||
content_comps = ccn_indexbuf_create();
|
||||
res = ccn_name_split(name, content_comps);
|
||||
if ( res < 0 )
|
||||
return 0;
|
||||
|
||||
if (content_comps->n < 2)
|
||||
return 0;
|
||||
|
||||
content_name = ccn_charbuf_create();
|
||||
ccn_name_init(content_name);
|
||||
|
||||
res = ccn_name_append_components( content_name, name->buf,
|
||||
content_comps->buf[0], content_comps->buf[content_comps->n - 1]);
|
||||
|
||||
if ( res < 0)
|
||||
return 0;
|
||||
|
||||
// for debugging
|
||||
struct ccn_charbuf *temp=ccn_charbuf_create();
|
||||
ccn_uri_append(temp, content_name->buf, content_name->length, 0);
|
||||
if ( nlsr->debugging )
|
||||
printf("Name before chopping: %s \n",ccn_charbuf_as_string(temp));
|
||||
ccn_charbuf_destroy(&temp);
|
||||
|
||||
name_comps = ccn_indexbuf_create();
|
||||
res=ccn_name_split (content_name, name_comps);
|
||||
if (res < 0)
|
||||
return 0;
|
||||
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf("Number of components in name = %d \n",res);
|
||||
printf("Number of components in name as indexbuf->n = %d \n",
|
||||
(int)name_comps->n);
|
||||
}
|
||||
|
||||
ccn_name_chop(content_name, name_comps, -3);
|
||||
if ( nlsr->debugging )
|
||||
printf("Number of components in name as indexbuf->n after chopping= %d \n"
|
||||
, (int)name_comps->n);
|
||||
|
||||
//for debugging
|
||||
struct ccn_charbuf *temp1=ccn_charbuf_create();
|
||||
ccn_uri_append(temp1, content_name->buf, content_name->length, 0);
|
||||
if ( nlsr->debugging )
|
||||
printf("Name after chopping: %s \n",ccn_charbuf_as_string(temp1));
|
||||
ccn_charbuf_destroy(&temp1);
|
||||
|
||||
//main method that processes contents from the sync
|
||||
process_content_from_sync(content_name, name_comps);
|
||||
|
||||
ccn_charbuf_destroy(&content_name);
|
||||
ccn_indexbuf_destroy(&content_comps);
|
||||
ccn_indexbuf_destroy(&name_comps);
|
||||
|
||||
nlsr_unlock();
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* this function retrieve part of name from interest name and put it in name_part
|
||||
*/
|
||||
|
||||
void
|
||||
get_name_part(struct name_prefix *name_part,struct ccn_charbuf * interest_ccnb,
|
||||
struct ccn_indexbuf *interest_comps, int offset)
|
||||
{
|
||||
int lsa_position=0;
|
||||
|
||||
struct ccn_indexbuf *components=ccn_indexbuf_create();
|
||||
struct ccn_charbuf *name=ccn_charbuf_create();
|
||||
ccn_name_from_uri(name,nlsr->slice_prefix);
|
||||
ccn_name_split (name, components);
|
||||
lsa_position=components->n-2;
|
||||
ccn_charbuf_destroy(&name);
|
||||
|
||||
struct ccn_charbuf *temp=ccn_charbuf_create();
|
||||
ccn_name_init(temp);
|
||||
ccn_name_append_components( temp, interest_ccnb->buf,
|
||||
interest_comps->buf[lsa_position+1],
|
||||
interest_comps->buf[interest_comps->n - 1]);
|
||||
|
||||
struct ccn_charbuf *temp1=ccn_charbuf_create();
|
||||
ccn_uri_append(temp1, temp->buf, temp->length, 0);
|
||||
|
||||
name_part->name=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
|
||||
sizeof(char));
|
||||
memcpy(name_part->name,ccn_charbuf_as_string(temp1),
|
||||
strlen(ccn_charbuf_as_string(temp1)));
|
||||
name_part->name[strlen(ccn_charbuf_as_string(temp1))]='\0';
|
||||
name_part->length=strlen(ccn_charbuf_as_string(temp1))+1;
|
||||
|
||||
ccn_charbuf_destroy(&temp1);
|
||||
ccn_charbuf_destroy(&temp);
|
||||
ccn_indexbuf_destroy(&components);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("Name Part: %s \n",name_part->name);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get content value by content name and put the content value in content_data
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
get_content_by_content_name(char *content_name, unsigned char **content_data,
|
||||
char *orig_router)
|
||||
{
|
||||
|
||||
int ret=-1;
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_charbuf *templ = NULL;
|
||||
struct ccn_charbuf *resultbuf = NULL;
|
||||
struct ccn_parsed_ContentObject pcobuf = { 0 };
|
||||
int res;
|
||||
int allow_stale = 1;
|
||||
int content_only = 1;
|
||||
int scope = -1;
|
||||
const unsigned char *ptr,*ptr_in;
|
||||
size_t length,length_in;
|
||||
int resolve_version = CCN_V_HIGHEST;
|
||||
int timeout_ms = 3000;
|
||||
const unsigned lifetime_default = CCN_INTEREST_LIFETIME_SEC << 12;
|
||||
unsigned lifetime_l12 = lifetime_default;
|
||||
int get_flags = 0;
|
||||
|
||||
name = ccn_charbuf_create();
|
||||
res = ccn_name_from_uri(name,content_name);
|
||||
if (res < 0) {
|
||||
fprintf(stderr, "Bad ccn URI: %s\n", content_name);
|
||||
ccn_charbuf_destroy(&name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (allow_stale || lifetime_l12 != lifetime_default || scope != -1) {
|
||||
templ = ccn_charbuf_create();
|
||||
ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
|
||||
ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
|
||||
ccn_charbuf_append_closer(templ); /* </Name> */
|
||||
if (allow_stale) {
|
||||
ccn_charbuf_append_tt(templ, CCN_DTAG_AnswerOriginKind, CCN_DTAG);
|
||||
ccnb_append_number(templ,
|
||||
CCN_AOK_DEFAULT | CCN_AOK_STALE);
|
||||
ccn_charbuf_append_closer(templ); /* </AnswerOriginKind> */
|
||||
}
|
||||
if (scope != -1) {
|
||||
ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
|
||||
}
|
||||
if (lifetime_l12 != lifetime_default) {
|
||||
/*
|
||||
* Choose the interest lifetime so there are at least 3
|
||||
* expressions (in the unsatisfied case).
|
||||
*/
|
||||
unsigned char buf[3] = { 0 };
|
||||
int i;
|
||||
for (i = sizeof(buf) - 1; i >= 0; i--, lifetime_l12 >>= 8)
|
||||
buf[i] = lifetime_l12 & 0xff;
|
||||
ccnb_append_tagged_blob(templ, CCN_DTAG_InterestLifetime, buf,
|
||||
sizeof(buf));
|
||||
}
|
||||
ccn_charbuf_append_closer(templ); /* </Interest> */
|
||||
}
|
||||
resultbuf = ccn_charbuf_create();
|
||||
if (resolve_version != 0) {
|
||||
res = ccn_resolve_version(nlsr->ccn, name, resolve_version, 500);
|
||||
if (res >= 0) {
|
||||
ccn_uri_append(resultbuf, name->buf, name->length, 1);
|
||||
resultbuf->length = 0;
|
||||
}
|
||||
}
|
||||
res = ccn_get(nlsr->ccn, name, templ, timeout_ms, resultbuf, &pcobuf, NULL,
|
||||
get_flags);
|
||||
if (res >= 0) {
|
||||
ptr = resultbuf->buf;
|
||||
length = resultbuf->length;
|
||||
if (content_only){
|
||||
ccn_content_get_value(ptr, length, &pcobuf, &ptr, &length);
|
||||
struct ccn_parsed_ContentObject pcobuf1 = { 0 };
|
||||
int chk_cont=ccn_parse_ContentObject(ptr,length,&pcobuf1,NULL);
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Parsing result: %d\n",chk_cont);
|
||||
if ( contain_key_name(ptr, &pcobuf1) == 1){
|
||||
int res_verify=-1;
|
||||
int key_exists=0;
|
||||
struct ccn_charbuf *key_name=get_key_name(ptr, &pcobuf1);
|
||||
struct ccn_charbuf *key_uri = ccn_charbuf_create();
|
||||
ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
|
||||
key_exists=does_key_exist(ccn_charbuf_as_string(key_uri));
|
||||
int key_type=get_key_type_from_key_name(key_name);
|
||||
|
||||
if ( key_exists == 1 && key_type == NLSR_KEY ){
|
||||
res_verify=0;
|
||||
}
|
||||
else{
|
||||
res_verify=verify_key(ptr,&pcobuf1,1);
|
||||
}
|
||||
|
||||
if ( res_verify != 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Error in verfiying keys !! :( \n");
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&key_uri);
|
||||
}
|
||||
else{
|
||||
if ( key_exists == 0 )
|
||||
add_key(ccn_charbuf_as_string(key_uri));
|
||||
ccn_charbuf_destroy(&key_name);
|
||||
ccn_charbuf_destroy(&key_uri);
|
||||
if ( nlsr->debugging )
|
||||
printf("Key verification is successful :)\n");
|
||||
ptr_in=ptr;
|
||||
length_in=length;
|
||||
ccn_content_get_value(ptr_in, length_in, &pcobuf1,
|
||||
&ptr_in, &length_in);
|
||||
*content_data = (unsigned char *) calloc(length_in+1,
|
||||
sizeof(char *));
|
||||
memcpy (*content_data, ptr_in, length_in);
|
||||
ret=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
ccn_charbuf_destroy(&templ);
|
||||
ccn_charbuf_destroy(&name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle incoming lsa content, Calls functions to install lsa into lsdb
|
||||
*/
|
||||
|
||||
void
|
||||
process_incoming_sync_content_lsa( unsigned char *content_data)
|
||||
{
|
||||
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("process_incoming_sync_content_lsa called \n");
|
||||
|
||||
char *sep="|";
|
||||
char *rem;
|
||||
char *orig_router;
|
||||
char *orl;
|
||||
int orig_router_length;
|
||||
char *lst;
|
||||
int ls_type;
|
||||
char *lsid;
|
||||
long int ls_id;
|
||||
char *isvld;
|
||||
int isValid;
|
||||
char *num_link;
|
||||
int no_link;
|
||||
char *np;
|
||||
char *np_length;
|
||||
int name_length;
|
||||
char *data;
|
||||
char *orig_time;
|
||||
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("LSA Data \n");
|
||||
|
||||
if( strlen((char *)content_data ) > 0 )
|
||||
{
|
||||
|
||||
orig_router=strtok_r((char *)content_data,sep,&rem);
|
||||
orl=strtok_r(NULL,sep,&rem);
|
||||
orig_router_length=atoi(orl);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf(" Orig Router Name : %s\n",orig_router);
|
||||
printf(" Orig Router Length: %d\n",orig_router_length);
|
||||
}
|
||||
|
||||
lst=strtok_r(NULL,sep,&rem);
|
||||
ls_type=atoi(lst);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf(" LS Type : %d\n",ls_type);
|
||||
|
||||
if ( ls_type == LS_TYPE_NAME )
|
||||
{
|
||||
lsid=strtok_r(NULL,sep,&rem);
|
||||
ls_id=atoi(lsid);
|
||||
orig_time=strtok_r(NULL,sep,&rem);
|
||||
isvld=strtok_r(NULL,sep,&rem);
|
||||
isValid=atoi(isvld);
|
||||
np=strtok_r(NULL,sep,&rem);
|
||||
np_length=strtok_r(NULL,sep,&rem);
|
||||
name_length=atoi(np_length);
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf(" LS ID : %ld\n",ls_id);
|
||||
printf(" isValid : %d\n",isValid);
|
||||
printf(" Name Prefix : %s\n",np);
|
||||
printf(" Orig Time : %s\n",orig_time);
|
||||
printf(" Name Prefix length: %d\n",name_length);
|
||||
}
|
||||
|
||||
build_and_install_others_name_lsa(orig_router,ls_type,ls_id,
|
||||
orig_time,isValid,np);
|
||||
|
||||
print_name_lsdb();
|
||||
|
||||
}
|
||||
else if ( ls_type == LS_TYPE_ADJ )
|
||||
{
|
||||
orig_time=strtok_r(NULL,sep,&rem);
|
||||
num_link=strtok_r(NULL,sep,&rem);
|
||||
no_link=atoi(num_link);
|
||||
data=rem;
|
||||
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf(" Orig Time : %s\n",orig_time);
|
||||
printf(" No Link : %d\n",no_link);
|
||||
printf(" Data : %s\n",data);
|
||||
}
|
||||
build_and_install_others_adj_lsa(orig_router,ls_type,orig_time,
|
||||
no_link,data);
|
||||
}
|
||||
else if ( ls_type == LS_TYPE_COR )
|
||||
{
|
||||
orig_time=strtok_r(NULL,sep,&rem);
|
||||
char *cor_r=strtok_r(NULL,sep,&rem);
|
||||
char *cor_theta=strtok_r(NULL,sep,&rem);
|
||||
|
||||
double r, theta;
|
||||
r=strtod(cor_r,NULL);
|
||||
theta=strtod(cor_theta,NULL);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf(" Orig Time : %s\n",orig_time);
|
||||
printf(" Cor R : %f\n",r);
|
||||
printf(" Cor Theta : %f\n",theta);
|
||||
}
|
||||
build_and_install_others_cor_lsa(orig_router,ls_type,orig_time,
|
||||
(double)r, (double)theta);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check LSA whether its new. If new retrieve the LSA content and call
|
||||
* process_incoming_sync_content_lsa with content_data
|
||||
*/
|
||||
|
||||
void
|
||||
process_content_from_sync (struct ccn_charbuf *content_name,
|
||||
struct ccn_indexbuf *components)
|
||||
{
|
||||
if (nlsr->debugging)
|
||||
printf("process_content_from_sync called \n");
|
||||
size_t comp_size;
|
||||
char *lst;
|
||||
char *lsid;
|
||||
const unsigned char *second_last_comp;
|
||||
const unsigned char *third_last_comp;
|
||||
const unsigned char *origtime;
|
||||
char *sep=".";
|
||||
char *rem;
|
||||
char *second_comp_type;
|
||||
|
||||
int ls_type;
|
||||
long int ls_id=0;
|
||||
|
||||
unsigned char *content_data = NULL;
|
||||
|
||||
char *time_stamp=get_current_timestamp_micro_v2();
|
||||
|
||||
struct ccn_charbuf *uri = ccn_charbuf_create();
|
||||
ccn_uri_append(uri, content_name->buf, content_name->length, 0);
|
||||
|
||||
struct name_prefix *orig_router=(struct name_prefix *)
|
||||
calloc( 1, sizeof(struct name_prefix));
|
||||
|
||||
ccn_name_comp_get( content_name->buf, components,
|
||||
components->n-1-2, &second_last_comp, &comp_size);
|
||||
|
||||
if (nlsr->debugging)
|
||||
printf("2nd Last Component: %s \n", second_last_comp);
|
||||
|
||||
second_comp_type=strtok_r((char *)second_last_comp, sep, &rem);
|
||||
if (second_comp_type == NULL || rem == NULL)
|
||||
{
|
||||
printf ("Error: unable to tokenize the string: %s, calling exit()\n",
|
||||
(char *)second_last_comp);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ( strcmp( second_comp_type, "lsId" ) == 0 )
|
||||
{
|
||||
lsid=rem;
|
||||
ls_id=atoi(rem);
|
||||
ccn_name_comp_get(content_name->buf, components,components->n-2-2,
|
||||
&third_last_comp, &comp_size);
|
||||
lst=strtok_r((char *)third_last_comp,sep,&rem);
|
||||
lst=rem;
|
||||
ls_type=atoi(lst);
|
||||
ccn_name_comp_get(content_name->buf, components,components->n-2,
|
||||
&origtime, &comp_size);
|
||||
ccn_name_chop(content_name,components,-3);
|
||||
get_name_part(orig_router,content_name,components,0);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("Orig Router: %s Ls Type: %d Ls id: %ld Orig Time: %s\n",
|
||||
orig_router->name,ls_type,ls_id,origtime);
|
||||
|
||||
int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
|
||||
if ( nlsr->debugging )
|
||||
printf("LSA Life time: %d\n",lsa_life_time);
|
||||
|
||||
if ( strcmp(orig_router->name,nlsr->router_name) != 0
|
||||
&& (lsa_life_time < nlsr->router_dead_interval) )
|
||||
{
|
||||
int is_new_name_lsa=check_is_new_name_lsa(orig_router->name,
|
||||
(char *)lst,(char *)lsid,(char *)origtime);
|
||||
if ( is_new_name_lsa == 1 )
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("New NAME LSA.....\n");
|
||||
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
|
||||
&content_data,orig_router->name);
|
||||
if ( chk_con == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Data: %s \n",content_data);
|
||||
process_incoming_sync_content_lsa(content_data);
|
||||
}
|
||||
else{
|
||||
if ( nlsr->debugging )
|
||||
printf("Verification failed. No content given back\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("Name LSA / Newer Name LSA already xists in LSDB\n");
|
||||
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri)
|
||||
, &content_data,orig_router->name);
|
||||
|
||||
if ( chk_con == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Data: %s \n",content_data);
|
||||
process_incoming_sync_content_lsa(content_data);
|
||||
}
|
||||
else{
|
||||
if ( nlsr->debugging )
|
||||
printf("Verification failed. No content given back\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ls_type=atoi(rem);
|
||||
lst=rem;
|
||||
if(ls_type == LS_TYPE_ADJ)
|
||||
{
|
||||
ccn_name_comp_get(content_name->buf, components,components->n-2,
|
||||
&origtime, &comp_size);
|
||||
ccn_name_chop(content_name,components,-2);
|
||||
get_name_part(orig_router,content_name,components,0);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("Orig Router: %s Ls Type: %d Orig Time: %s\n",
|
||||
orig_router->name,ls_type,origtime);
|
||||
|
||||
int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
|
||||
if ( nlsr->debugging )
|
||||
printf("LSA Life time: %d\n",lsa_life_time);
|
||||
|
||||
if ( strcmp(orig_router->name,nlsr->router_name) != 0
|
||||
&& (lsa_life_time < nlsr->router_dead_interval) )
|
||||
{
|
||||
int is_new_adj_lsa = check_is_new_adj_lsa( orig_router->name,
|
||||
(char *)lst, (char *)origtime);
|
||||
if ( is_new_adj_lsa == 1 )
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("New Adj LSA.....\n");
|
||||
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
|
||||
&content_data,orig_router->name);
|
||||
|
||||
if ( chk_con == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Data: %s \n",content_data);
|
||||
process_incoming_sync_content_lsa(content_data);
|
||||
}
|
||||
else{
|
||||
if ( nlsr->debugging )
|
||||
printf("Verification failed. No content given back\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("Adj LSA / Newer Adj LSA already exists in LSDB\n");
|
||||
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
|
||||
&content_data,orig_router->name);
|
||||
if ( chk_con == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Data: %s \n",content_data);
|
||||
process_incoming_sync_content_lsa(content_data);
|
||||
}
|
||||
else{
|
||||
if ( nlsr->debugging )
|
||||
printf("Verification failed. No content given back\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
|
||||
}
|
||||
}
|
||||
else if(ls_type == LS_TYPE_COR)
|
||||
{
|
||||
ccn_name_comp_get(content_name->buf, components, components->n-2,
|
||||
&origtime, &comp_size);
|
||||
ccn_name_chop(content_name,components,-2);
|
||||
get_name_part(orig_router,content_name,components,0);
|
||||
|
||||
if ( nlsr->debugging )
|
||||
printf("Orig Router: %s Ls Type: %d Orig Time: %s\n",
|
||||
orig_router->name,ls_type,origtime);
|
||||
|
||||
int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
|
||||
if ( nlsr->debugging )
|
||||
printf("LSA Life time: %d\n",lsa_life_time);
|
||||
|
||||
if ( strcmp(orig_router->name,nlsr->router_name) != 0
|
||||
&& (lsa_life_time < nlsr->router_dead_interval) )
|
||||
{
|
||||
int is_new_cor_lsa=check_is_new_cor_lsa( orig_router->name,
|
||||
(char *)lst,(char *) origtime);
|
||||
if ( is_new_cor_lsa == 1 )
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("New Cor LSA.....\n");
|
||||
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
|
||||
&content_data,
|
||||
orig_router->name);
|
||||
|
||||
if ( chk_con == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Data: %s \n",content_data);
|
||||
process_incoming_sync_content_lsa(content_data);
|
||||
}
|
||||
else{
|
||||
if ( nlsr->debugging )
|
||||
printf("Verification failed. No content given back\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("Cor LSA / Newer Cor LSA already exists in LSDB\n");
|
||||
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
|
||||
&content_data,orig_router->name);
|
||||
if ( chk_con == 0 ){
|
||||
if ( nlsr->debugging )
|
||||
printf("Content Data: %s \n",content_data);
|
||||
process_incoming_sync_content_lsa(content_data);
|
||||
}
|
||||
else{
|
||||
if ( nlsr->debugging )
|
||||
printf("Verification failed. No content given back\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nlsr->debugging )
|
||||
printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(content_data)
|
||||
free(content_data);
|
||||
|
||||
if (orig_router->name)
|
||||
free(orig_router->name);
|
||||
if (orig_router)
|
||||
free(orig_router);
|
||||
ccn_charbuf_destroy(&uri);
|
||||
//01/31/2013
|
||||
free(time_stamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function performs same functionality as ccnsyncwatch
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
sync_monitor(char *topo_prefix, char *slice_prefix)
|
||||
{
|
||||
|
||||
struct ccn_charbuf *prefix = ccn_charbuf_create();
|
||||
struct ccn_charbuf *topo = ccn_charbuf_create();
|
||||
|
||||
nlsr->closure=(struct ccns_name_closure *)
|
||||
calloc(1,sizeof(struct ccns_name_closure)); // leak
|
||||
|
||||
nlsr->slice = ccns_slice_create();
|
||||
|
||||
ccn_charbuf_reset(prefix);
|
||||
ccn_name_from_uri(prefix, slice_prefix);
|
||||
|
||||
ccn_charbuf_reset(topo);
|
||||
ccn_name_from_uri(topo, topo_prefix);
|
||||
|
||||
ccns_slice_set_topo_prefix(nlsr->slice, topo, prefix);
|
||||
nlsr->closure->callback = &sync_cb;
|
||||
nlsr->ccns = ccns_open(nlsr->ccn, nlsr->slice, nlsr->closure, NULL, NULL);
|
||||
|
||||
ccn_charbuf_destroy(&prefix);
|
||||
ccn_charbuf_destroy(&topo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ccn_charbuf *
|
||||
make_template(int scope)
|
||||
{
|
||||
struct ccn_charbuf *templ = NULL;
|
||||
templ = ccn_charbuf_create();
|
||||
ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
|
||||
ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
|
||||
ccn_charbuf_append_closer(templ); /* </Name> */
|
||||
if (0 <= scope && scope <= 2)
|
||||
ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
|
||||
ccn_charbuf_append_closer(templ); /* </Interest> */
|
||||
return(templ);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write signed data to repo
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
write_data_to_repo(char *data, char *name_prefix)
|
||||
{
|
||||
|
||||
nlsr_lock();
|
||||
if ( nlsr->debugging )
|
||||
{
|
||||
printf("write_data_to_repo called\n");
|
||||
printf("Content Name: %s \n",name_prefix);
|
||||
printf("Content Data: %s \n",data);
|
||||
}
|
||||
|
||||
struct ccn *temp_ccn;
|
||||
temp_ccn=ccn_create();
|
||||
int ccn_fd=ccn_connect(temp_ccn, NULL);
|
||||
if(ccn_fd == -1)
|
||||
{
|
||||
fprintf(stderr,"Could not connect to ccnd for Data Writing\n");
|
||||
writeLogg(__FILE__,__FUNCTION__,__LINE__,
|
||||
"Could not connect to ccnd for Data Writing\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct ccn_charbuf *name = NULL;
|
||||
struct ccn_seqwriter *w = NULL;
|
||||
int blocksize = 4096;
|
||||
int freshness = -1;
|
||||
int scope = 1;
|
||||
int res;
|
||||
size_t blockread;
|
||||
struct ccn_charbuf *templ;
|
||||
|
||||
name = ccn_charbuf_create();
|
||||
res = ccn_name_from_uri(name, name_prefix);
|
||||
if (res < 0) {
|
||||
fprintf(stderr, "bad CCN URI: %s\n",name_prefix);
|
||||
return -1;
|
||||
}
|
||||
|
||||
w = ccn_seqw_create(temp_ccn, name);
|
||||
if (w == NULL) {
|
||||
fprintf(stderr, "ccn_seqw_create failed\n");
|
||||
return -1;
|
||||
}
|
||||
ccn_seqw_set_block_limits(w, blocksize, blocksize);
|
||||
if (freshness > -1)
|
||||
ccn_seqw_set_freshness(w, freshness);
|
||||
|
||||
struct ccn_charbuf *name_v = ccn_charbuf_create();
|
||||
ccn_seqw_get_name(w, name_v);
|
||||
ccn_name_from_uri(name_v, "%C1.R.sw");
|
||||
ccn_name_append_nonce(name_v);
|
||||
templ = make_template(scope);
|
||||
res = ccn_get(temp_ccn, name_v, templ, 60000, NULL, NULL, NULL, 0);
|
||||
ccn_charbuf_destroy(&templ);
|
||||
ccn_charbuf_destroy(&name_v);
|
||||
if (res < 0) {
|
||||
fprintf(stderr, "No response from repository\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct ccn_charbuf *resultbuf=ccn_charbuf_create();
|
||||
|
||||
sign_content_with_user_defined_keystore(name,
|
||||
resultbuf,
|
||||
data,
|
||||
strlen(data),
|
||||
nlsr->keystore_path,
|
||||
nlsr->keystore_passphrase,
|
||||
nlsr->root_key_prefix,
|
||||
nlsr->site_name,
|
||||
nlsr->router_name,
|
||||
60);
|
||||
|
||||
|
||||
blockread=resultbuf->length;
|
||||
|
||||
if (blockread > 0) {
|
||||
res = ccn_seqw_write(w, resultbuf->buf, resultbuf->length);
|
||||
while (res == -1) {
|
||||
ccn_run(temp_ccn,1);
|
||||
res = ccn_seqw_write(w, resultbuf->buf, resultbuf->length);
|
||||
}
|
||||
}
|
||||
|
||||
ccn_seqw_close(w);
|
||||
ccn_run(temp_ccn, 1);
|
||||
ccn_charbuf_destroy(&name);
|
||||
ccn_destroy(&temp_ccn);
|
||||
ccn_charbuf_destroy(&resultbuf);
|
||||
|
||||
nlsr_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create slice for sync/repo
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
create_sync_slice(char *topo_prefix, char *slice_prefix)
|
||||
{
|
||||
int res;
|
||||
struct ccn *handle;
|
||||
struct ccns_slice *slice;
|
||||
struct ccn_charbuf *prefix = ccn_charbuf_create();
|
||||
struct ccn_charbuf *topo = ccn_charbuf_create();
|
||||
struct ccn_charbuf *clause = ccn_charbuf_create();
|
||||
struct ccn_charbuf *slice_name = ccn_charbuf_create();
|
||||
struct ccn_charbuf *slice_uri = ccn_charbuf_create();
|
||||
|
||||
if (prefix == NULL || topo == NULL || clause == NULL ||
|
||||
slice_name == NULL || slice_uri == NULL) {
|
||||
fprintf(stderr, "Unable to allocate required memory.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
handle = ccn_create();
|
||||
res = ccn_connect(handle, NULL);
|
||||
if (0 > res) {
|
||||
fprintf(stderr, "Unable to connect to ccnd.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
slice = ccns_slice_create();
|
||||
|
||||
ccn_charbuf_reset(topo);
|
||||
ccn_name_from_uri(topo, topo_prefix);
|
||||
ccn_charbuf_reset(prefix);
|
||||
ccn_name_from_uri(prefix,slice_prefix );
|
||||
ccns_slice_set_topo_prefix(slice, topo, prefix);
|
||||
|
||||
|
||||
res = ccns_write_slice(handle, slice, slice_name);
|
||||
|
||||
//01/31/2013
|
||||
ccns_slice_destroy(&slice);
|
||||
ccn_destroy(&handle);
|
||||
ccn_charbuf_destroy(&prefix);
|
||||
ccn_charbuf_destroy(&topo);
|
||||
ccn_charbuf_destroy(&clause);
|
||||
ccn_charbuf_destroy(&slice_name);
|
||||
ccn_charbuf_destroy(&slice_uri);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 231 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user