21#if ! defined (__GNUNET_UTIL_LIB_H_INSIDE__)
22#error "Only <gnunet_util_lib.h> can be included directly."
40#ifndef GNUNET_PROGRAM_LIB_H
41#define GNUNET_PROGRAM_LIB_H
94 const char *binaryName,
95 const char *binaryHelp,
99 int run_without_scheduler);
123 const char *binaryName,
124 const char *binaryHelp,
132 const char *daemon_desc,
149#ifndef HAVE_GNUNET_MONOLITH
150#define GNUNET_DAEMON_MAIN(daemon_name, daemon_help, init_cb) \
156 struct GNUNET_GETOPT_CommandLineOption options[] = { \
157 GNUNET_GETOPT_OPTION_END \
159 ret = GNUNET_PROGRAM_run (GNUNET_OS_project_data_gnunet (), \
170#define GNUNET_DAEMON_MAIN(daemon_name, daemon_help, init_cb) \
172 int __attribute__ ((constructor)) \
175 return GNUNET_DAEMON_register (daemon_name, \
struct GNUNET_GETOPT_CommandLineOption options[]
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Command line parsing and –help formatting.
API to schedule computations using continuation passing style.
GNUNET_GenericReturnValue
Named constants for return values.
enum GNUNET_GenericReturnValue GNUNET_DAEMON_register(const char *daemon_name, const char *daemon_desc, GNUNET_PROGRAM_Main task)
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run2(const struct GNUNET_OS_ProjectData *pd, int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls, int run_without_scheduler)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
void GNUNET_PROGRAM_monolith_main(const struct GNUNET_OS_ProjectData *pd, int argc, char *const *argv, struct GNUNET_CONFIGURATION_Handle *cfg)
Start all services and daemons in a single process.
void(* GNUNET_PROGRAM_Main)(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main function that will be run.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(const struct GNUNET_OS_ProjectData *pd, 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,...
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_conf_and_options(const struct GNUNET_OS_ProjectData *pd, int argc, char *const *argv, struct GNUNET_CONFIGURATION_Handle *cfg)
Create configuration handle from options and configuration file.
void GNUNET_DAEMON_main(const struct GNUNET_OS_ProjectData *pd, int argc, char *const *argv, struct GNUNET_CONFIGURATION_Handle *cfg, enum GNUNET_GenericReturnValue with_scheduler)
Run the mainloop in a monolithic libgnunet.
const struct GNUNET_OS_ProjectData * pd
Project data for this configuration object.
Definition of a command line option.
Project-specific data used to help the OS subsystem find installation paths.