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.   | |
| 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.   | |
| 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.   | |
| int | main (int argc, char *const *argv) | 
| The main function to obtain peer information from CORE.   | |
Variables | |
| static int | ret | 
| Return code.   | |
| static int | monitor_connections | 
| Option -m.   | |
| static int | show_conns | 
| Option -s.   | |
| static struct GNUNET_CORE_MonitorHandle * | mh | 
| Handle to the CORE monitor.   | |
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 59 of file gnunet-core.c.
References GNUNET_CORE_monitor_stop(), and mh.
      
  | 
  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 80 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_AWAIT_INITIATION, GNUNET_CORE_KX_STATE_DOWN, GNUNET_CORE_KX_STATE_INITIATOR_CONNECTED, GNUNET_CORE_KX_STATE_INITIATOR_DONE_SENT, GNUNET_CORE_KX_STATE_INITIATOR_HELLO_RECEIVED, GNUNET_CORE_KX_STATE_INITIATOR_HELLO_SENT, GNUNET_CORE_KX_STATE_RESPONDER_CONNECTED, GNUNET_CORE_KX_STATE_RESPONDER_HELLO_RECEIVED, GNUNET_CORE_KX_STATE_RESPONDER_HELLO_SENT, 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 174 of file gnunet-core.c.
References _, cfg, GNUNET_CORE_monitor_start(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), mh, monitor_cb(), monitor_connections, ret, show_conns, 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 222 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(), and show_conns.
      
  | 
  static | 
      
  | 
  static | 
Option -m.
Definition at line 40 of file gnunet-core.c.
Referenced by main(), monitor_cb(), and run().
      
  | 
  static | 
      
  | 
  static | 
Handle to the CORE monitor.
Definition at line 50 of file gnunet-core.c.
Referenced by run(), and shutdown_task().