![]() |
GNUnet
0.11.x
|
searching for files on GNUnet More...
Go to the source code of this file.
Functions | |
static int | item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, enum EXTRACTOR_MetaFormat format, const char *data_mime_type, const char *data, size_t data_size) |
Type of a function that libextractor calls for each meta data item found. More... | |
static void | clean_task (void *cls) |
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 | shutdown_task (void *cls) |
static void | timeout_task (void *cls) |
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 search GNUnet. More... | |
Variables | |
static int | ret |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
static struct GNUNET_FS_Handle * | ctx |
static struct GNUNET_FS_SearchContext * | sc |
static char * | output_filename |
static struct GNUNET_FS_DirectoryBuilder * | db |
static unsigned int | anonymity = 1 |
static struct GNUNET_TIME_Relative | timeout |
Timeout for the search, 0 means to wait for CTRL-C. More... | |
static unsigned int | results_limit |
static unsigned int | results |
static unsigned int | verbose |
static int | local_only |
static struct GNUNET_SCHEDULER_Task * | tt |
searching for files on GNUnet
Definition in file gnunet-search.c.
|
static |
Type of a function that libextractor calls for each meta data item found.
cls | closure (user-defined, unused) |
plugin_name | name of the plugin that produced this value; special values can be used (i.e. '<zlib>' for zlib being used in the main libextractor library and yielding meta data). |
type | libextractor-type describing the meta data |
format | basic format information about data |
data_mime_type | mime-type of data (not of the original file); can be NULL (if mime-type is not known) |
data | actual meta-data found |
data_size | number of bytes in data |
Definition at line 79 of file gnunet-search.c.
References dgettext, EXTRACTOR_METAFORMAT_C_STRING, EXTRACTOR_METAFORMAT_UTF8, EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, and LIBEXTRACTOR_GETTEXT_DOMAIN.
Referenced by progress_cb().
|
static |
Definition at line 105 of file gnunet-search.c.
References _, GNUNET_break, GNUNET_DISK_directory_remove(), GNUNET_DISK_fn_write(), GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_free, GNUNET_FS_directory_builder_finish(), GNUNET_FS_stop(), GNUNET_OK, and output_filename.
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 |
Definition at line 152 of file gnunet-search.c.
References _, clean_task(), EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, filename, GNUNET_CONTAINER_meta_data_get_by_type(), GNUNET_CONTAINER_meta_data_iterate(), GNUNET_DISK_filename_canonicalize(), GNUNET_free, GNUNET_FS_directory_builder_add(), GNUNET_FS_DIRECTORY_EXT, GNUNET_FS_meta_data_test_for_directory(), GNUNET_FS_STATUS_SEARCH_ERROR, GNUNET_FS_STATUS_SEARCH_RESULT, GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED, GNUNET_FS_STATUS_SEARCH_START, GNUNET_FS_STATUS_SEARCH_STOPPED, GNUNET_FS_STATUS_SEARCH_UPDATE, GNUNET_FS_uri_to_string(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), GNUNET_YES, item_printer(), results, results_limit, GNUNET_FS_ProgressInfo::search, GNUNET_FS_ProgressInfo::status, uri, GNUNET_FS_ProgressInfo::value, and verbose.
Referenced by run().
|
static |
Definition at line 237 of file gnunet-search.c.
References GNUNET_FS_search_stop().
Referenced by run().
|
static |
Definition at line 248 of file gnunet-search.c.
References GNUNET_SCHEDULER_shutdown().
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 264 of file gnunet-search.c.
References _, anonymity, GNUNET_FS_directory_builder_create(), GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END, GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY, GNUNET_FS_SEARCH_OPTION_NONE, GNUNET_FS_search_start(), GNUNET_FS_start(), GNUNET_FS_stop(), GNUNET_FS_uri_destroy(), GNUNET_FS_uri_ksk_create_from_args(), GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_shutdown(), local_only, options, output_filename, progress_cb(), GNUNET_TIME_Relative::rel_value_us, ret, shutdown_task(), timeout, timeout_task(), and uri.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to search GNUnet.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 327 of file gnunet-search.c.
References anonymity, gettext_noop, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_uint(), GNUNET_GETOPT_option_verbose(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), local_only, output_filename, results_limit, ret, run(), timeout, and verbose.
|
static |
Definition at line 31 of file gnunet-search.c.
|
static |
Definition at line 33 of file gnunet-search.c.
|
static |
Definition at line 35 of file gnunet-search.c.
|
static |
Definition at line 37 of file gnunet-search.c.
Referenced by call_completion_task(), connect_cb(), continue_writing(), database_setup(), datacache_get_successors_iterator(), deserialize_search(), deserialize_search_file(), deserialize_search_result(), disconnect_cb(), extract_box_cb(), find_sender_by_address(), GNUNET_FS_search_make_status_(), GNUNET_HELLO_extract_address(), GNUNET_PEERSTORE_disconnect(), GNUNET_PEERSTORE_store(), GNUNET_TESTBED_get_statistics(), GNUNET_TRANSPORT_TESTING_large_send(), GNUNET_TRANSPORT_TESTING_simple_send(), handle_client_start_search(), handle_datastore_reply(), handle_request(), iteration_completion_cb(), iterator_cb(), locate_by_id(), op_done_task(), opc_search_iterator(), oprelease_get_stats(), opstart_get_stats(), process_ksk_result(), process_sblock(), process_sks_result(), reconnect(), schedule_transmit_search_request(), search_iterator(), search_start(), server_access_cb(), server_disconnect_cb(), server_lookup_connection(), server_send_callback(), service_run_main(), signal_download_resume(), signal_socks_failure(), store_request_sent(), and timeout_cadet_task().
|
static |
Definition at line 39 of file gnunet-search.c.
Referenced by clean_task(), main(), and run().
|
static |
Definition at line 41 of file gnunet-search.c.
Referenced by GNUNET_PQ_connect(), GNUNET_PQ_connect_with_cfg(), and publish_content().
|
static |
Definition at line 43 of file gnunet-search.c.
|
static |
Timeout for the search, 0 means to wait for CTRL-C.
Definition at line 48 of file gnunet-search.c.
|
static |
Definition at line 50 of file gnunet-search.c.
Referenced by main(), and progress_cb().
|
static |
Definition at line 52 of file gnunet-search.c.
Referenced by progress_cb().
|
static |
Definition at line 54 of file gnunet-search.c.
Referenced by main(), and progress_cb().
|
static |
Definition at line 56 of file gnunet-search.c.
|
static |
Definition at line 58 of file gnunet-search.c.