summaryrefslogtreecommitdiff
path: root/uhttpd.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-11-23 11:47:08 +0100
committerJo-Philipp Wich <jo@mein.io>2021-11-23 19:26:43 +0100
commit3ceccd02d86bf4d6609f46d8b30963cc52034cc2 (patch)
tree43a8ccd6394adb7bd7ee8a2411a03150b1dbe770 /uhttpd.h
parentf0f14068f34adb6c9145e1c58786f2f9c805e4ee (diff)
ucode: add ucode plugin support
The ucode plugin mirrors the functionality of the Lua module, but using the ucode script interpreter instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'uhttpd.h')
-rw-r--r--uhttpd.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/uhttpd.h b/uhttpd.h
index e61e176..d230b31 100644
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -33,6 +33,9 @@
#include <libubus.h>
#include <json-c/json.h>
#endif
+#ifdef HAVE_UCODE
+#include <ucode/vm.h>
+#endif
#ifdef HAVE_TLS
#include <libubox/ustream-ssl.h>
#endif
@@ -59,6 +62,15 @@ struct lua_prefix {
void *ctx;
};
+#ifdef HAVE_UCODE
+struct ucode_prefix {
+ struct list_head list;
+ const char *handler;
+ const char *prefix;
+ uc_vm_t ctx;
+};
+#endif
+
struct config {
const char *docroot;
const char *realm;
@@ -85,6 +97,9 @@ struct config {
int events_retry;
struct list_head cgi_alias;
struct list_head lua_prefix;
+#ifdef HAVE_UCODE
+ struct list_head ucode_prefix;
+#endif
};
struct auth_realm {