gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 01/03: fs/struct: Define new message types /:msg:fs:put!


From: gnunet
Subject: [gnunet-scheme] 01/03: fs/struct: Define new message types /:msg:fs:put! and /:msg:fs:client:put!.
Date: Sun, 20 Nov 2022 20:50:39 +0100

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

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

commit e8015e4e1ab51982be2135978c3ace7ee82145be
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Fri Oct 28 21:51:56 2022 +0200

    fs/struct: Define new message types /:msg:fs:put! and /:msg:fs:client:put!.
    
    * gnu/gnunet/fs/struct.scm
    /:msg:fs:put!, /:msg:fs:client:put!): New network type definitions
---
 gnu/gnunet/fs/struct.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 48 insertions(+), 2 deletions(-)

diff --git a/gnu/gnunet/fs/struct.scm b/gnu/gnunet/fs/struct.scm
index 27d19c5..52639f8 100644
--- a/gnu/gnunet/fs/struct.scm
+++ b/gnu/gnunet/fs/struct.scm
@@ -26,7 +26,8 @@
          /:msg:fs:index-start!
          /:msg:fs:index-list:entry
          /:msg:fs:unindex!
-         /:msg:fs:start-search!)
+         /:msg:fs:start-search!
+         /:msg:fs:put!)
   (import (only (rnrs base) define begin * quote)
          (only (gnu gnunet crypto struct)
                /peer-identity)
@@ -190,4 +191,49 @@ exposing ourselves).
 Otherwise, @var{target} must be all zeros."))
        (field (query /hashcode:512)
              (synopsis "Hash of the public key for UBLOCKs: hash of the
-CHK-encoded block for DBLOCKS and IBLOCKS."))))))
+CHK-encoded block for DBLOCKS and IBLOCKS."))))
+
+    ;; TODO: client<->service or peer<->peer?
+    (define-type /:msg:fs:put!
+      (structure/packed
+       (synopsis "Response from file-sharing service with a response for a
+previous FS search.")
+       (documentation "This is followed by the actual encrypted content.")
+       (properties '((message-symbol msg:fs:put!) ; TODO: check
+                    (c-type . PutMessage)))
+       (field (header /:message-header))
+       (field (type u32/big)
+             ;; TODO: reference to block types
+             (synopsis "Type of the block.  Should never be zero"))
+       (field (expiration /time-absolute)
+             (synopsis "When does this result expire?"))))
+
+    (define-type /:msg:fs:client:put!
+      (structure/packed
+       (synopsis "Response from file-sharing service with a response for a
+previous FS search")
+       (documentation
+        "Response from FS service with a result for a previous FS search.
+Note that queries for DBLOCKS and IBLOCKS that have received a
+single response are considered done.  This message is transmitted
+between the service and a client.")
+       (properties '((c-type . ClientPutMessage)
+                    ;; This being the same as for /:msg:fs:client:put!
+                    ;; is correct.
+                    (message-symbol msg:fs:put!)))
+       (field (header /:message-header))
+       (field (type u32/big)
+             ;; TODO: reference to list of block types.
+             (synopsis "Type of the block.  Should never be zero."))
+       (field (expiration /time-absolute)
+             (synopsis "When does this result expire?"))
+       (field (last-transmission /time-absolute)
+             ;; TODO: Define FOREVER
+             (synopsis "When was the last time we have tried to download this
+block?  FOREVER if unknown/not relevant."))
+       (field (number-transmissions u32/big)
+             (synopsis "How often did we transmit this query before getting
+an answer (estimate).")) ; TODO check begin at 0 or 1, when
+       (field (respect-offered u32/big)
+             (synopsis "How much respect did we offer (in total) before
+getting an answer (estimate)."))))))

-- 
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]