GNUnet  0.10.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 {
76 
80  struct GNUNET_MessageHeader header;
81 
86  uint32_t purpose GNUNET_PACKED;
87 
91  struct GNUNET_TIME_AbsoluteNBO expiration_time;
92 
96  struct ContentHashKey chk;
97 
101  uint64_t file_length;
102 };
103 
104 
109 {
110 
115  struct GNUNET_MessageHeader header;
116 
121  uint32_t purpose GNUNET_PACKED;
122 
126  struct GNUNET_TIME_AbsoluteNBO expiration_time;
127 
132 
137 };
138 
139 
154 {
155 
159  struct GNUNET_MessageHeader header;
160 
165 
174 
181  uint64_t inode GNUNET_PACKED;
182 
186  struct GNUNET_HashCode file_id;
187 
188  /* this is followed by a 0-terminated
189  * filename of a file with the hash
190  * "file_id" as seen by the client */
191 
192 };
193 
194 
200 {
205  struct GNUNET_MessageHeader header;
206 
211 
215  struct GNUNET_HashCode file_id;
216 
217  /* this is followed by a 0-terminated
218  * filename of a file with the hash
219  * "file_id" as seen by the client */
220 
221 };
222 
223 
232 {
233 
237  struct GNUNET_MessageHeader header;
238 
243 
247  struct GNUNET_HashCode file_id;
248 
249 };
250 
251 
255 #define SEARCH_MESSAGE_OPTION_NONE 0
256 
260 #define SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY 1
261 
268 #define SEARCH_MESSAGE_OPTION_CONTINUED 2
269 
270 
276 {
277 
281  struct GNUNET_MessageHeader header;
282 
293 
297  uint32_t type GNUNET_PACKED;
298 
303 
314  struct GNUNET_PeerIdentity target;
315 
320  struct GNUNET_HashCode query;
321 
322  /* this is followed by the hash codes of already-known
323  * results (which should hence be excluded from what
324  * the service returns); naturally, this only applies
325  * to queries that can have multiple results (UBLOCKS).
326  */
327 };
328 
329 
337 {
338 
342  struct GNUNET_MessageHeader header;
343 
347  uint32_t type GNUNET_PACKED;
348 
353 
354  /* this is followed by the actual encrypted content */
355 
356 };
357 
365 {
366 
370  struct GNUNET_MessageHeader header;
371 
375  uint32_t type GNUNET_PACKED;
376 
380  struct GNUNET_TIME_AbsoluteNBO expiration;
381 
387 
393 
398  uint32_t respect_offered;
399 
400  /* this is followed by the actual encrypted content */
401 
402 };
404 
405 
406 #endif
407 
408 /* end of fs.h */
static char * expiration
Credential TTL.
static GNUNET_CronTime last_transmission
Response from FS service with a result for a previous FS search.
Definition: fs.h:336
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:101
Message send by FS service in response to a request asking for a list of all indexed files...
Definition: fs.h:199
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:153
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:231
A 512-bit hashcode.
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:398
an ECC signature using EdDSA.
Message sent from the service with the signed LOC URI.
Definition: fs.h:108
Response from FS service with a result for a previous FS search.
Definition: fs.h:364
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:275
uint32_t num_transmissions
How often did we transmit this query before getting an answer (estimate).
Definition: fs.h:392