Print information about other peers known to CORE. More...
#include "platform.h"
#include "gnunet_time_lib.h"
#include "gnunet_util_lib.h"
#include "gnunet_core_service.h"
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 | ret |
Return code. More... | |
static int | monitor_connections |
Option -m. More... | |
static int | show_pid |
Option -i. More... | |
static int | show_conns |
Option -s. More... | |
static struct GNUNET_CORE_MonitorHandle * | mh |
Handle to the CORE monitor. More... | |
static struct GNUNET_CRYPTO_EddsaPrivateKey | my_private_key |
Peer private key. More... | |
static struct GNUNET_PeerIdentity | my_full_id |
Peer identity. 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 74 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 95 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, 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 173 of file gnunet-core.c.
References _, consensus-simulation::args, cfg, GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CORE_monitor_start(), GNUNET_CRYPTO_eddsa_key_from_file(), GNUNET_CRYPTO_eddsa_key_get_public(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_i2s_full(), GNUNET_log, GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), GNUNET_SYSERR, GNUNET_YES, mh, monitor_cb(), monitor_connections, my_full_id, my_private_key, GNUNET_PeerIdentity::public_key, ret, show_conns, show_pid, 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 253 of file gnunet-core.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), monitor_connections, options, res, ret, run(), show_conns, and show_pid.
|
static |
|
static |
Option -m.
Definition at line 40 of file gnunet-core.c.
Referenced by main(), monitor_cb(), and run().
|
static |
|
static |
|
static |
Handle to the CORE monitor.
Definition at line 55 of file gnunet-core.c.
Referenced by run(), and shutdown_task().
|
static |
Peer private key.
Definition at line 60 of file gnunet-core.c.
Referenced by GCH_get_mine(), GCT_handle_kx_auth(), got_hello(), run(), send_kx(), send_kx_auth(), set_monotime_sig(), and update_ax_by_kx().
|
static |
Peer identity.
Definition at line 65 of file gnunet-core.c.
Referenced by announce_id(), core_init_cb(), dir_ready_cb(), GCCH_bind(), GCCH_channel_local_new(), GCH_get_mine(), GCPP_try_path_from_dht(), GCT_alice_or_betty(), get_next_free_ctn(), got_hello(), handle_connection_create(), route_message(), run(), send_broken_without_mqm(), and send_create().