aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-05-09 10:49:46 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-05-09 10:49:46 +0200
commitc42fd9b034d7b343f7fd8e480d693509b414b460 (patch)
treea00c38191505675fe588ef80e280a9ba12ed5e40 /src
parent2c589fcdf9eb24144786b8800cbba1c99a9452e8 (diff)
downloadgnunet-c42fd9b034d7b343f7fd8e480d693509b414b460.tar.gz
gnunet-c42fd9b034d7b343f7fd8e480d693509b414b460.zip
DHT: Move block type definitions to GANA
Diffstat (limited to 'src')
-rw-r--r--src/include/Makefile.am1
-rw-r--r--src/include/gnunet_block_lib.h122
2 files changed, 3 insertions, 120 deletions
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 8808f6802..67c29208c 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -21,6 +21,7 @@ gnunetinclude_HEADERS = \
21 gnunet_ats_plugin.h \ 21 gnunet_ats_plugin.h \
22 gnunet_bandwidth_lib.h \ 22 gnunet_bandwidth_lib.h \
23 gnunet_bio_lib.h \ 23 gnunet_bio_lib.h \
24 gnunet_dht_block_types.h \
24 gnunet_block_lib.h \ 25 gnunet_block_lib.h \
25 gnunet_block_group_lib.h \ 26 gnunet_block_group_lib.h \
26 gnunet_block_plugin.h \ 27 gnunet_block_plugin.h \
diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h
index 515b8256c..fb417412f 100644
--- a/src/include/gnunet_block_lib.h
+++ b/src/include/gnunet_block_lib.h
@@ -32,6 +32,8 @@
32#define GNUNET_BLOCK_LIB_H 32#define GNUNET_BLOCK_LIB_H
33 33
34#include "gnunet_util_lib.h" 34#include "gnunet_util_lib.h"
35#include "gnunet_dht_block_types.h"
36
35#ifdef __cplusplus 37#ifdef __cplusplus
36extern "C" 38extern "C"
37{ 39{
@@ -42,126 +44,6 @@ extern "C"
42 44
43 45
44/** 46/**
45 * Blocks in the datastore and the datacache must have a unique type.
46 *
47 * TODO: move to GANA!
48 */
49enum GNUNET_BLOCK_Type
50{
51 /**
52 * Any type of block, used as a wildcard when searching. Should
53 * never be attached to a specific block.
54 */
55 GNUNET_BLOCK_TYPE_ANY = 0,
56
57 /**
58 * Data block (leaf) in the CHK tree.
59 */
60 GNUNET_BLOCK_TYPE_FS_DBLOCK = 1,
61
62 /**
63 * Inner block in the CHK tree.
64 */
65 GNUNET_BLOCK_TYPE_FS_IBLOCK = 2,
66
67 /**
68 * Legacy type, no longer in use.
69 */
70 GNUNET_BLOCK_TYPE_FS_KBLOCK = 3,
71
72 /**
73 * Legacy type, no longer in use.
74 */
75 GNUNET_BLOCK_TYPE_FS_SBLOCK = 4,
76
77 /**
78 * Legacy type, no longer in use.
79 */
80 GNUNET_BLOCK_TYPE_FS_NBLOCK = 5,
81
82 /**
83 * Type of a block representing a block to be encoded on demand from disk.
84 * Should never appear on the network directly.
85 */
86 GNUNET_BLOCK_TYPE_FS_ONDEMAND = 6,
87
88 /**
89 * Type of a block that contains a HELLO for a peer (for
90 * DHT and CADET find-peer operations).
91 */
92 GNUNET_BLOCK_TYPE_DHT_HELLO = 7,
93
94 /**
95 * Block for testing.
96 */
97 GNUNET_BLOCK_TYPE_TEST = 8,
98
99 /**
100 * Type of a block representing any type of search result
101 * (universal). Implemented in the context of #2564, replaces
102 * SBLOCKS, KBLOCKS and NBLOCKS.
103 */
104 GNUNET_BLOCK_TYPE_FS_UBLOCK = 9,
105
106 /**
107 * Block for storing DNS exit service advertisements.
108 */
109 GNUNET_BLOCK_TYPE_DNS = 10,
110
111 /**
112 * Block for storing record data
113 */
114 GNUNET_BLOCK_TYPE_GNS_NAMERECORD = 11,
115
116 /**
117 * Block type for a revocation message by which a key is revoked.
118 */
119 GNUNET_BLOCK_TYPE_REVOCATION = 12,
120
121 /**
122 * Type of a block that contains a DHT-NG HELLO for a peer (for
123 * DHT and CADET find-peer operations).
124 */
125 GNUNET_BLOCK_TYPE_DHT_URL_HELLO = 13,
126
127 /**
128 * Block to store a cadet regex state
129 */
130 GNUNET_BLOCK_TYPE_REGEX = 22,
131
132 /**
133 * Block to store a cadet regex accepting state
134 */
135 GNUNET_BLOCK_TYPE_REGEX_ACCEPT = 23,
136
137 /**
138 * Block for testing set/consensus. If first byte of the block
139 * is non-zero, the block is considered invalid.
140 */
141 GNUNET_BLOCK_TYPE_SET_TEST = 24,
142
143 /**
144 * Block type for consensus elements.
145 * Contains either special marker elements or a nested block.
146 */
147 GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT = 25,
148
149 /**
150 * Block for testing set intersection. If first byte of the block
151 * is non-zero, the block is considered invalid.
152 */
153 GNUNET_BLOCK_TYPE_SETI_TEST = 24,
154
155 /**
156 * Block for testing set union. If first byte of the block
157 * is non-zero, the block is considered invalid.
158 */
159 GNUNET_BLOCK_TYPE_SETU_TEST = 24,
160
161};
162
163
164/**
165 * Possible ways for how a block may relate to a query. 47 * Possible ways for how a block may relate to a query.
166 */ 48 */
167enum GNUNET_BLOCK_ReplyEvaluationResult 49enum GNUNET_BLOCK_ReplyEvaluationResult