aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NETWORKING72
-rwxr-xr-xsrc/build_tree/ak_fs_build.sh4
-rwxr-xr-xsrc/build_tree/ak_logcatter_build.sh7
-rwxr-xr-xsrc/build_tree/ak_settings_build.sh7
4 files changed, 53 insertions, 37 deletions
diff --git a/NETWORKING b/NETWORKING
index 7e1d6c2..4ea3374 100644
--- a/NETWORKING
+++ b/NETWORKING
@@ -100,35 +100,30 @@ which is able to reach the whole public network of cjdns.
- http://hia.cjdns.ca/watchlist/c/walk.sh (seq)
- http://hia.cjdns.ca/watchlist/c/walk2.sh (threaded)
-TODO: We should be storing the output on a relevant file so it can be reached by
-the API as well or ask for current known nodes without rescanning the network.
+> TODO: We should be storing the output on a relevant file so it can be reached by
+> the API as well or ask for current known nodes without rescanning the network.
Part 5: Update on networking
----------------------------
Great news everyone! `ak-network` is here:
```
$ ak network
-ak-network - AK Nettool
-=======================
-
-Network tools
-
-Usage:
-
- -h, --help Prints this help message
-
- -c, --connect [ipfs|cjdns] Connect to network(s)
-
- -p, --peers [ipfs|cjdns|stellar] Outputs peers found
-
- -s, --scan [ipfs|cjdns|stellar] Scan network(s) for peers
-
-Bonus: CJDNS network scanning flags
-
- -s, --scan cjdns [-w|--whole] Scan using HIA's knowledge
-
- -s, --scan cjdns [-d|--dump] Scan using CJDNS' dumpLinks (default)
-
+# ak-network - AK Nettool
+# =======================
+#
+# Network tools
+#
+# Usage:
+#
+# -h, --help Prints this help message
+# -c, --connect [ipfs|cjdns] Connect to network(s)
+# -p, --peers [ipfs|cjdns|stellar|yggdrasil|incoming] Outputs peers found
+# -s, --scan [ipfs|cjdns|stellar|yggdrasil|incoming] Scan network(s) for peers
+#
+# Bonus: CJDNS network scanning modes
+#
+# -s, --scan cjdns [-w|--whole] Scan using HIA's knowledge
+# -s, --scan cjdns [-d|--dump] Scan using CJDNS' dumpLinks (default)
```
Though:
@@ -137,13 +132,24 @@ $ ak network --scan ipfs
20240707_065927 <ak-network> [ERROR] Not implemented: _ak_network_scan_ipfs
```
-Which I think I should not try to do since we use `ak-config` as the key on IPFS
-to publish our `node_info` at and we can not guess keys just in case we found
-one with `node_info`. A work around could be to use the `self` key and publish
-there instead of `ak-config`. Previously, since we were using for `IPFS_REPO`
-the default directory, it was thought that the `self` key could be already in
-use. Now that we do have our own dedicated path for `IPFS_REPO`, it could be
-revisited. But, as mentioned in other places, we are about to drop IPFS in the
-future. Whichever comes first?
-
-TODO ^^ maybe
+> TODO ^^ maybe
+> Which I think I should not try to do since we use `ak-config` as the key on IPFS
+> to publish our `node_info` at and we can not guess keys just in case we found
+> one with `node_info`. A work around could be to use the `self` key and publish
+> there instead of `ak-config`. Previously, since we were using for `IPFS_REPO`
+> the default directory, it was thought that the `self` key could be already in
+> use. Now that we do have our own dedicated path for `IPFS_REPO`, it could be
+> revisited. But, as mentioned in other places, we are about to drop IPFS in the
+> future. Whichever comes first?
+
+Part 6: Yggdrasil
+-----------------
+In the same way we do the full scan ( -w|--whole ) for cjdns network range, we
+also do the same for Yggdrasil network. The preassumption here is that yggdrasil
+is already installed and peered. We get some IP lists from scans from the YIA
+service running by ircerr.
+
+Part 7: Incoming
+----------------
+Incoming connections' IPs to the API are stored and can be scanned for the known
+API port for peering purposes.
diff --git a/src/build_tree/ak_fs_build.sh b/src/build_tree/ak_fs_build.sh
index d45fb0a..a18b824 100755
--- a/src/build_tree/ak_fs_build.sh
+++ b/src/build_tree/ak_fs_build.sh
@@ -5,11 +5,11 @@ gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include akfs.c -o
echo "Building tests/test_akfs" && \
gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akfs.c lib/akfs.so -o tests/test_akfs && \
echo "Running test_akfs" && \
-time ./tests/test_akfs
+time ./tests/test_akfs && \
rm ./tests/test_akfs
echo "Building tests/test_akfs_mkdir.c" && \
gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akfs_mkdir.c lib/akfs.so -o tests/test_akfs_mkdir && \
echo "Running test_akfs_mkdir" && \
-time ./tests/test_akfs_mkdir
+time ./tests/test_akfs_mkdir && \
rm ./tests/test_akfs_mkdir
diff --git a/src/build_tree/ak_logcatter_build.sh b/src/build_tree/ak_logcatter_build.sh
index 91a1805..5038073 100755
--- a/src/build_tree/ak_logcatter_build.sh
+++ b/src/build_tree/ak_logcatter_build.sh
@@ -1,2 +1,7 @@
-echo "Building lib/aklogcatter.so" && gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aklogcatter.c -o lib/aklogcatter.so && echo "Building tests/test_aklogcatter" && gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklogcatter.c lib/aklog.so lib/aklogcatter.so -o tests/test_aklogcatter && echo "Running test_aklogcatter" && time ./tests/test_aklogcatter
+echo "Building lib/aklogcatter.so" && \
+gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aklogcatter.c -o lib/aklogcatter.so && \
+echo "Building tests/test_aklogcatter" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklogcatter.c lib/aklog.so lib/aklogcatter.so -o tests/test_aklogcatter && \
+echo "Running test_aklogcatter" && \
+time ./tests/test_aklogcatter && \
rm ./tests/test_aklogcatter
diff --git a/src/build_tree/ak_settings_build.sh b/src/build_tree/ak_settings_build.sh
index 5edcd19..99689e3 100755
--- a/src/build_tree/ak_settings_build.sh
+++ b/src/build_tree/ak_settings_build.sh
@@ -1,2 +1,7 @@
-echo "Building lib/aksettings.so" && gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aksettings.c -o lib/aksettings.so && echo "Building tests/test_aksettings" && gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aksettings.c lib/aksettings.so -o tests/test_aksettings && echo "Running test_aksettings" && time ./tests/test_aksettings
+echo "Building lib/aksettings.so" && \
+gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aksettings.c -o lib/aksettings.so && \
+echo "Building tests/test_aksettings" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aksettings.c lib/aksettings.so -o tests/test_aksettings && \
+echo "Running test_aksettings" && \
+time ./tests/test_aksettings && \
rm ./tests/test_aksettings