GNUnet  0.11.x
setu.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2012-2014, 2020 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
26 #ifndef SET_H
27 #define SET_H
28 
29 #include "platform.h"
30 #include "gnunet_common.h"
31 #include "gnunet_set_service.h"
32 
34 
41 {
46 
47 };
48 
49 
56 {
61 
66 
70  struct GNUNET_HashCode app_id;
71 };
72 
73 
79 {
84 
89 
94 
99  uint8_t force_delta;
100 
105  uint8_t force_full;
106 
111  uint8_t byzantine;
112 
117  uint8_t symmetric;
118 
124 
125 
131 
137 
143 
149 
150 };
151 
152 
158 {
163 
168 };
169 
170 
175 {
180 
186 
191 
192  /* rest: context message, that is, application-specific
193  message to convince listener to pick up */
194 };
195 
196 
203 {
208 
214 
219 
223  struct GNUNET_HashCode app_id;
224 
229  uint8_t force_delta;
230 
235  uint8_t force_full;
236 
241  uint8_t byzantine;
242 
246  uint8_t symmetric;
247 
253 
259 
265 
271 
277 
278  /* rest: context message, that is, application-specific
279  message to convince listener to pick up */
280 };
281 
282 
290 {
295 
299  uint64_t current_size;
300 
305 
311 
316 
317  /* rest: the actual element */
318 };
319 
320 
326 {
331 
336 
341 
342  /* rest: the actual element */
343 };
344 
345 
350 {
355 
360 };
361 
362 
364 
365 #endif
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
A 512-bit hashcode.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Message sent by a listening client to the service to accept performing the operation with the other p...
Definition: setu.h:79
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: setu.h:111
uint32_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: setu.h:123
uint8_t symmetric
GNUNET_YES to also send back set elements we are sending to the remote peer.
Definition: setu.h:117
uint32_t request_id
Request ID to identify responses.
Definition: setu.h:93
uint64_t byzantine_upper_bond
Upper bound for the set size, used only when byzantine mode is enabled.
Definition: setu.h:130
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_ACCEPT.
Definition: setu.h:83
uint64_t bandwidth_latency_tradeoff
Bandwidth latency tradeoff determines how much bytes a single RTT is worth, which is a performance se...
Definition: setu.h:136
uint64_t ibf_bucket_number_factor
The factor determines the number of buckets an IBF has which is multiplied by the estimated setsize d...
Definition: setu.h:142
uint64_t ibf_number_of_buckets_per_element
This setting determines to how many IBF buckets an single elements is mapped to.
Definition: setu.h:148
uint32_t accept_reject_id
ID of the incoming request we want to accept.
Definition: setu.h:88
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: setu.h:105
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it's less efficient.
Definition: setu.h:99
Sent to the service by the client in order to cancel a set operation.
Definition: setu.h:350
uint32_t request_id
ID of the request we want to cancel.
Definition: setu.h:359
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_CANCEL.
Definition: setu.h:354
Message sent by the client to the service to ask starting a new set to perform operations with.
Definition: setu.h:41
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_CREATE.
Definition: setu.h:45
Message sent by client to the service to add an element to the set.
Definition: setu.h:326
uint16_t element_type
Type of the element to add or remove.
Definition: setu.h:335
uint16_t reserved
For alignment, always zero.
Definition: setu.h:340
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_ADD.
Definition: setu.h:330
Message sent by client to service to initiate a set operation as a client (not as listener).
Definition: setu.h:203
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_EVALUATE.
Definition: setu.h:207
uint8_t symmetric
Also return set elements we are sending to the remote peer.
Definition: setu.h:246
uint64_t byzantine_upper_bond
Upper bound for the set size, used only when byzantine mode is enabled.
Definition: setu.h:258
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it's less efficient.
Definition: setu.h:229
uint64_t bandwidth_latency_tradeoff
Bandwidth latency tradeoff determines how much bytes a single RTT is worth, which is a performance se...
Definition: setu.h:264
uint32_t request_id
Id of our set to evaluate, chosen implicitly by the client when it calls GNUNET_SETU_commit().
Definition: setu.h:213
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: setu.h:235
uint32_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: setu.h:252
uint64_t ibf_bucket_number_factor
The factor determines the number of buckets an IBF has which is multiplied by the estimated setsize d...
Definition: setu.h:270
uint64_t ibf_number_of_buckets_per_element
This setting determines to how many IBF buckets an single elements is mapped to.
Definition: setu.h:276
struct GNUNET_HashCode app_id
Application id.
Definition: setu.h:223
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: setu.h:241
struct GNUNET_PeerIdentity target_peer
Peer to evaluate the operation with.
Definition: setu.h:218
Message sent by the client to the service to start listening for incoming requests to perform a certa...
Definition: setu.h:56
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_LISTEN.
Definition: setu.h:60
struct GNUNET_HashCode app_id
application id
Definition: setu.h:70
uint32_t reserved
Always zero.
Definition: setu.h:65
Message sent by a listening client to the service to reject performing the operation with the other p...
Definition: setu.h:158
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_REJECT.
Definition: setu.h:162
uint32_t accept_reject_id
ID of the incoming request we want to reject.
Definition: setu.h:167
A request for an operation with another client.
Definition: setu.h:175
struct GNUNET_PeerIdentity peer_id
Identity of the requesting peer.
Definition: setu.h:190
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_REQUEST.
Definition: setu.h:179
uint32_t accept_id
ID of the to identify the request when accepting or rejecting it.
Definition: setu.h:185
Message sent by the service to the client to indicate an element that is removed (set intersection) o...
Definition: setu.h:290
uint64_t current_size
Current set size.
Definition: setu.h:299
uint16_t result_status
Was the evaluation successful? Contains an enum GNUNET_SETU_Status in NBO.
Definition: setu.h:310
uint16_t element_type
Type of the element attached to the message, if any.
Definition: setu.h:315
uint32_t request_id
id the result belongs to
Definition: setu.h:304
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_RESULT.
Definition: setu.h:294