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 buf, 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_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_increment_uint(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_uint(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), 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 cleanup_task(), and run().
|
static |
Definition at line 42 of file gnunet-download.c.
Referenced by activate_fs_download(), check_completed(), create_download_context(), deactivate_fs_download(), delta_match(), deserialize_download(), discard_oldest_mc(), do_reconnect(), download_mq_error_handler(), encrypt_existing_match(), fh_reader(), fragment_msg_proc(), free_download_context(), full_recursive_download(), get_download_sync_filename(), get_next_block(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_eddsa_private_key_derive(), GNUNET_DEFRAGMENT_context_create(), GNUNET_DEFRAGMENT_context_destroy(), 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_suspend(), GNUNET_FS_download_sync_(), GNUNET_HELLO_iterate_new_addresses(), 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(), send_ack(), 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(), execute_select(), expi_proc(), 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(), GNUNET_FS_TEST_download(), GNUNET_FS_TEST_publish(), handle_datastore_reply(), heap_plugin_put(), main(), mysql_plugin_put(), 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.
Referenced by adapt_parallelism(), main(), and run().
|
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_rooms(), 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(), file_name_cb(), find_libraries(), gen_topo_from_file(), get_ego_filename(), GNUNET_ATS_solver_logging_write_to_disk(), GNUNET_ATS_solvers_experimentation_load(), GNUNET_CONFIGURATION_load(), GNUNET_CONTAINER_bloomfilter_load(), GNUNET_CRYPTO_hash_file(), 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_process_status(), GNUNET_OS_start_process(), GNUNET_OS_start_process_v(), GNUNET_OS_start_process_va(), GNUNET_OS_start_process_vap(), GNUNET_STRINGS_get_short_name(), GNUNET_TESTBED_hosts_load_from_file(), GNUNET_TESTBED_overlay_configure_topology_va(), GNUNET_TESTBED_underlay_construct_(), GNUNET_TESTING_get_topo_from_file(), 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_xnew_array_2d_(), GNUNET_xnew_array_3d_(), GNUNET_xrealloc_(), GNUNET_xstrdup_(), GNUNET_xstrndup_(), handle_index_info(), hostkeys_load(), hosts_directory_scan_callback(), iface_proc(), iter_check_config(), iter_testbed_path(), iterate_save_rooms(), load_file(), load_hostlist_file(), load_message_store(), load_message_store_entries(), load_message_store_links(), load_search_strings(), main(), policy_filename_cb(), preprocess_file(), print_indexed(), print_key(), print_search_result(), process_ego_file(), process_helper_msgs(), progress_cb(), 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(), and write_jwk_to_file().
|
static |
Definition at line 54 of file gnunet-download.c.