hostlist support. More...
#include "gnunet_core_service.h"
#include "gnunet_statistics_service.h"
#include "gnunet_util_lib.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | GNUNET_HOSTLIST_UriHandler) (const char *uri) |
Function that handles an advertised URI. More... | |
Functions | |
int | GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_STATISTICS_Handle *st, GNUNET_CORE_ConnectEventHandler *ch, GNUNET_CORE_DisconnectEventHandler *dh, GNUNET_HOSTLIST_UriHandler *msgh, int learn) |
Start downloading hostlists from hostlist servers as necessary. More... | |
void | GNUNET_HOSTLIST_client_stop (void) |
Stop downloading hostlists from hostlist servers as necessary. More... | |
typedef void(* GNUNET_HOSTLIST_UriHandler) (const char *uri) |
Function that handles an advertised URI.
uri | 0-termianted URI of a hostlist |
Definition at line 38 of file gnunet-daemon-hostlist_client.h.
int GNUNET_HOSTLIST_client_start | ( | const struct GNUNET_CONFIGURATION_Handle * | c, |
struct GNUNET_STATISTICS_Handle * | st, | ||
GNUNET_CORE_ConnectEventHandler * | ch, | ||
GNUNET_CORE_DisconnectEventHandler * | dh, | ||
GNUNET_HOSTLIST_UriHandler * | msgh, | ||
int | learn | ||
) |
Start downloading hostlists from hostlist servers as necessary.
c | configuration to use | |
st | statistics handle to use | |
[out] | ch | set to handler for CORE connect events |
[out] | dh | set to handler for CORE disconnect events |
[out] | msgh | set to handler for CORE advertisement messages |
learn | should we learn hostlist URLs from CORE |
Definition at line 1648 of file gnunet-daemon-hostlist_client.c.
References _, cfg, ch, filename, gettext_noop, GNUNET_assert, GNUNET_break, GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_DISK_file_test(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_log_strerror_file, GNUNET_NO, GNUNET_OK, GNUNET_PEERSTORE_connect(), GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_STATISTICS_get(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_STRINGS_utf8_toupper(), GNUNET_SYSERR, GNUNET_TIME_UNIT_MINUTES, GNUNET_YES, handler_advertisement(), handler_connect(), handler_disconnect(), linked_list_head, linked_list_tail, load_hostlist_file(), peerstore, primary_task(), process_stat(), proxy, proxy_password, proxy_type, proxy_username, result, SAVING_INTERVAL, sget, st, stat_learning, stat_testing_allowed, stat_testing_hostlist, stat_timeout_task(), stat_use_bootstrap, stats, task_check(), task_hostlist_saving(), ti_check_download, and ti_saving_task.
Referenced by run().
void GNUNET_HOSTLIST_client_stop | ( | void | ) |
Stop downloading hostlists from hostlist servers as necessary.
Definition at line 1821 of file gnunet-daemon-hostlist_client.c.
References cfg, clean_up(), GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_PEERSTORE_disconnect(), GNUNET_PEERSTORE_hello_add_cancel(), GNUNET_SCHEDULER_cancel(), GNUNET_STATISTICS_get_cancel(), GNUNET_YES, peerstore, proxy, proxy_password, proxy_username, save_hostlist_file(), StoreHelloEntry::sc, sget, she_head, she_tail, stat_learning, stats, ti_check_download, ti_download, ti_download_dispatcher_task, ti_saving_task, ti_testing_intervall_task, and update_hostlist().
Referenced by cleaning_task().