X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ffs%2Fgnunet-service-fs_pr.h;h=8a95c20f4523736f2eb19fb1e29b5fd904c6af6f;hb=26d1b687ca01be01505b69ff48ae5d3e0cd4186e;hp=10bc5c1f3d9eb26c8e8b8f8bf005902ed2c554fa;hpb=c00ade9abf751ea2157f1f78dd834257fe19ed6c;p=oweals%2Fgnunet.git diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index 10bc5c1f3..8a95c20f4 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors) + Copyright (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -87,25 +87,20 @@ struct GSF_PendingRequestData struct GNUNET_HashCode query; /** - * Namespace to query, only set if the type is SBLOCK. + * Identity of a peer hosting the content, otherwise NULl. + * Allocated after struct only if needed. Do not free! */ - struct GNUNET_HashCode namespace; - - /** - * Identity of a peer hosting the content, only set if - * 'has_target' is GNUNET_YES. - */ - struct GNUNET_PeerIdentity target; + const struct GNUNET_PeerIdentity *target; /** * Fields for the plan module to track a DLL with the request. */ - struct GSF_RequestPlanReference *rpr_head; + struct GSF_PendingRequestPlanBijection *pr_head; /** * Fields for the plan module to track a DLL with the request. */ - struct GSF_RequestPlanReference *rpr_tail; + struct GSF_PendingRequestPlanBijection *pr_tail; /** * Current TTL for the request. @@ -163,11 +158,6 @@ struct GSF_PendingRequestData */ unsigned int results_found; - /** - * Is the 'target' value set to a valid peer identity? - */ - int has_target; - /** * Has this request been started yet (local/p2p operations)? Or are * we still constructing it? @@ -216,7 +206,6 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls, * @param options request options * @param type type of the block that is being requested * @param query key for the lookup - * @param namespace namespace to lookup, NULL for no namespace * @param target preferred target for the request, NULL for none * @param bf_data raw data for bloom filter for known replies, can be NULL * @param bf_size number of bytes in bf_data @@ -237,7 +226,6 @@ struct GSF_PendingRequest * GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode * query, - const struct GNUNET_HashCode * namespace, const struct GNUNET_PeerIdentity *target, const char *bf_data, size_t bf_size, uint32_t mingle, uint32_t anonymity_level, @@ -362,6 +350,15 @@ void GSF_dht_lookup_ (struct GSF_PendingRequest *pr); +/** + * Consider downloading via cadet (if possible) + * + * @param pr the pending request to process + */ +void +GSF_cadet_lookup_ (struct GSF_PendingRequest *pr); + + /** * Function to be called after we're done processing * replies from the local lookup.