summaryrefslogtreecommitdiffstats
path: root/src/plugins/http_static/http_static.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/http_static/http_static.h')
-rw-r--r--src/plugins/http_static/http_static.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/http_static/http_static.h b/src/plugins/http_static/http_static.h
index a1eaa6e1144..05d6ee05a4c 100644
--- a/src/plugins/http_static/http_static.h
+++ b/src/plugins/http_static/http_static.h
@@ -67,9 +67,10 @@ typedef struct
int inuse;
} hss_cache_entry_t;
+typedef int (*hss_url_handler_t) (http_req_method_t, u8 *, hss_session_t *);
+
/** \brief Main data structure
*/
-
typedef struct
{
/** Per thread vector of session pools */
@@ -127,14 +128,20 @@ typedef struct
u8 *uri;
/** Threshold for switching to ptr data in http msgs */
u32 use_ptr_thresh;
+ /** Enable the use of builtinurls */
+ u8 enable_url_handlers;
} hss_main_t;
extern hss_main_t hss_main;
int hss_create (vlib_main_t *vm);
-void http_static_server_register_builtin_handler (void *fp, char *url,
- http_req_method_t type);
+/**
+ * Register a GET or POST URL handler
+ */
+void hss_register_url_handler (hss_url_handler_t fp, const char *url,
+ http_req_method_t type);
+void hss_builtinurl_json_handlers_init (void);
#endif /* __included_http_static_h__ */