gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] branch master updated: doc: Propose how to write (gnu gn


From: gnunet
Subject: [gnunet-scheme] branch master updated: doc: Propose how to write (gnu gnunet ... struct) modules.
Date: Mon, 24 Jul 2023 22:00:51 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

The following commit(s) were added to refs/heads/master by this push:
     new 17a7957  doc: Propose how to write (gnu gnunet ... struct) modules.
17a7957 is described below

commit 17a79576a63b3baa7927a5b720874db4c8616727
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Mon Jul 24 21:59:54 2023 +0200

    doc: Propose how to write (gnu gnunet ... struct) modules.
    
    * doc/network-structures.tm
    ("Writing new (gnu gnunet ... struct) modules, converted from C"):
    Propose it!
---
 doc/network-structures.tm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/doc/network-structures.tm b/doc/network-structures.tm
index 3f65c93..113062d 100644
--- a/doc/network-structures.tm
+++ b/doc/network-structures.tm
@@ -320,6 +320,39 @@
 
   In contrast to C structures, Scheme-GNUnet network structures are always
   packed \V there are no \<#2018\>gaps\<#2019\> between fields.
+
+  <section|Writing new (gnu gnunet <text-dots> struct) modules, converted
+  from C<index|(gnu gnunet <text-dots> struct)>>
+
+  In Scheme-GNUnet, the message types for a service are defined in a module
+  named <scm|(gnu gnunet ... struct)>, where <scm|...> is a symbol
+  representing the service. If you want to port a service from the C
+  implementation to Scheme, the following approach is recommended
+
+  <\enumerate>
+    <item>Download the source code of the C implementation.
+
+    <item>Go to the directory containing the implementation of the service.
+
+    <item>Search for <cpp|struct GNUNET_MessageHeader header;>, e.g. with
+    <code*|git grep -F GNUNET_MessageHeader>. C structures containing this
+    field are usually network messages that need a Scheme definition.
+
+    <item>Write the Scheme equivalent of these C structures.
+
+    <item>While you're at it, try clarifying the comments (which in Scheme
+    become \<#2018\>synopsis\<#2019\> and \<#2018\>description\<#2019\>) \U
+    if you read the description, do you understand when then message should
+    be sent and when it can received? Are there request-response pairs? \U
+    You don't have to make a literal copy of the C comments.
+
+    To better understand the message types, you can read the C implementation
+    or the \<#2018\>developer manual' \U at time of writing, GANA does not
+    have specifications of the client-service protocol.
+
+    The information you learn along the way will most likely be useful for
+    completing the port.
+  </enumerate>
 </body>
 
 <\initial>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]