28#define LOG(kind, ...) GNUNET_log_from (kind, "dht-clients", __VA_ARGS__)
119 _ (
"Failed to connect to DHT service!\n"));
160 "gnunet-dht-hello [URL]",
162 "Obtain HELLO from DHT or provide HELLO to DHT for bootstrapping"),
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
struct GNUNET_GETOPT_CommandLineOption options[]
#define gettext_noop(String)
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static int global_ret
Global status value.
static void cleanup_task(void *cls)
Task run to clean up on shutdown.
static struct GNUNET_DHT_Handle * dht_handle
Handle to the DHT.
static void hello_done_cb(void *cls)
Task run when we are finished.
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.
static struct GNUNET_DHT_HelloGetHandle * get_hello_handle
Handle to the DHT hello get operation.
int main(int argc, char *const *argv)
Entry point for gnunet-dht-hello.
static void hello_result_cb(void *cls, const char *url)
Function called on our HELLO.
struct GNUNET_DHT_Handle * GNUNET_DHT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int ht_len)
Initialize the connection with the DHT service.
void GNUNET_DHT_hello_get_cancel(struct GNUNET_DHT_HelloGetHandle *hgh)
Cancel hello get operation.
struct GNUNET_DHT_HelloGetHandle * GNUNET_DHT_hello_get(struct GNUNET_DHT_Handle *dht_handle, GNUNET_DHT_HelloGetCallback cb, void *cb_cls)
Obtain HELLO URL of the DHT identified by dht_handle.
void GNUNET_DHT_disconnect(struct GNUNET_DHT_Handle *handle)
Shutdown connection with the DHT service.
void GNUNET_DHT_hello_offer(struct GNUNET_DHT_Handle *dht_handle, const char *url, GNUNET_SCHEDULER_TaskCallback cb, void *cb_cls)
Offer HELLO URL of the DHT identified by dht_handle.
GNUNET_GenericReturnValue
Named constants for return values.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
Connection to the DHT service.
Handle to get a HELLO URL from the DHT for manual bootstrapping.
Definition of a command line option.