[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 02/20: -also add serialization from/to block
From: |
gnunet |
Subject: |
[gnunet] 02/20: -also add serialization from/to block |
Date: |
Sat, 19 Feb 2022 16:20:42 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit cd84bf32e23b4396583a8fa1bfe4a00c1fba3715
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jan 12 12:57:13 2022 +0100
-also add serialization from/to block
---
src/include/gnunet_hello_uri_lib.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/include/gnunet_hello_uri_lib.h
b/src/include/gnunet_hello_uri_lib.h
index 0f61384d1..00b84e0e4 100644
--- a/src/include/gnunet_hello_uri_lib.h
+++ b/src/include/gnunet_hello_uri_lib.h
@@ -77,6 +77,18 @@ struct GNUNET_HELLO_Builder *
GNUNET_HELLO_builder_from_msg (const struct GNUNET_MessageHeader *msg);
+/**
+ * Parse @a block into builder.
+ *
+ * @param block DHT block to parse
+ * @param block_size number of bytes in @a block
+ * @return builder, NULL on failure
+ */
+struct GNUNET_HELLO_Builder *
+GNUNET_HELLO_builder_from_block (const void *block,
+ size_t block_size);
+
+
/**
* Parse GNUnet HELLO @a url into builder.
*
@@ -107,6 +119,21 @@ char *
GNUNET_HELLO_builder_to_url (struct GNUNET_HELLO_Builder *builder);
+/**
+ * Generate DHT block from a @a builder
+ *
+ * @param builder the builder to serialize
+ * @param[out] block where to write the block, NULL to only calculate @a
block_size
+ * @param[in,out] block_size input is number of bytes available in @a block,
+ * output is number of bytes needed in @a block
+ * @return #GNUNET_OK on success, #GNUNET_NO if @a block_size was too small
+ */
+enum GNUNET_GenericReturnValue
+GNUNET_HELLO_builder_to_block (struct GNUNET_HELLO_Builder *builder,
+ void *block,
+ size_t *block_size);
+
+
/**
* Add individual @a address to the @a builder
*
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (25ef40ef7 -> d68731944), gnunet, 2022/02/19
- [gnunet] 02/20: -also add serialization from/to block,
gnunet <=
- [gnunet] 03/20: incomplete first hack of new hello-uri lib, gnunet, 2022/02/19
- [gnunet] 01/20: first steps towards usable dhtu, gnunet, 2022/02/19
- [gnunet] 04/20: -conclude hello-uri implementation and test, gnunet, 2022/02/19
- [gnunet] 09/20: -DHT now takes care of queue size limit, gnunet, 2022/02/19
- [gnunet] 07/20: -more work on DHTU integration, gnunet, 2022/02/19
- [gnunet] 08/20: rebase, gnunet, 2022/02/19
- [gnunet] 13/20: -fix port initialization in addr, gnunet, 2022/02/19
- [gnunet] 11/20: -DHT: add gnunet-dht-hello for bootstrapping, gnunet, 2022/02/19
- [gnunet] 16/20: -got basics to work with dhtu and udp+ip underlay, gnunet, 2022/02/19
- [gnunet] 18/20: -fix merge issues, gnunet, 2022/02/19