tool to test resolver More...
Go to the source code of this file.
Macros | |
#define | GET_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
Functions | |
static void | print_hostname (void *cls, const char *hostname) |
Prints each hostname obtained from DNS. More... | |
static void | print_sockaddr (void *cls, const struct sockaddr *addr, socklen_t addrlen) |
Callback function to display address. 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) |
The main function to access GNUnet's DNS resolver. More... | |
Variables | |
static int | reverse |
Flag for reverse lookup. More... | |
tool to test resolver
Definition in file gnunet-resolver.c.
#define GET_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
Definition at line 31 of file gnunet-resolver.c.
|
static |
Prints each hostname obtained from DNS.
cls | closure (unused) |
hostname | one of the names for the host, NULL on the last call to the callback |
Definition at line 47 of file gnunet-resolver.c.
Referenced by run().
|
static |
Callback function to display address.
cls | closure (unused) |
addr | one of the addresses of the host, NULL for the last address |
addrlen | length of the address |
Definition at line 67 of file gnunet-resolver.c.
References GNUNET_a2s().
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 90 of file gnunet-resolver.c.
References consensus-simulation::args, cfg, GET_TIMEOUT, GNUNET_RESOLVER_hostname_get(), GNUNET_RESOLVER_ip_get(), GNUNET_YES, print_hostname(), print_sockaddr(), and reverse.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to access GNUnet's DNS resolver.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 164 of file gnunet-resolver.c.
References gettext_noop, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), options, ret, reverse, and run().
|
static |
Flag for reverse lookup.
Definition at line 36 of file gnunet-resolver.c.