Print information about other peers known to CORE. More...
Go to the source code of this file.
Functions | |
static void | shutdown_task (void *cls) |
Task run in monitor mode when the user presses CTRL-C to abort. More... | |
static void | monitor_cb (void *cls, const struct GNUNET_PeerIdentity *peer, enum GNUNET_CORE_KxState state, struct GNUNET_TIME_Absolute timeout) |
Function called to notify core users that another peer changed its state with us. 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 obtain peer information from CORE. More... | |
Variables | |
static int | monitor_connections |
Option -m. More... | |
static struct GNUNET_CORE_MonitorHandle * | mh |
Handle to the CORE monitor. More... | |
Print information about other peers known to CORE.
Definition in file gnunet-core.c.
|
static |
Task run in monitor mode when the user presses CTRL-C to abort.
Stops monitoring activity.
cls | NULL |
Definition at line 49 of file gnunet-core.c.
References GNUNET_CORE_monitor_stop(), and mh.
Referenced by run().
|
static |
Function called to notify core users that another peer changed its state with us.
cls | closure |
peer | the peer that changed state |
state | new state of the peer |
timeout | timeout for the new state |
Definition at line 70 of file gnunet-core.c.
References _, GNUNET_CORE_KX_CORE_DISCONNECT, GNUNET_CORE_KX_ITERATION_FINISHED, GNUNET_CORE_KX_PEER_DISCONNECT, GNUNET_CORE_KX_STATE_DOWN, GNUNET_CORE_KX_STATE_KEY_RECEIVED, GNUNET_CORE_KX_STATE_KEY_SENT, GNUNET_CORE_KX_STATE_REKEY_SENT, GNUNET_CORE_KX_STATE_UP, GNUNET_i2s(), GNUNET_NO, GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_absolute_time_to_string(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_remaining(), GNUNET_YES, monitor_connections, peer, state, and timeout.
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 148 of file gnunet-core.c.
References _, consensus-simulation::args, cfg, GNUNET_CORE_monitor_start(), GNUNET_SCHEDULER_add_shutdown(), mh, monitor_cb(), and shutdown_task().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to obtain peer information from CORE.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 178 of file gnunet-core.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(), monitor_connections, options, res, and run().
|
static |
|
static |
Handle to the CORE monitor.
Definition at line 39 of file gnunet-core.c.
Referenced by run(), and shutdown_task().