[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 81/324: nse: define network structures.
From: |
gnunet |
Subject: |
[gnunet-scheme] 81/324: nse: define network structures. |
Date: |
Tue, 21 Sep 2021 13:22:01 +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 66286858b7f677bf6cdfcd97be5b02e322842013
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Feb 10 18:24:29 2021 +0100
nse: define network structures.
* gnu/gnunet/nse/struct.scm: new module,
defining some NSE network structures.
* Makefile.am (modules): compile it.
---
Makefile.am | 3 +-
gnu/gnunet/nse/struct.scm | 74 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index d5fb460..9c6aa67 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,7 +48,8 @@ modules = \
\
gnu/gnunet/util/struct.scm \
gnu/gnunet/crypto/struct.scm \
- gnu/gnunet/hashcode/struct.scm
+ gnu/gnunet/hashcode/struct.scm \
+ gnu/gnunet/nse/struct.scm
dist_guilesite_DATA = $(modules)
diff --git a/gnu/gnunet/nse/struct.scm b/gnu/gnunet/nse/struct.scm
new file mode 100644
index 0000000..7ecd8c9
--- /dev/null
+++ b/gnu/gnunet/nse/struct.scm
@@ -0,0 +1,74 @@
+;; This file is part of scheme-GNUnet
+;; Copyright (C) 2001-2011 GNUnet e.V.
+;; Copyright (C) 2021 Maxime Devos
+;;
+;; 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.
+;;
+;; 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: AGPL3.0-or-later
+
+;; Author (GNUnet): Nathan Evans
+;; File (GNUnet): nse/nse.h
+;;
+;; Brief: Common type definitions for the network size estimation
+;; service and API.
+
+(define-library (gnu gnunet nse struct (0 0))
+ (export /:msg:nse:estimate
+ /:msg:nse:flood)
+ (import (only (rnrs base)
+ define-syntax begin)
+ (gnu gnunet utils netstruct)
+ (gnu gnunet hashcode struct)
+ (gnu gnunet util struct))
+ (begin
+ ;; Network size estimate sent from the service
+ ;; to clients. Contains the current size estimate
+ ;; (or 0 if none has been calculated) and the
+ ;; standard deviation of known estimates.
+ (define-syntax /:msg:nse:estimate
+ (structure/packed
+ ;; Type: msg:nse:estimate
+ ("header" /message-header)
+ ("reserved" u32/big)
+ ("timestamp" /time-absolute)
+ ("size-estimate" ieee-double/big)
+ ("std-deviation" ieee-double/big)))
+
+ ;; Network size estimate reply; sent when "this"
+ ;; peer's timer has run out before receiving a
+ ;; valid reply from another peer.
+ (define-syntax /:msg:nse:flood
+ (structure/packed
+ ;; Type: msg:nse:flood
+ ("header" /message-header)
+ ;; Number of hops this message has taken so far.
+ ("hop-count" u32/big)
+ ;; Purpose.
+ ("purpose" /ecc-signature-purpose)
+ ;; The current timestamp value (which all
+ ;; peers should agree on).
+ ("timestamp" /time-absolute)
+ ;; Number of matching bits between the hash
+ ;; of timestamp and the initiator's public
+ ;; key.
+ ;; XXX add to (gnu gnunet util struct)
+ ("matching-bits" u32/big)
+ ;; Public key of the originator.
+ ("origin" /peer-identity)
+ ;; Proof of work, causing leading zeros when hashed with pkey.
+ ("proof-of-work" u64/big)
+ ;; Signature (over range specified in purpose).
+ ("signature" /eddsa-signature)))))
+
+
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 59/324: Fix value creation in integer->value, (continued)
- [gnunet-scheme] 59/324: Fix value creation in integer->value, gnunet, 2021/09/21
- [gnunet-scheme] 54/324: Add missing dependency ‘guix-stuff.scm’, gnunet, 2021/09/21
- [gnunet-scheme] 62/324: Change e-mail address, gnunet, 2021/09/21
- [gnunet-scheme] 58/324: scripts: publish-store: use SRFI-39 parameters for configuration, gnunet, 2021/09/21
- [gnunet-scheme] 61/324: Write code for message handlers, gnunet, 2021/09/21
- [gnunet-scheme] 55/324: enum: implement docstrings and general niceness, gnunet, 2021/09/21
- [gnunet-scheme] 56/324: Define many GNUnet message types., gnunet, 2021/09/21
- [gnunet-scheme] 69/324: doc: Update ROADMAP with steps to do, gnunet, 2021/09/21
- [gnunet-scheme] 63/324: Define message envelope type and procedures., gnunet, 2021/09/21
- [gnunet-scheme] 73/324: concurrency: implement an ‘update stream’, gnunet, 2021/09/21
- [gnunet-scheme] 81/324: nse: define network structures.,
gnunet <=
- [gnunet-scheme] 74/324: build: add autotools scripts, gnunet, 2021/09/21
- [gnunet-scheme] 78/324: scripts: download-store: remove debugging, gnunet, 2021/09/21
- [gnunet-scheme] 60/324: Allow using integer->value on maximal value, gnunet, 2021/09/21
- [gnunet-scheme] 68/324: scripts: download-store: allow downloads in nar format, gnunet, 2021/09/21
- [gnunet-scheme] 67/324: scripts: Don't flatten the FS tree and use SXML instead of JSON, gnunet, 2021/09/21
- [gnunet-scheme] 66/324: Document how to use GNUnet FS without networking., gnunet, 2021/09/21
- [gnunet-scheme] 70/324: doc: Progress update in README.org, gnunet, 2021/09/21
- [gnunet-scheme] 72/324: mq: fix make-envelope/dll constructor., gnunet, 2021/09/21
- [gnunet-scheme] 65/324: download-store: prepare supporting the nar output format, gnunet, 2021/09/21
- [gnunet-scheme] 64/324: scripts: download-store: use SRFI-39 parameters for configuration, gnunet, 2021/09/21