Program to display network size estimates from the NSE service. More...
Go to the source code of this file.
Functions | |
static void | do_shutdown (void *cls) |
Task to shutdown and clean up all state. More... | |
static void | handle_estimate (void *cls, struct GNUNET_TIME_Absolute timestamp, double estimate, double std_dev) |
Callback to call when network size estimate is updated. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Actual main function that runs the emulation. More... | |
int | main (int argc, char *const *argv) |
Main function. More... | |
Variables | |
static struct GNUNET_NSE_Handle * | nse |
The handle to the NSE service. More... | |
static int | status |
The program status; 0 for success. More... | |
Program to display network size estimates from the NSE service.
Definition in file gnunet-nse.c.
|
static |
Task to shutdown and clean up all state.
cls | NULL |
Definition at line 47 of file gnunet-nse.c.
References GNUNET_NSE_disconnect(), and nse.
Referenced by run().
|
static |
Callback to call when network size estimate is updated.
cls | NULL |
timestamp | server timestamp |
estimate | the value of the current network size estimate |
std_dev | standard deviation (rounded down to nearest integer) of the size estimation values seen |
Definition at line 68 of file gnunet-nse.c.
References GNUNET_TIME_Absolute::abs_value_us, GNUNET_NSE_log_estimate_to_n, and status.
Referenced by run().
|
static |
Actual main function that runs the emulation.
cls | unused |
args | remaining args, unused |
cfgfile | name of the configuration |
cfg | configuration handle |
Definition at line 93 of file gnunet-nse.c.
References consensus-simulation::args, cfg, do_shutdown(), GNUNET_NSE_connect(), GNUNET_SCHEDULER_add_shutdown(), handle_estimate(), and nse.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
Main function.
Definition at line 112 of file gnunet-nse.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_OK, GNUNET_PROGRAM_run(), options, run(), and status.
|
static |
The handle to the NSE service.
Definition at line 33 of file gnunet-nse.c.
Referenced by do_shutdown(), libgnunet_plugin_dhtu_ip_init(), and run().
|
static |
The program status; 0 for success.
Definition at line 38 of file gnunet-nse.c.
Referenced by handle_estimate(), and main().