Commit b61c8db4 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Stuff VCL programs needs to know about.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@74 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4164de47
/*
* Stuff necessary to compile a VCL programs C code
*
* XXX: When this file is changed, lib/libvcl/vcl_gen_fixed_token.tcl
* XXX: *MUST* be rerun.
*/
struct vcl_ref {
unsigned line;
unsigned pos;
unsigned count;
const char *token;
};
struct vcl_acl {
unsigned ip;
unsigned mask;
};
struct client {
unsigned ip;
};
struct req {
char *req;
char *useragent;
struct {
char *path;
char *host;
} url;
double ttlfactor;
struct backend *backend;
};
struct backend {
unsigned ip;
double responsetime;
double timeout;
double bandwidth;
int down;
};
struct obj {
int exists;
double ttl;
unsigned result;
unsigned size;
unsigned usage;
};
#define VCL_FARGS struct client *client, struct obj *obj, struct req *req, struct backend *backend
#define VCL_PASS_ARGS client, obj, req, backend
void VCL_count(unsigned);
void VCL_no_cache();
void VCL_no_new_cache();
int ip_match(unsigned, struct vcl_acl *);
int string_match(const char *, const char *);
int VCL_rewrite(const char *, const char *);
int VCL_error(unsigned, const char *);
int VCL_fetch(void);
int VCL_switch_config(const char *);
typedef void vcl_init_f(void);
struct VCL_conf {
unsigned magic;
#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
vcl_init_f *init_func;
struct backend *default_backend;
struct vcl_ref *ref;
unsigned nref;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment