callcgi: Don't log errors about broken pipes.
[ashd.git] / src / dirplex / dirplex.h
... / ...
CommitLineData
1#ifndef _ASH_DIRPLEX_H
2#define _ASH_DIRPLEX_H
3
4#define PAT_BASENAME 0
5#define PAT_PATHNAME 1
6#define PAT_ALL 2
7#define PAT_DEFAULT 3
8#define PAT_LOCAL 4
9
10#define PT_FILE 0
11#define PT_DIR 1
12
13struct config {
14 struct config *next, *prev;
15 char *path;
16 time_t mtime, lastck;
17 struct child *children;
18 struct pattern *patterns;
19 char **index;
20 char *capture;
21 int caproot;
22};
23
24struct rule {
25 int type;
26 char **patterns;
27};
28
29struct headmod {
30 struct headmod *next;
31 char *name, *value;
32};
33
34struct pattern {
35 struct pattern *next;
36 int type;
37 struct headmod *headers;
38 char *childnm;
39 char **fchild;
40 struct rule **rules;
41};
42
43struct child *getchild(struct config *cf, char *name);
44struct config *readconfig(char *file);
45struct config *getconfig(char *path);
46struct config **getconfigs(char *file);
47struct child *findchild(char *file, char *name, struct config **cf);
48struct pattern *findmatch(char *file, int trydefault, int dir);
49void modheaders(struct hthead *req, struct pattern *pat);
50
51extern time_t now;
52extern struct child *notfound;
53extern struct config *gconfig, *lconfig;
54
55#endif