GNUnet  0.11.x
set.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2012-2014 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 
51 };
52 
53 
60 {
65 
70 
74  struct GNUNET_HashCode app_id;
75 };
76 
77 
83 {
88 
93 
98 
104 
109  uint8_t force_delta;
110 
115  uint8_t force_full;
116 
121  uint8_t byzantine;
122 
128 };
129 
130 
136 {
141 
146 };
147 
148 
153 {
158 
164 
169 
170  /* rest: context message, that is, application-specific
171  message to convince listener to pick up */
172 };
173 
174 
181 {
186 
192 
197 
201  struct GNUNET_HashCode app_id;
202 
208 
213  uint8_t force_delta;
214 
219  uint8_t force_full;
220 
225  uint8_t byzantine;
226 
232 
233  /* rest: context message, that is, application-specific
234  message to convince listener to pick up */
235 };
236 
237 
245 {
250 
254  uint64_t current_size;
255 
260 
266 
271 
272  /* rest: the actual element */
273 };
274 
275 
281 {
287 
292 
297 
298  /* rest: the actual element */
299 };
300 
301 
307 {
312 
317 };
318 
319 
325 {
330 
336 
342 
343  /* rest: element */
344 };
345 
346 
351 {
356 
360  uint32_t send_more;
361 };
362 
363 
368 {
373 
377  uint32_t cookie;
378 };
379 
380 
385 {
390 
394  uint32_t cookie;
395 };
396 
397 
399 
400 #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: set.h:83
uint8_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: set.h:127
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: set.h:115
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it's less efficient.
Definition: set.h:109
uint32_t result_mode
How should results be sent to us? See enum GNUNET_SET_ResultMode.
Definition: set.h:103
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_ACCEPT.
Definition: set.h:87
uint32_t request_id
Request ID to identify responses.
Definition: set.h:97
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: set.h:121
uint32_t accept_reject_id
ID of the incoming request we want to accept.
Definition: set.h:92
Sent to the service by the client in order to cancel a set operation.
Definition: set.h:307
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_CANCEL.
Definition: set.h:311
uint32_t request_id
ID of the request we want to cancel.
Definition: set.h:316
Client connects to a lazily copied set.
Definition: set.h:385
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_CONNECT.
Definition: set.h:389
uint32_t cookie
Temporary name for the copied set.
Definition: set.h:394
Server responds to a lazy copy request.
Definition: set.h:368
uint32_t cookie
Temporary name for the copied set.
Definition: set.h:377
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_RESPONSE.
Definition: set.h:372
Message sent by the client to the service to ask starting a new set to perform operations with.
Definition: set.h:41
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_CREATE.
Definition: set.h:45
uint32_t operation
Operation type, values of enum GNUNET_SET_OperationType
Definition: set.h:50
Message sent by client to the service to add or remove an element to/from the set.
Definition: set.h:281
uint16_t element_type
Type of the element to add or remove.
Definition: set.h:291
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_ADD or GNUNET_MESSAGE_TYPE_SET_REMOVE.
Definition: set.h:286
uint16_t reserved
For alignment, always zero.
Definition: set.h:296
Message sent by client to service to initiate a set operation as a client (not as listener).
Definition: set.h:181
uint8_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: set.h:231
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_EVALUATE.
Definition: set.h:185
uint32_t request_id
Id of our set to evaluate, chosen implicitly by the client when it calls GNUNET_SET_commit().
Definition: set.h:207
uint32_t result_mode
How should results be sent to us? See enum GNUNET_SET_ResultMode.
Definition: set.h:191
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: set.h:219
struct GNUNET_HashCode app_id
Application id.
Definition: set.h:201
struct GNUNET_PeerIdentity target_peer
Peer to evaluate the operation with.
Definition: set.h:196
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it's less efficient.
Definition: set.h:213
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: set.h:225
Client acknowledges receiving element in iteration.
Definition: set.h:351
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_ITER_ACK.
Definition: set.h:355
uint32_t send_more
Non-zero if the service should continue sending elements.
Definition: set.h:360
Set element transmitted by service to client in response to a set iteration request.
Definition: set.h:325
uint16_t iteration_id
To which set iteration does this response belong to? First iteration (per client) has counter zero.
Definition: set.h:335
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT.
Definition: set.h:329
uint16_t element_type
Type of the element attached to the message, if any.
Definition: set.h:341
Message sent by the client to the service to start listening for incoming requests to perform a certa...
Definition: set.h:60
struct GNUNET_HashCode app_id
application id
Definition: set.h:74
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_LISTEN.
Definition: set.h:64
uint32_t operation
Operation type, values of enum GNUNET_SET_OperationType
Definition: set.h:69
Message sent by a listening client to the service to reject performing the operation with the other p...
Definition: set.h:136
uint32_t accept_reject_id
ID of the incoming request we want to reject.
Definition: set.h:145
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_REJECT.
Definition: set.h:140
A request for an operation with another client.
Definition: set.h:153
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_REQUEST.
Definition: set.h:157
struct GNUNET_PeerIdentity peer_id
Identity of the requesting peer.
Definition: set.h:168
uint32_t accept_id
ID of the to identify the request when accepting or rejecting it.
Definition: set.h:163
Message sent by the service to the client to indicate an element that is removed (set intersection) o...
Definition: set.h:245
uint32_t request_id
id the result belongs to
Definition: set.h:259
uint16_t result_status
Was the evaluation successful? Contains an enum GNUNET_SET_Status in NBO.
Definition: set.h:265
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_RESULT.
Definition: set.h:249
uint16_t element_type
Type of the element attached to the message, if any.
Definition: set.h:270
uint64_t current_size
Current set size.
Definition: set.h:254