GNUnet  0.11.x
fs.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2003--2012 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  */
20 
26 #ifndef FS_H
27 #define FS_H
28 
29 #include "gnunet_constants.h"
31 #include "gnunet_dht_service.h"
32 #include "gnunet_fs_service.h"
33 #include "gnunet_block_lib.h"
34 #include "block_fs.h"
35 
36 
40 #define DBLOCK_SIZE (32 * 1024)
41 
47 #define HASHING_BLOCKSIZE (1024 * 128)
48 
49 
54 {
59 
64 };
65 
66 
68 
69 
75 {
79  struct GNUNET_MessageHeader header;
80 
85  uint32_t purpose GNUNET_PACKED;
86 
90  struct GNUNET_TIME_AbsoluteNBO expiration_time;
91 
95  struct ContentHashKey chk;
96 
100  uint64_t file_length;
101 };
102 
103 
108 {
113  struct GNUNET_MessageHeader header;
114 
119  uint32_t purpose GNUNET_PACKED;
120 
124  struct GNUNET_TIME_AbsoluteNBO expiration_time;
125 
130 
135 };
136 
137 
152 {
156  struct GNUNET_MessageHeader header;
157 
162 
171 
178  uint64_t inode GNUNET_PACKED;
179 
183  struct GNUNET_HashCode file_id;
184 
185  /* this is followed by a 0-terminated
186  * filename of a file with the hash
187  * "file_id" as seen by the client */
188 };
189 
190 
196 {
201  struct GNUNET_MessageHeader header;
202 
207 
211  struct GNUNET_HashCode file_id;
212 
213  /* this is followed by a 0-terminated
214  * filename of a file with the hash
215  * "file_id" as seen by the client */
216 };
217 
218 
227 {
231  struct GNUNET_MessageHeader header;
232 
237 
241  struct GNUNET_HashCode file_id;
242 };
243 
244 
248 #define SEARCH_MESSAGE_OPTION_NONE 0
249 
253 #define SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY 1
254 
261 #define SEARCH_MESSAGE_OPTION_CONTINUED 2
262 
263 
269 {
273  struct GNUNET_MessageHeader header;
274 
285 
289  uint32_t type GNUNET_PACKED;
290 
295 
306  struct GNUNET_PeerIdentity target;
307 
312  struct GNUNET_HashCode query;
313 
314  /* this is followed by the hash codes of already-known
315  * results (which should hence be excluded from what
316  * the service returns); naturally, this only applies
317  * to queries that can have multiple results (UBLOCKS).
318  */
319 };
320 
321 
329 {
333  struct GNUNET_MessageHeader header;
334 
338  uint32_t type GNUNET_PACKED;
339 
344 
345  /* this is followed by the actual encrypted content */
346 };
347 
355 {
359  struct GNUNET_MessageHeader header;
360 
364  uint32_t type GNUNET_PACKED;
365 
369  struct GNUNET_TIME_AbsoluteNBO expiration;
370 
376 
382 
387  uint32_t respect_offered;
388 
389  /* this is followed by the actual encrypted content */
390 };
392 
393 
394 #endif
395 
396 /* end of fs.h */
static GNUNET_CronTime last_transmission
Response from FS service with a result for a previous FS search.
Definition: fs.h:328
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static char * device
Video device to capture from.
Definition: gnunet-qr.c:39
content hash key
Definition: fs.h:53
uint64_t file_length
Size of the shared file (to be signed).
Definition: fs.h:100
Message send by FS service in response to a request asking for a list of all indexed files...
Definition: fs.h:195
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
Message sent from a GNUnet (fs) publishing activity to the gnunet-fs-service to initiate indexing of ...
Definition: fs.h:151
static unsigned int anonymity_level
Anonymity level option to use for publishing.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
struct GNUNET_HashCode query
Hash of the encrypted content, used for querying.
Definition: fs.h:63
Message sent from a GNUnet (fs) unindexing activity to the gnunet-service-fs to indicate that a file ...
Definition: fs.h:226
A 512-bit hashcode.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
uint32_t respect_offered
How much respect did we offer (in total) before getting an answer (estimate).
Definition: fs.h:387
an ECC signature using EdDSA.
Message sent from the service with the signed LOC URI.
Definition: fs.h:107
Response from FS service with a result for a previous FS search.
Definition: fs.h:354
struct GNUNET_HashCode key
Hash of the original content, used for encryption.
Definition: fs.h:58
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
The identity of the host (wraps the signing key of the peer).
Message sent from a GNUnet (fs) publishing activity to sign a LOC URI.
Definition: fs.h:74
#define GNUNET_PACKED
gcc-ism to get packed structs.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Header for all communications.
static unsigned long long reserved
How much space have we currently reserved?
Message sent from a GNUnet (fs) search activity to the gnunet-service-fs to start a search...
Definition: fs.h:268
uint32_t num_transmissions
How often did we transmit this query before getting an answer (estimate).
Definition: fs.h:381