Obtain HELLO from DHT for bootstrapping. More...
Go to the source code of this file.
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "dht-clients", __VA_ARGS__) |
Functions | |
static void | cleanup_task (void *cls) |
Task run to clean up on shutdown. More... | |
static void | hello_done_cb (void *cls) |
Task run when we are finished. More... | |
static void | hello_result_cb (void *cls, const char *url) |
Function called on our HELLO. 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... | |
int | main (int argc, char *const *argv) |
Entry point for gnunet-dht-hello. More... | |
Variables | |
static struct GNUNET_DHT_Handle * | dht_handle |
Handle to the DHT. More... | |
static struct GNUNET_DHT_HelloGetHandle * | get_hello_handle |
Handle to the DHT hello get operation. More... | |
static int | global_ret |
Global status value. More... | |
Obtain HELLO from DHT for bootstrapping.
Definition in file gnunet-dht-hello.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "dht-clients", __VA_ARGS__) |
Definition at line 28 of file gnunet-dht-hello.c.
|
static |
Task run to clean up on shutdown.
cls | unused |
Definition at line 52 of file gnunet-dht-hello.c.
References dht_handle, get_hello_handle, GNUNET_DHT_disconnect(), and GNUNET_DHT_hello_get_cancel().
Referenced by run().
|
static |
Task run when we are finished.
Triggers shutdown.
cls | unused |
Definition at line 73 of file gnunet-dht-hello.c.
References GNUNET_SCHEDULER_shutdown().
Referenced by run().
|
static |
Function called on our HELLO.
cls | closure |
url | the HELLO URL |
Definition at line 86 of file gnunet-dht-hello.c.
References get_hello_handle, and GNUNET_SCHEDULER_shutdown().
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure, NULL |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 106 of file gnunet-dht-hello.c.
References _, consensus-simulation::args, cfg, cleanup_task(), dht_handle, EXIT_NOTCONFIGURED, get_hello_handle, global_ret, GNUNET_break, GNUNET_DHT_connect(), GNUNET_DHT_hello_get(), GNUNET_DHT_hello_offer(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), hello_done_cb(), and hello_result_cb().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
Entry point for gnunet-dht-hello.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 149 of file gnunet-dht-hello.c.
References gettext_noop, global_ret, GNUNET_GETOPT_OPTION_END, GNUNET_NO, GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), GNUNET_SYSERR, options, and run().
|
static |
Handle to the DHT.
Definition at line 33 of file gnunet-dht-hello.c.
Referenced by cleanup_task(), and run().
|
static |
Handle to the DHT hello get operation.
Definition at line 38 of file gnunet-dht-hello.c.
Referenced by cleanup_task(), hello_result_cb(), and run().
|
static |
Global status value.
Definition at line 43 of file gnunet-dht-hello.c.