From 3fa99b4a1657b783260e9cde7da08290d856662d Mon Sep 17 00:00:00 2001
From: t3sserakt
Date: Fri, 26 Apr 2024 15:57:47 +0200
Subject: Added milestone 2 and api page.
---
template/probnat/api.html.j2 | 52 ++++++++++++++++++++
template/probnat/index.html.j2 | 17 ++++++-
template/probnat/mile1.html.j2 | 4 +-
template/probnat/mile2.html.j2 | 105 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 175 insertions(+), 3 deletions(-)
create mode 100644 template/probnat/api.html.j2
create mode 100644 template/probnat/mile2.html.j2
diff --git a/template/probnat/api.html.j2 b/template/probnat/api.html.j2
new file mode 100644
index 00000000..90e56cfd
--- /dev/null
+++ b/template/probnat/api.html.j2
@@ -0,0 +1,52 @@
+{% extends "common/base.j2" %}
+{% block body_content %}
+
+
+
+
+ {{ _("API Documentation") }}
+
+
+
+
+
+
+
Sync Protocol
+
+
+
+
+ {% trans %}
+ To use the probabilistic NAT traversal library, the peers to be connected must first be synchronized. For that, each peer has to use two API calls.
+
+ enum GNUNET_GenericReturnValue
+ GNUNET_is_burst_ready (struct GNUNET_TIME_Relative rtt_avarage,
+ struct GNUNET_BurstSync *burst_sync,
+ GNUNET_SCHEDULER_TaskCallback task,
+ struct GNUNET_StartBurstCls *task_cls)
+
+ and
+
+ struct GNUNET_BurstSync *
+ GNUNET_get_burst_sync_msg (struct GNUNET_TIME_Relative rtt_avarage,
+ enum GNUNET_GenericReturnValue sync_ready)
+
+
+ The second is to create the synchronisation message which the caller has to send to the other peer.
+ Within GNUnet the Distance Vector DV protocol is used for sending the synchronisation message. Applications which do not want to use the complete GNUnet stack have to use transportion by other means.
+
+ The API call needs two parameters. The avarage round trip time rtt_avarage has to be provided by the callers application. In GNUnet this information is constantly calculated from messages delivered by DV. Again, applications not using the GNUnet stack have to assemble this information by themself. The second parameter is returned by the first API call and must be temporarily stored to use it in the second.
+
+ The first API call also needs the avarage RTT and the synchronisation message received from another peer. The callback is called, if both peers are ready to synchronize. Therefore the callback should start the burst mode which will finally do the hole punch for NAT traversal.
+ {% endtrans %}
+
+
+
+
+
+
+{% endblock body_content %}
diff --git a/template/probnat/index.html.j2 b/template/probnat/index.html.j2
index 67dd7c0e..39700c83 100644
--- a/template/probnat/index.html.j2
+++ b/template/probnat/index.html.j2
@@ -61,6 +61,21 @@
+
+ Usage
+
+ {% trans %}
+ We we have encapsulated the functionality in a library. The library can be used under the following requirements:
+
+ - The caller of the API has to know the external IP address of the other peer.
+ - The peers trying to communicate with each other need an indirect way to exchange messages in order to synchronize with each other.
+
+
+ These two requirements are not covered by the library. For more details have a look here.
+ {% endtrans %}
+
+
+
{{ _("Milestones") }}
The next milestone to be reached is milestone 1.
@@ -92,7 +107,7 @@ project. Details
{% trans %}
This task is to implement the protocol that is doing the signaling for synchronizing two peers
-which do like to connect to each other.
+which do like to connect to each other. Details
- Two peers which got connected via DV signaling each other being behind a NAT.
- Learning the external IP address+port from already connected peers, exchange with the
diff --git a/template/probnat/mile1.html.j2 b/template/probnat/mile1.html.j2
index 25b94313..a06f1d6d 100644
--- a/template/probnat/mile1.html.j2
+++ b/template/probnat/mile1.html.j2
@@ -18,7 +18,7 @@
Implementation details milestone 1
- {{ _("See revision 4b2303a on branch dev/t3ss/probnat") }}
+ {{ _("See revision 4b2303a on branch dev/t3ss/probnatt") }}
{% trans %}
@@ -36,7 +36,7 @@
| |
- est_transport_plugin_cmd_nat_mapping.c | Testcase to start the script which sends test messages to open up ports. |
+ test_transport_plugin_cmd_nat_mapping.c | Testcase to start the script which sends test messages to open up ports. |
| |
diff --git a/template/probnat/mile2.html.j2 b/template/probnat/mile2.html.j2
new file mode 100644
index 00000000..2d76796a
--- /dev/null
+++ b/template/probnat/mile2.html.j2
@@ -0,0 +1,105 @@
+{% extends "common/base.j2" %}
+{% block body_content %}
+
+
+
+
+ {{ _("NGI Assure project: Probabilistic NAT Traversal") }}
+
+
+
+
+
+
+
Implementation details milestone 2
+
+
+ {{ _("See revision d0c59f2, 16b5da1, c1ef824 and 8de6f97 on branch dev/t3ss/probnatt") }}
+
+ {% trans %}
+
+
+ scripts/testing-ng/emu_run.sh | Script to run several cli commands to start and configure the virtual Android devices. |
+
+ | |
+
+
+ scripts/Makefile.am | Added emu_run.sh script to makefile. |
+
+
+ | |
+
+
+ src/service/core/test_core_plugin_cmd_run_emu.c | Test case to run a setup with two natted Android devices in separate subnetworks and one global reachable node. |
+
+ | |
+
+
+ src/service/core/Makefile.am | Adding test case to makefile. |
+
+ | |
+
+
+ src/service/core/test_core_run_emu_topo.conf | Configuration for the test case. |
+
+
+ | |
+
+
+ src/service/transport/gnunet-service-transport.c | Added request to ask arm service for services configured to start and checking if they have started. Added check in log file to se if communicators already connected with transport service. |
+
+ | |
+
+
+ include/gnunet_transport_testing_ng_lib.h | Changes in header file for check of running services and connected communicaors. |
+
+
+ | |
+
+
+ src/service/transport/gnunet-service-transport.c | Added functionality to synchronize two peers by comparing the measured RTT of both peers. This code was moved to the util library. For use of that library have a look here |
+
+ | |
+
+
+ src/service/core/Makefile.am | Adding test case to makefile. |
+
+ | |
+
+
+ test_core_just_run_topo.conf | Change the configuration file to just run peers to manually test to have a setup with two natted peers in separate subnetworks and one global reachable peer. |
+
+
+ | |
+
+
+ src/include/gnunet_protocols.h | Added the burst sync message to the header file. |
+
+
+ | |
+
+
+ src/include/gnunet_util_lib.h | Added the new API to the util library. |
+
+
+ | |
+
+
+ src/lib/util/Makefile.am | Added the new API to the Makefile. |
+
+
+ | |
+
+
+ {% endtrans %}
+
+
+
+
+
+
+{% endblock body_content %}
\ No newline at end of file
--
cgit v1.2.3