add uh_addr_rfc1918()
[project/uhttpd.git] / uhttpd.h
index e1d061f..f47c743 100644 (file)
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -103,6 +103,7 @@ struct path_info {
        const char *name;
        const char *info;
        const char *query;
+       const char *auth;
        bool redirected;
        struct stat stat;
        const struct interpreter *ip;
@@ -135,15 +136,6 @@ struct dispatch_handler {
        void (*handle_request)(struct client *cl, const char *url, struct path_info *pi);
 };
 
-struct uh_addr {
-       uint8_t family;
-       uint16_t port;
-       union {
-               struct in_addr in;
-               struct in6_addr in6;
-       };
-};
-
 struct client {
        struct list_head list;
        int id;
@@ -213,6 +205,7 @@ uh_client_error(struct client *cl, int code, const char *summary, const char *fm
 void uh_handle_request(struct client *cl);
 
 void uh_auth_add(const char *path, const char *user, const char *pass);
+bool uh_auth_check(struct client *cl, struct path_info *pi);
 
 void uh_close_listen_fds(void);
 void uh_close_fds(void);