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