GNUnet  0.10.x
Functions | Variables
gnunet-arm.c File Reference

arm for writing a tool More...

#include "platform.h"
#include "gnunet_arm_service.h"
#include "gnunet_constants.h"
#include "gnunet_util_lib.h"
Include dependency graph for gnunet-arm.c:

Go to the source code of this file.

Functions

static void delete_files ()
 Attempts to delete configuration file and GNUNET_HOME on ARM shutdown provided the end and delete options were specified when gnunet-arm was run. More...
 
static void shutdown_task (void *cls)
 Main continuation-passing-style loop. More...
 
static const char * req_string (enum GNUNET_ARM_RequestStatus rs)
 Returns a string interpretation of rs. More...
 
static const char * ret_string (enum GNUNET_ARM_Result result)
 Returns a string interpretation of the result. More...
 
static void action_loop (void *cls)
 Main task that runs our various operations in order. More...
 
static void conn_status (void *cls, int connected)
 Function called whenever we connect to or disconnect from ARM. More...
 
static void start_callback (void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
 We have requested ARM to be started, this function is called with the result of the operation. More...
 
static void stop_callback (void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
 We have requested ARM to be stopped, this function is called with the result of the operation. More...
 
static void init_callback (void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
 We have requested a service to be started, this function is called with the result of the operation. More...
 
static void term_callback (void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
 We have requested a service to be stopped, this function is called with the result of the operation. More...
 
static void list_callback (void *cls, enum GNUNET_ARM_RequestStatus rs, unsigned int count, const char *const *list)
 Function called with the list of running services. More...
 
static void srv_status (void *cls, const char *service, enum GNUNET_ARM_ServiceStatus status)
 Function called when a service starts or stops. More...
 
static void timeout_task_cb (void *cls)
 Task run on timeout (if -T is given). More...
 
static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
 Main function that will be run by the scheduler. More...
 
int main (int argc, char *const *argv)
 The main function to obtain arm from gnunetd. More...
 

Variables

static int end
 Set if we are to shutdown all services (including ARM). More...
 
static int start
 Set if we are to start default services (including ARM). More...
 
static int restart
 Set if we are to stop/start default services (including ARM). More...
 
static int delete
 Set if we should delete configuration and temp directory on exit. More...
 
static int quiet
 Set if we should not print status messages. More...
 
static int monitor
 Monitor ARM activity. More...
 
static int list
 Set if we should print a list of currently running services. More...
 
static char * init
 Set to the name of a service to start. More...
 
static char * term
 Set to the name of a service to kill. More...
 
static char * config_file
 Set to the name of the config file used. More...
 
static char * dir
 Set to the directory where runtime files are stored. More...
 
static int ret
 Final status code. More...
 
static struct GNUNET_ARM_Handleh
 Connection with ARM. More...
 
static struct GNUNET_ARM_MonitorHandlem
 Monitor connection with ARM. More...
 
static struct GNUNET_CONFIGURATION_Handlecfg
 Our configuration. More...
 
static unsigned int phase
 Processing stage that we are in. More...
 
static struct GNUNET_TIME_Relative timeout
 User defined timestamp for completing operations. More...
 
static struct GNUNET_SCHEDULER_Tasktimeout_task
 Task to be run on timeout. More...
 
static int no_stdout
 Do we want to give our stdout to gnunet-service-arm? More...
 
static int no_stderr
 Do we want to give our stderr to gnunet-service-arm? More...
 
static struct GNUNET_SCHEDULER_Taskal_task
 Handle for the task running the action_loop(). More...
 
static struct GNUNET_ARM_Operationop
 Current operation. More...
 

Detailed Description

arm for writing a tool

Author
Christian Grothoff

Definition in file gnunet-arm.c.

Function Documentation

◆ delete_files()

static void delete_files ( )
static

Attempts to delete configuration file and GNUNET_HOME on ARM shutdown provided the end and delete options were specified when gnunet-arm was run.

Definition at line 147 of file gnunet-arm.c.

References _, config_file, dir, GNUNET_DISK_directory_remove(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_OK, and UNLINK.

Referenced by shutdown_task().

148 {
149  GNUNET_log (
151  "Will attempt to remove configuration file %s and service directory %s\n",
152  config_file,
153  dir);
154  if (0 != UNLINK (config_file))
155  {
157  _ ("Failed to remove configuration file %s\n"),
158  config_file);
159  }
161  {
163  _ ("Failed to remove servicehome directory %s\n"),
164  dir);
165  }
166 }
static char * dir
Set to the directory where runtime files are stored.
Definition: gnunet-arm.c:84
static char * config_file
Set to the name of the config file used.
Definition: gnunet-arm.c:79
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
#define UNLINK(f)
Definition: plibc.h:666
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
int GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
Definition: disk.c:1359
#define GNUNET_log(kind,...)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown_task()

static void shutdown_task ( void *  cls)
static

Main continuation-passing-style loop.

Runs the various jobs that we've been asked to do in order.

Parameters
clsclosure, unused

Definition at line 176 of file gnunet-arm.c.

References delete_files(), end, GNUNET_ARM_disconnect(), GNUNET_ARM_monitor_stop(), GNUNET_ARM_operation_cancel(), GNUNET_CONFIGURATION_destroy(), GNUNET_SCHEDULER_cancel(), and GNUNET_YES.

Referenced by run().

177 {
178  (void) cls;
179  if (NULL != al_task)
180  {
182  al_task = NULL;
183  }
184  if (NULL != op)
185  {
187  op = NULL;
188  }
189  if (NULL != h)
190  {
192  h = NULL;
193  }
194  if (NULL != m)
195  {
197  m = NULL;
198  }
199  if (NULL != timeout_task)
200  {
202  timeout_task = NULL;
203  }
204  if ((GNUNET_YES == end) && (GNUNET_YES == delete))
205  delete_files ();
207  cfg = NULL;
208 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
static int end
Set if we are to shutdown all services (including ARM).
Definition: gnunet-arm.c:34
void GNUNET_ARM_operation_cancel(struct GNUNET_ARM_Operation *op)
Abort an operation.
Definition: arm_api.c:665
void GNUNET_ARM_disconnect(struct GNUNET_ARM_Handle *h)
Disconnect from the ARM service (if connected) and destroy the context.
Definition: arm_api.c:507
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:99
static void delete_files()
Attempts to delete configuration file and GNUNET_HOME on ARM shutdown provided the end and delete opt...
Definition: gnunet-arm.c:147
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
static struct GNUNET_SCHEDULER_Task * timeout_task
Task to be run on timeout.
Definition: gnunet-arm.c:119
void GNUNET_ARM_monitor_stop(struct GNUNET_ARM_MonitorHandle *h)
Disconnect from the ARM service (if connected) and destroy the context.
#define GNUNET_YES
Definition: gnunet_common.h:80
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:965
Here is the call graph for this function:
Here is the caller graph for this function:

◆ req_string()

static const char* req_string ( enum GNUNET_ARM_RequestStatus  rs)
static

Returns a string interpretation of rs.

Parameters
rsthe request status from ARM
Returns
a string interpretation of the request status

Definition at line 218 of file gnunet-arm.c.

References _, GNUNET_ARM_REQUEST_DISCONNECTED, and GNUNET_ARM_REQUEST_SENT_OK.

Referenced by init_callback(), list_callback(), start_callback(), stop_callback(), and term_callback().

219 {
220  switch (rs)
221  {
223  return _ ("Message was sent successfully");
225  return _ ("We disconnected from ARM before we could send a request");
226  }
227  return _ ("Unknown request status");
228 }
We disconnected from ARM, and request was not sent.
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
Message was sent successfully.
Here is the caller graph for this function:

◆ ret_string()

static const char* ret_string ( enum GNUNET_ARM_Result  result)
static

Returns a string interpretation of the result.

Parameters
resultthe arm result
Returns
a string interpretation

Definition at line 238 of file gnunet-arm.c.

References _, action_loop(), GNUNET_ARM_RESULT_IN_SHUTDOWN, GNUNET_ARM_RESULT_IS_NOT_KNOWN, GNUNET_ARM_RESULT_IS_STARTED_ALREADY, GNUNET_ARM_RESULT_IS_STARTING_ALREADY, GNUNET_ARM_RESULT_IS_STOPPED_ALREADY, GNUNET_ARM_RESULT_IS_STOPPING_ALREADY, GNUNET_ARM_RESULT_START_FAILED, GNUNET_ARM_RESULT_STARTING, GNUNET_ARM_RESULT_STOPPED, and GNUNET_ARM_RESULT_STOPPING.

Referenced by init_callback(), start_callback(), stop_callback(), and term_callback().

239 {
240  switch (result)
241  {
243  return _ ("is stopped");
245  return _ ("is starting");
247  return _ ("is stopping");
249  return _ ("is starting already");
251  return _ ("is stopping already");
253  return _ ("is started already");
255  return _ ("is stopped already");
257  return _ ("service is not known to ARM");
259  return _ ("service failed to start");
261  return _ ("service cannot be manipulated because ARM is shutting down");
262  }
263  return _ ("Unknown result code.");
264 }
ARM stopping was initiated (there's no "stopped" for ARM itself).
Asked to stop it, but it's already stopping.
Asked to start it, but it's already started.
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
Tried to start a service, but that failed for some reason.
Service starting was initiated.
Asked to start it, but it's already starting.
static int result
Global testing status.
Asked to start something, but ARM is shutting down and can't comply.
Asked to stop it, but it's already stopped.
Asked to start or stop a service, but it's not known.
Service was stopped (never sent for ARM itself).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ action_loop()

static void action_loop ( void *  cls)
static

Main task that runs our various operations in order.

Main action loop.

Parameters
clsclosure

Runs the various jobs that we've been asked to do, in order.

Parameters
clsclosure, unused

Definition at line 547 of file gnunet-arm.c.

References _, end, GNUNET_ARM_request_service_list(), GNUNET_ARM_request_service_start(), GNUNET_ARM_request_service_stop(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_OS_INHERIT_STD_ERR, GNUNET_OS_INHERIT_STD_NONE, GNUNET_OS_INHERIT_STD_OUT, GNUNET_SCHEDULER_shutdown(), init, init_callback(), list, list_callback(), monitor, no_stderr, no_stdout, phase, quiet, restart, start, start_callback(), stop_callback(), term, and term_callback().

Referenced by init_callback(), list_callback(), ret_string(), run(), start_callback(), stop_callback(), and term_callback().

548 {
549  (void) cls;
550  al_task = NULL;
551  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n");
552  while (1)
553  {
554  switch (phase++)
555  {
556  case 0:
557  if (NULL != term)
558  {
559  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Termination action\n");
561  return;
562  }
563  break;
564  case 1:
565  if (end || restart)
566  {
567  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "End action\n");
569  return;
570  }
571  break;
572  case 2:
573  if (start)
574  {
575  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start action\n");
576  op =
578  "arm",
579  (no_stdout
580  ? 0
582  (no_stderr
583  ? 0
586  NULL);
587  return;
588  }
589  break;
590  case 3:
591  if (NULL != init)
592  {
593  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Initialization action\n");
595  init,
597  &init_callback,
598  NULL);
599  return;
600  }
601  break;
602  case 4:
603  if (list)
604  {
606  "Going to list all running services controlled by ARM.\n");
608  return;
609  }
610  break;
611  case 5:
612  if (monitor)
613  {
614  if (! quiet)
615  fprintf (stderr, _ ("Now only monitoring, press CTRL-C to stop.\n"));
616  quiet =
617  0; /* does not make sense to stay quiet in monitor mode at this time */
618  return; /* done with tasks, just monitor */
619  }
620  break;
621  default: /* last phase */
623  return;
624  }
625  }
626 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
When this flag is set, the child process will inherit stderr of the parent.
Definition: gnunet_os_lib.h:92
static unsigned int phase
Processing stage that we are in.
Definition: gnunet-arm.c:109
static int end
Set if we are to shutdown all services (including ARM).
Definition: gnunet-arm.c:34
static void stop_callback(void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
We have requested ARM to be stopped, this function is called with the result of the operation...
Definition: gnunet-arm.c:355
static int restart
Set if we are to stop/start default services (including ARM).
Definition: gnunet-arm.c:44
static int start
Set if we are to start default services (including ARM).
Definition: gnunet-arm.c:39
static void start_callback(void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
We have requested ARM to be started, this function is called with the result of the operation...
Definition: gnunet-arm.c:314
static int quiet
Set if we should not print status messages.
Definition: gnunet-arm.c:54
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
static char * term
Set to the name of a service to kill.
Definition: gnunet-arm.c:74
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
static void list_callback(void *cls, enum GNUNET_ARM_RequestStatus rs, unsigned int count, const char *const *list)
Function called with the list of running services.
Definition: gnunet-arm.c:504
struct GNUNET_ARM_Operation * GNUNET_ARM_request_service_stop(struct GNUNET_ARM_Handle *h, const char *service_name, GNUNET_ARM_ResultCallback cont, void *cont_cls)
Request a service to be stopped.
Definition: arm_api.c:864
No standard streams should be inherited.
Definition: gnunet_os_lib.h:74
When this flag is set, the child process will inherit stdout of the parent.
Definition: gnunet_os_lib.h:86
struct GNUNET_ARM_Operation * GNUNET_ARM_request_service_list(struct GNUNET_ARM_Handle *h, GNUNET_ARM_ServiceListCallback cont, void *cont_cls)
Request a list of running services.
Definition: arm_api.c:896
struct GNUNET_ARM_Operation * GNUNET_ARM_request_service_start(struct GNUNET_ARM_Handle *h, const char *service_name, enum GNUNET_OS_InheritStdioFlags std_inheritance, GNUNET_ARM_ResultCallback cont, void *cont_cls)
Request for a service to be started.
Definition: arm_api.c:789
static void init_callback(void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
We have requested a service to be started, this function is called with the result of the operation...
Definition: gnunet-arm.c:408
static char * init
Set to the name of a service to start.
Definition: gnunet-arm.c:69
static void term_callback(void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result)
We have requested a service to be stopped, this function is called with the result of the operation...
Definition: gnunet-arm.c:454
static int monitor
Monitor ARM activity.
Definition: gnunet-arm.c:59
static int no_stderr
Do we want to give our stderr to gnunet-service-arm?
Definition: gnunet-arm.c:129
#define GNUNET_log(kind,...)
static int no_stdout
Do we want to give our stdout to gnunet-service-arm?
Definition: gnunet-arm.c:124
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:64
Here is the call graph for this function:
Here is the caller graph for this function:

◆ conn_status()

static void conn_status ( void *  cls,
int  connected 
)
static

Function called whenever we connect to or disconnect from ARM.

Termiantes the process if we fail to connect to the service on our first attempt.

Parameters
clsclosure
connectedGNUNET_YES if connected, GNUNET_NO if disconnected, GNUNET_SYSERR on error.

Definition at line 286 of file gnunet-arm.c.

References _, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_SCHEDULER_shutdown(), GNUNET_SYSERR, and once.

Referenced by GNUNET_ARM_connect(), and run().

287 {
288  static int once;
289 
290  (void) cls;
291  if ((GNUNET_SYSERR == connected) && (0 == once))
292  {
294  _ ("Fatal error initializing ARM API.\n"));
296  return;
297  }
298  once = 1;
299 }
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
static int once
Global to mark if we've run the initialization.
Definition: gnsrecord.c:68
#define GNUNET_SYSERR
Definition: gnunet_common.h:79
#define GNUNET_log(kind,...)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_callback()

static void start_callback ( void *  cls,
enum GNUNET_ARM_RequestStatus  rs,
enum GNUNET_ARM_Result  result 
)
static

We have requested ARM to be started, this function is called with the result of the operation.

Informs the use of the result; on success, we continue with the event loop, on failure we terminate the process.

Parameters
clsclosure unused
rswhat happened to our request
resultif the request was processed, this is the result according to ARM

Definition at line 314 of file gnunet-arm.c.

References _, action_loop(), FPRINTF, GNUNET_ARM_REQUEST_SENT_OK, GNUNET_ARM_RESULT_IS_STARTED_ALREADY, GNUNET_ARM_RESULT_STARTING, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), req_string(), ret_string(), and start.

Referenced by action_loop().

317 {
318  (void) cls;
319  op = NULL;
320  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
321  {
322  FPRINTF (stdout,
323  _ ("Failed to start the ARM service: %s\n"),
324  req_string (rs));
326  return;
327  }
330  {
331  FPRINTF (stdout,
332  _ ("Failed to start the ARM service: %s\n"),
333  ret_string (result));
335  return;
336  }
337  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n");
338  start = 0;
340 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
#define FPRINTF
Definition: plibc.h:683
static int start
Set if we are to start default services (including ARM).
Definition: gnunet-arm.c:39
Asked to start it, but it's already started.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
Service starting was initiated.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
static int result
Global testing status.
static const char * ret_string(enum GNUNET_ARM_Result result)
Returns a string interpretation of the result.
Definition: gnunet-arm.c:238
Message was sent successfully.
static const char * req_string(enum GNUNET_ARM_RequestStatus rs)
Returns a string interpretation of rs.
Definition: gnunet-arm.c:218
static void action_loop(void *cls)
Main task that runs our various operations in order.
Definition: gnunet-arm.c:547
#define GNUNET_log(kind,...)
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop_callback()

static void stop_callback ( void *  cls,
enum GNUNET_ARM_RequestStatus  rs,
enum GNUNET_ARM_Result  result 
)
static

We have requested ARM to be stopped, this function is called with the result of the operation.

Informs the use of the result; on success, we continue with the event loop, on failure we terminate the process.

Parameters
clsclosure unused
rswhat happened to our request
resultif the request was processed, this is the result according to ARM

Definition at line 355 of file gnunet-arm.c.

References _, action_loop(), end, FPRINTF, GNUNET_ARM_REQUEST_SENT_OK, GNUNET_ARM_RESULT_IS_STOPPED_ALREADY, GNUNET_ARM_RESULT_STOPPED, GNUNET_ARM_RESULT_STOPPING, GNUNET_asprintf(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), msg, req_string(), restart, ret_string(), and start.

Referenced by action_loop().

358 {
359  char *msg;
360 
361  (void) cls;
362  op = NULL;
363  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
364  {
365  GNUNET_asprintf (&msg,
366  "%s",
367  _ (
368  "Failed to send a stop request to the ARM service: %s\n"));
369  FPRINTF (stdout, msg, req_string (rs));
370  GNUNET_free (msg);
372  return;
373  }
377  {
378  FPRINTF (stdout,
379  _ ("Failed to stop the ARM service: %s\n"),
380  ret_string (result));
382  return;
383  }
384  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service shutdown successful\n");
385  end = 0;
386  if (restart)
387  {
388  restart = 0;
389  start = 1;
390  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Initiating an ARM restart\n");
391  }
393 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
ARM stopping was initiated (there's no "stopped" for ARM itself).
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
static int end
Set if we are to shutdown all services (including ARM).
Definition: gnunet-arm.c:34
static int restart
Set if we are to stop/start default services (including ARM).
Definition: gnunet-arm.c:44
#define FPRINTF
Definition: plibc.h:683
static int start
Set if we are to start default services (including ARM).
Definition: gnunet-arm.c:39
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
int GNUNET_asprintf(char **buf, const char *format,...)
Like asprintf, just portable.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
static int result
Global testing status.
static const char * ret_string(enum GNUNET_ARM_Result result)
Returns a string interpretation of the result.
Definition: gnunet-arm.c:238
Asked to stop it, but it's already stopped.
Message was sent successfully.
static const char * req_string(enum GNUNET_ARM_RequestStatus rs)
Returns a string interpretation of rs.
Definition: gnunet-arm.c:218
static void action_loop(void *cls)
Main task that runs our various operations in order.
Definition: gnunet-arm.c:547
#define GNUNET_log(kind,...)
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
Service was stopped (never sent for ARM itself).
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_callback()

static void init_callback ( void *  cls,
enum GNUNET_ARM_RequestStatus  rs,
enum GNUNET_ARM_Result  result 
)
static

We have requested a service to be started, this function is called with the result of the operation.

Informs the use of the result; on success, we continue with the event loop, on failure we terminate the process.

Parameters
clsclosure unused
rswhat happened to our request
resultif the request was processed, this is the result according to ARM

Definition at line 408 of file gnunet-arm.c.

References _, action_loop(), FPRINTF, GNUNET_ARM_REQUEST_SENT_OK, GNUNET_ARM_RESULT_IS_STARTED_ALREADY, GNUNET_ARM_RESULT_STARTING, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), init, req_string(), and ret_string().

Referenced by action_loop().

411 {
412  (void) cls;
413  op = NULL;
414  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
415  {
416  FPRINTF (stdout,
417  _ ("Failed to send a request to start the `%s' service: %s\n"),
418  init,
419  req_string (rs));
421  return;
422  }
425  {
426  FPRINTF (stdout,
427  _ ("Failed to start the `%s' service: %s\n"),
428  init,
429  ret_string (result));
431  return;
432  }
434  "Service %s [re]started successfully\n",
435  init);
436  GNUNET_free (init);
437  init = NULL;
439 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
#define FPRINTF
Definition: plibc.h:683
Asked to start it, but it's already started.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
Service starting was initiated.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
static int result
Global testing status.
static const char * ret_string(enum GNUNET_ARM_Result result)
Returns a string interpretation of the result.
Definition: gnunet-arm.c:238
static char * init
Set to the name of a service to start.
Definition: gnunet-arm.c:69
Message was sent successfully.
static const char * req_string(enum GNUNET_ARM_RequestStatus rs)
Returns a string interpretation of rs.
Definition: gnunet-arm.c:218
static void action_loop(void *cls)
Main task that runs our various operations in order.
Definition: gnunet-arm.c:547
#define GNUNET_log(kind,...)
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ term_callback()

static void term_callback ( void *  cls,
enum GNUNET_ARM_RequestStatus  rs,
enum GNUNET_ARM_Result  result 
)
static

We have requested a service to be stopped, this function is called with the result of the operation.

Informs the use of the result; on success, we continue with the event loop, on failure we terminate the process.

Parameters
clsclosure unused
rswhat happened to our request
resultif the request was processed, this is the result according to ARM

Definition at line 454 of file gnunet-arm.c.

References _, action_loop(), FPRINTF, GNUNET_ARM_REQUEST_SENT_OK, GNUNET_ARM_RESULT_IS_STOPPED_ALREADY, GNUNET_ARM_RESULT_STOPPED, GNUNET_asprintf(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), msg, req_string(), ret_string(), and term.

Referenced by action_loop().

457 {
458  char *msg;
459 
460  (void) cls;
461  op = NULL;
462  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
463  {
464  GNUNET_asprintf (&msg,
465  _ (
466  "Failed to send a request to kill the `%s' service: %%s\n"),
467  term);
468  FPRINTF (stdout, msg, req_string (rs));
469  GNUNET_free (msg);
471  return;
472  }
475  {
476  FPRINTF (stdout,
477  _ ("Failed to kill the `%s' service: %s\n"),
478  term,
479  ret_string (result));
481  return;
482  }
483 
485  "Service %s stopped successfully\n",
486  term);
487  GNUNET_free (term);
488  term = NULL;
490 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
#define FPRINTF
Definition: plibc.h:683
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
static char * term
Set to the name of a service to kill.
Definition: gnunet-arm.c:74
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
int GNUNET_asprintf(char **buf, const char *format,...)
Like asprintf, just portable.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
static int result
Global testing status.
static const char * ret_string(enum GNUNET_ARM_Result result)
Returns a string interpretation of the result.
Definition: gnunet-arm.c:238
Asked to stop it, but it's already stopped.
Message was sent successfully.
static const char * req_string(enum GNUNET_ARM_RequestStatus rs)
Returns a string interpretation of rs.
Definition: gnunet-arm.c:218
static void action_loop(void *cls)
Main task that runs our various operations in order.
Definition: gnunet-arm.c:547
#define GNUNET_log(kind,...)
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
Service was stopped (never sent for ARM itself).
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ list_callback()

static void list_callback ( void *  cls,
enum GNUNET_ARM_RequestStatus  rs,
unsigned int  count,
const char *const *  list 
)
static

Function called with the list of running services.

Prints the list to stdout, then starts the event loop again. Prints an error message and terminates the process on errors.

Parameters
clsclosure (unused)
rsrequest status (success, failure, etc.)
countnumber of services in the list
listlist of services that are running

Definition at line 504 of file gnunet-arm.c.

References _, action_loop(), FPRINTF, GNUNET_ARM_REQUEST_SENT_OK, GNUNET_asprintf(), GNUNET_free, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), msg, quiet, req_string(), and ret.

Referenced by action_loop().

508 {
509  (void) cls;
510  op = NULL;
511  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
512  {
513  char *msg;
514 
515  GNUNET_asprintf (&msg,
516  "%s",
517  _ ("Failed to request a list of services: %s\n"));
518  FPRINTF (stdout, msg, req_string (rs));
519  GNUNET_free (msg);
520  ret = 3;
522  }
523  if (NULL == list)
524  {
525  FPRINTF (stderr,
526  "%s",
527  _ ("Error communicating with ARM. ARM not running?\n"));
529  ret = 3;
530  return;
531  }
532  if (! quiet)
533  FPRINTF (stdout, "%s", _ ("Running services:\n"));
534  for (unsigned int i = 0; i < count; i++)
535  FPRINTF (stdout, "%s\n", list[i]);
537 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
#define FPRINTF
Definition: plibc.h:683
static int quiet
Set if we should not print status messages.
Definition: gnunet-arm.c:54
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
static int ret
Final status code.
Definition: gnunet-arm.c:89
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
int GNUNET_asprintf(char **buf, const char *format,...)
Like asprintf, just portable.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
Message was sent successfully.
static const char * req_string(enum GNUNET_ARM_RequestStatus rs)
Returns a string interpretation of rs.
Definition: gnunet-arm.c:218
static void action_loop(void *cls)
Main task that runs our various operations in order.
Definition: gnunet-arm.c:547
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:64
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ srv_status()

static void srv_status ( void *  cls,
const char *  service,
enum GNUNET_ARM_ServiceStatus  status 
)
static

Function called when a service starts or stops.

Parameters
clsclosure
serviceservice name
statusstatus of the service

Definition at line 637 of file gnunet-arm.c.

References _, FPRINTF, GNUNET_ARM_SERVICE_MONITORING_STARTED, GNUNET_ARM_SERVICE_STARTING, GNUNET_ARM_SERVICE_STOPPED, GNUNET_ARM_SERVICE_STOPPING, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, msg, and quiet.

Referenced by run().

640 {
641  const char *msg;
642 
643  (void) cls;
644  switch (status)
645  {
647  return; /* this should be done silently */
649  msg = _ ("Stopped %s.\n");
650  break;
652  msg = _ ("Starting %s...\n");
653  break;
655  msg = _ ("Stopping %s...\n");
656  break;
657  default:
658  msg = NULL;
659  break;
660  }
661  if (! quiet)
662  {
663  if (NULL != msg)
664  FPRINTF (stderr, msg, service);
665  else
666  FPRINTF (stderr,
667  _ ("Unknown status %u for service %s.\n"),
668  status,
669  service);
670  }
672  "Got service %s status %d\n",
673  service,
674  (int) status);
675 }
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
#define FPRINTF
Definition: plibc.h:683
Service starting was initiated.
static int quiet
Set if we should not print status messages.
Definition: gnunet-arm.c:54
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
uint16_t status
See PRISM_STATUS_*-constants.
Service was stopped.
Service stopping was initiated.
#define GNUNET_log(kind,...)
Here is the caller graph for this function:

◆ timeout_task_cb()

static void timeout_task_cb ( void *  cls)
static

Task run on timeout (if -T is given).

Definition at line 682 of file gnunet-arm.c.

References GNUNET_SCHEDULER_shutdown(), and ret.

Referenced by run().

683 {
684  (void) cls;
685  timeout_task = NULL;
686  ret = 2;
688 }
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:524
static int ret
Final status code.
Definition: gnunet-arm.c:89
static struct GNUNET_SCHEDULER_Task * timeout_task
Task to be run on timeout.
Definition: gnunet-arm.c:119
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle c 
)
static

Main function that will be run by the scheduler.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cconfiguration

Definition at line 700 of file gnunet-arm.c.

References action_loop(), config_file, conn_status(), dir, GNUNET_ARM_connect(), GNUNET_ARM_monitor_start(), GNUNET_CONFIGURATION_dup(), GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing(), GNUNET_OK, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_shutdown(), monitor, GNUNET_TIME_Relative::rel_value_us, shutdown_task(), srv_status(), timeout, and timeout_task_cb().

Referenced by adjust_running_peers(), and main().

704 {
705  (void) cls;
706  (void) args;
707  (void) cfgfile;
709  if (GNUNET_OK !=
710  GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "GNUNET_HOME", &dir))
711  {
712  GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "PATHS", "GNUNET_HOME");
713  return;
714  }
716  "arm",
717  "CONFIG",
718  &config_file);
719  if (NULL == (h = GNUNET_ARM_connect (cfg, &conn_status, NULL)))
720  return;
721  if (monitor)
725  if (0 != timeout.rel_value_us)
726  timeout_task =
728 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
static char * dir
Set to the directory where runtime files are stored.
Definition: gnunet-arm.c:84
static void timeout_task_cb(void *cls)
Task run on timeout (if -T is given).
Definition: gnunet-arm.c:682
uint64_t rel_value_us
The actual value.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received, or when GNUNET_SCHEDULER_shutdown() is being invoked.
Definition: scheduler.c:1293
static char * config_file
Set to the name of the config file used.
Definition: gnunet-arm.c:79
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:99
static void shutdown_task(void *cls)
Main continuation-passing-style loop.
Definition: gnunet-arm.c:176
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1246
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:114
void GNUNET_log_config_missing(enum GNUNET_ErrorType kind, const char *section, const char *option)
Log error message about missing configuration option.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
static void conn_status(void *cls, int connected)
Function called whenever we connect to or disconnect from ARM.
Definition: gnunet-arm.c:286
struct GNUNET_ARM_Handle * GNUNET_ARM_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_ARM_ConnectionStatusCallback conn_status, void *conn_status_cls)
Set up a context for communicating with ARM, then start connecting to the ARM service using that cont...
Definition: arm_api.c:482
int GNUNET_CONFIGURATION_get_value_string(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be a string.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
static struct GNUNET_SCHEDULER_Task * timeout_task
Task to be run on timeout.
Definition: gnunet-arm.c:119
static void srv_status(void *cls, const char *service, enum GNUNET_ARM_ServiceStatus status)
Function called when a service starts or stops.
Definition: gnunet-arm.c:637
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_dup(const struct GNUNET_CONFIGURATION_Handle *cfg)
Duplicate an existing configuration object.
static int monitor
Monitor ARM activity.
Definition: gnunet-arm.c:59
static void action_loop(void *cls)
Main task that runs our various operations in order.
Definition: gnunet-arm.c:547
int GNUNET_CONFIGURATION_get_value_filename(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be the name of a file or directory.
struct GNUNET_ARM_MonitorHandle * GNUNET_ARM_monitor_start(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_ARM_ServiceStatusCallback cont, void *cont_cls)
Setup a context for monitoring ARM, then start connecting to the ARM service for monitoring using tha...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

The main function to obtain arm from gnunetd.

Parameters
argcnumber of arguments from the command line
argvcommand line arguments
Returns
0 ok, 1 on error, 2 on timeout

Definition at line 739 of file gnunet-arm.c.

References end, gettext_noop, GNUNET_free, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_string(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), init, list, monitor, no_stderr, no_stdout, quiet, restart, ret, run(), start, term, and timeout.

740 {
743  "end",
744  gettext_noop ("stop all GNUnet services"),
745  &end),
747  "init",
748  "SERVICE",
749  gettext_noop ("start a particular service"),
750  &init),
752  "kill",
753  "SERVICE",
754  gettext_noop ("stop a particular service"),
755  &term),
757  "start",
758  gettext_noop (
759  "start all GNUnet default services"),
760  &start),
762  "restart",
763  gettext_noop (
764  "stop and start all GNUnet default services"),
765  &restart),
767  "delete",
768  gettext_noop (
769  "delete config file and directory on exit"),
770  &delete),
772  "monitor",
773  gettext_noop ("monitor ARM activities"),
774  &monitor),
776  "quiet",
777  gettext_noop ("don't print status messages"),
778  &quiet),
780  'T',
781  "timeout",
782  "DELAY",
783  gettext_noop (
784  "exit with error status if operation does not finish after DELAY"),
785  &timeout),
787  "info",
788  gettext_noop (
789  "list currently running services"),
790  &list),
792  'O',
793  "no-stdout",
794  gettext_noop ("don't let gnunet-service-arm inherit standard output"),
795  &no_stdout),
797  'E',
798  "no-stderr",
799  gettext_noop ("don't let gnunet-service-arm inherit standard error"),
800  &no_stderr),
802  int lret;
803 
804  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
805  return 2;
806  if (GNUNET_OK ==
807  (lret = GNUNET_PROGRAM_run (
808  argc,
809  argv,
810  "gnunet-arm",
811  gettext_noop (
812  "Control services and the Automated Restart Manager (ARM)"),
813  options,
814  &run,
815  NULL)))
816  {
817  GNUNET_free ((void *) argv);
818  return ret;
819  }
820  GNUNET_free ((void *) argv);
821  return lret;
822 }
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_relative_time(char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_TIME_Relative *val)
Allow user to specify a struct GNUNET_TIME_Relative (using human-readable "fancy" time)...
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
Main function that will be run by the scheduler.
Definition: gnunet-arm.c:700
static int end
Set if we are to shutdown all services (including ARM).
Definition: gnunet-arm.c:34
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static int restart
Set if we are to stop/start default services (including ARM).
Definition: gnunet-arm.c:44
static int start
Set if we are to start default services (including ARM).
Definition: gnunet-arm.c:39
int GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Definition: strings.c:1521
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
Definition of a command line option.
static int quiet
Set if we should not print status messages.
Definition: gnunet-arm.c:54
static int ret
Final status code.
Definition: gnunet-arm.c:89
static char * term
Set to the name of a service to kill.
Definition: gnunet-arm.c:74
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:114
static char * init
Set to the name of a service to start.
Definition: gnunet-arm.c:69
static int monitor
Monitor ARM activity.
Definition: gnunet-arm.c:59
static int no_stderr
Do we want to give our stderr to gnunet-service-arm?
Definition: gnunet-arm.c:129
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
int GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration, parse options).
Definition: program.c:361
static int no_stdout
Do we want to give our stdout to gnunet-service-arm?
Definition: gnunet-arm.c:124
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:64
#define GNUNET_free(ptr)
Wrapper around free.
#define gettext_noop(String)
Definition: gettext.h:69
Here is the call graph for this function:

Variable Documentation

◆ end

int end
static

◆ start

int start
static

◆ restart

int restart
static

Set if we are to stop/start default services (including ARM).

Definition at line 44 of file gnunet-arm.c.

Referenced by action_loop(), main(), and stop_callback().

◆ delete

int delete
static

Set if we should delete configuration and temp directory on exit.

Definition at line 49 of file gnunet-arm.c.

◆ quiet

int quiet
static

Set if we should not print status messages.

Definition at line 54 of file gnunet-arm.c.

Referenced by action_loop(), list_callback(), main(), and srv_status().

◆ monitor

int monitor
static

Monitor ARM activity.

Definition at line 59 of file gnunet-arm.c.

Referenced by action_loop(), client_disconnect_cb(), main(), and run().

◆ list

int list
static

◆ init

char* init
static

◆ term

char* term
static

Set to the name of a service to kill.

Definition at line 74 of file gnunet-arm.c.

Referenced by action_loop(), main(), and term_callback().

◆ config_file

char* config_file
static

Set to the name of the config file used.

Definition at line 79 of file gnunet-arm.c.

Referenced by delete_files(), GNUNET_PROGRAM_run2(), GNUNET_SERVICE_run_(), LEGACY_SERVICE_run(), main(), and run().

◆ dir

char* dir
static

◆ ret

int ret
static

Final status code.

Definition at line 89 of file gnunet-arm.c.

Referenced by __attribute__(), access_handler_callback(), add_address_to_hello(), add_address_to_uri(), add_record(), add_services(), add_valid_peer(), address_generator(), address_to_regex(), append_port(), bound_priority(), build_dns_query(), child_death_task(), cleanup_expired_records(), client_message_tokenizer_callback(), client_run(), close_all_files(), cmd_read(), compute_chk_offset(), compute_policy(), compute_rand_delay(), compute_scalar_product(), connect_to_dns_resolver(), conversation_value_to_string(), convert_with_table(), copy_from_reader(), create_meter(), create_peer_ctx(), create_response(), db_read_whitelist(), decide_capacity(), delta_match(), demultiplex_with_cmc(), deserialize_fi_node(), deserialize_file_information(), do_delete_entry(), do_send(), do_transmit(), download_hostlist(), estimate_latency(), execute_get(), execute_select(), extract_fixed_blob(), extract_rsa_pub(), extract_rsa_sig(), extract_var_blob(), fh_reader(), fill_s_reply(), fork_and_exec(), GCP_2s(), GCP_iterate_indirect_paths(), GCP_iterate_paths(), GCP_iterate_paths_at(), GCT_handle_kx(), GCT_handle_kx_auth(), get_bootstrap_server(), get_cb(), get_delay_randomization(), get_latest(), get_next_free_ctn(), get_peer_ctx(), get_random_peer_from_peermap(), get_randomized_delay(), get_read_handle(), get_records_and_call_iterator(), get_serialization_file_name(), get_serialization_file_name_in_dir(), get_server_addresses(), get_target_peers(), get_transmit_delay(), get_update_information_directory(), get_valid_peers(), get_write_handle(), get_write_handle_in_dir(), getPRK(), gns_resolve_name(), GNUNET_ARM_request_service_start(), GNUNET_asprintf(), GNUNET_BANDWIDTH_tracker_get_delay(), GNUNET_BANDWIDTH_value_get_delay_for(), GNUNET_BANDWIDTH_value_init(), GNUNET_BIO_flush(), GNUNET_BIO_read(), GNUNET_BIO_write_close(), GNUNET_BLOCK_group_merge(), GNUNET_CADET_get_channel_cancel(), GNUNET_CADET_get_path_cancel(), GNUNET_CADET_list_peers_cancel(), GNUNET_CADET_list_tunnels_cancel(), GNUNET_CONFIGURATION_deserialize(), GNUNET_CONFIGURATION_dup(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONFIGURATION_get_value_yesno(), GNUNET_CONFIGURATION_iterate_value_filenames(), GNUNET_CONFIGURATION_parse(), GNUNET_CONFIGURATION_parse_and_run(), GNUNET_CONFIGURATION_write_diffs(), GNUNET_CONTAINER_heap_remove_node(), GNUNET_CONTAINER_heap_remove_root(), GNUNET_CONTAINER_meta_data_duplicate(), GNUNET_CONTAINER_meta_data_get_first_by_types(), GNUNET_CONTAINER_meta_data_get_serialized_size(), GNUNET_CONTAINER_multihashmap32_create(), GNUNET_CONTAINER_multihashmap32_remove_all(), GNUNET_CONTAINER_multihashmap_clear(), GNUNET_CONTAINER_multihashmap_remove_all(), GNUNET_CONTAINER_multipeermap_remove_all(), GNUNET_CONTAINER_multishortmap_remove_all(), GNUNET_CONTAINER_multiuuidmap_remove_all(), GNUNET_copy_message(), GNUNET_CREDENTIAL_credentials_get_size(), GNUNET_CREDENTIAL_delegation_chain_get_size(), GNUNET_CREDENTIAL_delegation_set_get_size(), GNUNET_CRYPTO_ecdh_eddsa(), GNUNET_CRYPTO_ecdsa_ecdh(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_eddsa_ecdh(), GNUNET_CRYPTO_hkdf(), GNUNET_CRYPTO_hkdf_v(), GNUNET_CRYPTO_kdf(), GNUNET_CRYPTO_random_permute(), GNUNET_CRYPTO_random_u32(), GNUNET_CRYPTO_random_u64(), GNUNET_CRYPTO_rsa_blind(), GNUNET_CRYPTO_rsa_private_key_cmp(), GNUNET_CRYPTO_rsa_private_key_create(), GNUNET_CRYPTO_rsa_public_key_cmp(), GNUNET_CRYPTO_rsa_public_key_decode(), GNUNET_CRYPTO_rsa_signature_cmp(), GNUNET_CRYPTO_rsa_signature_decode(), GNUNET_CRYPTO_rsa_signature_dup(), GNUNET_CRYPTO_rsa_unblind(), GNUNET_DATACACHE_create(), GNUNET_DISK_directory_create(), GNUNET_DISK_directory_create_for_file(), GNUNET_DISK_directory_scan(), GNUNET_DISK_directory_test(), GNUNET_DISK_file_close(), GNUNET_DISK_file_open(), GNUNET_DISK_file_read_non_blocking(), GNUNET_DISK_file_size(), GNUNET_DISK_file_sync(), GNUNET_DISK_file_test(), GNUNET_DISK_file_unmap(), GNUNET_DISK_file_write_blocking(), GNUNET_DISK_fn_read(), GNUNET_DISK_fn_write(), GNUNET_DISK_pipe(), GNUNET_DISK_pipe_close(), GNUNET_DISK_pipe_close_end(), GNUNET_DISK_pipe_detach_end(), GNUNET_DISK_pipe_from_fd(), GNUNET_DNSPARSER_bin_to_hex(), GNUNET_DNSPARSER_builder_add_query(), GNUNET_DNSPARSER_builder_add_soa(), GNUNET_DNSPARSER_builder_add_srv(), GNUNET_DNSPARSER_pack(), GNUNET_FRIENDS_write(), GNUNET_FRIENDS_write_stop(), GNUNET_FS_data_reader_file_(), GNUNET_FS_directory_builder_add(), GNUNET_FS_directory_builder_create(), GNUNET_FS_directory_builder_finish(), GNUNET_FS_file_information_create_empty_directory(), GNUNET_FS_file_information_create_from_file(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_make_top(), GNUNET_FS_meta_data_suggest_filename(), GNUNET_FS_meta_data_test_for_directory(), GNUNET_FS_publish_start(), GNUNET_FS_search_make_status_(), GNUNET_FS_search_start(), GNUNET_FS_start(), GNUNET_FS_tree_calculate_block_size(), GNUNET_FS_tree_compute_iblock_size(), GNUNET_FS_uri_dup(), GNUNET_FS_uri_ksk_create_from_meta_data(), GNUNET_FS_uri_ksk_merge(), GNUNET_FS_uri_ksk_to_string_fancy(), GNUNET_FS_uri_loc_get_uri(), GNUNET_FS_uri_parse(), GNUNET_FS_uri_test_equal(), GNUNET_GNS_lookup_cancel(), GNUNET_GNS_lookup_with_tld_cancel(), GNUNET_GNSRECORD_number_to_typename(), GNUNET_GNSRECORD_pkey_to_zkey(), GNUNET_GNSRECORD_records_get_size(), GNUNET_GNSRECORD_typename_to_number(), GNUNET_GNSRECORD_value_to_string(), GNUNET_h2s_full(), GNUNET_HELLO_address_cmp(), GNUNET_HELLO_create(), GNUNET_HELLO_get_header(), GNUNET_HELLO_get_id(), GNUNET_HELLO_get_last_expiration(), GNUNET_HELLO_iterate_addresses(), GNUNET_HELLO_size(), GNUNET_HELPER_kill(), GNUNET_HELPER_wait(), GNUNET_i2s(), GNUNET_i2s2(), GNUNET_i2s_full(), GNUNET_JSON_from_rsa_public_key(), GNUNET_JSON_from_rsa_signature(), GNUNET_JSON_from_time_abs(), GNUNET_JSON_from_time_rel(), GNUNET_JSON_post_parser(), GNUNET_JSON_spec_absolute_time(), GNUNET_JSON_spec_absolute_time_nbo(), GNUNET_JSON_spec_boolean(), GNUNET_JSON_spec_end(), GNUNET_JSON_spec_fixed(), GNUNET_JSON_spec_gnsrecord(), GNUNET_JSON_spec_json(), GNUNET_JSON_spec_relative_time(), GNUNET_JSON_spec_rsa_public_key(), GNUNET_JSON_spec_rsa_signature(), GNUNET_JSON_spec_string(), GNUNET_JSON_spec_uint16(), GNUNET_JSON_spec_uint32(), GNUNET_JSON_spec_uint64(), GNUNET_JSON_spec_uint8(), GNUNET_JSON_spec_varsize(), GNUNET_LOAD_value_init(), GNUNET_MQ_env_combine_options(), GNUNET_MQ_inject_message(), GNUNET_MST_create(), GNUNET_MST_from_buffer(), GNUNET_MST_read(), GNUNET_MY_extract_result(), GNUNET_NAT_stun_handle_packet_(), GNUNET_NETWORK_socket_accept(), GNUNET_NETWORK_socket_bind(), GNUNET_NETWORK_socket_box_native(), GNUNET_NETWORK_socket_close(), GNUNET_NETWORK_socket_connect(), GNUNET_NETWORK_socket_create(), GNUNET_NETWORK_socket_disable_corking(), GNUNET_NETWORK_socket_getsockopt(), GNUNET_NETWORK_socket_listen(), GNUNET_NETWORK_socket_recv(), GNUNET_NETWORK_socket_recvfrom(), GNUNET_NETWORK_socket_send(), GNUNET_NETWORK_socket_sendto(), GNUNET_NETWORK_socket_setsockopt(), GNUNET_NETWORK_socket_shutdown(), GNUNET_NETWORK_test_pf(), GNUNET_NETWORK_test_port_free(), GNUNET_NETWORK_unix_precheck(), GNUNET_OS_process_kill(), GNUNET_OS_process_wait(), GNUNET_OS_start_process(), GNUNET_OS_start_process_va(), GNUNET_PEER_intern(), GNUNET_PLUGIN_load(), GNUNET_PLUGIN_unload(), GNUNET_PQ_eval_prepared_multi_select(), GNUNET_PQ_exec_prepared(), GNUNET_PQ_extract_result(), GNUNET_PQ_prepare_statements(), GNUNET_PROGRAM_run2(), gnunet_read(), GNUNET_RECLAIM_ATTRIBUTE_number_to_typename(), GNUNET_RECLAIM_ATTRIBUTE_typename_to_number(), GNUNET_RECLAIM_ATTRIBUTE_value_to_string(), GNUNET_RECLAIM_JSON_spec_claim(), GNUNET_RECLAIM_JSON_spec_ticket(), GNUNET_RESOLVER_local_fqdn_get(), GNUNET_SCHEDULER_add_file_with_priority(), GNUNET_SCHEDULER_add_net_with_priority(), GNUNET_SCHEDULER_add_now_with_lifeness(), GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_get_load(), GNUNET_SERVER_mst_create(), GNUNET_SERVER_mst_receive(), GNUNET_SERVICE_run_(), GNUNET_SIGNAL_handler_install(), GNUNET_snprintf(), GNUNET_SQ_prepare(), GNUNET_STRINGS_base64_decode(), GNUNET_STRINGS_base64_encode(), GNUNET_STRINGS_byte_size_fancy(), GNUNET_STRINGS_conv(), GNUNET_STRINGS_fancy_time_to_relative(), GNUNET_STRINGS_parse_ipv6_policy(), GNUNET_STRINGS_string_to_data(), GNUNET_STRINGS_to_address_ipv6(), GNUNET_strlcpy(), GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_test_run(), GNUNET_TESTBED_underlay_construct_(), GNUNET_TESTING_get_testname_from_underscore(), GNUNET_TESTING_peer_wait(), GNUNET_TESTING_reserve_port(), GNUNET_TIME_absolute_add(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_absolute_get_duration(), GNUNET_TIME_absolute_get_remaining(), GNUNET_TIME_absolute_hton(), GNUNET_TIME_absolute_ntoh(), GNUNET_TIME_absolute_subtract(), GNUNET_TIME_calculate_eta(), GNUNET_TIME_relative_add(), GNUNET_TIME_relative_divide(), GNUNET_TIME_relative_hton(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_relative_ntoh(), GNUNET_TIME_relative_saturating_multiply(), GNUNET_TIME_relative_subtract(), GNUNET_TIME_relative_to_absolute(), GNUNET_TIME_year_to_time(), GNUNET_TRANSPORT_TESTING_get_config_name(), GNUNET_TRANSPORT_TESTING_get_test_name(), GNUNET_TRANSPORT_TESTING_get_test_plugin_name(), GNUNET_TRANSPORT_TESTING_main_(), GNUNET_xmalloc_(), GNUNET_xmemdup_(), GNUNET_xnew_array_2d_(), GNUNET_xnew_array_3d_(), GSC_TYPEMAP_extend(), GSC_TYPEMAP_get_from_message(), GST_neighbours_calculate_receive_delay(), GST_receive_callback(), GST_validation_handle_ping(), habitability_check(), handle_lookup_block(), handle_request_connection_reversal(), handle_revoke_message(), http_common_plugin_address_pretty_printer(), inflate_data(), insert_in_view(), ipv4_to_regex(), ipv6_to_regex(), iterator_cb(), kwait(), libgnunet_plugin_transport_tcp_init(), list_callback(), load_cert_from_file(), load_key_from_file(), load_plugin(), load_quota(), mac_set(), main(), maint_child_death(), make_icmp_socket(), make_peer(), make_raw_socket(), make_serialization_file_name(), make_serialization_file_name_in_dir(), make_udp_socket(), monitor_iteration_next(), mst_create(), mst_receive(), mysql_plugin_estimate_size(), mysql_plugin_get_keys(), namecache_sqlite_lookup_block(), namestore_postgres_store_records(), namestore_sqlite_store_records(), nibble_to_regex(), notify_connect(), notify_send_probe(), num_to_regex(), ogg_demux_and_decode(), op_get_element(), open_socket(), os_get_exec_path(), os_get_gnunet_path(), parent_control_handler(), parse_configuration_file(), parse_hello_uri(), parse_name(), parse_quota(), pass_plaintext_to_core(), peerstore_sqlite_delete_records(), percent_decode_keyword(), perform_dht_put(), port_to_regex(), postgres_plugin_estimate_size(), postgres_plugin_put(), postgres_plugin_remove_key(), prepare_daemon(), process_data(), process_incoming(), process_payload(), process_status(), queue(), receive_ready(), recursive_dns_resolution(), remove_address4(), remove_address6(), repl_proc(), reply_to_dns(), reservations_reserve(), resolver_lookup_get_next_label(), resume_client_receive(), rfn_noncontested(), run(), run_zbar(), s2i_full(), secret_ready_cb(), select_del(), select_read_cb(), send_client_element(), send_name_to_ip_request(), serve_main_page(), server_get_addresses(), server_schedule(), service_client_recv(), service_manage_result_cb(), set_address4(), set_address6(), set_result_cb(), setup_db(), setup_service(), sigchld_handler(), sockaddr_to_udpaddr_string(), sqlite_plugin_get_keys(), sqlite_plugin_put(), start_process(), store_and_free_entries(), store_peer_presistently_iterator(), store_valid_peers(), stun_read_task(), test_service_configuration(), test_wlan_interface(), timeout_task_cb(), translate_dot_plus(), transmit_content(), transmit_ping_if_allowed(), transmit_ready(), unix_plugin_address_pretty_printer(), unix_plugin_do_read(), updateUsage(), uri_chk_parse(), uri_chk_to_string(), uri_ksk_parse(), uri_ksk_to_string(), uri_loc_to_string(), uri_sks_parse(), uri_sks_to_string(), winErrorStr(), wlan_plugin_address_pretty_printer(), write_data(), and write_wav_header().

◆ h

struct GNUNET_ARM_Handle* h
static

Connection with ARM.

Definition at line 94 of file gnunet-arm.c.

Referenced by add_setter_action(), cadet_connect_adapter(), call_flush_completion(), clean_node(), consider_notify_transport(), crc_init(), create_channel(), create_download_context(), derive_h(), deserialize_download(), deserialize_fi_node(), deserialize_publish_file(), deserialize_search(), deserialize_unindex_file(), destroy_channel(), disconnect_after_drop(), disconnect_on_mq_error(), encrypt_fair(), env_delete_notify(), free_queue_entry(), full_recursive_download(), GCD_search(), get_fair_encryption_challenge(), GN_start_gnunet_nat_server_(), GNUNET_ARM_monitor_start(), GNUNET_BIO_read_open(), GNUNET_BIO_write_open(), GNUNET_CADET_connect(), GNUNET_CADET_open_port(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_ecdsa_public_key_derive(), GNUNET_DATASTORE_cancel(), GNUNET_DATASTORE_connect(), GNUNET_DISK_file_open(), GNUNET_DNSPARSER_hex_to_bin(), GNUNET_FS_dequeue_(), GNUNET_FS_file_information_create_empty_directory(), GNUNET_FS_file_information_create_from_file(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_probe(), GNUNET_FS_publish_sks(), GNUNET_FS_publish_start(), GNUNET_FS_queue_(), GNUNET_FS_stop_probe_ping_task_(), GNUNET_FS_unindex_start(), GNUNET_NAMECACHE_block_cache(), GNUNET_NAMECACHE_cancel(), GNUNET_NAMECACHE_connect(), GNUNET_NAMECACHE_lookup_block(), GNUNET_NETWORK_fdset_handle_set(), GNUNET_NETWORK_fdset_handle_set_first(), GNUNET_NSE_connect(), GNUNET_OS_process_wait(), GNUNET_PEERSTORE_connect(), GNUNET_PEERSTORE_iterate(), GNUNET_PEERSTORE_store(), GNUNET_PEERSTORE_store_cancel(), GNUNET_PEERSTORE_watch(), GNUNET_PEERSTORE_watch_cancel(), GNUNET_REVOCATION_revoke(), GNUNET_RPS_connect(), GNUNET_RPS_request_cancel(), GNUNET_RPS_request_single_info_cancel(), GNUNET_SCALARPRODUCT_accept_computation(), GNUNET_SCALARPRODUCT_start_computation(), GNUNET_SECRETSHARING_encrypt(), GNUNET_STATISTICS_create(), GNUNET_TESTBED_barrier_wait(), GNUNET_TESTBED_is_host_habitable(), GNUNET_TESTBED_LOGGER_connect(), GNUNET_TESTBED_SD_init_(), GNUNET_TRANSPORT_manipulation_connect(), GST_neighbour_get_connection(), habitability_check(), handle_block_cache_response(), handle_client_error(), handle_data(), handle_data_end(), handle_dht_p2p_result(), handle_estimate(), handle_iterate_end(), handle_iterate_result(), handle_lookup_block_response(), handle_monitor_notify(), handle_revocation_response(), handle_status(), handle_stream_input(), handle_view_update(), handle_watch_record(), make_queue_entry(), mq_error_handler(), nat_server_read(), neighbour_connect_notify_task(), parent_control_thread(), peer_add(), peer_free(), probe_ping_task_cb(), process_job_queue(), process_ksk_result(), process_status(), read_start_time(), read_update_information_graph(), reconnect(), reconnect_arm_monitor_task(), reconnect_task(), regex_cancel_dht_get(), REGEX_INTERNAL_announce(), REGEX_INTERNAL_search(), regex_iterator(), register_service(), restart_nat_server(), revocation_mq_error_handler(), rewatch_it(), rps_connect_adapter(), rps_disconnect_adapter(), run(), schedule_watch_request(), search_start(), send_get(), send_get_known_results(), send_monitor_start(), service_connect_comp(), shutdown_service(), simple_preference_add(), simple_preference_del(), simple_session_add(), simple_session_del(), simple_session_update(), socket_set_inheritable(), start_probe_ping_task(), suggest_hello(), transport_communicator_start(), trigger_flush_notification(), try_anat(), try_reconnect(), and update_memory_statistics().

◆ m

struct GNUNET_ARM_MonitorHandle* m
static

Monitor connection with ARM.

Definition at line 99 of file gnunet-arm.c.

Referenced by address_to_regex(), api_send(), decrypt_conclude(), destroy_it(), do_send(), EnumNICs3(), envi_get_state(), full_recursive_download(), GDS_CLIENTS_process_get(), GDS_CLIENTS_process_get_resp(), GDS_CLIENTS_process_put(), gen_topo_scale_free(), GNUNET_ABE_cpabe_decrypt(), GNUNET_ABE_cpabe_encrypt(), GNUNET_ATS_address_destroy(), GNUNET_ATS_address_update(), GNUNET_ATS_application_suggest_cancel(), GNUNET_ATS_connectivity_suggest_cancel(), GNUNET_ATS_performance_change_preference(), GNUNET_ATS_performance_give_feedback(), GNUNET_ATS_performance_list_addresses(), GNUNET_ATS_reserve_bandwidth(), GNUNET_ATS_session_del(), GNUNET_ATS_session_update(), GNUNET_CRYPTO_cpabe_decrypt(), GNUNET_CRYPTO_cpabe_encrypt(), GNUNET_CURL_get_select_info(), GNUNET_DATASTORE_get_for_replication(), GNUNET_DATASTORE_get_zero_anonymity(), GNUNET_DHT_monitor_stop(), GNUNET_SECRETSHARING_encrypt(), GNUNET_SET_operation_cancel(), GNUNET_TESTBED_overlay_configure_topology_va(), GNUNET_TESTBED_underlay_construct_(), GNUNET_TESTBED_underlaylinkmodel_create(), GNUNET_TRANSPORT_application_suggest_cancel(), GNUNET_TRANSPORT_application_validate(), GNUNET_xnew_array_3d_(), keygen_round2_conclude(), main(), map_remove_iterator(), notify_connect(), num_to_regex(), process_peer_monitoring_cb(), relative_multiply_double(), send_add_address_message(), send_add_session_message(), send_monitor_start(), send_msg(), send_to_client_iter(), transmit(), and transmit_suggestion().

◆ cfg

struct GNUNET_CONFIGURATION_Handle* cfg
static

Our configuration.

Definition at line 104 of file gnunet-arm.c.

Referenced by connect_check_run(), create_internal(), default_ego_cb(), GAS_plugin_init(), GCP_set_hello(), GNUNET_ARM_connect(), GNUNET_ATS_application_init(), GNUNET_ATS_connectivity_init(), GNUNET_ATS_performance_init(), GNUNET_ATS_scheduling_init(), GNUNET_ATS_solvers_experimentation_load(), GNUNET_ATS_TEST_experimentation_load(), GNUNET_ATS_transport_init(), GNUNET_CLIENT_connect(), GNUNET_CONFIGURATION_parse_and_run(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONVERSATION_phone_create(), GNUNET_CORE_connect(), GNUNET_CREDENTIAL_connect(), GNUNET_CRYPTO_eddsa_setup_key(), GNUNET_DATASTORE_connect(), GNUNET_DHT_connect(), GNUNET_DNS_connect(), GNUNET_FS_start(), GNUNET_GNS_connect(), GNUNET_IDENTITY_connect(), GNUNET_NAMECACHE_connect(), GNUNET_NAMESTORE_connect(), GNUNET_NAT_AUTO_test_start(), GNUNET_NAT_register(), GNUNET_NAT_test_start(), GNUNET_PEERINFO_connect(), GNUNET_RECLAIM_connect(), GNUNET_RESOLVER_connect(), GNUNET_RPS_connect(), GNUNET_SERVICE_run_(), GNUNET_SERVICE_start(), GNUNET_SET_listen(), GNUNET_STATISTICS_create(), GNUNET_TESTBED_controller_connect(), GNUNET_TESTBED_controller_start(), GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_peer_create(), GNUNET_TESTING_configuration_create_(), GNUNET_TESTING_service_run(), GNUNET_TIME_absolute_get_monotonic(), GNUNET_TRANSPORT_application_init(), GNUNET_TRANSPORT_communicator_connect(), GNUNET_TRANSPORT_core_connect(), GNUNET_TRANSPORT_core_get_mq(), GPI_plugins_load(), handle_link_controllers_result(), handle_peer_create(), handle_peer_reconfigure(), handle_slave_get_config(), id_connect_cb(), identity_cb(), libgnunet_plugin_block_revocation_init(), main_task(), parse_configuration_file(), parse_shared_services(), print_option(), run(), tokenizer_cb(), and update_peer_config().

◆ phase

unsigned int phase
static

Processing stage that we are in.

Simple counter.

Definition at line 109 of file gnunet-arm.c.

Referenced by action_loop(), and main().

◆ timeout

struct GNUNET_TIME_Relative timeout
static

◆ timeout_task

struct GNUNET_SCHEDULER_Task* timeout_task
static

Task to be run on timeout.

Definition at line 119 of file gnunet-arm.c.

◆ no_stdout

int no_stdout
static

Do we want to give our stdout to gnunet-service-arm?

Definition at line 124 of file gnunet-arm.c.

Referenced by action_loop(), and main().

◆ no_stderr

int no_stderr
static

Do we want to give our stderr to gnunet-service-arm?

Definition at line 129 of file gnunet-arm.c.

Referenced by action_loop(), and main().

◆ al_task

struct GNUNET_SCHEDULER_Task* al_task
static

Handle for the task running the action_loop().

Definition at line 134 of file gnunet-arm.c.

◆ op

struct GNUNET_ARM_Operation* op
static

Current operation.

Definition at line 139 of file gnunet-arm.c.

Referenced by adjust_running_peers(), bind_loose_channel(), change_service(), channel_end_cb(), channel_new_cb(), check_incoming_msg(), check_intersection_p2p_bf(), check_union_p2p_demand(), check_union_p2p_elements(), check_union_p2p_full_element(), check_union_p2p_ibf(), check_union_p2p_inquiry(), check_union_p2p_offer(), check_union_p2p_strata_estimator(), clean_peer(), client_disconnect_cb(), client_release_ports(), collect_generation_garbage(), create_finished(), delete_finished(), disconnect_cadet_peers(), exop_insert(), filter_all(), filtered_map_initialization(), finished_local_operations(), GCCH_channel_incoming_new(), GCCH_channel_local_new(), get_incoming(), GNUNET_ARM_disconnect(), GNUNET_ARM_request_service_list(), GNUNET_ARM_request_service_start(), GNUNET_ARM_request_service_stop(), GNUNET_IDENTITY_create(), GNUNET_IDENTITY_delete(), GNUNET_IDENTITY_disconnect(), GNUNET_IDENTITY_get(), GNUNET_IDENTITY_rename(), GNUNET_IDENTITY_set(), GNUNET_OP_add(), GNUNET_OP_get(), GNUNET_RECLAIM_attribute_delete(), GNUNET_RECLAIM_attribute_store(), GNUNET_RECLAIM_ticket_consume(), GNUNET_RECLAIM_ticket_issue(), GNUNET_RECLAIM_ticket_revoke(), GST_connection_pool_get_handle(), handle_arm_list_result(), handle_arm_result(), handle_attribute_result(), handle_client_accept(), handle_client_cancel(), handle_client_evaluate(), handle_client_reject(), handle_consume_ticket_result(), handle_identity_result_code(), handle_identity_set_default(), handle_incoming_msg(), handle_intersection_p2p_bf(), handle_intersection_p2p_done(), handle_intersection_p2p_element_info(), handle_peer_create_success(), handle_port_close(), handle_port_open(), handle_revoke_ticket_result(), handle_success_response(), handle_ticket_result(), handle_union_p2p_demand(), handle_union_p2p_done(), handle_union_p2p_elements(), handle_union_p2p_full_done(), handle_union_p2p_full_element(), handle_union_p2p_ibf(), handle_union_p2p_inquiry(), handle_union_p2p_offer(), handle_union_p2p_request_full(), handle_union_p2p_strata_estimator(), incoming_timeout_cb(), init_key_to_element_iterator(), initialize_map_unfiltered(), iterator_bf_create(), iterator_bf_reduce(), load_episode(), mlp_create_problem_create_constraint(), mq_error_handler(), needs_parens(), needs_parentheses(), notify_running(), notify_starting(), ogg_demux_and_decode(), ogg_init(), op_done_task(), op_find(), op_result(), packetizer(), post_test_op(), prepare_ibf_iterator(), reconnect(), reconnect_arm_later(), remove_parentheses(), reschedule_connect(), send_client_done(), send_client_done_and_destroy(), send_full_element_iterator(), send_missing_full_elements_iter(), send_offers_for_key(), send_offers_iterator(), and send_remaining_elements().