X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ffs%2Fgnunet-service-fs_pr.h;h=92827f76bb053a9da6eb99e4665c6bf921d9f404;hb=b393537f38727987db955152cc34d69f4fb4173b;hp=00249afcf6a20983461086c258b3025ca797112c;hpb=83b19539f4d322b43683f5838b72e9ec2c8e6073;p=oweals%2Fgnunet.git diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index 00249afcf..92827f76b 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h @@ -34,6 +34,12 @@ */ enum GSF_PendingRequestOptions { + + /** + * No special options (P2P-default). + */ + GSF_PRO_DEFAULTS = 0, + /** * Request must only be processed locally. */ @@ -47,7 +53,7 @@ enum GSF_PendingRequestOptions /** * Request persists indefinitely (no expiration). */ - GSF_PRO_REQUEST_EXPIRES = 4, + GSF_PRO_REQUEST_NEVER_EXPIRES = 4, /** * Request is allowed to refresh bloomfilter and change mingle value. @@ -63,7 +69,7 @@ enum GSF_PendingRequestOptions * Option mask for typical local requests. */ GSF_PRO_LOCAL_REQUEST = - (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED) + (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED | GSF_PRO_REQUEST_NEVER_EXPIRES) }; @@ -146,6 +152,12 @@ struct GSF_PendingRequestData */ int has_target; + /** + * Has this request been started yet (local/p2p operations)? Or are + * we still constructing it? + */ + int has_started; + }; @@ -162,6 +174,7 @@ struct GSF_PendingRequestData * @param pr handle to the original pending request * @param reply_anonymity_level anonymity level for the reply, UINT32_MAX for "unknown" * @param expiration when does 'data' expire? + * @param last_transmission the last time we've tried to get this block (FOREVER if unknown) * @param type type of the block * @param data response data, NULL on request expiration * @param data_len number of bytes in data @@ -174,6 +187,8 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls, uint32_t reply_anonymity_level, struct GNUNET_TIME_Absolute expiration, + struct GNUNET_TIME_Absolute + last_transmission, enum GNUNET_BLOCK_Type type, const void *data, size_t data_len);