37#define DEFAULT_MAX_PARALLEL_REQUESTS (1024 * 10)
42#define DEFAULT_MAX_PARALLEL_DOWNLOADS 16
56 qe->
h->active_blocks +=
qe->blocks;
57 qe->
h->active_downloads++;
60 "Starting job %p (%u active)\n",
62 qe->
h->active_downloads);
83 qe->
h->active_downloads--;
84 qe->
h->active_blocks -=
qe->blocks;
89 "Stopping job %p (%u active)\n",
91 qe->
h->active_downloads);
116 unsigned int num_downloads_waiting;
117 unsigned int num_downloads_active;
118 unsigned int num_downloads_expired;
119 unsigned int num_probes_active;
120 unsigned int num_probes_waiting;
121 unsigned int num_probes_expired;
122 int num_probes_change;
123 int num_downloads_change;
132 num_probes_waiting = 0;
133 num_downloads_waiting = 0;
139 num_probes_waiting++;
143 num_downloads_waiting++;
152 num_probes_active = 0;
153 num_probes_expired = 0;
154 num_downloads_active = 0;
155 num_downloads_expired = 0;
156 next =
h->running_head;
157 while (NULL != (
qe = next))
168 num_probes_expired++;
181 qe->blocks *
qe->start_times);
186 num_downloads_expired++;
191 num_downloads_active++;
202 num_downloads_active + num_probes_active);
204 "PA: %u, PE: %u, PW: %u; DA: %u, DE: %u, DW: %u\n",
208 num_downloads_active,
209 num_downloads_expired,
210 num_downloads_waiting);
212 h->max_parallel_downloads);
214 if (
h->active_downloads + num_downloads_waiting >
h->max_parallel_downloads)
217 num_probes_change = -
GNUNET_MIN (num_probes_active, num_downloads_waiting);
220 num_downloads_change =
221 h->max_parallel_downloads -
h->active_downloads - num_probes_change;
226 num_downloads_change = num_downloads_waiting;
228 if (1 +
h->max_parallel_downloads / 4 >=
229 (
h->active_downloads + num_downloads_change))
232 (1 +
h->max_parallel_downloads / 4)
233 - (
h->active_downloads + num_downloads_change));
235 num_probes_change = 0;
237 GNUNET_break (num_downloads_change <= num_downloads_waiting);
239 "Changing %d probes and %d/%u/%u downloads\n",
241 num_downloads_change,
242 (
unsigned int)
h->active_downloads,
243 (
unsigned int)
h->max_parallel_downloads);
245 next =
h->running_head;
246 while (NULL != (
qe = next))
251 if (num_probes_change < 0)
255 if (0 == num_probes_change)
263 next =
h->pending_head;
264 while ((NULL != (
qe = next)) &&
265 ((num_probes_change > 0) || (num_downloads_change > 0)))
271 if (num_probes_change > 0)
281 if ((num_downloads_change > 0) &&
282 ((
qe->blocks +
h->active_blocks <=
h->max_parallel_requests) ||
283 ((
qe->blocks >
h->max_parallel_requests) &&
284 (0 ==
h->active_downloads))))
287 num_downloads_change--;
289 else if (num_downloads_change > 0)
303 "AD: %u, MP: %u; %d probes and %d downloads to start, will run again in %s\n",
305 h->max_parallel_requests,
307 num_downloads_change,
313 if (NULL !=
h->queue_job)
342 if (NULL !=
h->queue_job)
366 if (NULL !=
h->queue_job)
456 if (UINT64_MAX == offset)
481 _ (
"Could not open file `%s': %s"),
492 _ (
"Could not read file `%s': %s"),
500 _ (
"Short read reading from file `%s'!"),
553 if (UINT64_MAX == offset)
631 "%s%s%s%s%s%s%s.dir%s%s",
734 if ((NULL == ent) || (0 == strlen (ent)))
742 if ((0 != unlink (
filename)) && (ENOENT != errno))
765 if ((NULL == ent) || (0 == strlen (ent)))
928 (int64_t *) &
ret->bo.expiration_time.abs_value_us)) ||
932 (int32_t *) &
ret->bo.anonymity_level)) ||
936 (int32_t *) &
ret->bo.content_priority)) ||
940 (int32_t *) &
ret->bo.replication_level)))
951 (int64_t *) &
ret->data.file.file_size))
962 if (NULL ==
ret->filename)
965 ret->data.file.reader_cls =
967 if (
ret->data.file.reader_cls == NULL)
971 ret->data.file.reader_cls,
972 ret->data.file.file_size))
981 ret->data.file.reader_cls =
988 if (NULL ==
ret->filename)
996 (int64_t *) &
ret->data.file.file_size))
1006 ret->data.file.reader_cls =
1011 if (NULL ==
ret->filename)
1019 (int64_t *) &
ret->data.file.file_size)) ||
1022 &
ret->data.file.file_id,
1033 ret->data.file.reader_cls =
1038 if (NULL ==
ret->filename)
1046 (int64_t *) &
ret->data.file.file_size)) ||
1049 &
ret->data.file.file_id,
1060 ret->data.file.reader_cls =
1067 (int32_t *) &dsize)) ||
1071 "contents completed",
1072 (int64_t *) &
ret->data.dir.contents_completed)) ||
1077 (int64_t *) &
ret->data.dir.contents_size)) ||
1087 ret->data.dir.dir_size = (uint32_t) dsize;
1093 nxt =
ret->data.dir.entries;
1157 _ (
"Failed to resume publishing information `%s': %s\n"),
1168 if (0 != unlink (fn))
1195 while (
'\0' != *nxt)
1201 if ((NULL ==
end) || (0 == strlen (
end)))
1295 char buf[32 * 1024];
1303 while (off < fi->
data.file.file_size)
1394 "replication level",
1472 "contents completed",
1526 if (0 != unlink (fn))
1661 if (NULL == fi_root)
1681 if (NULL ==
pc->
dsh)
1714 _ (
"Failure while resuming publishing operation `%s': %s\n"),
1729 _ (
"Failed to resume publishing operation `%s': %s\n"),
1793 ((NULL !=
pc->
ns) &&
1958 (int32_t *) &dr->
depth)) ||
2148 if (0 != unlink (fn))
2271 const char *category;
2289 in_pause = (
sc->
task != NULL) ?
'r' :
'\0';
2296 &in_pause,
sizeof(in_pause))) ||
2356 (int32_t *) &
state)) ||
2470 _ (
"Failure while resuming unindexing operation `%s': %s\n"),
2481 _ (
"Failed to resume unindexing operation `%s': %s\n"),
2510 const char *serialization);
2553 if (NULL != serialized)
2587 "mandatory missing",
2595 "availability success",
2599 "availability trials",
2629 _ (
"Failed to resume sub-download `%s': %s\n"),
2637 if (NULL != update_srch)
2647 _ (
"Failed to resume sub-search `%s': %s\n"),
2663 _ (
"Failure while resuming search operation `%s': %s\n"),
2674 if (NULL != sr->
uri)
2676 if (NULL != sr->
meta)
2683 _ (
"Failure while resuming search operation `%s': %s\n"),
2750 pi.
value.
search.specifics.resume_result.result = sr;
2751 pi.
value.
search.specifics.resume_result.availability_rank =
2753 pi.
value.
search.specifics.resume_result.availability_certainty =
2755 pi.
value.
search.specifics.resume_result.applicability_rank =
2830 if (NULL !=
sc->
uri)
2865 "Failed to resume sub-download `%s': could not open file `%s'\n"),
2875 _ (
"Failed to resume sub-download `%s': %s\n"),
2899 if (NULL !=
dc->
uri)
3016 if ((NULL == parent) && (NULL == search))
3123 if ((
'\0' == in_pause) &&
3128 _ (
"Could not resume running search, will resume as paused search\n"));
3164 if (S_ISDIR (buf.st_mode))
3184 _ (
"Failure while resuming search operation `%s': %s\n"),
3227 "Failure while resuming download operation `%s': %s\n",
3283 ret->avg_block_latency =
3285 va_start (ap,
flags);
3292 ret->max_parallel_downloads = va_arg (ap,
unsigned int);
3297 ret->max_parallel_requests = va_arg (ap,
unsigned int);
3332 while (NULL !=
h->top_head)
3333 h->top_head->ssf (
h->top_head->ssf_cls);
3334 if (NULL !=
h->queue_job)
struct GNUNET_GETOPT_CommandLineOption options[]
#define HASHING_BLOCKSIZE
Blocksize to use when hashing files for indexing (blocksize for IO, not for the DBlocks).
#define DBLOCK_SIZE
Size of the individual blocks used for file-sharing.
static int deserialize_download_file(void *cls, const char *filename)
Function called with a filename of serialized download operation to deserialize.
static void remove_sync_file_in_dir(struct GNUNET_FS_Handle *h, const char *ext, const char *uni, const char *ent)
Remove serialization/deserialization file from disk.
void GNUNET_FS_search_result_sync_(struct GNUNET_FS_SearchResult *sr)
Synchronize this search result with its mirror on disk.
#define DEFAULT_MAX_PARALLEL_REQUESTS
How many block requests can we have outstanding in parallel at a time by default?
static int deserialize_unindex_file(void *cls, const char *filename)
Function called with a filename of serialized unindexing operation to deserialize.
static int copy_from_reader(struct GNUNET_BIO_WriteHandle *wh, struct GNUNET_FS_FileInformation *fi)
Copy all of the data from the reader to the write handle.
static struct GNUNET_FS_FileInformation * deserialize_file_information(struct GNUNET_FS_Handle *h, const char *filename)
Using the given serialization filename, try to deserialize the file-information tree associated with ...
void GNUNET_FS_unindex_sync_(struct GNUNET_FS_UnindexContext *uc)
Synchronize this unindex struct with its mirror on disk.
static int deserialize_search_file(void *cls, const char *filename)
Function called with a filename of serialized search operation to deserialize.
static char * get_serialization_file_name(struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
Return the full filename where we would store state information (for serialization/deserialization).
static void start_job(struct GNUNET_FS_QueueEntry *qe)
Start the given job (send signal, remove from pending queue, update counters and state).
void GNUNET_FS_search_sync_(struct GNUNET_FS_SearchContext *sc)
Synchronize this search struct with its mirror on disk.
static struct DownloadRequest * read_download_request(struct GNUNET_BIO_ReadHandle *rh)
Read a download request tree.
struct GNUNET_FS_QueueEntry * GNUNET_FS_queue_(struct GNUNET_FS_Handle *h, GNUNET_SCHEDULER_TaskCallback start, GNUNET_SCHEDULER_TaskCallback stop, void *cls, unsigned int blocks, enum GNUNET_FS_QueuePriority priority)
Add a job to the queue.
static void deserialize_download(struct GNUNET_FS_Handle *h, struct GNUNET_BIO_ReadHandle *rh, struct GNUNET_FS_DownloadContext *parent, struct GNUNET_FS_SearchResult *search, const char *serialization)
Deserialize a download.
static struct GNUNET_BIO_ReadHandle * get_read_handle(struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
Return a read handle for deserialization.
static int fip_signal_resume(void *cls, struct GNUNET_FS_FileInformation *fi, uint64_t length, struct GNUNET_FS_MetaData *meta, struct GNUNET_FS_Uri **uri, struct GNUNET_FS_BlockOptions *bo, int *do_index, void **client_info)
Signal the FS's progress function that we are resuming an upload.
static void stop_job(struct GNUNET_FS_QueueEntry *qe)
Stop the given job (send signal, remove from active queue, update counters and state).
void * GNUNET_FS_make_file_reader_context_(const char *filename)
Create the closure for the GNUNET_FS_data_reader_file_() callback.
static void signal_download_resume(struct GNUNET_FS_DownloadContext *dc)
Send the 'resume' signal to the callback; also actually resume the download (put it in the queue).
static void deserialization_master(const char *master_path, GNUNET_FileNameCallback proc, struct GNUNET_FS_Handle *h)
Deserialize information about pending operations.
static char * get_serialization_file_name_in_dir(struct GNUNET_FS_Handle *h, const char *ext, const char *uni, const char *ent)
Return the full filename where we would store state information (for serialization/deserialization) t...
size_t GNUNET_FS_data_reader_copy_(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Function that provides data by copying from a buffer.
static char * make_serialization_file_name(struct GNUNET_FS_Handle *h, const char *ext)
Create a new random name for serialization.
static int read_start_time(struct GNUNET_BIO_ReadHandle *rh, struct GNUNET_TIME_Absolute *timestamp)
Deserialize a start-time.
static int write_download_request(struct GNUNET_BIO_WriteHandle *wh, struct DownloadRequest *dr)
Serialize a download request.
static struct GNUNET_BIO_WriteHandle * get_write_handle_in_dir(struct GNUNET_FS_Handle *h, const char *ext, const char *uni, const char *ent)
Return a write handle for serialization.
static struct GNUNET_BIO_WriteHandle * get_write_handle(struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
Return a write handle for serialization.
static int free_result(void *cls, const struct GNUNET_HashCode *key, void *value)
Iterator over search results freeing each.
void GNUNET_FS_download_sync_(struct GNUNET_FS_DownloadContext *dc)
Synchronize this download struct with its mirror on disk.
static struct GNUNET_FS_SearchContext * deserialize_search(struct GNUNET_FS_Handle *h, struct GNUNET_BIO_ReadHandle *rh, struct GNUNET_FS_SearchResult *psearch_result, const char *serialization)
Deserialize a search.
static char * get_download_sync_filename(struct GNUNET_FS_DownloadContext *dc, const char *uni, const char *ext)
Compute the name of the sync file (or directory) for the given download context.
static void process_job_queue(void *cls)
Process the jobs in the job queue, possibly starting some and stopping others.
static void signal_search_resume(struct GNUNET_FS_SearchContext *sc)
Signal resuming of a search to our clients (for the top level search and all sub-searches).
void GNUNET_FS_remove_sync_file_(struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
Remove serialization/deserialization file from disk.
static void free_search_context(struct GNUNET_FS_SearchContext *sc)
Free memory allocated by the search context and its children.
#define DEFAULT_MAX_PARALLEL_DOWNLOADS
How many downloads can we have outstanding in parallel at a time by default?
static char * get_serialization_short_name(const char *fullname)
Given a serialization name (full absolute path), return the basename of the file (without the path),...
static int write_start_time(struct GNUNET_BIO_WriteHandle *wh, struct GNUNET_TIME_Absolute timestamp)
Serialize a start-time.
struct TopLevelActivity * GNUNET_FS_make_top(struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf, void *ssf_cls)
Create a top-level activity entry.
static struct GNUNET_FS_FileInformation * find_file_position(struct GNUNET_FS_FileInformation *pos, const char *srch)
Find the entry in the file information struct where the serialization filename matches the given name...
static int deserialize_subdownload(void *cls, const char *filename)
Function called with a filename of serialized sub-download to deserialize.
void GNUNET_FS_remove_sync_dir_(struct GNUNET_FS_Handle *h, const char *ext, const char *uni)
Remove serialization/deserialization directory from disk.
void GNUNET_FS_file_information_sync_(struct GNUNET_FS_FileInformation *fi)
Create a temporary file on disk to store the current state of fi in.
void GNUNET_FS_dequeue_(struct GNUNET_FS_QueueEntry *qe)
Dequeue a job from the queue.
static char * make_serialization_file_name_in_dir(struct GNUNET_FS_Handle *h, const char *ext, const char *uni)
Create a new random name for serialization.
static int deserialize_search_result(void *cls, const char *filename)
Function called with a filename of serialized search result to deserialize.
static int signal_result_resume(void *cls, const struct GNUNET_HashCode *key, void *value)
Iterator over search results signaling resume to the client for each result.
static void free_download_context(struct GNUNET_FS_DownloadContext *dc)
Free this download context and all of its descendants.
size_t GNUNET_FS_data_reader_file_(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Function that provides data by reading from a file.
void GNUNET_FS_end_top(struct GNUNET_FS_Handle *h, struct TopLevelActivity *top)
Destroy a top-level activity entry.
void GNUNET_FS_publish_sync_(struct GNUNET_FS_PublishContext *pc)
Synchronize this publishing struct with its mirror on disk.
static struct GNUNET_FS_FileInformation * deserialize_fi_node(struct GNUNET_FS_Handle *h, const char *fn, struct GNUNET_BIO_ReadHandle *rh)
Using the given serialization filename, try to deserialize the file-information tree associated with ...
static int deserialize_publish_file(void *cls, const char *filename)
Function called with a filename of serialized publishing operation to deserialize.
shared definitions for the FS library
@ BRS_DOWNLOAD_UP
This block and all of its children have been downloaded successfully (full completion propagates up).
@ BRS_RECONSTRUCT_META_UP
We've calculated the CHK bottom-up based on the meta data.
@ BRS_CHK_SET
We've determined the real, desired CHK for this block (full tree reconstruction failed),...
@ BRS_ERROR
We got a block back that matched the query but did not hash to the key (malicious publisher or hash c...
@ BRS_RECONSTRUCT_DOWN
We've checked the block on the path down the tree, and the content on disk did match the desired CHK,...
@ BRS_INIT
Initial state, block has only been allocated (since it is relevant to the overall download request).
@ BRS_DOWNLOAD_DOWN
We've successfully downloaded this block, but the children still need to be either downloaded or veri...
@ BRS_RECONSTRUCT_UP
We've calculated the CHK bottom-up based on what we have on disk, which may not be what the desired C...
void GNUNET_FS_download_signal_suspend_(void *cls)
Create SUSPEND event for the given download operation and then clean up our state (without stop signa...
void * GNUNET_FS_search_make_status_(struct GNUNET_FS_ProgressInfo *pi, struct GNUNET_FS_Handle *h, struct GNUNET_FS_SearchContext *sc)
Fill in all of the generic fields for a search event and call the callback.
UnindexState
Phases of unindex processing (state machine).
@ UNINDEX_STATE_EXTRACT_KEYWORDS
Find out which keywords apply.
@ UNINDEX_STATE_COMPLETE
We're done.
@ UNINDEX_STATE_DS_REMOVE
We're telling the datastore to delete the respective DBlocks and IBlocks.
@ UNINDEX_STATE_HASHING
We're currently hashing the file.
@ UNINDEX_STATE_ERROR
We've encountered a fatal error.
@ UNINDEX_STATE_FS_NOTIFY
We're notifying the FS service about the unindexing.
@ UNINDEX_STATE_DS_REMOVE_KBLOCKS
We're telling the datastore to remove KBlocks.
@ GNUNET_FS_URI_KSK
Keyword search key (query with keywords).
#define GNUNET_FS_SYNC_PATH_MASTER_DOWNLOAD
Name of the directory with master downloads (not associated with search or part of another download).
void GNUNET_FS_unindex_do_remove_kblocks_(struct GNUNET_FS_UnindexContext *uc)
If necessary, connect to the datastore and remove the KBlocks.
void GNUNET_FS_free_download_request_(struct DownloadRequest *dr)
(recursively) free download request structure
#define GNUNET_FS_SYNC_PATH_MASTER_SEARCH
Name of the directory with top-level searches.
void GNUNET_FS_publish_signal_suspend_(void *cls)
Create SUSPEND event for the given publish operation and then clean up our state (without stop signal...
#define GNUNET_FS_SYNC_PATH_MASTER_UNINDEX
Name of the directory with unindex operations.
#define GNUNET_FS_SYNC_PATH_MASTER_PUBLISH
Name of the directory with publishing operations.
#define CHK_PER_INODE
Pick a multiple of 2 here to achieve 8-byte alignment! We also probably want DBlocks to have (roughly...
void GNUNET_FS_unindex_make_status_(struct GNUNET_FS_ProgressInfo *pi, struct GNUNET_FS_UnindexContext *uc, uint64_t offset)
Fill in all of the generic fields for an unindex event and call the callback.
void GNUNET_FS_download_make_status_(struct GNUNET_FS_ProgressInfo *pi, struct GNUNET_FS_DownloadContext *dc)
Fill in all of the generic fields for a download event and call the callback.
void GNUNET_FS_download_start_task_(void *cls)
Task that creates the initial (top-level) download request for the file.
#define GNUNET_FS_SYNC_PATH_CHILD_SEARCH
Name of the directory with sub-searches (namespace-updates).
void GNUNET_FS_unindex_do_extract_keywords_(struct GNUNET_FS_UnindexContext *uc)
Extract the keywords for KBlock removal.
void GNUNET_FS_unindex_do_remove_(struct GNUNET_FS_UnindexContext *uc)
Connect to the datastore and remove the blocks.
void * GNUNET_FS_publish_make_status_(struct GNUNET_FS_ProgressInfo *pi, struct GNUNET_FS_PublishContext *pc, const struct GNUNET_FS_FileInformation *p, uint64_t offset)
Fill in all of the generic fields for a publish event and call the callback.
void GNUNET_FS_search_start_probe_(struct GNUNET_FS_SearchResult *sr)
Start download probes for the given search result.
GNUNET_FS_QueuePriority
Priorities for the queue.
@ GNUNET_FS_QUEUE_PRIORITY_NORMAL
Default priority.
@ GNUNET_FS_QUEUE_PRIORITY_PROBE
This is a probe (low priority).
void(* SuspendSignalFunction)(void *cls)
Function signature of the functions that can be called to trigger suspend signals and clean-up for to...
void GNUNET_FS_unindex_signal_suspend_(void *cls)
Create SUSPEND event for the given unindex operation and then clean up our state (without stop signal...
int GNUNET_FS_search_start_searching_(struct GNUNET_FS_SearchContext *sc)
Build the request and actually initiate the search using the GNUnet FS service.
void GNUNET_FS_unindex_process_hash_(void *cls, const struct GNUNET_HashCode *file_id)
Function called once the hash of the file that is being unindexed has been computed.
#define GNUNET_FS_SYNC_PATH_CHILD_DOWNLOAD
Name of the directory with downloads that are part of another download or a search.
void GNUNET_FS_publish_main_(void *cls)
Main function that performs the upload.
#define GNUNET_FS_SYNC_PATH_FILE_INFO
Name of the directory with files that are being published.
void GNUNET_FS_search_signal_suspend_(void *cls)
Create SUSPEND event for the given search operation and then clean up our state (without stop signal)...
unsigned int GNUNET_FS_compute_depth(uint64_t flen)
Compute the depth of the CHK tree.
Merkle-tree-ish-CHK file encoding for GNUnet.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static int start
Set if we are to start default services (including ARM).
static int ret
Final status code.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static char * dir
Set to the directory where runtime files are stored.
static int end
Set if we are to shutdown all services (including ARM).
static uint64_t timestamp(void)
Get current timestamp.
static struct GNUNET_TIME_Absolute end_time
At what time MUST the current hostlist request be done?
static struct GNUNET_DATASTORE_QueueEntry * qe
Current operation.
static char * data
The data to insert into the dht.
struct GNUNET_HashCode key
The key used in the DHT.
static void cleanup(void *cls)
Disconnect and shutdown.
static struct GNUNET_FS_DownloadContext * dc
static struct GNUNET_NAMECACHE_Handle * ns
Handle to the namecache.
static char * value
Value of the record to add/remove.
static int status
The program status; 0 for success.
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static struct GNUNET_FS_MetaData * meta
Meta-data provided via command-line option.
static struct GNUNET_FS_BlockOptions bo
Options we set for published blocks.
static struct GNUNET_FS_PublishContext * pc
Handle to FS-publishing operation.
enum State state
current state of profiling
static struct GNUNET_FS_SearchContext * sc
static struct GNUNET_FS_UnindexContext * uc
API for file sharing via GNUnet.
enum GNUNET_GenericReturnValue GNUNET_BIO_read(struct GNUNET_BIO_ReadHandle *h, const char *what, void *result, size_t len)
Read some contents into a buffer.
enum GNUNET_GenericReturnValue GNUNET_BIO_write_close(struct GNUNET_BIO_WriteHandle *h, char **emsg)
Close an IO handle.
struct GNUNET_BIO_ReadSpec GNUNET_BIO_read_spec_string(const char *what, char **result, size_t max_length)
Create the specification to read a 0-terminated string.
struct GNUNET_BIO_WriteHandle * GNUNET_BIO_write_open_file(const char *fn)
Open a file for writing.
enum GNUNET_GenericReturnValue GNUNET_BIO_write_int32(struct GNUNET_BIO_WriteHandle *h, const char *what, int32_t i)
Write an (u)int32_t.
enum GNUNET_GenericReturnValue GNUNET_BIO_read_spec_commit(struct GNUNET_BIO_ReadHandle *h, struct GNUNET_BIO_ReadSpec *rs)
Execute the read specifications in order.
enum GNUNET_GenericReturnValue GNUNET_BIO_write(struct GNUNET_BIO_WriteHandle *h, const char *what, const void *buffer, size_t n)
Write a buffer to a handle.
enum GNUNET_GenericReturnValue GNUNET_BIO_read_string(struct GNUNET_BIO_ReadHandle *h, const char *what, char **result, size_t max_length)
Read 0-terminated string.
struct GNUNET_BIO_WriteSpec GNUNET_BIO_write_spec_string(const char *what, const char *s)
Create the specification to write a 0-terminated string.
#define GNUNET_BIO_read_spec_end()
End of specifications marker.
enum GNUNET_GenericReturnValue GNUNET_BIO_write_string(struct GNUNET_BIO_WriteHandle *h, const char *what, const char *s)
Write a 0-terminated string.
struct GNUNET_BIO_ReadSpec GNUNET_BIO_read_spec_int32(const char *what, int32_t *i)
Create the specification to read an (u)int32_t.
#define GNUNET_BIO_write_spec_end()
End of specifications marker.
struct GNUNET_BIO_WriteSpec GNUNET_BIO_write_spec_object(const char *what, void *source, size_t size)
Create the specification to read some bytes.
enum GNUNET_GenericReturnValue GNUNET_BIO_write_spec_commit(struct GNUNET_BIO_WriteHandle *h, struct GNUNET_BIO_WriteSpec *ws)
Execute the write specifications in order.
enum GNUNET_GenericReturnValue GNUNET_BIO_read_close(struct GNUNET_BIO_ReadHandle *h, char **emsg)
Close an open handle.
enum GNUNET_GenericReturnValue GNUNET_BIO_read_int64(struct GNUNET_BIO_ReadHandle *h, const char *what, int64_t *i)
Read an (u)int64_t.
enum GNUNET_GenericReturnValue GNUNET_BIO_read_int32(struct GNUNET_BIO_ReadHandle *h, const char *what, int32_t *i)
Read an (u)int32_t.
struct GNUNET_BIO_WriteSpec GNUNET_BIO_write_spec_int32(const char *what, int32_t *i)
Create the specification to write an (u)int32_t.
struct GNUNET_BIO_ReadSpec GNUNET_BIO_read_spec_int64(const char *what, int64_t *i)
Create the specification to read an (u)int64_t.
struct GNUNET_BIO_ReadHandle * GNUNET_BIO_read_open_file(const char *fn)
Open a file for reading.
enum GNUNET_GenericReturnValue GNUNET_BIO_write_int64(struct GNUNET_BIO_WriteHandle *h, const char *what, int64_t i)
Write an (u)int64_t.
struct GNUNET_BIO_WriteSpec GNUNET_BIO_write_spec_int64(const char *what, int64_t *i)
Create the specification to write an (u)int64_t.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_filename(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be the name of a file or directory.
struct GNUNET_DATASTORE_Handle * GNUNET_DATASTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the datastore service.
struct GNUNET_DISK_FileHandle * GNUNET_DISK_file_open(const char *fn, enum GNUNET_DISK_OpenFlags flags, enum GNUNET_DISK_AccessPermissions perm)
Open a file.
char * GNUNET_DISK_mktemp(const char *t)
Create an (empty) temporary file on disk.
off_t GNUNET_DISK_file_seek(const struct GNUNET_DISK_FileHandle *h, off_t offset, enum GNUNET_DISK_Seek whence)
Move the read/write pointer in a file.
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_test(const char *fil, int is_readable)
Test if fil is a directory and listable.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_close(struct GNUNET_DISK_FileHandle *h)
Close an open file.
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_create_for_file(const char *filename)
Create the directory structure for storing a file.
ssize_t GNUNET_DISK_file_read(const struct GNUNET_DISK_FileHandle *h, void *result, size_t len)
Read the contents of a binary file into a buffer.
int GNUNET_DISK_directory_scan(const char *dir_name, GNUNET_FileNameCallback callback, void *callback_cls)
Scan a directory for files.
@ GNUNET_DISK_OPEN_READ
Open the file for reading.
@ GNUNET_DISK_PERM_NONE
Nobody is allowed to do anything to the file.
@ GNUNET_DISK_SEEK_SET
Seek an absolute position (from the start of the file).
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert_after(head, tail, other, element)
Insert an element into a DLL after the given other element.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
GNUNET_FS_Flags
General (global) option flags for file-sharing.
GNUNET_FS_SearchOptions
Options for searching.
GNUNET_FS_DownloadOptions
Options for downloading.
uint64_t GNUNET_FS_uri_chk_get_file_size(const struct GNUNET_FS_Uri *uri)
What is the size of the file that this URI refers to?
int GNUNET_FS_uri_test_ksk(const struct GNUNET_FS_Uri *uri)
Is this a keyword URI?
GNUNET_FS_OPTIONS
Options specified in the VARARGs portion of GNUNET_FS_start.
void GNUNET_FS_file_information_inspect(struct GNUNET_FS_FileInformation *dir, GNUNET_FS_FileInformationProcessor proc, void *proc_cls)
Inspect a file or directory in a publish-structure.
enum GNUNET_GenericReturnValue GNUNET_FS_read_meta_data(struct GNUNET_BIO_ReadHandle *h, const char *what, struct GNUNET_FS_MetaData **result)
Read a metadata container.
int GNUNET_FS_uri_test_loc(const struct GNUNET_FS_Uri *uri)
Is this a location URI?
char * GNUNET_FS_uri_to_string(const struct GNUNET_FS_Uri *uri)
Convert a URI to a UTF-8 String.
struct GNUNET_FS_Handle * GNUNET_FS_start(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *client_name, GNUNET_FS_ProgressCallback upcb, void *upcb_cls, enum GNUNET_FS_Flags flags,...)
Setup a connection to the file-sharing service.
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
int GNUNET_FS_uri_test_sks(const struct GNUNET_FS_Uri *uri)
Is this a namespace URI?
int GNUNET_FS_meta_data_test_for_directory(const struct GNUNET_FS_MetaData *md)
Does the meta-data claim that this is a directory? Checks if the mime-type is that of a GNUnet direct...
int GNUNET_FS_uri_test_chk(const struct GNUNET_FS_Uri *uri)
Is this a file (or directory) URI?
void GNUNET_FS_stop(struct GNUNET_FS_Handle *h)
Close our connection with the file-sharing service.
struct GNUNET_FS_Uri * GNUNET_FS_uri_parse(const char *uri, char **emsg)
Convert a UTF-8 String to a URI.
struct GNUNET_BIO_ReadSpec GNUNET_FS_read_spec_meta_data(const char *what, struct GNUNET_FS_MetaData **result)
Create the specification to read a metadata container.
struct GNUNET_BIO_WriteSpec GNUNET_FS_write_spec_meta_data(const char *what, const struct GNUNET_FS_MetaData *m)
Create the specification to write a metadata container.
void GNUNET_FS_file_information_destroy(struct GNUNET_FS_FileInformation *fi, GNUNET_FS_FileInformationProcessor cleaner, void *cleaner_cls)
Destroy publish-structure.
int GNUNET_FS_uri_loc_get_peer_identity(const struct GNUNET_FS_Uri *uri, struct GNUNET_PeerIdentity *peer)
Obtain the identity of the peer offering the data.
void *(* GNUNET_FS_ProgressCallback)(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Notification of FS to a client about the progress of an operation.
@ GNUNET_FS_FLAGS_PERSISTENCE
Is persistence of operations desired? (will create SUSPEND/RESUME events).
@ GNUNET_FS_DOWNLOAD_IS_PROBE
Internal option used to flag this download as a 'probe' for a search result.
@ GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM
Select the desired amount of parallelism (this option should be followed by an "unsigned int" giving ...
@ GNUNET_FS_OPTIONS_END
Last option in the VARARG list.
@ GNUNET_FS_OPTIONS_REQUEST_PARALLELISM
Maximum number of requests that should be pending at a given point in time (individual downloads may ...
@ GNUNET_FS_STATUS_UNINDEX_RESUME
Notification that we resumed unindexing of a file.
@ GNUNET_FS_STATUS_DOWNLOAD_RESUME
Notification that this download is being resumed.
@ GNUNET_FS_STATUS_SEARCH_RESUME
Last event when a search is being resumed; note that "GNUNET_FS_SEARCH_START" will not be generated i...
@ GNUNET_FS_STATUS_SEARCH_RESUME_RESULT
Event generated for each search result when the respective search is resumed.
@ GNUNET_FS_STATUS_PUBLISH_RESUME
Notification that we have resumed sharing a file structure.
@ GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY
Simulate publishing.
struct GNUNET_CRYPTO_FileHashContext * GNUNET_CRYPTO_hash_file(enum GNUNET_SCHEDULER_Priority priority, const char *filename, size_t blocksize, GNUNET_CRYPTO_HashCompletedCallback callback, void *callback_cls)
Compute the hash of an entire file.
int GNUNET_CONTAINER_multihashmap_iterate(struct GNUNET_CONTAINER_MultiHashMap *map, GNUNET_CONTAINER_MultiHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE
Allow multiple values with the same key.
enum GNUNET_GenericReturnValue(* GNUNET_FileNameCallback)(void *cls, const char *filename)
Function called with a filename.
#define GNUNET_log(kind,...)
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
@ GNUNET_SCHEDULER_PRIORITY_IDLE
Run when otherwise idle.
@ GNUNET_SCHEDULER_PRIORITY_BACKGROUND
Run as background job (higher than idle, lower than default).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
#define GNUNET_log_strerror_file(level, cmd, filename)
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the mess...
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_malloc_large(size)
Wrapper around malloc.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_with_priority(enum GNUNET_SCHEDULER_Priority prio, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified priority.
char * GNUNET_STRINGS_filename_expand(const char *fil)
Complete filename (a la shell) from abbrevition.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_min(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the minimum of two relative time values.
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration(struct GNUNET_TIME_Absolute whence)
Get the duration of an operation as the difference of the current time and the given start time "henc...
struct GNUNET_TIME_Relative GNUNET_TIME_relative_saturating_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Saturating multiply relative time by a given factor.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining(struct GNUNET_TIME_Absolute future)
Given a timestamp in the future, how much time remains until then?
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
#define GNUNET_TIME_UNIT_MINUTES
One minute.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_add(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Add relative times together.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_subtract(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Subtract a given relative duration from the given start time.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Add a given relative duration to the given start time.
Information about an active download request.
struct DownloadRequest ** children
Array (!) of child-requests, or NULL for the bottom of the tree.
unsigned int num_children
Number of entries in children array.
uint64_t offset
Offset of the corresponding block.
enum BlockRequestState state
State in the FSM.
unsigned int depth
Depth of the corresponding block in the tree.
struct DownloadRequest * parent
Parent in the CHK-tree.
struct ContentHashKey chk
CHK for the request for this block (set during reconstruction to what we have on disk,...
Closure for GNUNET_FS_data_reader_file_().
struct GNUNET_DISK_FileHandle * fd
File descriptor, NULL if it has not yet been opened.
char * filename
Name of the file to read.
const struct GNUNET_CONFIGURATION_Handle * cfg
The configuration that we are using.
Handle for buffered reading.
char * emsg
Error message, NULL if there were no errors.
Structure specifying a reading operation on an IO handle.
GNUNET_BIO_ReadHandler rh
Function performing data deserialization.
Handle for buffered writing.
Structure specifying a writing operation on an IO handle.
GNUNET_BIO_WriteHandler wh
Function performing data serialization.
Private ECC key encoded for transmission.
unsigned int priority
Priority in the queue.
struct GNUNET_DATASTORE_Handle * h
Handle to the master context.
struct GNUNET_DATASTORE_QueueEntry * next
This is a linked list.
Handle used to access files (and pipes).
Settings for publishing a block (which may of course also apply to an entire directory or file).
uint32_t anonymity_level
At which anonymity level should the block be shared? (0: no anonymity, 1: normal GAP,...
uint32_t content_priority
How important is it for us to store the block? If we run out of space, the highest-priority,...
uint32_t replication_level
How often should we try to migrate the block to other peers? Only used if "CONTENT_PUSHING" is set to...
struct GNUNET_TIME_Absolute expiration_time
At what time should the block expire? Data blocks (DBLOCKS and IBLOCKS) may still be used even if the...
Context for controlling a download.
int has_finished
Flag set upon transitive completion (includes child downloads).
unsigned int treedepth
The depth of the file-tree.
char * filename
Where are we writing the data (name of the file, can be NULL!).
struct GNUNET_FS_Uri * uri
URI that identifies the file that we are downloading.
struct GNUNET_FS_MetaData * meta
Known meta-data for the file (can be NULL).
uint64_t old_file_size
What was the size of the file on disk that we're downloading before we started? Used to detect if the...
uint64_t completed
How many bytes have we already received within the specified range (DBlocks only).
uint64_t offset
What is the first offset that we're interested in?
struct GNUNET_FS_QueueEntry * job_queue
Our entry in the job queue.
char * emsg
Error message, NULL if we're doing OK.
struct GNUNET_SCHEDULER_Task * task
ID of a task that is using this struct and that must be cancelled when the download is being stopped ...
struct GNUNET_FS_SearchResult * search
Associated search (used when downloading files based on search results), or NULL for none.
struct GNUNET_FS_DownloadContext * child_tail
Tail of list of child downloads.
struct GNUNET_CONTAINER_MultiHashMap * active
Map of active requests (those waiting for a response).
struct GNUNET_FS_DownloadContext * child_head
Head of list of child downloads.
uint64_t length
How many bytes starting from offset are desired? This is NOT the overall length of the file!
char * serialization
Random portion of filename we use for syncing state of this download.
uint32_t anonymity
Desired level of anonymity.
char * temp_filename
Where are we writing the data temporarily (name of the file, can be NULL!); used if we do not have a ...
struct GNUNET_FS_DownloadContext * next
Next download belonging to the same parent.
struct GNUNET_FS_DownloadContext * parent
Parent download (used when downloading files in directories).
struct DownloadRequest * top_request
Top-level download request.
struct GNUNET_PeerIdentity target
Identity of the peer having the content, or all-zeros if we don't know of such a peer.
enum GNUNET_FS_DownloadOptions options
Options for the download.
struct GNUNET_FS_Handle * h
Global FS context.
struct GNUNET_TIME_Absolute start_time
Time download was started.
struct TopLevelActivity * top
Our top-level activity entry (if we are top-level, otherwise NULL).
Master context for most FS operations.
enum GNUNET_FS_Flags flags
General flags.
char * client_name
Name of our client.
void * upcb_cls
Closure for upcb.
GNUNET_FS_ProgressCallback upcb
Function to call with updates on our progress.
Argument given to the progress callback with information about what is going on.
struct GNUNET_FS_ProgressInfo::@21::GNUNET_FS_DownloadStatusEvent download
struct GNUNET_FS_ProgressInfo::@21::GNUNET_FS_PublishStatusEvent publish
enum GNUNET_FS_Status status
Specific status code (determines the event type).
struct GNUNET_FS_ProgressInfo::@21::GNUNET_FS_UnindexEvent unindex
union GNUNET_FS_ProgressInfo::@21 value
Values that depend on the event type.
struct GNUNET_FS_ProgressInfo::@21::GNUNET_FS_SearchStatusEvent search
const struct GNUNET_FS_FileInformation * fi
Information about the file that is being published.
Handle for controlling a publication process.
int skip_next_fi_callback
Flag set to GNUNET_YES if the next callback from GNUNET_FS_file_information_inspect should be skipped...
enum GNUNET_FS_PublishOptions options
Options for publishing.
struct GNUNET_DATASTORE_Handle * dsh
Connection to the datastore service.
struct TopLevelActivity * top
Our top-level activity entry (if we are top-level, otherwise NULL).
struct GNUNET_FS_FileInformation * fi_pos
Current position in the file-tree for the upload.
char * nuid
ID for future updates, NULL if we have no namespace or no updates.
int all_done
Set to GNUNET_YES if all processing has completed.
struct GNUNET_FS_FileInformation * fi
File-structure that is being shared.
char * nid
ID of the content in the namespace, NULL if we have no namespace.
struct GNUNET_FS_Handle * h
Handle to the global fs context.
struct GNUNET_CRYPTO_EcdsaPrivateKey * ns
Namespace that we are publishing in, NULL if we have no namespace.
struct GNUNET_SCHEDULER_Task * upload_task
ID of the task performing the upload.
char * serialization
Filename used for serializing information about this operation (should be determined using 'mktemp').
GNUNET_SCHEDULER_TaskCallback stop
Function to call when the job needs to stop (or is done / dequeued).
void * cls
Closure for start and stop.
enum GNUNET_FS_QueuePriority priority
How important is this download?
unsigned int blocks
How many blocks do the active downloads have?
struct GNUNET_FS_QueueEntry * next
This is a linked list.
Handle for controlling a search.
struct GNUNET_CONTAINER_MultiHashMap * master_result_map
Map that contains a struct GNUNET_FS_SearchResult for each result that was found in the search.
char * emsg
Error message (non-NULL if this operation failed).
char * serialization
Name of the file on disk we use for persistence.
void * client_info
Pointer we keep for the client.
struct GNUNET_FS_SearchResult * psearch_result
For update-searches, link to the search result that triggered the update search; otherwise NULL.
struct GNUNET_SCHEDULER_Task * task
ID of a task that is using this struct and that must be cancelled when the search is being stopped (i...
enum GNUNET_FS_SearchOptions options
Options for the search.
uint32_t anonymity
Anonymity level for the search.
struct TopLevelActivity * top
Our top-level activity entry (if we are top-level, otherwise NULL).
struct GNUNET_FS_Uri * uri
List of keywords that we're looking for.
struct GNUNET_FS_Handle * h
Handle to the global FS context.
struct GNUNET_MQ_Handle * mq
Connection to the FS service.
struct GNUNET_TIME_Absolute start_time
When did we start?
Information we store for each search result.
uint32_t optional_support
Number of optional keywords under which this result was also found.
struct GNUNET_FS_DownloadContext * download
ID of an associated download based on this search result (or NULL for none).
struct GNUNET_FS_SearchContext * update_search
If this search result triggered an update search, this field links to the update search.
void * client_info
Client info for this search result.
uint32_t availability_trials
Number of availability trials that we have performed for this search result.
struct GNUNET_FS_Uri * uri
URI to which this search result refers to.
uint8_t * keyword_bitmap
Bitmap that specifies precisely which keywords have been matched already.
struct GNUNET_FS_Handle * h
File-sharing context this result belongs to.
struct GNUNET_HashCode key
Key for the search result based on the URI.
char * serialization
Name under which this search result is stored on disk.
uint32_t availability_success
Number of availability tests that have succeeded for this result.
struct GNUNET_FS_MetaData * meta
Metadata for the search result.
struct GNUNET_FS_SearchContext * sc
Search context this result belongs to; can be NULL for probes that come from a directory result.
uint32_t mandatory_missing
Number of mandatory keywords for which we have NOT yet found the search result; when this value hits ...
Handle for controlling an unindexing operation.
enum UnindexState state
Current operatinonal phase.
char * emsg
Error message, NULL on success.
struct GNUNET_TIME_Absolute start_time
When did we start?
struct ContentHashKey chk
The content hash key of the last block we processed, will in the end be set to the CHK from the URI.
struct GNUNET_CRYPTO_FileHashContext * fhc
Context for hashing of the file.
struct TopLevelActivity * top
Our top-level activity entry.
char * filename
Name of the file that we are unindexing.
struct GNUNET_FS_Handle * h
Global FS context.
uint32_t ksk_offset
Current offset in KSK removal.
char * serialization
Short name under which we are serializing the state of this operation.
struct GNUNET_FS_Uri * ksk_uri
Keywords found (telling us which KBlocks to remove).
struct GNUNET_HashCode file_id
Hash of the file's contents (once computed).
uint64_t file_size
Overall size of the file.
A Universal Resource Identifier (URI), opaque.
union GNUNET_FS_Uri::@49 data
enum GNUNET_FS_UriType type
Type of the URI.
struct GNUNET_FS_Uri::@49::@50 ksk
unsigned int keywordCount
Size of the keywords array.
Time for absolute times used by GNUnet, in microseconds.
uint64_t abs_value_us
The actual value.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.
We track all of the top-level activities of FS so that we can signal 'suspend' on shutdown.
void * ssf_cls
Closure for 'ssf' (some struct GNUNET_FS_XXXHandle*)
SuspendSignalFunction ssf
Function to call for suspend-signalling and clean up.