API to PUT zero-anonymity index data from our datastore into the DHT. More...
Go to the source code of this file.
Data Structures | |
struct | PutOperator |
Context for each zero-anonymity iterator. More... | |
Macros | |
#define | MAX_DHT_PUT_FREQ |
How often do we at most PUT content into the DHT? More... | |
#define | DEFAULT_PUT_REPLICATION 5 |
How many replicas do we try to create per PUT? More... | |
Functions | |
static void | gather_dht_put_blocks (void *cls) |
Task that is run periodically to obtain blocks for DHT PUTs. More... | |
static void | schedule_next_put (struct PutOperator *po) |
Calculate when to run the next PUT operation and schedule it. More... | |
static void | delay_dht_put_blocks (void *cls) |
Continuation called after DHT PUT operation has finished. More... | |
static void | delay_dht_put_task (void *cls) |
Task that is run periodically to obtain blocks for DHT PUTs. More... | |
static void | process_dht_put_content (void *cls, const struct GNUNET_HashCode *key, size_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, uint64_t uid) |
Store content in DHT. More... | |
void | GSF_put_init_ () |
Setup the module. More... | |
void | GSF_put_done_ () |
Shutdown the module. More... | |
Variables | |
static struct PutOperator | operators [] |
ANY-terminated list of our operators (one per type of block that we're putting into the DHT). More... | |
API to PUT zero-anonymity index data from our datastore into the DHT.
Definition in file gnunet-service-fs_put.c.
#define MAX_DHT_PUT_FREQ |
How often do we at most PUT content into the DHT?
Definition at line 34 of file gnunet-service-fs_put.c.
#define DEFAULT_PUT_REPLICATION 5 |
How many replicas do we try to create per PUT?
Definition at line 40 of file gnunet-service-fs_put.c.
|
static |
Task that is run periodically to obtain blocks for DHT PUTs.
cls | type of blocks to gather |
Definition at line 222 of file gnunet-service-fs_put.c.
References delay_dht_put_task(), PutOperator::dht_put_type, PutOperator::dht_qe, PutOperator::dht_task, GNUNET_DATASTORE_get_zero_anonymity(), GNUNET_SCHEDULER_add_now(), GSF_dsh, PutOperator::next_uid, and process_dht_put_content().
Referenced by GSF_put_init_(), and schedule_next_put().
|
static |
Calculate when to run the next PUT operation and schedule it.
po | put operator to schedule |
Definition at line 111 of file gnunet-service-fs_put.c.
References PutOperator::dht_task, gather_dht_put_blocks(), GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY, GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_relative_divide(), GNUNET_TIME_relative_min(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_MINUTES, MAX_DHT_PUT_FREQ, and PutOperator::zero_anonymity_count_estimate.
Referenced by delay_dht_put_blocks(), and delay_dht_put_task().
|
static |
Continuation called after DHT PUT operation has finished.
cls | type of blocks to gather |
Definition at line 139 of file gnunet-service-fs_put.c.
References PutOperator::dht_put, and schedule_next_put().
Referenced by process_dht_put_content().
|
static |
Task that is run periodically to obtain blocks for DHT PUTs.
cls | type of blocks to gather |
Definition at line 154 of file gnunet-service-fs_put.c.
References PutOperator::dht_task, and schedule_next_put().
Referenced by gather_dht_put_blocks(), and process_dht_put_content().
|
static |
Store content in DHT.
cls | closure |
key | key for the content |
size | number of bytes in data |
data | content stored |
type | type of the content |
priority | priority of the content |
anonymity | anonymity-level for the content |
replication | replication-level for the content |
expiration | expiration time for the content |
uid | unique identifier for the datum; maybe 0 if no unique identifier is available |
Definition at line 179 of file gnunet-service-fs_put.c.
References data, DEFAULT_PUT_REPLICATION, delay_dht_put_blocks(), delay_dht_put_task(), PutOperator::dht_put, PutOperator::dht_qe, PutOperator::dht_task, expiration, GNUNET_DHT_put(), GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_MAX, GNUNET_SCHEDULER_add_now(), GSF_dht, key, PutOperator::next_uid, PutOperator::result_count, size, type, and PutOperator::zero_anonymity_count_estimate.
Referenced by gather_dht_put_blocks().
void GSF_put_init_ | ( | void | ) |
Setup the module.
Definition at line 244 of file gnunet-service-fs_put.c.
References PutOperator::dht_put_type, PutOperator::dht_task, gather_dht_put_blocks(), GNUNET_BLOCK_TYPE_ANY, GNUNET_SCHEDULER_add_now(), and operators.
Referenced by run().
void GSF_put_done_ | ( | void | ) |
Shutdown the module.
Definition at line 262 of file gnunet-service-fs_put.c.
References PutOperator::dht_put, PutOperator::dht_put_type, PutOperator::dht_qe, PutOperator::dht_task, GNUNET_BLOCK_TYPE_ANY, GNUNET_DATASTORE_cancel(), GNUNET_DHT_put_cancel(), GNUNET_SCHEDULER_cancel(), and operators.
Referenced by shutdown_task().
|
static |
ANY-terminated list of our operators (one per type of block that we're putting into the DHT).
Definition at line 90 of file gnunet-service-fs_put.c.
Referenced by GSF_put_done_(), and GSF_put_init_().