gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 08/09: fs/struct: New module.


From: gnunet
Subject: [gnunet-scheme] 08/09: fs/struct: New module.
Date: Wed, 21 Sep 2022 16:57:22 +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.

commit 78297acda83366bf3caefa3821c00cf8cbd6b7d4
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Sep 21 16:25:39 2022 +0200

    fs/struct: New module.
    
    * gnu/gnunet/fs/struct.scm: New module.
    * Makefile.am (module): Register new module.
---
 Makefile.am              |  1 +
 gnu/gnunet/fs/struct.scm | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 03e5a7d..dc4badb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,6 +87,7 @@ modules = \
   gnu/gnunet/dht/struct.scm \
   \
   gnu/gnunet/fs/client.scm \
+  gnu/gnunet/fs/struct.scm \
   gnu/gnunet/fs/uri.scm \
   \
   gnu/gnunet/util/cmsg.scm \
diff --git a/gnu/gnunet/fs/struct.scm b/gnu/gnunet/fs/struct.scm
new file mode 100644
index 0000000..27d36c6
--- /dev/null
+++ b/gnu/gnunet/fs/struct.scm
@@ -0,0 +1,59 @@
+;; This file is part of Scheme-GNUnet.
+;; Copyright © 2003--2012 GNUnet e.V.
+;;
+;; Scheme-GNUnet is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU Affero General Public License as published
+;; by the Free Software Foundation, either version 3 of the License,
+;; or (at your option) any later version.
+;;
+;; Scheme-GNUnet is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; Affero General Public License for more details.
+;;
+;; You should have received a copy of the GNU Affero General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;
+;; SPDX-License-Identifier: AGPL-3.0-or-later
+
+;; C source file: fs/fs.h
+;; Network-related definitions for file-sharing
+;; Author: Igor Wronsky, Christian Grothoff
+;; Ported to Scheme-GNUnet by: Maxime Devos
+(define-library (gnu gnunet fs struct)
+  (export /:msg:fs:loc-sign)
+  (import (only (rnrs base) define begin * quote)
+         (only (gnu gnunet hashcode struct)
+               /hashcode:512)
+         (only (gnu gnunet util struct)
+               /:message-header /time-absolute)
+         (only (gnu gnunet netstruct procedural)
+               u32/big u64/big make-netprimitive)
+         (only (gnu gnunet netstruct syntactic)
+               define-type structure/packed))
+  (begin
+    ;; TODO: interaction with <content-hash-key>
+    (define-type /content-hash-key
+      (structure/packed
+       (synopsis "Content hash key")
+       (properties '((c-type . ContentHashKey)))
+       (field (key /hashcode:512)
+             (synopsis "Hash of the original content, used for encryption"))
+       (field (query /hashcode:512)
+             (synopsis "Hash of the encrypted content, used for querying"))))
+
+    (define-type /:msg:fs:loc-sign
+      (structure/packed
+       (synopsis "Message sent by a FS client to request a LOC signature.")
+       (properties '((message-symbol msg:fs:loc-sign)
+                    (c-type . RequestLocSignatureMessage)))
+       (field (header /:message-header))
+       (field (purpose u32/big)
+             (synopsis "Requested signature purpose")
+             (documentation "For now, always 
GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT"))
+       (field (expiration-time /time-absolute)
+             (synopsis "Requested expiration time"))
+       (field (content-hash-key /content-hash-key)
+             (synopsis "Information about the shared file (to be signed"))
+       (field (file-length u64/big)
+             (synopsis "Size of the shared file (to be signed)"))))))

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