27#include <microhttpd.h>
45#define GNUNET_REST_SERVICE_PORT 7776
51#define MAX_HTTP_URI_LENGTH 2048
66#define MHD_CACHE_TIMEOUT \
67 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
69#define GN_REST_STATE_INIT 0
70#define GN_REST_STATE_PROCESSING 1
204 struct MHD_Connection *
con;
210 struct MHD_PostProcessor *
pp;
315 MHD_resume_connection (
handle->con);
331 if (NULL !=
handle->response)
332 MHD_destroy_response (
handle->response);
333 if (NULL !=
handle->data_handle)
335 if (NULL !=
handle->data_handle->header_param_map)
342 handle->data_handle->header_param_map);
344 if (NULL !=
handle->data_handle->url_param_map)
350 handle->data_handle->url_param_map);
383 enum MHD_ValueKind kind,
403 "Could not load add header `%s'=%s\n",
414 enum MHD_ValueKind kind,
431 "Could not load add url param `%s'=%s\n",
441 enum MHD_ValueKind kind,
444 const char *content_type,
445 const char *transfer_encoding,
454 if (MHD_POSTDATA_KIND != kind)
470 "Could not add url param '%s'\n",
507 struct MHD_Connection *con,
511 const char *upload_data,
512 size_t *upload_data_size,
535 con_handle->
con = con;
544 rest_conndata_handle->
method = meth;
545 rest_conndata_handle->
url = url;
546 rest_conndata_handle->
data = upload_data;
547 rest_conndata_handle->
data_size = *upload_data_size;
553 MHD_get_connection_values (con,
554 MHD_GET_ARGUMENT_KIND,
556 rest_conndata_handle);
557 MHD_get_connection_values (con,
560 rest_conndata_handle);
564 user = MHD_basic_auth_get_username_password (con, &pw);
565 if ((NULL == user) ||
566 (0 != strcmp (user,
cuser)))
569 "Unknown user %s\n", user);
577 "Password incorrect\n");
585 con_handle->
pp = MHD_create_post_processor (con,
588 rest_conndata_handle);
589 if (*upload_data_size)
591 MHD_post_process (con_handle->
pp, upload_data, *upload_data_size);
593 MHD_destroy_post_processor (con_handle->
pp);
599 rest_conndata_handle,
609 *upload_data_size = 0;
616 MHD_suspend_connection (con_handle->
con);
621 "Queueing response from plugin with MHD\n");
635 strncmp (
"moz-extension://",
origin, strlen (
"moz-extension://"))) ||
636 (0 == strncmp (
"chrome-extension://",
638 strlen (
"chrome-extension://"))))
641 MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
648 char *allow_origin = strtok (tmp,
",");
649 while (NULL != allow_origin)
651 if (0 == strncmp (allow_origin,
origin, strlen (allow_origin)))
655 MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
659 allow_origin = strtok (NULL,
",");
667 "Access-Control-Allow-Credentials",
673 "Access-Control-Allow-Headers",
698 MHD_stop_daemon (
httpd);
747 MHD_UNSIGNED_LONG_LONG
timeout;
754 if (MHD_YES != MHD_get_fdset (
httpd, &rs, &ws, &es, &
max))
760 if (MHD_YES == haveto)
781 if ((MHD_YES == haveto) || (-1 !=
max))
813 struct MHD_Connection *connection)
816 const union MHD_ConnectionInfo *ci;
818 ci = MHD_get_connection_info (connection,
819 MHD_CONNECTION_INFO_SOCKET_CONTEXT);
826 ar = ci->socket_context;
842 struct MHD_Connection *connection,
844 enum MHD_RequestTerminationCode toe)
847 if (MHD_REQUEST_TERMINATED_COMPLETED_OK != toe)
849 "MHD encountered error handling request: %d\n",
874 struct MHD_Connection *connection,
876 enum MHD_ConnectionNotificationCode cnc)
879 const union MHD_ConnectionInfo *ci;
884 case MHD_CONNECTION_NOTIFY_STARTED:
886 ci = MHD_get_connection_info (connection,
887 MHD_CONNECTION_INFO_CONNECTION_FD);
893 sock = ci->connect_fd;
906 case MHD_CONNECTION_NOTIFY_CLOSED:
908 "Connection closed... cleaning up\n");
913 "Connection stale!\n");
951 const struct sockaddr *addr;
974 if (NULL == ar->
sock)
981 "Got an inbound connection, waiting for data\n");
988 if (MHD_YES != MHD_add_connection (
httpd, fd, addr, len))
993 _ (
"Failed to pass client to MHD\n"));
1045 struct sockaddr_in sa4;
1048 memset (&sa4, 0,
sizeof(sa4));
1049 sa4.sin_family = AF_INET;
1050 sa4.sin_port = htons (
port);
1051 sa4.sin_addr.s_addr =
address;
1052#if HAVE_SOCKADDR_IN_SIN_LEN
1053 sa4.sin_len =
sizeof(sa4);
1059 (
const struct sockaddr *) &sa4,
1080 struct sockaddr_in6 sa6;
1083 memset (&sa6, 0,
sizeof(sa6));
1084 sa6.sin6_family = AF_INET6;
1085 sa6.sin6_port = htons (
port);
1087#if HAVE_SOCKADDR_IN_SIN_LEN
1088 sa6.sin6_len =
sizeof(sa6);
1094 (
const struct sockaddr *) &sa6,
1120 if (NULL == plugin_cls)
1123 "Could not load plugin\n");
1130 ple->
plugin = plugin_cls;
1151 const char *cfgfile,
1154 static const char *err_page =
"{}";
1156 char *basic_auth_file;
1164 MHD_RESPMEM_PERSISTENT);
1183 if (1 != inet_pton (AF_INET, addr_str, &
address))
1186 "Unable to parse address %s\n",
1204 if (1 != inet_pton (AF_INET6, addr_str, &
address6))
1207 "Unable to parse IPv6 address %s\n",
1217 "BASIC_AUTH_ENABLED");
1222 "BASIC_AUTH_SECRET_FILE",
1226 "No basic auth secret file location set...\n");
1233 "No basic auth secret found... generating\n");
1251 char basic_auth_secret_tmp[16];
1252 memset (basic_auth_secret_tmp, 0, 16);
1254 basic_auth_secret_tmp,
1255 sizeof (basic_auth_secret_tmp)
1259 "Unable to read basic auth secret file.\n");
1265 if (0 != getlogin_r (
cuser, _POSIX_LOGIN_NAME_MAX))
1268 "Unable to get user.\n");
1280 "REST_ECHO_ORIGIN_WEBEXT");
1284 "REST_ALLOW_ORIGIN",
1288 "No CORS Access-Control-Allow-Origin header will be sent...\n");
1293 "REST_ALLOW_CREDENTIALS",
1298 "No CORS Credential Header will be sent...\n");
1303 "REST_ALLOW_HEADERS",
1308 "No CORS Access-Control-Allow-Headers Header will be sent...\n");
1361 httpd = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_NO_LISTEN_SOCKET
1362 | MHD_ALLOW_SUSPEND_RESUME,
1368 MHD_OPTION_CONNECTION_TIMEOUT,
1370 MHD_OPTION_NOTIFY_CONNECTION,
1373 MHD_OPTION_URI_LOG_CALLBACK,
1376 MHD_OPTION_NOTIFY_COMPLETED,
void * REST_config_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
enum GNUNET_GenericReturnValue REST_config_process_request(void *plugin, struct GNUNET_REST_RequestHandle *conndata_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
void REST_config_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
enum GNUNET_GenericReturnValue REST_copying_process_request(void *plugin, struct GNUNET_REST_RequestHandle *conndata_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
void REST_copying_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
void * REST_copying_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
void * REST_gns_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
void REST_gns_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
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.
static int ret
Final status code.
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
static char * data
The data to insert into the dht.
struct GNUNET_HashCode key
The key used in the DHT.
static char * name
Name (label) of the records to list.
static char origin[GNUNET_DNSPARSER_MAX_NAME_LENGTH]
Current origin.
static char * value
Value of the record to add/remove.
static struct GNUNET_NETWORK_Handle * ls
Listen socket for STUN processing.
static int status
The program status; 0 for success.
static char * allow_origins
Allowed Origins (CORS)
static void plugin_callback(void *cls, struct MHD_Response *resp, int status)
Plugin result callback.
#define GNUNET_REST_SERVICE_PORT
Default Socks5 listen port.
static struct AcceptedRequest * req_list_head
AcceptedRequest list head.
static int basic_auth_enabled
Do basic auth of user.
static struct GNUNET_NETWORK_Handle * bind_v4()
Create an IPv4 listen socket bound to our port.
static void run_mhd_now()
Run MHD now, we have extra data ready for the callback.
static struct MHD_Daemon * httpd
Daemon for HTTP.
char cuser[_POSIX_LOGIN_NAME_MAX]
User of the service.
static MHD_RESULT post_data_iter(void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
static struct GNUNET_NETWORK_Handle * bind_v6()
Create an IPv6 listen socket bound to our port.
static struct GNUNET_NETWORK_Handle * lsock6
The listen socket of the service for IPv6.
#define GN_REST_STATE_INIT
static const struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static char * allow_headers
Allowed Headers (CORS)
static char * basic_auth_secret
Basic auth secret.
static MHD_RESULT create_response(void *cls, struct MHD_Connection *con, const char *url, const char *meth, const char *ver, const char *upload_data, size_t *upload_data_size, void **con_cls)
Main MHD callback for handling requests.
static struct GNUNET_NETWORK_Handle * lsock4
The listen socket of the service for IPv4.
static void kill_httpd()
Kill the MHD daemon.
static struct in6_addr address6
The IPv6 address to bind to.
static unsigned long long port
The port the service is running on (default 7776)
struct GNUNET_REST_Plugin * copying_plugin
#define GN_REST_STATE_PROCESSING
static void do_shutdown(void *cls)
Task run on shutdown.
static void cleanup_ar(struct AcceptedRequest *ar)
static void * mhd_log_callback(void *cls, const char *url, struct MHD_Connection *connection)
Function called when MHD first processes an incoming connection.
static void mhd_completed_cb(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Function called when MHD decides that we are done with a connection.
static int url_iterator(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
static int cleanup_url_map(void *cls, const struct GNUNET_HashCode *key, void *value)
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
Main function that will be run.
static void do_httpd(void *cls)
Task run whenever HTTP server operations are pending.
struct GNUNET_REST_Plugin * reclaim_plugin
static enum GNUNET_GenericReturnValue setup_plugin(const char *name, GNUNET_REST_ProcessingFunction proc, void *plugin_cls)
Callback for plugin load.
struct GNUNET_REST_Plugin * namestore_plugin
static void do_accept(void *cls)
Accept new incoming connections.
static int header_iterator(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
static struct PluginListEntry * plugins_tail
Plugin list tail.
static struct GNUNET_SCHEDULER_Task * httpd_task
The task ID.
static int echo_origin
Echo request Origin in CORS.
struct GNUNET_REST_Plugin * gns_plugin
static struct AcceptedRequest * req_list_tail
AcceptedRequest list tail.
static char * allow_credentials
Allowed Credentials (CORS)
struct GNUNET_REST_Plugin * config_plugin
plugins
static void schedule_httpd()
Schedule MHD.
static struct MHD_Response * failure_response
Response we return on failures.
struct GNUNET_REST_Plugin * identity_plugin
static in_addr_t address
The address to bind to.
static void mhd_connection_cb(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_ConnectionNotificationCode cnc)
Function called when MHD connection is opened or closed.
static struct PluginListEntry * plugins_head
Plugin list head.
static void cleanup_handle(struct MhdConnectionHandle *handle)
static struct GNUNET_SCHEDULER_Task * ltask6
The listen task ID for IPv6.
static struct GNUNET_SCHEDULER_Task * ltask4
The listen task ID for IPv4.
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
#define MHD_RESULT
Data type to use for functions return an "MHD result".
GNUnet service REST plugin header.
enum GNUNET_GenericReturnValue 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.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_yesno(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option)
Get a configuration value that should be in a set of "YES" or "NO".
enum GNUNET_GenericReturnValue 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.
uint64_t GNUNET_CRYPTO_random_u64(enum GNUNET_CRYPTO_Quality mode, uint64_t max)
Generate a random unsigned 64-bit value.
@ GNUNET_CRYPTO_QUALITY_WEAK
No good quality of the operation is needed (i.e., random numbers can be pseudo-random).
enum GNUNET_GenericReturnValue GNUNET_DISK_file_test(const char *fil)
Check that fil corresponds to a filename (of a file that exists and that is not a directory).
enum GNUNET_GenericReturnValue GNUNET_DISK_fn_write(const char *fn, const void *buf, size_t buf_size, enum GNUNET_DISK_AccessPermissions mode)
Write a buffer to a file atomically.
ssize_t GNUNET_DISK_fn_read(const char *fn, void *result, size_t len)
Read the contents of a binary file into a buffer.
@ GNUNET_DISK_PERM_USER_READ
Owner can read.
@ GNUNET_DISK_PERM_USER_WRITE
Owner can write.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
int GNUNET_CONTAINER_multihashmap_iterate(struct GNUNET_CONTAINER_MultiHashMap *map, GNUNET_CONTAINER_MultiHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
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.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY
There must only be one value per key; storing a value should fail if a value under the same key alrea...
#define GNUNET_log(kind,...)
GNUNET_GenericReturnValue
Named constants for return values.
@ GNUNET_SCHEDULER_PRIORITY_DEFAULT
Run with the default priority (normal P2P operations).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
#define GNUNET_log_strerror(level, cmd)
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the mess...
#define GNUNET_log_strerror_file(level, cmd, filename)
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the mess...
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
struct sockaddr * GNUNET_NETWORK_get_addr(const struct GNUNET_NETWORK_Handle *desc)
Return the sockaddr for this network handle.
struct GNUNET_NETWORK_Handle * GNUNET_NETWORK_socket_accept(const struct GNUNET_NETWORK_Handle *desc, struct sockaddr *address, socklen_t *address_len)
Accept a new connection on a socket.
enum GNUNET_GenericReturnValue GNUNET_NETWORK_socket_close(struct GNUNET_NETWORK_Handle *desc)
Close a socket.
void GNUNET_NETWORK_fdset_destroy(struct GNUNET_NETWORK_FDSet *fds)
Releases the associated memory of an fd set.
socklen_t GNUNET_NETWORK_get_addrlen(const struct GNUNET_NETWORK_Handle *desc)
Return sockaddr length for this network handle.
int GNUNET_NETWORK_get_fd(const struct GNUNET_NETWORK_Handle *desc)
Return file descriptor for this network handle.
void GNUNET_NETWORK_fdset_copy_native(struct GNUNET_NETWORK_FDSet *to, const fd_set *from, int nfds)
Copy a native fd set into the GNUnet representation.
struct GNUNET_NETWORK_FDSet * GNUNET_NETWORK_fdset_create(void)
Creates an fd set.
struct GNUNET_NETWORK_Handle * GNUNET_NETWORK_socket_create(int domain, int type, int protocol)
Create a new socket.
void GNUNET_NETWORK_socket_free_memory_only_(struct GNUNET_NETWORK_Handle *desc)
Only free memory of a socket, keep the file descriptor untouched.
enum GNUNET_GenericReturnValue GNUNET_NETWORK_socket_bind(struct GNUNET_NETWORK_Handle *desc, const struct sockaddr *address, socklen_t address_len)
Bind a socket to a particular address.
enum GNUNET_GenericReturnValue GNUNET_NETWORK_socket_listen(const struct GNUNET_NETWORK_Handle *desc, int backlog)
Listen on a socket.
#define GNUNET_DAEMON_MAIN(daemon_name, daemon_help, init_cb)
enum GNUNET_GenericReturnValue(* GNUNET_REST_ProcessingFunction)(void *plugin, struct GNUNET_REST_RequestHandle *handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_read_net(struct GNUNET_TIME_Relative delay, struct GNUNET_NETWORK_Handle *rfd, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay or when the specified file descriptor is ready f...
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_select(enum GNUNET_SCHEDULER_Priority prio, struct GNUNET_TIME_Relative delay, const struct GNUNET_NETWORK_FDSet *rs, const struct GNUNET_NETWORK_FDSet *ws, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay or when any of the specified file descriptor set...
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,...
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
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.
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
enum GNUNET_GenericReturnValue GNUNET_STRINGS_utf8_tolower(const char *input, char *output)
Convert the utf-8 input string to lower case.
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
@ MHD_HTTP_NOT_FOUND
Not Found [RFC7231, Section 6.5.4].
void REST_identity_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
void * REST_identity_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
enum GNUNET_GenericReturnValue REST_identity_process_request(void *plugin, struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
void REST_namestore_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
void * REST_namestore_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
enum GNUNET_GenericReturnValue REST_namestore_process_request(void *plugin, struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
void REST_openid_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
enum GNUNET_GenericReturnValue REST_openid_process_request(void *plugin, struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
void * REST_openid_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
static unsigned int size
Size of the "table".
void * REST_reclaim_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
void REST_reclaim_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
enum GNUNET_GenericReturnValue REST_reclaim_process_request(void *plugin, struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
struct AcceptedRequest * prev
DLL.
int socket_with_mhd
State.
struct MhdConnectionHandle * con_handle
Connection.
struct GNUNET_NETWORK_Handle * sock
Socket.
struct AcceptedRequest * next
DLL.
collection of IO descriptors
struct returned by the initialization function of the plugin
void * cls
The closure of the plugin.
const char * name
Plugin name.
struct GNUNET_CONTAINER_MultiHashMap * header_param_map
Map of headers.
const char * data
The POST data.
const char * url
The url as string.
const char * method
The HTTP method as MHD value (see microhttpd.h)
struct GNUNET_CONTAINER_MultiHashMap * url_param_map
Map of url parameters.
size_t data_size
The POST data size.
Entry in list of pending tasks.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.
struct GNUNET_REST_RequestHandle * data_handle
struct MHD_PostProcessor * pp
struct MHD_Response * response
struct MHD_Connection * con
struct PluginListEntry * prev
char * libname
libname (to cleanup)
GNUNET_REST_ProcessingFunction process_request
Request function.
struct PluginListEntry * next