GNUnet  0.11.x
seti.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 SETI_H
27 #define SETI_H
28 
29 #include "platform.h"
30 #include "gnunet_common.h"
31 #include "gnunet_set_service.h"
32 
34 
40 {
45 };
46 
47 
54 {
59 
64 
68  struct GNUNET_HashCode app_id;
69 };
70 
71 
77 {
82 
87 
92 
98 
99 };
100 
101 
107 {
112 
117 };
118 
119 
124 {
129 
135 
140 
141  /* rest: context message, that is, application-specific
142  message to convince listener to pick up */
143 };
144 
145 
152 {
157 
163 
168 
172  struct GNUNET_HashCode app_id;
173 
179 
180  /* rest: context message, that is, application-specific
181  message to convince listener to pick up */
182 };
183 
184 
192 {
197 
201  uint64_t current_size;
202 
207 
213 
218 
219  /* rest: the actual element */
220 };
221 
222 
227 {
232 
237 
242 
243  /* rest: the actual element */
244 };
245 
246 
252 {
257 
262 };
263 
264 
266 
267 #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: seti.h:77
uint32_t request_id
Request ID to identify responses.
Definition: seti.h:91
uint32_t return_intersection
Return the intersection (1), instead of the elements to remove / the delta (0), in NBO.
Definition: seti.h:97
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_ACCEPT.
Definition: seti.h:81
uint32_t accept_reject_id
ID of the incoming request we want to accept.
Definition: seti.h:86
Sent to the service by the client in order to cancel a set operation.
Definition: seti.h:252
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_CANCEL.
Definition: seti.h:256
uint32_t request_id
ID of the request we want to cancel.
Definition: seti.h:261
Message sent by the client to the service to ask starting a new set to perform operations with.
Definition: seti.h:40
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_CREATE.
Definition: seti.h:44
Message sent by client to the service to add an element to the set.
Definition: seti.h:227
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_ADD.
Definition: seti.h:231
uint16_t element_type
Type of the element to add or remove.
Definition: seti.h:236
uint16_t reserved
For alignment, always zero.
Definition: seti.h:241
Message sent by client to service to initiate a set operation as a client (not as listener).
Definition: seti.h:152
struct GNUNET_HashCode app_id
Application id.
Definition: seti.h:172
uint32_t request_id
Id of our set to evaluate, chosen implicitly by the client when it calls GNUNET_SETI_commit().
Definition: seti.h:162
uint32_t return_intersection
Return the intersection (1), instead of the elements to remove / the delta (0), in NBO.
Definition: seti.h:178
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_EVALUATE.
Definition: seti.h:156
struct GNUNET_PeerIdentity target_peer
Peer to evaluate the operation with.
Definition: seti.h:167
Message sent by the client to the service to start listening for incoming requests to perform a certa...
Definition: seti.h:54
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_LISTEN.
Definition: seti.h:58
uint32_t operation
Operation type, values of enum GNUNET_SETI_OperationType
Definition: seti.h:63
struct GNUNET_HashCode app_id
application id
Definition: seti.h:68
Message sent by a listening client to the service to reject performing the operation with the other p...
Definition: seti.h:107
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_REJECT.
Definition: seti.h:111
uint32_t accept_reject_id
ID of the incoming request we want to reject.
Definition: seti.h:116
A request for an operation with another client.
Definition: seti.h:124
struct GNUNET_PeerIdentity peer_id
Identity of the requesting peer.
Definition: seti.h:139
uint32_t accept_id
ID of the to identify the request when accepting or rejecting it.
Definition: seti.h:134
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_REQUEST.
Definition: seti.h:128
Message sent by the service to the client to indicate an element that is removed (set intersection) o...
Definition: seti.h:192
uint32_t request_id
id the result belongs to
Definition: seti.h:206
uint64_t current_size
Current set size.
Definition: seti.h:201
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETI_RESULT.
Definition: seti.h:196
uint16_t element_type
Type of the element attached to the message, if any.
Definition: seti.h:217
uint16_t result_status
Was the evaluation successful? Contains an enum GNUNET_SETI_Status in NBO.
Definition: seti.h:212