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, and GNUNET_OK.

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:75
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
int GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
Definition: disk.c:1026
#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:663
void GNUNET_ARM_disconnect(struct GNUNET_ARM_Handle *h)
Disconnect from the ARM service (if connected) and destroy the context.
Definition: arm_api.c:505
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:77
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:956
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");
224 
226  return _("We disconnected from ARM before we could send a request");
227  }
228  return _("Unknown request status");
229 }
We disconnected from ARM, and request was not sent.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
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 239 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().

240 {
241  switch (result)
242  {
244  return _("is stopped");
245 
247  return _("is starting");
248 
250  return _("is stopping");
251 
253  return _("is starting already");
254 
256  return _("is stopping already");
257 
259  return _("is started already");
260 
262  return _("is stopped already");
263 
265  return _("service is not known to ARM");
266 
268  return _("service failed to start");
269 
271  return _("service cannot be manipulated because ARM is shutting down");
272  }
273  return _("Unknown result code.");
274 }
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:181
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 557 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().

558 {
559  (void)cls;
560  al_task = NULL;
561  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n");
562  while (1)
563  {
564  switch (phase++)
565  {
566  case 0:
567  if (NULL != term)
568  {
569  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Termination action\n");
571  return;
572  }
573  break;
574 
575  case 1:
576  if (end || restart)
577  {
578  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "End action\n");
580  return;
581  }
582  break;
583 
584  case 2:
585  if (start)
586  {
587  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Start action\n");
588  op =
590  "arm",
591  (no_stdout
592  ? 0
594  (no_stderr
595  ? 0
598  NULL);
599  return;
600  }
601  break;
602 
603  case 3:
604  if (NULL != init)
605  {
606  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Initialization action\n");
608  init,
610  &init_callback,
611  NULL);
612  return;
613  }
614  break;
615 
616  case 4:
617  if (list)
618  {
620  "Going to list all running services controlled by ARM.\n");
622  return;
623  }
624  break;
625 
626  case 5:
627  if (monitor)
628  {
629  if (!quiet)
630  fprintf(stderr, _("Now only monitoring, press CTRL-C to stop.\n"));
631  quiet =
632  0; /* does not make sense to stay quiet in monitor mode at this time */
633  return; /* done with tasks, just monitor */
634  }
635  break;
636 
637  default: /* last phase */
639  return;
640  }
641  }
642 }
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:90
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:365
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:324
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:517
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:181
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:514
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:862
No standard streams should be inherited.
Definition: gnunet_os_lib.h:72
When this flag is set, the child process will inherit stdout of the parent.
Definition: gnunet_os_lib.h:84
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:894
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:787
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:418
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:464
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 296 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().

297 {
298  static int once;
299 
300  (void)cls;
301  if ((GNUNET_SYSERR == connected) && (0 == once))
302  {
304  _("Fatal error initializing ARM API.\n"));
306  return;
307  }
308  once = 1;
309 }
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:517
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static int once
Global to mark if we've run the initialization.
Definition: gnsrecord.c:67
#define GNUNET_SYSERR
Definition: gnunet_common.h:76
#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 324 of file gnunet-arm.c.

References _, action_loop(), 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().

327 {
328  (void)cls;
329  op = NULL;
330  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
331  {
332  fprintf(stdout,
333  _("Failed to start the ARM service: %s\n"),
334  req_string(rs));
336  return;
337  }
340  {
341  fprintf(stdout,
342  _("Failed to start the ARM service: %s\n"),
343  ret_string(result));
345  return;
346  }
347  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n");
348  start = 0;
350 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
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:517
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
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:1264
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:239
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:557
#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 365 of file gnunet-arm.c.

References _, action_loop(), end, 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().

368 {
369  char *msg;
370 
371  (void)cls;
372  op = NULL;
373  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
374  {
375  GNUNET_asprintf(&msg,
376  "%s",
377  _(
378  "Failed to send a stop request to the ARM service: %s\n"));
379  fprintf(stdout, msg, req_string(rs));
380  GNUNET_free(msg);
382  return;
383  }
387  {
388  fprintf(stdout,
389  _("Failed to stop the ARM service: %s\n"),
390  ret_string(result));
392  return;
393  }
394  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "ARM service shutdown successful\n");
395  end = 0;
396  if (restart)
397  {
398  restart = 0;
399  start = 1;
400  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Initiating an ARM restart\n");
401  }
403 }
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
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:517
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
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:1264
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:239
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:557
#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 418 of file gnunet-arm.c.

References _, action_loop(), 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().

421 {
422  (void)cls;
423  op = NULL;
424  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
425  {
426  fprintf(stdout,
427  _("Failed to send a request to start the `%s' service: %s\n"),
428  init,
429  req_string(rs));
431  return;
432  }
435  {
436  fprintf(stdout,
437  _("Failed to start the `%s' service: %s\n"),
438  init,
439  ret_string(result));
441  return;
442  }
444  "Service %s [re]started successfully\n",
445  init);
446  GNUNET_free(init);
447  init = NULL;
449 }
static struct GNUNET_SCHEDULER_Task * al_task
Handle for the task running the action_loop().
Definition: gnunet-arm.c:134
Asked to start it, but it's already started.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:517
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
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:1264
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:239
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:557
#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 464 of file gnunet-arm.c.

References _, action_loop(), 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().

467 {
468  char *msg;
469 
470  (void)cls;
471  op = NULL;
472  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
473  {
474  GNUNET_asprintf(&msg,
475  _(
476  "Failed to send a request to kill the `%s' service: %%s\n"),
477  term);
478  fprintf(stdout, msg, req_string(rs));
479  GNUNET_free(msg);
481  return;
482  }
485  {
486  fprintf(stdout,
487  _("Failed to kill the `%s' service: %s\n"),
488  term,
489  ret_string(result));
491  return;
492  }
493 
495  "Service %s stopped successfully\n",
496  term);
497  GNUNET_free(term);
498  term = NULL;
500 }
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
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:517
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:181
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:1264
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:239
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:557
#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 514 of file gnunet-arm.c.

References _, action_loop(), 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().

518 {
519  (void)cls;
520  op = NULL;
521  if (GNUNET_ARM_REQUEST_SENT_OK != rs)
522  {
523  char *msg;
524 
525  GNUNET_asprintf(&msg,
526  "%s",
527  _("Failed to request a list of services: %s\n"));
528  fprintf(stdout, msg, req_string(rs));
529  GNUNET_free(msg);
530  ret = 3;
532  }
533  if (NULL == list)
534  {
535  fprintf(stderr,
536  "%s",
537  _("Error communicating with ARM. ARM not running?\n"));
539  ret = 3;
540  return;
541  }
542  if (!quiet)
543  fprintf(stdout, "%s", _("Running services:\n"));
544  for (unsigned int i = 0; i < count; i++)
545  fprintf(stdout, "%s\n", list[i]);
547 }
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
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:517
static int ret
Final status code.
Definition: gnunet-arm.c:89
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
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:1264
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:557
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 653 of file gnunet-arm.c.

References _, 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().

656 {
657  const char *msg;
658 
659  (void)cls;
660  switch (status)
661  {
663  return; /* this should be done silently */
664 
666  msg = _("Stopped %s.\n");
667  break;
668 
670  msg = _("Starting %s...\n");
671  break;
672 
674  msg = _("Stopping %s...\n");
675  break;
676 
677  default:
678  msg = NULL;
679  break;
680  }
681  if (!quiet)
682  {
683  if (NULL != msg)
684  fprintf(stderr, msg, service);
685  else
686  fprintf(stderr,
687  _("Unknown status %u for service %s.\n"),
688  status,
689  service);
690  }
692  "Got service %s status %d\n",
693  service,
694  (int)status);
695 }
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
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:181
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 702 of file gnunet-arm.c.

References GNUNET_SCHEDULER_shutdown(), and ret.

Referenced by run().

703 {
704  (void)cls;
705  timeout_task = NULL;
706  ret = 2;
708 }
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:517
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 720 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().

724 {
725  (void)cls;
726  (void)args;
727  (void)cfgfile;
729  if (GNUNET_OK !=
730  GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_HOME", &dir))
731  {
732  GNUNET_log_config_missing(GNUNET_ERROR_TYPE_ERROR, "PATHS", "GNUNET_HOME");
733  return;
734  }
736  "arm",
737  "CONFIG",
738  &config_file);
739  if (NULL == (h = GNUNET_ARM_connect(cfg, &conn_status, NULL)))
740  return;
741  if (monitor)
745  if (0 != timeout.rel_value_us)
746  timeout_task =
748 }
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:702
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:1284
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:75
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:1237
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:1264
static void conn_status(void *cls, int connected)
Function called whenever we connect to or disconnect from ARM.
Definition: gnunet-arm.c:296
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:480
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:653
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:557
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 759 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.

760 {
763  "end",
764  gettext_noop("stop all GNUnet services"),
765  &end),
767  "init",
768  "SERVICE",
769  gettext_noop("start a particular service"),
770  &init),
772  "kill",
773  "SERVICE",
774  gettext_noop("stop a particular service"),
775  &term),
777  "start",
778  gettext_noop(
779  "start all GNUnet default services"),
780  &start),
782  "restart",
783  gettext_noop(
784  "stop and start all GNUnet default services"),
785  &restart),
787  "delete",
788  gettext_noop(
789  "delete config file and directory on exit"),
790  &delete),
792  "monitor",
793  gettext_noop("monitor ARM activities"),
794  &monitor),
796  "quiet",
797  gettext_noop("don't print status messages"),
798  &quiet),
800  'T',
801  "timeout",
802  "DELAY",
803  gettext_noop(
804  "exit with error status if operation does not finish after DELAY"),
805  &timeout),
807  "info",
808  gettext_noop(
809  "list currently running services"),
810  &list),
812  'O',
813  "no-stdout",
814  gettext_noop("don't let gnunet-service-arm inherit standard output"),
815  &no_stdout),
817  'E',
818  "no-stderr",
819  gettext_noop("don't let gnunet-service-arm inherit standard error"),
820  &no_stderr),
822  int lret;
823 
824  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args(argc, argv, &argc, &argv))
825  return 2;
826  if (GNUNET_OK ==
827  (lret = GNUNET_PROGRAM_run(
828  argc,
829  argv,
830  "gnunet-arm",
831  gettext_noop(
832  "Control services and the Automated Restart Manager (ARM)"),
833  options,
834  &run,
835  NULL)))
836  {
837  GNUNET_free((void *)argv);
838  return ret;
839  }
840  GNUNET_free((void *)argv);
841  return lret;
842 }
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:720
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:1439
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
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:367
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(), LEGACY_SERVICE_run(), main(), run(), and set_cont().

◆ 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(), 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_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_mark_optional(), 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_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_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_peer(), 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(), 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(), serve_main_page(), server_get_addresses(), server_schedule(), service_client_recv(), service_manage_result_cb(), 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(), tokenizer_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(), 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_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_NSE_connect(), 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(), peer_add(), peer_free(), probe_ping_task_cb(), process_job_queue(), process_ksk_result(), 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(), 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(), 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().