GNUnet  0.10.x
Data Structures | Macros | Functions | Variables
plugin_rest_config.c File Reference
#include "platform.h"
#include "gnunet_rest_plugin.h"
#include <gnunet_rest_lib.h>
#include <gnunet_util_lib.h>
#include <jansson.h>
Include dependency graph for plugin_rest_config.c:

Go to the source code of this file.

Data Structures

struct  Plugin
 Handle for a plugin. More...
 
struct  RequestHandle
 The request handle. More...
 

Macros

#define GNUNET_REST_API_NS_CONFIG   "/config"
 

Functions

static void cleanup_handle (struct RequestHandle *handle)
 Cleanup request handle. More...
 
static void do_error (void *cls)
 Task run on shutdown. More...
 
static void add_sections (void *cls, const char *section, const char *option, const char *value)
 
static void add_section_contents (void *cls, const char *section, const char *option, const char *value)
 
static void get_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
 Handle rest request. More...
 
struct GNUNET_CONFIGURATION_Handleset_value (struct GNUNET_CONFIGURATION_Handle *config, const char *section, const char *option, json_t *value)
 
static void set_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
 Handle REST POST request. More...
 
static void options_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
 Handle rest request. More...
 
static void rest_config_process_request (struct GNUNET_REST_RequestHandle *conndata_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
 Function processing the REST call. More...
 
void * libgnunet_plugin_rest_config_init (void *cls)
 Entry point for the plugin. More...
 
void * libgnunet_plugin_rest_config_done (void *cls)
 Exit point from the plugin. More...
 

Variables

const struct GNUNET_CONFIGURATION_Handlecfg
 Handle to our configuration. More...
 

Macro Definition Documentation

◆ GNUNET_REST_API_NS_CONFIG

#define GNUNET_REST_API_NS_CONFIG   "/config"

Function Documentation

◆ cleanup_handle()

static void cleanup_handle ( struct RequestHandle handle)
static

Cleanup request handle.

Parameters
handleHandle to clean up

Definition at line 78 of file plugin_rest_config.c.

References GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, and RequestHandle::url.

Referenced by do_error(), get_cont(), options_cont(), and set_cont().

79 {
80  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
81  if (NULL != handle->url)
82  GNUNET_free(handle->url);
83  GNUNET_free(handle);
84 }
#define GNUNET_log(kind,...)
#define GNUNET_free(ptr)
Wrapper around free.
char * url
The url.
Here is the caller graph for this function:

◆ do_error()

static void do_error ( void *  cls)
static

Task run on shutdown.

Cleans up everything.

Parameters
clsunused
tcscheduler context

Definition at line 94 of file plugin_rest_config.c.

References cleanup_handle(), GNUNET_REST_create_response(), handle, RequestHandle::proc, RequestHandle::proc_cls, and RequestHandle::response_code.

Referenced by get_cont(), rest_config_process_request(), and set_cont().

95 {
96  struct RequestHandle *handle = cls;
97  struct MHD_Response *resp;
98 
99  resp = GNUNET_REST_create_response(NULL);
100  handle->proc(handle->proc_cls, resp, handle->response_code);
101  cleanup_handle(handle);
102 }
GNUNET_REST_ResultProcessor proc
The plugin result processor.
void * proc_cls
The closure of the result processor.
The request handle.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
int response_code
HTTP response code.
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
Definition: rest.c:56
static void cleanup_handle(struct RequestHandle *handle)
Cleanup request handle.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_sections()

static void add_sections ( void *  cls,
const char *  section,
const char *  option,
const char *  value 
)
static

Definition at line 106 of file plugin_rest_config.c.

Referenced by get_cont().

110 {
111  json_t *sections_obj = cls;
112  json_t *sec_obj;
113 
114  sec_obj = json_object_get(sections_obj, section);
115  if (NULL != sec_obj)
116  {
117  json_object_set_new(sec_obj, option, json_string(value));
118  return;
119  }
120  sec_obj = json_object();
121  json_object_set_new(sec_obj, option, json_string(value));
122  json_object_set_new(sections_obj, section, sec_obj);
123 }
static char * section
Name of the section.
Definition: gnunet-config.c:33
static char * value
Value of the record to add/remove.
static char * option
Name of the option.
Definition: gnunet-config.c:38
Here is the caller graph for this function:

◆ add_section_contents()

static void add_section_contents ( void *  cls,
const char *  section,
const char *  option,
const char *  value 
)
static

Definition at line 126 of file plugin_rest_config.c.

Referenced by get_cont().

130 {
131  json_t *section_obj = cls;
132 
133  json_object_set_new(section_obj, option, json_string(value));
134 }
static char * value
Value of the record to add/remove.
static char * option
Name of the option.
Definition: gnunet-config.c:38
Here is the caller graph for this function:

◆ get_cont()

static void get_cont ( struct GNUNET_REST_RequestHandle con_handle,
const char *  url,
void *  cls 
)
static

Handle rest request.

Parameters
handlethe lookup handle

Definition at line 142 of file plugin_rest_config.c.

References add_section_contents(), add_sections(), cleanup_handle(), do_error(), GNUNET_CONFIGURATION_iterate(), GNUNET_CONFIGURATION_iterate_section_values(), GNUNET_free, GNUNET_REST_API_NS_CONFIG, GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), handle, RequestHandle::proc, RequestHandle::proc_cls, response, RequestHandle::response_code, result, section, and RequestHandle::url.

Referenced by rest_config_process_request().

145 {
146  struct MHD_Response *resp;
147  struct RequestHandle *handle = cls;
148  const char *section;
149  char *response;
150  json_t *result;
151 
152  if (strlen(GNUNET_REST_API_NS_CONFIG) > strlen(handle->url))
153  {
154  handle->response_code = MHD_HTTP_BAD_REQUEST;
156  return;
157  }
158  if (strlen(GNUNET_REST_API_NS_CONFIG) == strlen(handle->url))
159  {
160  result = json_object();
162  }
163  else
164  {
165  result = json_object();
166  section = &handle->url[strlen(GNUNET_REST_API_NS_CONFIG) + 1];
168  section,
170  result);
171  }
172  response = json_dumps(result, 0);
173  resp = GNUNET_REST_create_response(response);
174  handle->proc(handle->proc_cls, resp, MHD_HTTP_OK);
175  cleanup_handle(handle);
176  GNUNET_free(response);
177  json_decref(result);
178 }
#define GNUNET_REST_API_NS_CONFIG
void GNUNET_CONFIGURATION_iterate_section_values(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, GNUNET_CONFIGURATION_Iterator iter, void *iter_cls)
Iterate over values of a section in the configuration.
void GNUNET_CONFIGURATION_iterate(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CONFIGURATION_Iterator iter, void *iter_cls)
Iterate over all options in the configuration.
const struct GNUNET_CONFIGURATION_Handle * cfg
Handle to our configuration.
GNUNET_REST_ResultProcessor proc
The plugin result processor.
void * proc_cls
The closure of the result processor.
The request handle.
static char * section
Name of the section.
Definition: gnunet-config.c:33
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 do_error(void *cls)
Task run on shutdown.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
static int result
Global testing status.
static void add_section_contents(void *cls, const char *section, const char *option, const char *value)
int response_code
HTTP response code.
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
Definition: rest.c:56
static struct MHD_Response * response
Our canonical response.
static void add_sections(void *cls, const char *section, const char *option, const char *value)
static void cleanup_handle(struct RequestHandle *handle)
Cleanup request handle.
#define GNUNET_free(ptr)
Wrapper around free.
char * url
The url.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_value()

struct GNUNET_CONFIGURATION_Handle* set_value ( struct GNUNET_CONFIGURATION_Handle config,
const char *  section,
const char *  option,
json_t *  value 
)

Definition at line 181 of file plugin_rest_config.c.

References config, GNUNET_CONFIGURATION_set_value_number(), and GNUNET_CONFIGURATION_set_value_string().

Referenced by set_cont().

185 {
186  if (json_is_string(value))
187  GNUNET_CONFIGURATION_set_value_string(config, section, option, json_string_value(value));
188  else if (json_is_number(value))
189  GNUNET_CONFIGURATION_set_value_number(config, section, option, json_integer_value(value));
190  else if (json_is_null(value))
192  else if (json_is_true(value))
194  else if (json_is_false(value))
196  else
197  return NULL;
198  return config; // for error handling (0 -> success, 1 -> error)
199 }
void GNUNET_CONFIGURATION_set_value_number(struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long number)
Set a configuration value that should be a number.
static char * section
Name of the section.
Definition: gnunet-config.c:33
static char * value
Value of the record to add/remove.
static char * option
Name of the option.
Definition: gnunet-config.c:38
static const struct GNUNET_CONFIGURATION_Handle * config
void GNUNET_CONFIGURATION_set_value_string(struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, const char *value)
Set a configuration value that should be a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_cont()

static void set_cont ( struct GNUNET_REST_RequestHandle con_handle,
const char *  url,
void *  cls 
)
static

Handle REST POST request.

Parameters
handlethe lookup handle

Definition at line 207 of file plugin_rest_config.c.

References cleanup_handle(), config_file, GNUNET_REST_RequestHandle::data, GNUNET_REST_RequestHandle::data_size, DIR_SEPARATOR_STR, do_error(), getenv(), GNUNET_asprintf(), GNUNET_CONFIGURATION_dup(), GNUNET_CONFIGURATION_write(), GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_memcpy, GNUNET_OS_project_data_get(), GNUNET_REST_API_NS_CONFIG, GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), GNUNET_strdup, handle, option, RequestHandle::proc, RequestHandle::proc_cls, RequestHandle::response_code, RequestHandle::rest_handle, section, set_value(), RequestHandle::url, and value.

Referenced by rest_config_process_request().

210 {
211  struct RequestHandle *handle = cls;
212  char term_data[handle->rest_handle->data_size + 1];
214 
215  json_error_t err;
216  json_t *data_json;
217  const char *section;
218  const char *option;
219  json_t *sec_obj;
220  json_t *value;
221  char *cfg_fn;
222 
223  // invalid url
224  if (strlen(GNUNET_REST_API_NS_CONFIG) > strlen(handle->url))
225  {
226  handle->response_code = MHD_HTTP_BAD_REQUEST;
228  return;
229  }
230 
231  // extract data from handle
232  term_data[handle->rest_handle->data_size] = '\0';
233  GNUNET_memcpy(term_data,
234  handle->rest_handle->data,
235  handle->rest_handle->data_size);
236  data_json = json_loads(term_data, JSON_DECODE_ANY, &err);
237 
238  if (NULL == data_json)
239  {
241  "Unable to parse JSON Object from %s\n",
242  term_data);
244  return;
245  }
246 
247  // POST /config => {<section> : {<option> : <value>}}
248  if (strlen(GNUNET_REST_API_NS_CONFIG) == strlen(handle->url)) // POST /config
249  {
250  // iterate over sections
251  json_object_foreach(data_json, section, sec_obj)
252  {
253  // iterate over options
254  json_object_foreach(sec_obj, option, value)
255  {
256  out = set_value(out, section, option, value);
257  if (NULL == out)
258  {
259  handle->response_code = MHD_HTTP_BAD_REQUEST;
261  json_decref(data_json);
262  return;
263  }
264  }
265  }
266  }
267  else // POST /config/<section> => {<option> : <value>}
268  {
269  // extract the "<section>" part from the url
270  section = &handle->url[strlen(GNUNET_REST_API_NS_CONFIG) + 1];
271  // iterate over options
272  json_object_foreach(data_json, option, value)
273  {
274  out = set_value(out, section, option, value);
275  if (NULL == out)
276  {
277  handle->response_code = MHD_HTTP_BAD_REQUEST;
279  json_decref(data_json);
280  return;
281  }
282  }
283  }
284  json_decref(data_json);
285 
286 
287  // get cfg file path
288  cfg_fn = NULL;
289  const char *xdg = getenv("XDG_CONFIG_HOME");
290  if (NULL != xdg)
291  GNUNET_asprintf(&cfg_fn,
292  "%s%s%s",
293  xdg,
296  else
297  cfg_fn = GNUNET_strdup(GNUNET_OS_project_data_get()->user_config_file);
298 
299  GNUNET_CONFIGURATION_write(out, cfg_fn);
300  cfg = out;
301  handle->proc(handle->proc_cls,
303  MHD_HTTP_OK);
304  cleanup_handle(handle);
305 }
#define GNUNET_REST_API_NS_CONFIG
int GNUNET_CONFIGURATION_write(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Write configuration file.
size_t data_size
The POST data size.
const struct GNUNET_CONFIGURATION_Handle * cfg
Handle to our configuration.
GNUNET_REST_ResultProcessor proc
The plugin result processor.
static char * config_file
Set to the name of the config file used.
Definition: gnunet-arm.c:79
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
void * proc_cls
The closure of the result processor.
The request handle.
static char * section
Name of the section.
Definition: gnunet-config.c:33
int GNUNET_asprintf(char **buf, const char *format,...)
Like asprintf, just portable.
static char * value
Value of the record to add/remove.
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
#define DIR_SEPARATOR_STR
Definition: platform.h:168
static char * option
Name of the option.
Definition: gnunet-config.c:38
static void do_error(void *cls)
Task run on shutdown.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
struct GNUNET_REST_RequestHandle * rest_handle
Handle to rest request.
int response_code
HTTP response code.
const char * data
The POST data.
char * getenv()
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_dup(const struct GNUNET_CONFIGURATION_Handle *cfg)
Duplicate an existing configuration object.
configuration data
Definition: configuration.c:83
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
Definition: rest.c:56
#define GNUNET_log(kind,...)
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_get(void)
struct GNUNET_CONFIGURATION_Handle * set_value(struct GNUNET_CONFIGURATION_Handle *config, const char *section, const char *option, json_t *value)
static void cleanup_handle(struct RequestHandle *handle)
Cleanup request handle.
char * url
The url.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ options_cont()

static void options_cont ( struct GNUNET_REST_RequestHandle con_handle,
const char *  url,
void *  cls 
)
static

Handle rest request.

Parameters
handlethe lookup handle

Definition at line 313 of file plugin_rest_config.c.

References cleanup_handle(), GNUNET_REST_create_response(), handle, RequestHandle::proc, and RequestHandle::proc_cls.

Referenced by rest_config_process_request().

316 {
317  struct MHD_Response *resp;
318  struct RequestHandle *handle = cls;
319 
320  resp = GNUNET_REST_create_response(NULL);
321  MHD_add_response_header(resp,
322  "Access-Control-Allow-Methods",
323  MHD_HTTP_METHOD_GET);
324  handle->proc(handle->proc_cls, resp, MHD_HTTP_OK);
325  cleanup_handle(handle);
326 }
GNUNET_REST_ResultProcessor proc
The plugin result processor.
void * proc_cls
The closure of the result processor.
The request handle.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
Definition: rest.c:56
static void cleanup_handle(struct RequestHandle *handle)
Cleanup request handle.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rest_config_process_request()

static void rest_config_process_request ( struct GNUNET_REST_RequestHandle conndata_handle,
GNUNET_REST_ResultProcessor  proc,
void *  proc_cls 
)
static

Function processing the REST call.

Parameters
methodHTTP method
urlURL of the HTTP request
databody of the HTTP request (optional)
data_sizelength of the body
proccallback function for the result
proc_clsclosure for proc
Returns
GNUNET_OK if request accepted

Definition at line 341 of file plugin_rest_config.c.

References do_error(), GNUNET_REST_RequestHandlerError::error_code, get_cont(), GNUNET_new, GNUNET_NO, GNUNET_REST_API_NS_CONFIG, GNUNET_REST_handle_request(), GNUNET_REST_HANDLER_END, GNUNET_SCHEDULER_add_now(), GNUNET_strdup, handle, options_cont(), RequestHandle::proc, RequestHandle::proc_cls, RequestHandle::response_code, RequestHandle::rest_handle, set_cont(), GNUNET_REST_RequestHandle::url, and RequestHandle::url.

Referenced by libgnunet_plugin_rest_config_init().

344 {
345  static const struct GNUNET_REST_RequestHandler handlers[] = {
346  { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_CONFIG, &get_cont },
347  { MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_CONFIG, &set_cont },
348  { MHD_HTTP_METHOD_OPTIONS, GNUNET_REST_API_NS_CONFIG, &options_cont },
350  };
351  struct RequestHandle *handle = GNUNET_new(struct RequestHandle);
353 
354  handle->proc_cls = proc_cls;
355  handle->proc = proc;
356  handle->rest_handle = conndata_handle;
357  handle->url = GNUNET_strdup(conndata_handle->url);
358  if (handle->url[strlen(handle->url) - 1] == '/')
359  handle->url[strlen(handle->url) - 1] = '\0';
360 
361  if (GNUNET_NO ==
362  GNUNET_REST_handle_request(conndata_handle, handlers, &err, handle))
363  {
364  handle->response_code = err.error_code;
366  }
367 }
#define GNUNET_REST_API_NS_CONFIG
GNUNET_REST_ResultProcessor proc
The plugin result processor.
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
void * proc_cls
The closure of the result processor.
#define GNUNET_REST_HANDLER_END
The request handle.
static struct GNUNET_CADET_MessageHandler handlers[]
Handlers, for diverse services.
const char * url
The url as string.
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 do_error(void *cls)
Task run on shutdown.
static void get_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Handle rest request.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
int GNUNET_REST_handle_request(struct GNUNET_REST_RequestHandle *conn, const struct GNUNET_REST_RequestHandler *handlers, struct GNUNET_REST_RequestHandlerError *err, void *cls)
Definition: rest.c:75
struct GNUNET_REST_RequestHandle * rest_handle
Handle to rest request.
int response_code
HTTP response code.
static void set_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Handle REST POST request.
static void options_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Handle rest request.
char * url
The url.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgnunet_plugin_rest_config_init()

void* libgnunet_plugin_rest_config_init ( void *  cls)

Entry point for the plugin.

Parameters
clsthe "struct GNUNET_NAMESTORE_PluginEnvironment*"
Returns
NULL on error, otherwise the plugin context

Definition at line 377 of file plugin_rest_config.c.

References _, Plugin::api, Plugin::cfg, GNUNET_REST_Plugin::cls, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_new, GNUNET_REST_API_NS_CONFIG, GNUNET_REST_Plugin::name, plugin, GNUNET_REST_Plugin::process_request, and rest_config_process_request().

378 {
379  static struct Plugin plugin;
380 
381  cfg = cls;
382  struct GNUNET_REST_Plugin *api;
383 
384  if (NULL != plugin.cfg)
385  return NULL; /* can only initialize once! */
386  memset(&plugin, 0, sizeof(struct Plugin));
387  plugin.cfg = cfg;
388  api = GNUNET_new(struct GNUNET_REST_Plugin);
389  api->cls = &plugin;
392  GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("CONFIG REST API initialized\n"));
393  return api;
394 }
#define GNUNET_REST_API_NS_CONFIG
void * cls
The closure of the plugin.
const struct GNUNET_CONFIGURATION_Handle * cfg
Handle to our configuration.
struct returned by the initialization function of the plugin
#define GNUNET_new(type)
Allocate a struct or union of the given type.
void(* process_request)(struct GNUNET_REST_RequestHandle *handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function to process a REST call.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static struct GNUNET_ATS_SolverFunctions * plugin
Our solver.
static void rest_config_process_request(struct GNUNET_REST_RequestHandle *conndata_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
char * name
Plugin name.
Handle for a plugin.
Definition: block.c:37
#define GNUNET_log(kind,...)
Here is the call graph for this function:

◆ libgnunet_plugin_rest_config_done()

void* libgnunet_plugin_rest_config_done ( void *  cls)

Exit point from the plugin.

Parameters
clsthe plugin context (as returned by "init")
Returns
always NULL

Definition at line 404 of file plugin_rest_config.c.

References Plugin::api, Plugin::cfg, GNUNET_REST_Plugin::cls, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, and plugin.

405 {
406  struct GNUNET_REST_Plugin *api = cls;
407  struct Plugin *plugin = api->cls;
408 
409  plugin->cfg = NULL;
410  GNUNET_free(api);
411  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "CONFIG REST plugin is finished\n");
412  return NULL;
413 }
void * cls
The closure of the plugin.
const struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
struct returned by the initialization function of the plugin
static struct GNUNET_ATS_SolverFunctions * plugin
Our solver.
Handle for a plugin.
Definition: block.c:37
#define GNUNET_log(kind,...)
#define GNUNET_free(ptr)
Wrapper around free.

Variable Documentation

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* cfg

Handle to our configuration.

Handle to our configuration.

Definition at line 42 of file plugin_rest_config.c.