X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=utils.h;h=49e242edce12482d34e28352a265ef7fc061a1e6;hb=bb64de8897d9de5c964d021d05999bd4ca5cb36a;hp=8f67823a8ea9e92c4e85b718ba9fe618a57633b7;hpb=d0aab7b1fc7c94c3d6d41990e7615be85b58e640;p=project%2Fuhttpd.git diff --git a/utils.h b/utils.h index 8f67823..49e242e 100644 --- a/utils.h +++ b/utils.h @@ -27,8 +27,19 @@ #include #include #include +#include +#include #include +struct uh_addr { + uint8_t family; + uint16_t port; + union { + struct in_addr in; + struct in6_addr in6; + }; +}; + #define min(x, y) (((x) < (y)) ? (x) : (y)) #define max(x, y) (((x) > (y)) ? (x) : (y)) @@ -44,6 +55,9 @@ static inline void clearenv(void) extern char **environ; *environ = NULL; } + +time_t timegm (struct tm *tm); + #endif #ifdef __GNUC__ @@ -57,5 +71,6 @@ int uh_urlencode(char *buf, int blen, const char *src, int slen); int uh_b64decode(char *buf, int blen, const void *src, int slen); bool uh_path_match(const char *prefix, const char *url); char *uh_split_header(char *str); +bool uh_addr_rfc1918(struct uh_addr *addr); #endif