tool to dispatch URIs to the appropriate GNUnet helper process More...
Go to the source code of this file.
Functions | |
static void | maint_child_death (void *cls) |
Task triggered whenever we receive a SIGCHLD (child process died) or when user presses CTRL-C. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run by the scheduler. More... | |
static void | sighandler_child_death () |
Signal handler called for SIGCHLD. More... | |
int | main (int argc, char *const *argv) |
The main function to handle gnunet://-URIs. More... | |
Variables | |
static long unsigned int | exit_code = 0 |
Handler exit code. More... | |
static struct GNUNET_OS_Process * | p |
Helper process we started. More... | |
static struct GNUNET_DISK_PipeHandle * | sigpipe |
Pipe used to communicate shutdown via signal. More... | |
tool to dispatch URIs to the appropriate GNUnet helper process
Definition in file gnunet-uri.c.
|
static |
Task triggered whenever we receive a SIGCHLD (child process died) or when user presses CTRL-C.
cls | closure, NULL |
Definition at line 53 of file gnunet-uri.c.
References exit_code, GNUNET_break, GNUNET_OK, GNUNET_OS_process_destroy(), GNUNET_OS_PROCESS_EXITED, GNUNET_OS_process_kill(), GNUNET_OS_process_status(), GNUNET_TERM_SIG, p, and type.
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!) |
cfg | configuration |
Definition at line 74 of file gnunet-uri.c.
References _, consensus-simulation::args, cfg, GNUNET_CONFIGURATION_get_value_string(), GNUNET_DISK_PIPE_END_READ, GNUNET_DISK_pipe_handle(), GNUNET_free, GNUNET_OK, GNUNET_OS_INHERIT_STD_NONE, GNUNET_OS_start_process(), GNUNET_SCHEDULER_add_read_file(), GNUNET_SCHEDULER_cancel(), GNUNET_strndup, GNUNET_TIME_UNIT_FOREVER_REL, maint_child_death(), p, sigpipe, subsystem, and uri.
Referenced by main().
|
static |
Signal handler called for SIGCHLD.
Triggers the respective handler by writing to the trigger pipe.
Definition at line 138 of file gnunet-uri.c.
References GNUNET_break, GNUNET_DISK_file_write(), GNUNET_DISK_PIPE_END_WRITE, GNUNET_DISK_pipe_handle(), and sigpipe.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to handle gnunet://-URIs.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 162 of file gnunet-uri.c.
References exit_code, gettext_noop, GNUNET_assert, GNUNET_DISK_PF_NONE, GNUNET_DISK_pipe(), GNUNET_DISK_pipe_close(), GNUNET_GETOPT_OPTION_END, GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), GNUNET_SIGCHLD, GNUNET_SIGNAL_handler_install(), GNUNET_SIGNAL_handler_uninstall(), options, ret, run(), shc_chld, sighandler_child_death(), and sigpipe.
|
static |
Handler exit code.
Definition at line 33 of file gnunet-uri.c.
Referenced by main(), and maint_child_death().
|
static |
Helper process we started.
Definition at line 38 of file gnunet-uri.c.
Referenced by adjust(), block_proc(), block_reader(), buffer_clear(), build_dns_query(), check_address(), check_priority(), compute_scalar_product(), compute_service_response(), context_state_callback(), create_loc_uri(), CustomPeerMap_put(), CustomPeerMap_remove_peer(), display_bar(), display_request(), dns_result_parser(), do_stop_task(), download_stop_task(), dump_buffer(), encode_cont(), find_timed_out(), for_all_records(), format_help(), GCT_consider_path(), get_all_peers_iterator(), get_all_tunnels_iterator(), get_keywords_from_tokens(), get_longest_prefix(), get_path_from_GNUNET_PREFIX(), get_path_from_PATH(), get_pipeline(), GN_getopt_internal(), gns_resolve_name(), gns_string_to_value(), GNUNET_CADET_close_port(), GNUNET_CADET_open_port(), GNUNET_CONFIGURATION_create(), GNUNET_CONTAINER_multihashmap32_remove(), GNUNET_CONTAINER_multihashmap32_remove_all(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_CONTAINER_multihashmap_remove_all(), GNUNET_CONTAINER_multipeermap_remove(), GNUNET_CONTAINER_multipeermap_remove_all(), GNUNET_CONTAINER_multishortmap_remove(), GNUNET_CONTAINER_multishortmap_remove_all(), GNUNET_CONTAINER_multiuuidmap_remove(), GNUNET_CONTAINER_multiuuidmap_remove_all(), GNUNET_CRYPTO_ecc_ecdh(), GNUNET_CRYPTO_ecc_pmul_mpi(), GNUNET_CRYPTO_ecdh_ecdsa(), GNUNET_CRYPTO_ecdh_eddsa(), GNUNET_CRYPTO_ecdsa_ecdh(), GNUNET_CRYPTO_eddsa_ecdh(), GNUNET_CRYPTO_mpi_print_unsigned(), GNUNET_CRYPTO_paillier_create(), GNUNET_CRYPTO_zero_keys(), GNUNET_DISK_pipe_close(), GNUNET_DISK_pipe_close_end(), GNUNET_DISK_pipe_detach_end(), GNUNET_DISK_pipe_from_fd(), GNUNET_DISK_pipe_handle(), GNUNET_DNSPARSER_free_packet(), GNUNET_DNSPARSER_pack(), GNUNET_DNSPARSER_parse(), GNUNET_e2s(), GNUNET_e2s2(), GNUNET_FS_meta_data_insert(), GNUNET_FS_publish_main_(), GNUNET_FS_publish_make_status_(), GNUNET_HELLO_builder_from_parser(), GNUNET_HELLO_parser_from_block(), GNUNET_HELLO_parser_from_url(), GNUNET_OS_check_helper_binary(), GNUNET_p2s(), GNUNET_p2s2(), GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_get_load(), GNUNET_SECRETSHARING_share_read(), GNUNET_SECRETSHARING_share_write(), GNUNET_TRANSPORT_TESTING_connect_check(), GNUNET_TRANSPORT_TESTING_done(), GNUNET_TRANSPORT_TESTING_restart_peer(), GNUNET_TRANSPORT_TESTING_start_peer(), GNUNET_TRANSPORT_TESTING_stop_peer(), GSF_cadet_query_cancel(), handle_dns_request(), handle_index_start_failed(), handle_index_start_ok(), handle_show_path(), handle_signature_response(), hash_for_index_cb(), hello_iter_cb(), ibf_hashcode_from_key(), ieee80211_get_radiotap_len(), index_mq_error_handler(), main(), maint_child_death(), modify_request(), notify_connect(), notify_disconnect(), parse_definitions(), parse_pattern(), parser_new(), process_result(), progress_cb(), progress_proc(), publish_content(), publish_kblocks(), publish_kblocks_cont(), publish_stop_task(), queue(), queue_ready_task(), recursive_dns_resolution(), regex_add(), regex_combine(), REGEX_INTERNAL_construct_nfa(), retrieve_hello(), run(), run_process_and_wait(), schedule_transmit_on_queue(), search_stop_task(), set_work_priority(), shutdown_task(), signal_publish_completion(), signal_publish_error(), start_cb(), start_download(), start_publish(), update_network_size_estimate(), and w_check().
|
static |
Pipe used to communicate shutdown via signal.
Definition at line 43 of file gnunet-uri.c.
Referenced by main(), run(), and sighandler_child_death().