GNUnet 0.22.2
gns_plugin.c File Reference
#include "platform.h"
#include "gnunet_rest_plugin.h"
#include "gnunet_rest_lib.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_gnsrecord_json_lib.h"
#include "gnunet_gns_service.h"
#include "microhttpd.h"
#include <jansson.h>
#include "gns_plugin.h"
Include dependency graph for gns_plugin.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_GNS   "/gns"
 Rest API GNS Namespace. More...
 
#define GNUNET_REST_GNS_PARAM_RECORD_TYPE   "record_type"
 Rest API GNS Parameter record_type. More...
 
#define GNUNET_REST_GNS_ERROR_UNKNOWN   "Unknown Error"
 Rest API GNS ERROR Unknown Error. More...
 
#define GNUNET_REST_GNS_NOT_FOUND   "Record not found"
 Rest API GNS ERROR Record not found. More...
 

Functions

static void cleanup_handle (void *cls)
 Cleanup lookup handle. More...
 
static void do_error (void *cls)
 Task run on errors. More...
 
static void do_timeout (void *cls)
 
static void handle_gns_response (void *cls, int was_gns, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
 Iterator called on obtained result for a GNS lookup. More...
 
static void get_gns_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
 Handle gns GET request. More...
 
static void options_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
 Respond to OPTIONS request. More...
 
enum GNUNET_GenericReturnValue REST_gns_process_request (void *plugin, struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
 Function processing the REST call. More...
 
void * REST_gns_init (const struct GNUNET_CONFIGURATION_Handle *c)
 Entry point for the plugin. More...
 
void REST_gns_done (struct GNUNET_REST_Plugin *api)
 Exit point from the plugin. More...
 

Variables

const struct GNUNET_CONFIGURATION_Handlegns_cfg
 The configuration handle. More...
 
static char * allow_methods
 HTTP methods allows for this plugin. More...
 
static struct GNUNET_GNS_Handlegns
 Connection to GNS. More...
 
static struct RequestHandlerequests_head
 DLL. More...
 
static struct RequestHandlerequests_tail
 DLL. More...
 

Macro Definition Documentation

◆ GNUNET_REST_API_NS_GNS

#define GNUNET_REST_API_NS_GNS   "/gns"

Rest API GNS Namespace.

Definition at line 39 of file gns_plugin.c.

◆ GNUNET_REST_GNS_PARAM_RECORD_TYPE

#define GNUNET_REST_GNS_PARAM_RECORD_TYPE   "record_type"

Rest API GNS Parameter record_type.

Definition at line 44 of file gns_plugin.c.

◆ GNUNET_REST_GNS_ERROR_UNKNOWN

#define GNUNET_REST_GNS_ERROR_UNKNOWN   "Unknown Error"

Rest API GNS ERROR Unknown Error.

Definition at line 49 of file gns_plugin.c.

◆ GNUNET_REST_GNS_NOT_FOUND

#define GNUNET_REST_GNS_NOT_FOUND   "Record not found"

Rest API GNS ERROR Record not found.

Definition at line 54 of file gns_plugin.c.

Function Documentation

◆ cleanup_handle()

static void cleanup_handle ( void *  cls)
static

Cleanup lookup handle.

Parameters
clsstruct RequestHandle to clean up

Definition at line 165 of file gns_plugin.c.

166{
167 struct RequestHandle *handle = cls;
168
169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
170
171 if (NULL != handle->gns_lookup)
172 {
174 handle->gns_lookup = NULL;
175 }
176 if (NULL != handle->timeout_task)
177 {
178 GNUNET_SCHEDULER_cancel (handle->timeout_task);
179 handle->timeout_task = NULL;
180 }
181 if (NULL != handle->url)
182 GNUNET_free (handle->url);
183 if (NULL != handle->name)
184 GNUNET_free (handle->name);
185 if (NULL != handle->emsg)
186 GNUNET_free (handle->emsg);
187
190 handle);
192}
static struct RequestHandle * requests_head
DLL.
Definition: gns_plugin.c:153
static struct RequestHandle * requests_tail
DLL.
Definition: gns_plugin.c:158
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
Definition: gnunet-vpn.c:35
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
void * GNUNET_GNS_lookup_with_tld_cancel(struct GNUNET_GNS_LookupWithTldRequest *ltr)
Cancel pending lookup request.
Definition: gns_tld_api.c:331
#define GNUNET_log(kind,...)
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:980
The request handle.
Definition: config_plugin.c:47

References GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_GNS_lookup_with_tld_cancel(), GNUNET_log, GNUNET_SCHEDULER_cancel(), handle, requests_head, and requests_tail.

Referenced by do_error(), handle_gns_response(), options_cont(), and REST_gns_process_request().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_error()

static void do_error ( void *  cls)
static

Task run on errors.

Reports an error and cleans up everything.

Parameters
clsthe struct RequestHandle

Definition at line 201 of file gns_plugin.c.

202{
203 struct RequestHandle *handle = cls;
204 struct MHD_Response *resp;
205 json_t *json_error = json_object ();
206 char *response;
207
208 if (NULL != handle->timeout_task)
209 GNUNET_SCHEDULER_cancel (handle->timeout_task);
210 handle->timeout_task = NULL;
211 if (NULL == handle->emsg)
213
214 json_object_set_new (json_error, "error", json_string (handle->emsg));
215
216 if (0 == handle->response_code)
217 handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
218 response = json_dumps (json_error, 0);
220 MHD_add_response_header (resp, "Content-Type", "application/json");
221 handle->proc (handle->proc_cls, resp, handle->response_code);
222 json_decref (json_error);
225}
#define GNUNET_REST_GNS_ERROR_UNKNOWN
Rest API GNS ERROR Unknown Error.
Definition: gns_plugin.c:49
static void cleanup_handle(void *cls)
Cleanup lookup handle.
Definition: gns_plugin.c:165
static struct MHD_Response * response
Our canonical response.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
Definition: rest.c:44
@ MHD_HTTP_INTERNAL_SERVER_ERROR
Internal Server Error [RFC7231, Section 6.6.1].

References cleanup_handle(), GNUNET_free, GNUNET_REST_create_response(), GNUNET_REST_GNS_ERROR_UNKNOWN, GNUNET_SCHEDULER_cancel(), GNUNET_strdup, handle, MHD_HTTP_INTERNAL_SERVER_ERROR, and response.

Referenced by do_timeout(), get_gns_cont(), handle_gns_response(), and REST_gns_done().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_timeout()

static void do_timeout ( void *  cls)
static

Definition at line 229 of file gns_plugin.c.

230{
231 struct RequestHandle *handle = cls;
232
233 handle->timeout_task = NULL;
234 handle->response_code = MHD_HTTP_REQUEST_TIMEOUT;
236}
static void do_error(void *cls)
Task run on errors.
Definition: gns_plugin.c:201
@ MHD_HTTP_REQUEST_TIMEOUT
Request Timeout [RFC7231, Section 6.5.7].

References do_error(), handle, and MHD_HTTP_REQUEST_TIMEOUT.

Referenced by REST_gns_process_request().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_gns_response()

static void handle_gns_response ( void *  cls,
int  was_gns,
uint32_t  rd_count,
const struct GNUNET_GNSRECORD_Data rd 
)
static

Iterator called on obtained result for a GNS lookup.

Parameters
clsclosure with the object
was_gnsGNUNET_NO if name was not a GNS name
rd_countnumber of records in rd
rdthe records in reply

Definition at line 248 of file gns_plugin.c.

252{
253 struct RequestHandle *handle = cls;
254 struct MHD_Response *resp;
255 json_t *result_obj;
256 char *result;
257
258 handle->gns_lookup = NULL;
259
260 if (GNUNET_NO == was_gns)
261 {
262 handle->response_code = MHD_HTTP_NOT_FOUND;
265 return;
266 }
267
269 rd_count);
270
271 result = json_dumps (result_obj, 0);
272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result);
274 GNUNET_assert (MHD_NO != MHD_add_response_header (resp,
275 "Content-Type",
276 "application/json"));
277 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
279 json_decref (result_obj);
281}
#define GNUNET_REST_GNS_NOT_FOUND
Rest API GNS ERROR Record not found.
Definition: gns_plugin.c:54
static unsigned int rd_count
Number of records for currently parsed set.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
static int result
Global testing status.
json_t * GNUNET_GNSRECORD_JSON_from_gnsrecord(const char *rname, const struct GNUNET_GNSRECORD_Data *rd, unsigned int rd_count)
Convert GNS record to JSON.
@ GNUNET_NO
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
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:1304
@ MHD_HTTP_OK
OK [RFC7231, Section 6.3.1].
@ MHD_HTTP_NOT_FOUND
Not Found [RFC7231, Section 6.5.4].

References cleanup_handle(), do_error(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_GNSRECORD_JSON_from_gnsrecord(), GNUNET_log, GNUNET_NO, GNUNET_REST_create_response(), GNUNET_REST_GNS_NOT_FOUND, GNUNET_SCHEDULER_add_now(), GNUNET_strdup, handle, MHD_HTTP_NOT_FOUND, MHD_HTTP_OK, rd, rd_count, and result.

Referenced by get_gns_cont().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_gns_cont()

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

Handle gns GET request.

Parameters
con_handlethe connection handle
urlthe url
clsthe RequestHandle

Definition at line 292 of file gns_plugin.c.

295{
296 struct RequestHandle *handle = cls;
297 struct GNUNET_HashCode key;
298 char *record_type;
299 char *name;
300
301 name = NULL;
302 handle->name = NULL;
303 if (strlen (GNUNET_REST_API_NS_GNS) < strlen (handle->url))
304 {
305 name = &handle->url[strlen (GNUNET_REST_API_NS_GNS) + 1];
306 }
307
308 if (NULL == name)
309 {
310 handle->response_code = MHD_HTTP_NOT_FOUND;
313 return;
314 }
315 if (0 >= strlen (name))
316 {
317 handle->response_code = MHD_HTTP_NOT_FOUND;
320 return;
321 }
322 handle->name = GNUNET_strdup (name);
323
324 handle->record_type = UINT32_MAX;
327 &key);
328 if (GNUNET_YES ==
330 {
331 record_type =
333 handle->record_type = GNUNET_GNSRECORD_typename_to_number (record_type);
334 }
335
336 if (UINT32_MAX == handle->record_type)
337 {
338 handle->record_type = GNUNET_GNSRECORD_TYPE_ANY;
339 }
340
342 handle->name,
343 handle->record_type,
346 handle);
347}
static struct GNUNET_GNS_Handle * gns
Connection to GNS.
Definition: gns_plugin.c:69
static void handle_gns_response(void *cls, int was_gns, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
Iterator called on obtained result for a GNS lookup.
Definition: gns_plugin.c:248
#define GNUNET_REST_API_NS_GNS
Rest API GNS Namespace.
Definition: gns_plugin.c:39
#define GNUNET_REST_GNS_PARAM_RECORD_TYPE
Rest API GNS Parameter record_type.
Definition: gns_plugin.c:44
struct GNUNET_HashCode key
The key used in the DHT.
static char * name
Name (label) of the records to list.
struct GNUNET_GNS_LookupWithTldRequest * GNUNET_GNS_lookup_with_tld(struct GNUNET_GNS_Handle *handle, const char *name, uint32_t type, enum GNUNET_GNS_LocalOptions options, GNUNET_GNS_LookupResultProcessor2 proc, void *proc_cls)
Perform an asynchronous lookup operation on the GNS, determining the zone using the TLD of the given ...
Definition: gns_tld_api.c:240
@ GNUNET_GNS_LO_DEFAULT
Defaults, look in cache, then in DHT.
uint32_t GNUNET_GNSRECORD_typename_to_number(const char *dns_typename)
Convert a type name (e.g.
Definition: gnsrecord.c:192
#define GNUNET_GNSRECORD_TYPE_ANY
Record type indicating any record/'*'.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
Definition: crypto_hash.c:41
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_contains(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Check if the map contains any value under the given key (including values that are NULL).
void * GNUNET_CONTAINER_multihashmap_get(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Given a key find a value in the map matching the key.
@ GNUNET_YES
A 512-bit hashcode.
struct GNUNET_CONTAINER_MultiHashMap * url_param_map
Map of url parameters.

References do_error(), gns, GNUNET_CONTAINER_multihashmap_contains(), GNUNET_CONTAINER_multihashmap_get(), GNUNET_CRYPTO_hash(), GNUNET_GNS_LO_DEFAULT, GNUNET_GNS_lookup_with_tld(), GNUNET_GNSRECORD_TYPE_ANY, GNUNET_GNSRECORD_typename_to_number(), GNUNET_REST_API_NS_GNS, GNUNET_REST_GNS_NOT_FOUND, GNUNET_REST_GNS_PARAM_RECORD_TYPE, GNUNET_SCHEDULER_add_now(), GNUNET_strdup, GNUNET_YES, handle, handle_gns_response(), key, MHD_HTTP_NOT_FOUND, name, and GNUNET_REST_RequestHandle::url_param_map.

Referenced by REST_gns_process_request().

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

Respond to OPTIONS request.

Parameters
con_handlethe connection handle
urlthe url
clsthe RequestHandle

Definition at line 358 of file gns_plugin.c.

361{
362 struct MHD_Response *resp;
363 struct RequestHandle *handle = cls;
364
365 // independent of path return all options
366 resp = GNUNET_REST_create_response (NULL);
367 MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods);
368 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
370 return;
371}
static char * allow_methods
HTTP methods allows for this plugin.
Definition: gns_plugin.c:64

References allow_methods, cleanup_handle(), GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), handle, and MHD_HTTP_OK.

Referenced by REST_gns_process_request().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ REST_gns_process_request()

enum GNUNET_GenericReturnValue REST_gns_process_request ( void *  plugin,
struct GNUNET_REST_RequestHandle rest_handle,
GNUNET_REST_ResultProcessor  proc,
void *  proc_cls 
)

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 callback function
Returns
GNUNET_OK if request accepted

Definition at line 386 of file gns_plugin.c.

390{
391 struct RequestHandle *handle = GNUNET_new (struct RequestHandle);
393 static const struct GNUNET_REST_RequestHandler handlers[] =
394 { { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_GNS, &get_gns_cont },
395 { MHD_HTTP_METHOD_OPTIONS, GNUNET_REST_API_NS_GNS, &options_cont },
397
398 handle->response_code = 0;
399 handle->timeout =
401 handle->proc_cls = proc_cls;
402 handle->proc = proc;
403 handle->rest_handle = rest_handle;
404 handle->url = GNUNET_strdup (rest_handle->url);
405 handle->timeout_task =
409 handle);
410 if (handle->url[strlen (handle->url) - 1] == '/')
411 handle->url[strlen (handle->url) - 1] = '\0';
412 if (GNUNET_NO ==
413 GNUNET_REST_handle_request (handle->rest_handle, handlers, &err, handle))
414 {
416 return GNUNET_NO;
417 }
418
419
420 return GNUNET_YES;
421}
struct GNUNET_MQ_MessageHandlers handlers[]
Definition: 003.c:1
static void get_gns_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Handle gns GET request.
Definition: gns_plugin.c:292
static void do_timeout(void *cls)
Definition: gns_plugin.c:229
static void options_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Respond to OPTIONS request.
Definition: gns_plugin.c:358
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
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:64
#define GNUNET_REST_HANDLER_END
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:1277
#define GNUNET_TIME_UNIT_SECONDS
One second.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
Definition: time.c:486
const char * url
The url as string.
void(* proc)(struct GNUNET_REST_RequestHandle *handle, const char *url, void *cls)
Namespace to handle.

References cleanup_handle(), do_timeout(), get_gns_cont(), GNUNET_CONTAINER_DLL_insert, GNUNET_new, GNUNET_NO, GNUNET_REST_API_NS_GNS, GNUNET_REST_handle_request(), GNUNET_REST_HANDLER_END, GNUNET_SCHEDULER_add_delayed(), GNUNET_strdup, GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_SECONDS, GNUNET_YES, handle, handlers, options_cont(), GNUNET_REST_RequestHandler::proc, requests_head, requests_tail, and GNUNET_REST_RequestHandle::url.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ REST_gns_init()

void * REST_gns_init ( const struct GNUNET_CONFIGURATION_Handle c)

Entry point for the plugin.

Parameters
clsConfig info
Returns
NULL on error, otherwise the plugin context

Definition at line 431 of file gns_plugin.c.

432{
433 static struct Plugin plugin;
434 struct GNUNET_REST_Plugin *api;
435
436 gns_cfg = c;
437 memset (&plugin, 0, sizeof(struct Plugin));
438 plugin.cfg = gns_cfg;
439 api = GNUNET_new (struct GNUNET_REST_Plugin);
440 api->cls = &plugin;
443 "%s, %s, %s, %s, %s",
444 MHD_HTTP_METHOD_GET,
445 MHD_HTTP_METHOD_POST,
446 MHD_HTTP_METHOD_PUT,
447 MHD_HTTP_METHOD_DELETE,
448 MHD_HTTP_METHOD_OPTIONS);
450
451 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _ ("Gns REST API initialized\n"));
452 return api;
453}
const struct GNUNET_CONFIGURATION_Handle * gns_cfg
The configuration handle.
Definition: gns_plugin.c:59
static struct GNUNET_TESTING_PluginFunctions * plugin
Plugin to dynamically load a test case.
struct GNUNET_GNS_Handle * GNUNET_GNS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize the connection with the GNS service.
Definition: gns_api.c:267
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define _(String)
GNU gettext support macro.
Definition: platform.h:178
struct returned by the initialization function of the plugin
void * cls
The closure of the plugin.
const char * name
Plugin name.
Handle for a plugin.
Definition: block.c:38

References _, allow_methods, GNUNET_REST_Plugin::cls, gns, gns_cfg, GNUNET_asprintf(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_GNS_connect(), GNUNET_log, GNUNET_new, GNUNET_REST_API_NS_GNS, GNUNET_REST_Plugin::name, and plugin.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ REST_gns_done()

void REST_gns_done ( struct GNUNET_REST_Plugin api)

Exit point from the plugin.

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

Definition at line 463 of file gns_plugin.c.

464{
465 struct RequestHandle *request;
466 struct Plugin *plugin;
467
468 while (NULL != (request = requests_head))
470
471 if (NULL != gns)
473
474 plugin = api->cls;
475
476 plugin->cfg = NULL;
477
480 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n");
481}
static struct GNUNET_VPN_RedirectionRequest * request
Opaque redirection request handle.
Definition: gnunet-vpn.c:40
void GNUNET_GNS_disconnect(struct GNUNET_GNS_Handle *handle)
Shutdown connection with the GNS service.
Definition: gns_api.c:289
void * cls
Closure for all of the callbacks.
struct GNUNET_BLOCK_PluginFunctions * api
Plugin API.
Definition: block.c:47

References allow_methods, Plugin::api, GNUNET_BLOCK_PluginFunctions::cls, do_error(), gns, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_GNS_disconnect(), GNUNET_log, plugin, request, and requests_head.

Referenced by do_shutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ gns_cfg

const struct GNUNET_CONFIGURATION_Handle* gns_cfg

The configuration handle.

Definition at line 59 of file gns_plugin.c.

Referenced by REST_gns_init().

◆ allow_methods

char* allow_methods
static

HTTP methods allows for this plugin.

Definition at line 64 of file gns_plugin.c.

Referenced by options_cont(), REST_gns_done(), and REST_gns_init().

◆ gns

struct GNUNET_GNS_Handle* gns
static

Connection to GNS.

Definition at line 69 of file gns_plugin.c.

Referenced by get_gns_cont(), REST_gns_done(), and REST_gns_init().

◆ requests_head

struct RequestHandle* requests_head
static

DLL.

Definition at line 153 of file gns_plugin.c.

Referenced by cleanup_handle(), REST_gns_done(), and REST_gns_process_request().

◆ requests_tail

struct RequestHandle* requests_tail
static

DLL.

Definition at line 158 of file gns_plugin.c.

Referenced by cleanup_handle(), and REST_gns_process_request().