#ifndef TYPES_H #define TYPES_H #include typedef struct { int fd, frozen; int inbuf_len, outbuf_len; int inbuf_reallen, outbuf_reallen; void *inbuf, *outbuf; } SOCKET; struct url_command_t { char *command; char *options; }; typedef struct { pcre *pattern; pcre_extra *extra; } regex_sub_t; typedef struct { int rm_so, rm_eo, subcount; const char **substrings; } regmatch_sub_t; typedef struct XML_LIST_T { struct XML_LIST_T *prev, *next; int type; char *item; } XML_LIST; typedef struct STACK_T { struct STACK_T *next, *prev; char *data; } STACK; struct HTTP_HEADER_LIST { struct HTTP_HEADER_LIST *next, *prev; char *type; char *value; }; struct LOGBUFFER_LIST { struct LOGBUFFER_LIST *next, *prev; char *msg; }; typedef struct { pthread_rwlock_t lock; int entries, size; struct LOGBUFFER_LIST *head, *tail; } LOGBUFFER; typedef struct { int type; int version; int port; int code; int content_length; int chunked; int keepalive; int proxy_keepalive; char *method; char *proto; char *host; char *file; char *referer; char *location; char *content_type; char *content_encoding; char *accept_encoding; char *proxy_authenticate; char *proxy_authorization; char *host_header; struct url_command_t **url_command; struct HTTP_HEADER_LIST *header; struct HTTP_HEADER_LIST *header_filtered; } HEADER; typedef struct { int status; int fd; int port; char *ip; } SOCKLIST; typedef struct { int thread; int buffer; SOCKET *client, *server; int port; char *ip; char *site_host; int site_port; int request; int keepalive_client; int keepalive_server; int authenticate; char *proxy_auth; char *proxy_host; int proxy_port; int proxy_type; char *proxy_username; char *proxy_password; char *proxy_domain; int access; int bypass, obypass; HEADER *header, *rheader; } CONNECTION; typedef struct { int code; char *type; unsigned int size, realsize; char *data; } FILEBUF; struct COOKIE_LIST_LIST { struct COOKIE_LIST_LIST *prev, *next; int id, enabled; int direction; char *host, *comment; regex_t *he; }; typedef struct { pthread_rwlock_t lock; int id, enabled; int policy; struct COOKIE_LIST_LIST *allow, *deny; } COOKIE_LIST; struct FILTER_LIST_LIST { struct FILTER_LIST_LIST *prev, *next; int id, enabled; char *comment, *template, *host, *file; regex_t *he, *fe; }; typedef struct { pthread_rwlock_t lock; int id, enabled; int policy; char *dtemplate; struct FILTER_LIST_LIST *allow, *deny, *empty; } FILTER_LIST; struct KEYWORD_LIST_LIST { struct KEYWORD_LIST_LIST *prev, *next; int id, enabled; int score; char *comment, *host, *file, *mime, *keyword; regex_t *he, *fe, *me, *ke; }; typedef struct { pthread_rwlock_t lock; int id, enabled; int threshold; char *template; struct KEYWORD_LIST_LIST *keyword_list; } KEYWORD_LIST; struct REDIRECT_LIST_LIST { struct REDIRECT_LIST_LIST *prev, *next; int id, enabled; int which, port, send302, options; regex_sub_t *up; char *comment, *redirect, *url; }; typedef struct { pthread_rwlock_t lock; int id, enabled; struct REDIRECT_LIST_LIST *redirect_list; } REDIRECT_LIST; struct FORWARD_LIST_LIST { struct FORWARD_LIST_LIST *prev, *next; int id, enabled; int which, port, type; regex_t *he, *fe; char *comment, *host, *file, *proxy, *username, *password, *domain; }; typedef struct { pthread_rwlock_t lock; int id, enabled; struct FORWARD_LIST_LIST *forward_list; } FORWARD_LIST; struct MIME_LIST_LIST { struct MIME_LIST_LIST *prev, *next; int id, enabled; char *comment, *template, *mime, *host, *file; regex_t *me, *he, *fe; }; typedef struct { pthread_rwlock_t lock; int id, enabled; int policy; char *dtemplate; struct MIME_LIST_LIST *allow, *deny, *empty; } MIME_LIST; struct HEADER_LIST_LIST { struct HEADER_LIST_LIST *prev, *next; int id, enabled; char *comment, *type, *value, *host; regex_t *te, *ve, *he; }; typedef struct { pthread_rwlock_t lock; int id, enabled; int policy; struct HEADER_LIST_LIST *allow, *deny, *insert; } HEADER_LIST; struct ACCESS_LIST_LIST { struct ACCESS_LIST_LIST *prev, *next; int id, enabled; int access, bypass; char *comment, *ip, *username, *password; regex_t *ie; }; typedef struct { pthread_rwlock_t lock; int id; int policy; struct ACCESS_LIST_LIST *allow, *deny; } ACCESS_LIST; typedef struct { pthread_rwlock_t lock; int id; struct LISTEN_LIST *listen_list; } NETWORK; struct LISTEN_LIST { struct LISTEN_LIST *prev, *next; int id; int port; char *ip; char *proxy; int proxytype; }; struct TEMPLATE_LIST { struct TEMPLATE_LIST *prev, *next; int id, enabled; int type, code; char *comment, *name, *file, *mime; }; typedef struct { pthread_rwlock_t lock; int id; char *path; struct TEMPLATE_LIST *template_list; } TEMPLATES; struct EXTERNAL_LIST_LIST { struct EXTERNAL_LIST_LIST *prev, *next; int id, enabled; regex_t *me, *fe, *he; int type; char *comment, *exec, *newmime, *host, *file, *mime; }; typedef struct { pthread_rwlock_t lock; int id, enabled; struct EXTERNAL_LIST_LIST *external_list; } EXTERNAL; struct REWRITE_LIST_LIST { struct REWRITE_LIST_LIST *prev, *next; int id, enabled; int which; regex_t *he, *fe, *me; regex_sub_t *pe; char *comment, *pattern, *replace, *host, *file, *mime; }; typedef struct { pthread_rwlock_t lock; int id, enabled; struct REWRITE_LIST_LIST *rewrite; } REWRITE_LIST; typedef struct { struct in_addr *addr; int len; } HOSTENT; struct HASH_LIST { struct HASH_LIST *next; time_t age; char *ref; void *data; }; typedef struct { int hit; int miss; int size; struct HASH_LIST **hash_list; } HASH_TABLE; typedef struct { pthread_mutex_t lock; int flags, pid; int requests; char *ip, *host, *file, *method; int port; } THREADLIST; struct cgi_args_t { struct cgi_args_t *next; char *name; char *value; }; #endif /* TYPES_H */