downloading for files on GNUnet More...
Go to the source code of this file.
Functions | |
static void | cleanup_task (void *cls) |
static void | shutdown_task (void *cls) |
static void | display_bar (unsigned long long x, unsigned long long n, unsigned int w) |
Display progress bar (if tty). More... | |
static void * | progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) |
Called by FS client to give information about the progress of an operation. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
Main function that will be run by the scheduler. More... | |
int | main (int argc, char *const *argv) |
The main function to download GNUnet. More... | |
Variables | |
static int | ret |
static unsigned int | verbose |
static int | delete_incomplete |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
static struct GNUNET_FS_Handle * | ctx |
static struct GNUNET_FS_DownloadContext * | dc |
static unsigned int | anonymity = 1 |
static unsigned int | parallelism = 16 |
static unsigned int | request_parallelism = 4092 |
static int | do_recursive |
static char * | filename |
static int | local_only |
downloading for files on GNUnet
Definition in file gnunet-download.c.
|
static |
Definition at line 58 of file gnunet-download.c.
References ctx, and GNUNET_FS_stop().
Referenced by progress_cb().
|
static |
Definition at line 66 of file gnunet-download.c.
References dc, delete_incomplete, and GNUNET_FS_download_stop().
Referenced by run().
|
static |
Display progress bar (if tty).
x | current position in the download |
n | total size of the download |
w | desired number of steps in the progress bar |
Definition at line 84 of file gnunet-download.c.
References GNUNET_snprintf(), and p.
Referenced by progress_cb().
|
static |
Called by FS client to give information about the progress of an operation.
cls | closure |
info | details about the event, specifying the event type and various bits about the event |
struct GNUNET_FS_ProgressInfo
Definition at line 120 of file gnunet-download.c.
References _, cleanup_task(), dc, display_bar(), GNUNET_free, GNUNET_FS_STATUS_DOWNLOAD_ACTIVE, GNUNET_FS_STATUS_DOWNLOAD_COMPLETED, GNUNET_FS_STATUS_DOWNLOAD_ERROR, GNUNET_FS_STATUS_DOWNLOAD_INACTIVE, GNUNET_FS_STATUS_DOWNLOAD_PROGRESS, GNUNET_FS_STATUS_DOWNLOAD_START, GNUNET_FS_STATUS_DOWNLOAD_STOPPED, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), GNUNET_strdup, GNUNET_STRINGS_byte_size_fancy(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, info, t, and verbose.
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
c | configuration |
Definition at line 223 of file gnunet-download.c.
References _, anonymity, consensus-simulation::args, cfg, ctx, dc, do_recursive, filename, GNUNET_free, GNUNET_FS_DOWNLOAD_OPTION_LOOPBACK_ONLY, GNUNET_FS_DOWNLOAD_OPTION_NONE, GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE, GNUNET_FS_download_start(), GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, GNUNET_FS_OPTIONS_END, GNUNET_FS_OPTIONS_REQUEST_PARALLELISM, GNUNET_FS_start(), GNUNET_FS_stop(), GNUNET_FS_uri_chk_get_file_size(), GNUNET_FS_uri_destroy(), GNUNET_FS_uri_parse(), GNUNET_FS_uri_test_chk(), GNUNET_FS_uri_test_loc(), GNUNET_SCHEDULER_add_shutdown(), local_only, options, parallelism, progress_cb(), request_parallelism, ret, shutdown_task(), and uri.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to download GNUnet.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 312 of file gnunet-download.c.
References anonymity, delete_incomplete, do_recursive, filename, gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_increment_uint(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_uint(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), local_only, options, parallelism, request_parallelism, ret, run(), and verbose.
|
static |
Definition at line 32 of file gnunet-download.c.
|
static |
Definition at line 34 of file gnunet-download.c.
Referenced by main(), and progress_cb().
|
static |
Definition at line 36 of file gnunet-download.c.
Referenced by main(), and shutdown_task().
|
static |
Definition at line 38 of file gnunet-download.c.
Referenced by run().
|
static |
Definition at line 40 of file gnunet-download.c.
Referenced by add_global_addresses(), add_plugin(), automaton_merge_states(), automaton_save_graph_step(), block_plugin_consensus_check_block(), block_plugin_consensus_check_reply(), block_plugin_template_create_group(), block_plugin_test_create_group(), cancel_get(), check_connection_quality(), check_edge(), checkvec(), cleanup_task(), compute_nonce(), consider_sending_fc(), construct_dfa_states(), core_env_sent_cb(), cr_cont(), create_peer_ctx(), curl_download_cb(), datacache_get_iterator(), debugctx(), delayed_put(), derive_aes_key(), derive_auth_key(), derive_iv(), derive_pong_iv(), dfa_add_multi_strides_helper(), dfa_merge_nondistinguishable_states(), dfa_minimize(), dfa_state_create(), dht_connected(), dht_get_string_accept_handler(), dht_get_string_handler(), do_dns_read(), do_notify(), find_plugin(), finish_handling_raw_message(), format_help(), GCT_iterate_channels(), GDS_DATACACHE_get_closest(), GDS_DATACACHE_handle_get(), GDS_u_connect(), GDS_u_disconnect(), get_iter(), get_longest_prefix(), get_peer_ctx(), get_request_socket(), GNUNET_BLOCK_check_block(), GNUNET_BLOCK_check_query(), GNUNET_BLOCK_check_reply(), GNUNET_BLOCK_context_create(), GNUNET_BLOCK_context_destroy(), GNUNET_BLOCK_get_key(), GNUNET_BLOCK_group_create(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_ecdsa_public_key_derive(), GNUNET_CRYPTO_eddsa_private_key_derive(), GNUNET_CRYPTO_eddsa_public_key_derive(), GNUNET_CRYPTO_hpke_open(), GNUNET_CRYPTO_hpke_open_oneshot(), GNUNET_CRYPTO_hpke_receiver_setup(), GNUNET_CRYPTO_hpke_receiver_setup2(), GNUNET_CRYPTO_hpke_seal(), GNUNET_CRYPTO_hpke_seal_oneshot(), GNUNET_CRYPTO_hpke_sender_setup(), GNUNET_CRYPTO_hpke_sender_setup2(), GNUNET_CRYPTO_kdf_mod_mpi(), GNUNET_CURL_append_header(), GNUNET_CURL_enable_async_scope_header(), GNUNET_CURL_fini(), GNUNET_CURL_get_select_info(), GNUNET_CURL_gnunet_rc_create(), GNUNET_CURL_gnunet_rc_create_with_parser(), GNUNET_CURL_init(), GNUNET_CURL_job_add(), GNUNET_CURL_job_add2(), GNUNET_CURL_job_add_raw(), GNUNET_CURL_job_add_with_ct_json(), GNUNET_CURL_job_cancel(), GNUNET_CURL_perform(), GNUNET_CURL_perform2(), GNUNET_CURL_set_tlscert(), GNUNET_CURL_set_userpass(), GNUNET_DNSSTUB_add_dns_ip(), GNUNET_DNSSTUB_add_dns_sa(), GNUNET_DNSSTUB_resolve(), GNUNET_DNSSTUB_set_retry(), GNUNET_DNSSTUB_start(), GNUNET_DNSSTUB_stop(), GNUNET_PQ_event_do_poll(), GNUNET_SET_element_hash(), GNUNET_SETI_element_hash(), GNUNET_SETU_element_hash(), GNUNET_SIGNAL_handler_uninstall(), GNUNET_SIGNAL_raise(), handle_dht_local_get_stop(), hkdf_expand(), id_connect_cb(), identity_cb(), increment_seq(), increment_value(), inspect_attrs(), iterate_channels_cb(), key_schedule(), libgnunet_plugin_block_consensus_done(), libgnunet_plugin_block_consensus_init(), make_file(), new_regex_ctx(), nfa_add_alternation(), nfa_add_concatenation(), nfa_add_label(), nfa_add_plus_op(), nfa_add_question_op(), nfa_add_star_op(), nfa_state_create(), op_get_element(), op_get_element_iterator(), output_vectors(), pabc_create_presentation(), PABC_load_public_parameters(), PABC_read_issuer_ppfile(), PABC_read_usr_ctx(), PABC_write_public_parameters(), PABC_write_usr_ctx(), print_version(), regex_add(), regex_add_multiple(), REGEX_BLOCK_check(), regex_combine(), regex_ctx_destroy(), regex_edge_iterator(), regex_find_path(), REGEX_INTERNAL_construct_dfa(), REGEX_INTERNAL_construct_nfa(), REGEX_INTERNAL_context_init(), REGEX_INTERNAL_dfa_add_multi_strides(), REGEX_INTERNAL_search(), regex_next_edge(), regex_result_iterator(), regex_split(), REGEX_TEST_automaton_save_graph(), REGEX_TEST_combine(), remove_by_unique_id(), run(), service_started(), set_absolute_time(), set_attributes_from_idtoken(), set_base32(), set_filename(), set_one(), set_relative_time(), set_string(), set_timestamp(), set_timetravel_time(), set_uint(), set_uint16(), set_ulong(), setup_job(), setup_job_headers(), setup_new_user_context(), start_profiling(), state_add_transition(), t_ax_decrypt_and_validate(), t_ax_encrypt(), t_ax_hmac_hash(), t_hmac(), t_hmac_derive_key(), tcp_send(), transmit_query(), try_send_tcp(), u_address_add(), and u_address_del().
|
static |
Definition at line 42 of file gnunet-download.c.
Referenced by activate_fs_download(), check_completed(), create_download_context(), deactivate_fs_download(), deserialize_download(), do_reconnect(), download_mq_error_handler(), encrypt_existing_match(), fh_reader(), free_download_context(), full_recursive_download(), get_download_sync_filename(), get_next_block(), GNUNET_CONTAINER_bloomfilter_or(), GNUNET_CONTAINER_bloomfilter_or2(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_eddsa_private_key_derive(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_resume(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_start_from_search(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), GNUNET_FS_download_suspend(), GNUNET_FS_download_sync_(), handle_put(), handle_verify_result(), is_recursive_download(), match_full_data(), process_result_with_request(), progress_cb(), reconstruct_cb(), reconstruct_cont(), retry_entry(), run(), schedule_block_download(), shutdown_task(), signal_download_resume(), trigger_recursive_download(), try_match_block(), try_reconnect(), and try_top_down_reconstruction().
|
static |
Definition at line 44 of file gnunet-download.c.
Referenced by create_download_context(), execute_get(), get_cb(), GNUNET_DATASTORE_put(), GNUNET_FS_download_start(), GNUNET_FS_download_start_from_search(), GNUNET_FS_handle_on_demand_block(), GNUNET_FS_probe(), GNUNET_FS_search_start(), handle_datastore_reply(), heap_plugin_put(), main(), postgres_plugin_put(), process_local_reply(), process_migration_content(), process_result(), repl_proc(), run(), search_start(), sqlite_plugin_put(), and transmit_item().
|
static |
Definition at line 46 of file gnunet-download.c.
|
static |
Definition at line 48 of file gnunet-download.c.
|
static |
Definition at line 50 of file gnunet-download.c.
|
static |
Definition at line 52 of file gnunet-download.c.
Referenced by add_file(), callback_scan_for_members(), callback_scan_for_operations(), callback_scan_for_sessions(), check_index_info(), collect_files_cb(), create_download_context(), database_setup(), deserialize_download_file(), deserialize_fi_node(), deserialize_file_information(), deserialize_publish_file(), deserialize_search_file(), deserialize_search_result(), deserialize_subdownload(), deserialize_unindex_file(), determine_id(), directory_scan_cb(), expand_tree(), extract_filename(), find_libraries(), get_ego_filename(), glob_cb(), GNUNET_CONFIGURATION_load(), GNUNET_CONFIGURATION_load_from(), GNUNET_CONFIGURATION_parse(), GNUNET_CONFIGURATION_parse_and_run(), GNUNET_CONFIGURATION_write(), GNUNET_CONFIGURATION_write_diffs(), GNUNET_CONTAINER_bloomfilter_load(), GNUNET_CRYPTO_ecdsa_key_from_file(), GNUNET_CRYPTO_eddsa_key_from_file(), GNUNET_CRYPTO_hash_file(), GNUNET_DISK_directory_create_for_file(), GNUNET_DISK_directory_remove(), GNUNET_DISK_file_change_owner(), GNUNET_DISK_file_get_identifiers(), GNUNET_DISK_file_size(), GNUNET_FS_add_to_index(), GNUNET_FS_directory_list_contents(), GNUNET_FS_directory_scan_start(), GNUNET_FS_download_start(), GNUNET_FS_download_start_from_search(), GNUNET_FS_file_information_create_empty_directory(), GNUNET_FS_file_information_create_from_file(), GNUNET_FS_file_information_set_filename(), GNUNET_FS_make_file_reader_context_(), GNUNET_FS_remove_sync_file_(), GNUNET_FS_unindex_start(), GNUNET_FS_uri_ksk_create_from_meta_data(), GNUNET_HOSTLIST_client_start(), GNUNET_OS_start_process(), GNUNET_OS_start_process_s(), GNUNET_OS_start_process_v(), GNUNET_OS_start_process_va(), GNUNET_OS_start_process_vap(), GNUNET_STRINGS_check_filename(), GNUNET_STRINGS_get_short_name(), GNUNET_STRINGS_path_is_absolute(), GNUNET_TIME_absolute_get_monotonic(), GNUNET_TRANSPORT_TESTING_get_config_name(), GNUNET_TRANSPORT_TESTING_get_test_name(), GNUNET_TRANSPORT_TESTING_get_test_plugin_name(), GNUNET_TRANSPORT_TESTING_main_(), GNUNET_xgrow_(), GNUNET_xmalloc_(), GNUNET_xmalloc_unchecked_(), GNUNET_xmemdup_(), GNUNET_xrealloc_(), GNUNET_xstrdup_(), GNUNET_xstrndup_(), handle_index_info(), iter_check_config(), iter_testbed_path(), load_file(), load_hostlist_file(), load_message_store(), load_message_store_entries(), load_message_store_links(), load_search_strings(), main(), PABC_write_public_parameters(), preprocess_file(), print_indexed(), print_key(), print_search_result(), process_ego_file(), process_helper_msgs(), progress_cb(), read_file(), read_from_file(), read_jwk_from_file(), REGEX_TEST_automaton_save_graph(), REGEX_TEST_read_from_file(), remove_sync_file_in_dir(), run(), run_process_and_wait(), save_hostlist_file(), save_message_store(), scan(), scan_callback(), start_process(), trigger_recursive_download(), write_file(), and write_jwk_to_file().
|
static |
Definition at line 54 of file gnunet-download.c.