Commit b18f2c4e authored by Tollef Fog Heen's avatar Tollef Fog Heen

Get rid of autogenerated files from SVN

We now require python to build and we always regenerate the generated files.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5019 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0a4e195c
# $Id$
INCLUDES = -I$(top_srcdir)/include
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
sbin_PROGRAMS = varnishd
......
......@@ -296,10 +296,7 @@ else
fi
AM_MISSING_HAS_RUN
AC_CHECK_PROGS(PYTHON, [python python2 python2.5 python2.6 python3 python3.1 python3.2], :)
if test "$PYTHON" = :; then
PYTHON="${am_missing_run}python"
fi
AC_CHECK_PROGS(PYTHON, [python python2 python2.5 python2.6 python3 python3.1 python3.2], [AC_MSG_ERROR([Python is needed to build Varnish, please install python.])])
# Solaris defines SO_{RCV,SND}TIMEO, but does not implement them.
# Varnish will build and run without these, but connections will not
......
......@@ -49,3 +49,10 @@ nobase_noinst_HEADERS = \
vrt.h \
vrt_obj.h \
vss.h
vcl_returns.h vcl.h vrt_obj.h: $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir)/include/vmod.h $(top_srcdir)/include/vrt.h
@PYTHON@ $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir) $(top_builddir)
CLEANFILES = vcl_returns.h \
vcl.h \
vrt_obj.h
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
struct sess;
struct cli;
typedef void vcl_init_f(struct cli *);
typedef void vcl_fini_f(struct cli *);
typedef int vcl_func_f(struct sess *sp);
/* VCL Methods */
#define VCL_MET_RECV (1U << 0)
#define VCL_MET_PIPE (1U << 1)
#define VCL_MET_PASS (1U << 2)
#define VCL_MET_HASH (1U << 3)
#define VCL_MET_MISS (1U << 4)
#define VCL_MET_HIT (1U << 5)
#define VCL_MET_FETCH (1U << 6)
#define VCL_MET_DELIVER (1U << 7)
#define VCL_MET_ERROR (1U << 8)
#define VCL_MET_MAX 9
#define VCL_MET_MASK 0x1ff
/* VCL Returns */
#define VCL_RET_DELIVER 0
#define VCL_RET_ERROR 1
#define VCL_RET_FETCH 2
#define VCL_RET_HASH 3
#define VCL_RET_LOOKUP 4
#define VCL_RET_PASS 5
#define VCL_RET_PIPE 6
#define VCL_RET_RESTART 7
#define VCL_RET_MAX 8
struct VCL_conf {
unsigned magic;
#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
struct director **director;
unsigned ndirector;
struct vrt_ref *ref;
unsigned nref;
unsigned busy;
unsigned discard;
unsigned nsrc;
const char **srcname;
const char **srcbody;
vcl_init_f *init_func;
vcl_fini_f *fini_func;
vcl_func_f *recv_func;
vcl_func_f *pipe_func;
vcl_func_f *pass_func;
vcl_func_f *hash_func;
vcl_func_f *miss_func;
vcl_func_f *hit_func;
vcl_func_f *fetch_func;
vcl_func_f *deliver_func;
vcl_func_f *error_func;
};
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
#ifdef VCL_RET_MAC
VCL_RET_MAC(deliver, DELIVER, VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR)
VCL_RET_MAC(error, ERROR, VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH)
VCL_RET_MAC(fetch, FETCH, VCL_MET_MISS)
VCL_RET_MAC(hash, HASH, VCL_MET_HASH)
VCL_RET_MAC(lookup, LOOKUP, VCL_MET_RECV)
VCL_RET_MAC(pass, PASS, VCL_MET_RECV | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH)
VCL_RET_MAC(pipe, PIPE, VCL_MET_RECV | VCL_MET_PIPE)
VCL_RET_MAC(restart, RESTART, VCL_MET_PASS | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR)
#endif
#ifdef VCL_MET_MAC
VCL_MET_MAC(recv,RECV,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_PIPE)
| (1U << VCL_RET_LOOKUP)
))
VCL_MET_MAC(pipe,PIPE,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_PIPE)
))
VCL_MET_MAC(pass,PASS,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
))
VCL_MET_MAC(hash,HASH,
((1U << VCL_RET_HASH)
))
VCL_MET_MAC(miss,MISS,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_FETCH)
))
VCL_MET_MAC(hit,HIT,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_DELIVER)
))
VCL_MET_MAC(fetch,FETCH,
((1U << VCL_RET_ERROR)
| (1U << VCL_RET_RESTART)
| (1U << VCL_RET_PASS)
| (1U << VCL_RET_DELIVER)
))
VCL_MET_MAC(deliver,DELIVER,
((1U << VCL_RET_RESTART)
| (1U << VCL_RET_DELIVER)
))
VCL_MET_MAC(error,ERROR,
((1U << VCL_RET_RESTART)
| (1U << VCL_RET_DELIVER)
))
#endif
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
struct sockaddr * VRT_r_client_ip(const struct sess *);
struct sockaddr * VRT_r_server_ip(struct sess *);
const char * VRT_r_server_hostname(struct sess *);
const char * VRT_r_server_identity(struct sess *);
int VRT_r_server_port(struct sess *);
const char * VRT_r_req_request(const struct sess *);
void VRT_l_req_request(const struct sess *, const char *, ...);
const char * VRT_r_req_url(const struct sess *);
void VRT_l_req_url(const struct sess *, const char *, ...);
const char * VRT_r_req_proto(const struct sess *);
void VRT_l_req_proto(const struct sess *, const char *, ...);
struct director * VRT_r_req_backend(struct sess *);
void VRT_l_req_backend(struct sess *, struct director *);
int VRT_r_req_restarts(const struct sess *);
double VRT_r_req_grace(struct sess *);
void VRT_l_req_grace(struct sess *, double);
const char * VRT_r_req_xid(struct sess *);
unsigned VRT_r_req_esi(struct sess *);
void VRT_l_req_esi(struct sess *, unsigned);
unsigned VRT_r_req_backend_healthy(const struct sess *);
const char * VRT_r_bereq_request(const struct sess *);
void VRT_l_bereq_request(const struct sess *, const char *, ...);
const char * VRT_r_bereq_url(const struct sess *);
void VRT_l_bereq_url(const struct sess *, const char *, ...);
const char * VRT_r_bereq_proto(const struct sess *);
void VRT_l_bereq_proto(const struct sess *, const char *, ...);
double VRT_r_bereq_connect_timeout(struct sess *);
void VRT_l_bereq_connect_timeout(struct sess *, double);
double VRT_r_bereq_first_byte_timeout(struct sess *);
void VRT_l_bereq_first_byte_timeout(struct sess *, double);
double VRT_r_bereq_between_bytes_timeout(struct sess *);
void VRT_l_bereq_between_bytes_timeout(struct sess *, double);
const char * VRT_r_beresp_proto(const struct sess *);
void VRT_l_beresp_proto(const struct sess *, const char *, ...);
void VRT_l_beresp_saintmode(const struct sess *, double);
int VRT_r_beresp_status(const struct sess *);
void VRT_l_beresp_status(const struct sess *, int);
const char * VRT_r_beresp_response(const struct sess *);
void VRT_l_beresp_response(const struct sess *, const char *, ...);
unsigned VRT_r_beresp_cacheable(const struct sess *);
void VRT_l_beresp_cacheable(const struct sess *, unsigned);
double VRT_r_beresp_ttl(const struct sess *);
void VRT_l_beresp_ttl(const struct sess *, double);
double VRT_r_beresp_grace(const struct sess *);
void VRT_l_beresp_grace(const struct sess *, double);
const char * VRT_r_obj_proto(const struct sess *);
void VRT_l_obj_proto(const struct sess *, const char *, ...);
int VRT_r_obj_status(const struct sess *);
void VRT_l_obj_status(const struct sess *, int);
const char * VRT_r_obj_response(const struct sess *);
void VRT_l_obj_response(const struct sess *, const char *, ...);
int VRT_r_obj_hits(const struct sess *);
unsigned VRT_r_obj_cacheable(const struct sess *);
void VRT_l_obj_cacheable(const struct sess *, unsigned);
double VRT_r_obj_ttl(const struct sess *);
void VRT_l_obj_ttl(const struct sess *, double);
double VRT_r_obj_grace(const struct sess *);
void VRT_l_obj_grace(const struct sess *, double);
double VRT_r_obj_lastuse(const struct sess *);
const char * VRT_r_resp_proto(const struct sess *);
void VRT_l_resp_proto(const struct sess *, const char *, ...);
int VRT_r_resp_status(const struct sess *);
void VRT_l_resp_status(const struct sess *, int);
const char * VRT_r_resp_response(const struct sess *);
void VRT_l_resp_response(const struct sess *, const char *, ...);
double VRT_r_now(const struct sess *);
# $Id$
INCLUDES = -I$(top_srcdir)/include
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
lib_LTLIBRARIES = libvcl.la
......@@ -20,7 +20,7 @@ libvcl_la_SOURCES = \
vcc_dir_random.c \
vcc_dir_round_robin.c \
vcc_parse.c \
vcc_fixed_token.c \
$(builddir)/vcc_fixed_token.c \
vcc_obj.c \
vcc_string.c \
vcc_symb.c \
......@@ -31,11 +31,9 @@ libvcl_la_SOURCES = \
EXTRA_DIST = \
generate.py
$(srcdir)/vcc_obj.c: $(srcdir)/generate.py
cd $(srcdir) && @PYTHON@ generate.py || true
$(builddir)/vcc_obj.c $(builddir)/vcc_fixed_token.c $(builddir)/vcc_token_defs.h: $(srcdir)/generate.py $(top_srcdir)/include/vmod.h $(top_srcdir)/include/vrt.h
@PYTHON@ $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir) $(top_builddir)
$(srcdir)/vcc_fixed_token.c: $(srcdir)/generate.py $(top_srcdir)/include/vcl.h $(top_srcdir)/include/vrt.h $(top_srcdir)/include/vrt_obj.h
cd $(srcdir) && @PYTHON@ generate.py || true
$(srcdir)/vcc_token_defs.h: $(srcdir)/generate.py $(top_srcdir)/include/vcl.h $(top_srcdir)/include/vrt.h $(top_srcdir)/include/vrt_obj.h
cd $(srcdir) && @PYTHON@ generate.py || true
CLEANFILES = $(builddir)/vcc_token_defs.h \
$(builddir)/vcc_fixed_token.c \
$(builddir)/vcc_obj.c
......@@ -40,6 +40,13 @@
# which hopefully makes for better error messages.
# XXX: does it actually do that ?
import sys
srcroot = "../.."
buildroot = "../.."
if len(sys.argv) == 3:
srcroot = sys.argv[1]
buildroot = sys.argv[2]
tokens = {
"T_INC": "++",
"T_DEC": "--",
......@@ -535,43 +542,9 @@ def file_header(fo):
#######################################################################
fo = open("vcc_fixed_token.c", "w")
file_header(fo)
fo.write("""
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include "config.h"
#include "vcc_priv.h"
#include "vsb.h"
""")
polish_tokens(tokens)
emit_vcl_fixed_token(fo, tokens)
emit_vcl_tnames(fo, tokens)
fo.write("""
void
vcl_output_lang_h(struct vsb *sb)
{
""")
emit_file(fo, "../../include/vcl.h")
emit_file(fo, "../../include/vmod.h")
emit_file(fo, "../../include/vrt.h")
emit_file(fo, "../../include/vrt_obj.h")
fo.write("""
}
""")
fo.close()
#######################################################################
fo = open("vcc_token_defs.h", "w")
fo = open(buildroot + "/lib/libvcl/vcc_token_defs.h", "w")
file_header(fo)
......@@ -596,10 +569,9 @@ for i in returns:
for j in i[1]:
rets[j] = True
#######################################################################
fo = open("../../include/vcl_returns.h", "w")
fo = open(buildroot + "/include/vcl_returns.h", "w")
file_header(fo)
......@@ -629,7 +601,7 @@ fo.close()
#######################################################################
fo = open("../../include/vcl.h", "w")
fo = open(buildroot + "/include/vcl.h", "w")
file_header(fo)
......@@ -721,10 +693,10 @@ def restrict(fo, spec):
#######################################################################
fh=open("../../include/vrt_obj.h", "w")
fh = open(buildroot + "/include/vrt_obj.h", "w")
file_header(fh)
fo=open("vcc_obj.c", "w")
fo = open(buildroot + "/lib/libvcl/vcc_obj.c", "w")
file_header(fo)
fo.write("""
......@@ -775,3 +747,39 @@ fo.write("\t{ NULL }\n};\n")
fo.close()
fh.close()
#######################################################################
fo = open(buildroot + "/lib/libvcl/vcc_fixed_token.c", "w")
file_header(fo)
fo.write("""
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include "config.h"
#include "vcc_priv.h"
#include "vsb.h"
""")
emit_vcl_fixed_token(fo, tokens)
emit_vcl_tnames(fo, tokens)
fo.write("""
void
vcl_output_lang_h(struct vsb *sb)
{
""")
emit_file(fo, buildroot + "/include/vcl.h")
emit_file(fo, srcroot + "/include/vmod.h")
emit_file(fo, srcroot + "/include/vrt.h")
emit_file(fo, buildroot + "/include/vrt_obj.h")
fo.write("""
}
""")
fo.close()
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include "config.h"
#include "vcc_priv.h"
#include "vsb.h"
#define M1() do {*q = p + 1; return (p[0]); } while (0)
#define M2(c,t) do {if (p[1] == (c)) { *q = p + 2; return (t); }} while (0)
unsigned
vcl_fixed_token(const char *p, const char **q)
{
switch (p[0]) {
case '!':
M2('=', T_NEQ);
M2('~', T_NOMATCH);
M1();
case '%':
M1();
case '&':
M2('&', T_CAND);
M1();
case '(':
M1();
case ')':
M1();
case '*':
M2('=', T_MUL);
M1();
case '+':
M2('+', T_INC);
M2('=', T_INCR);
M1();
case ',':
M1();
case '-':
M2('-', T_DEC);
M2('=', T_DECR);
M1();
case '.':
M1();
case '/':
M2('=', T_DIV);
M1();
case ';':
M1();
case '<':
M2('<', T_SHL);
M2('=', T_LEQ);
M1();
case '=':
M2('=', T_EQ);
M1();
case '>':
M2('=', T_GEQ);
M2('>', T_SHR);
M1();
case 'e':
if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
p[4] == 'i' && p[5] == 'f' && !isvar(p[6])) {
*q = p + 6;
return (T_ELSEIF);
}
if (p[1] == 'l' && p[2] == 's' && p[3] == 'i' &&
p[4] == 'f' && !isvar(p[5])) {
*q = p + 5;
return (T_ELSIF);
}
if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
!isvar(p[4])) {
*q = p + 4;
return (T_ELSE);
}
return (0);
case 'i':
if (p[1] == 'n' && p[2] == 'c' && p[3] == 'l' &&
p[4] == 'u' && p[5] == 'd' && p[6] == 'e' &&
!isvar(p[7])) {
*q = p + 7;
return (T_INCLUDE);
}
M2('f', T_IF);
return (0);
case '{':
M1();
case '|':
M2('|', T_COR);
M1();
case '}':
M1();
case '~':
M1();
default:
return (0);
}
}
const char * const vcl_tnames[256] = {
['!'] = "'!'",
['%'] = "'%'",
['&'] = "'&'",
['('] = "'('",
[')'] = "')'",
['*'] = "'*'",
['+'] = "'+'",
[','] = "','",
['-'] = "'-'",
['.'] = "'.'",
['/'] = "'/'",
[';'] = "';'",
['<'] = "'<'",
['='] = "'='",
['>'] = "'>'",
['{'] = "'{'",
['|'] = "'|'",
['}'] = "'}'",
['~'] = "'~'",
[CNUM] = "CNUM",
[CSRC] = "CSRC",
[CSTR] = "CSTR",
[EOI] = "EOI",
[ID] = "ID",
[T_CAND] = "&&",
[T_COR] = "||",
[T_DEC] = "--",
[T_DECR] = "-=",
[T_DIV] = "/=",
[T_ELSE] = "else",
[T_ELSEIF] = "elseif",
[T_ELSIF] = "elsif",
[T_EQ] = "==",
[T_GEQ] = ">=",
[T_IF] = "if",
[T_INC] = "++",
[T_INCLUDE] = "include",
[T_INCR] = "+=",
[T_LEQ] = "<=",
[T_MUL] = "*=",
[T_NEQ] = "!=",
[T_NOMATCH] = "!~",
[T_SHL] = "<<",
[T_SHR] = ">>",
};
void
vcl_output_lang_h(struct vsb *sb)
{
/* ../../include/vcl.h */
vsb_cat(sb, "\n/*\n * $Id$\n *\n * NB: This file is machine "
"generated, DO NOT EDIT!\n *\n * Edit and run generate.py instead"
"\n */\n\nstruct sess;\nstruct cli;\n\ntypedef void vcl_init_f(st"
"ruct cli *);\ntypedef void vcl_fini_f(struct cli *);\n"
"typedef int vcl_func_f(struct sess *sp);\n\n/* VCL Methods "
"*/\n#define VCL_MET_RECV\t\t(1U << 0)\n#define VCL_MET_PIPE\t"
"\t(1U << 1)\n#define VCL_MET_PASS\t\t(1U << 2)\n#define VCL_MET_"
"HASH\t\t(1U << 3)\n#define VCL_MET_MISS\t\t(1U << 4)\n"
"#define VCL_MET_HIT\t\t(1U << 5)\n#define VCL_MET_FETCH\t\t"
"(1U << 6)\n#define VCL_MET_DELIVER\t\t(1U << 7)\n"
"#define VCL_MET_ERROR\t\t(1U << 8)\n\n#define VCL_MET_MAX\t"
"\t9\n\n#define VCL_MET_MASK\t\t0x1ff\n\n/* VCL Returns */\n"
"#define VCL_RET_DELIVER\t\t0\n#define VCL_RET_ERROR\t\t1\n"
"#define VCL_RET_FETCH\t\t2\n#define VCL_RET_HASH\t\t3\n"
"#define VCL_RET_LOOKUP\t\t4\n#define VCL_RET_PASS\t\t5\n"
"#define VCL_RET_PIPE\t\t6\n#define VCL_RET_RESTART\t\t7\n"
"\n#define VCL_RET_MAX\t\t8\n\nstruct VCL_conf {\n"
"\tunsigned\tmagic;\n#define VCL_CONF_MAGIC\t0x7406c509\t/* "
"from /dev/random */\n\n\tstruct director\t**director;\n"
"\tunsigned\tndirector;\n\tstruct vrt_ref\t*ref;\n"
"\tunsigned\tnref;\n\tunsigned\tbusy;\n\tunsigned\tdiscard;\n"
"\n\tunsigned\tnsrc;\n\tconst char\t**srcname;\n\tconst char\t"
"**srcbody;\n\n\tvcl_init_f\t*init_func;\n\tvcl_fini_f\t*fini_fun"
"c;\n\n\tvcl_func_f\t*recv_func;\n\tvcl_func_f\t*pipe_func;\n"
"\tvcl_func_f\t*pass_func;\n\tvcl_func_f\t*hash_func;\n"
"\tvcl_func_f\t*miss_func;\n\tvcl_func_f\t*hit_func;\n"
"\tvcl_func_f\t*fetch_func;\n\tvcl_func_f\t*deliver_func;\n"
"\tvcl_func_f\t*error_func;\n};\n");
/* ../../include/vmod.h */
vsb_cat(sb, "/*-\n * Copyright (c) 2010 Linpro AS\n"
" * All rights reserved.\n *\n * Author: Poul-Henning Kamp "
"<phk@phk.freebsd.dk>\n *\n * Redistribution and use in source "
"and binary forms, with or without\n * modification, are permitte"
"d provided that the following conditions\n * are met:\n"
" * 1. Redistributions of source code must retain the above "
"copyright\n * notice, this list of conditions and the followi"
"ng disclaimer.\n * 2. Redistributions in binary form must "
"reproduce the above copyright\n * notice, this list of "
"conditions and the following disclaimer in the\n * documentat"
"ion and/or other materials provided with the distribution.\n"
" *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "
"``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, "
"BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILIT"
"Y AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. "
" IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n"
" * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, "
"OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, "
"PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, "
"DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED "
"AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n"
" * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) "
"ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN "
"IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n"
" *\n * $Id$\n *\n * VCL modules\n *\n * XXX: When this file "
"is changed, lib/libvcl/generate.py *MUST* be rerun.\n"
" */\n\nstruct vmod_conf {\n\tunsigned\t\tmagic;\n"
"#define VMOD_CONF_MAGIC\t\t0x3f017730\n};\n");
/* ../../include/vrt.h */
vsb_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n"
" * Copyright (c) 2006-2009 Linpro AS\n * All rights reserved.\n"
" *\n * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>\n"
" *\n * Redistribution and use in source and binary forms, "
"with or without\n * modification, are permitted provided that "
"the following conditions\n * are met:\n * 1. Redistributions "
"of source code must retain the above copyright\n * notice, "
"this list of conditions and the following disclaimer.\n"
" * 2. Redistributions in binary form must reproduce the above "
"copyright\n * notice, this list of conditions and the followi"
"ng disclaimer in the\n * documentation and/or other materials"
" provided with the distribution.\n *\n * THIS SOFTWARE IS "
"PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n"
" * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED"
" TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS "
"FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT "
"SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, "
"INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n"
" * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF "
"SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS;"
" OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY "
"OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR "
"TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n"
" * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE "
"POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * $Id: vrt.h 5001 2010-07-"
"04 14:40:33Z phk $\n *\n * Runtime support for compiled VCL "
"programs.\n *\n * XXX: When this file is changed, lib/libvcl/gen"
"erate.py *MUST* be rerun.\n */\n\nstruct sess;\nstruct vsb;\n"
"struct cli;\nstruct director;\nstruct VCL_conf;\n"
"struct sockaddr;\n\n/*\n * A backend probe specification\n"
" */\n\nextern const void * const vrt_magic_string_end;\n"
"\nstruct vrt_backend_probe {\n\tconst char\t*url;\n"
"\tconst char\t*request;\n\tdouble\t\ttimeout;\n\tdouble\t\t"
"interval;\n\tunsigned\texp_status;\n\tunsigned\twindow;\n"
"\tunsigned\tthreshold;\n\tunsigned\tinitial;\n};\n"
"\n/*\n * A backend is a host+port somewhere on the network\n"
" */\nstruct vrt_backend {\n\tconst char\t\t\t*vcl_name;\n"
"\tconst char\t\t\t*ident;\n\n\tconst char\t\t\t*hosthdr;\n"
"\n\tconst unsigned char\t\t*ipv4_sockaddr;\n\tconst unsigned "
"char\t\t*ipv6_sockaddr;\n\n\tdouble\t\t\t\tconnect_timeout;\n"
"\tdouble\t\t\t\tfirst_byte_timeout;\n\tdouble\t\t\t\tbetween_byt"
"es_timeout;\n\tunsigned\t\t\tmax_connections;\n\tunsigned\t"
"\t\tsaintmode_threshold;\n\tconst struct vrt_backend_probe\t"
"*probe;\n};\n\n/*\n * A director with an unpredictable reply\n"
" */\n\nstruct vrt_dir_random_entry {\n\tint\t\t\t\t\thost;\n"
"\tdouble\t\t\t\t\tweight;\n};\n\nstruct vrt_dir_random {\n"
"\tconst char\t\t\t\t*name;\n\tunsigned\t\t\t\tretries;\n"
"\tunsigned\t\t\t\tnmember;\n\tconst struct vrt_dir_random_entry\t"
"*members;\n};\n\n/*\n * A director with round robin selection\n"
" */\n\nstruct vrt_dir_round_robin_entry {\n\tint\t\t\t\t\thost;\n"
"};\n\nstruct vrt_dir_round_robin {\n\tconst char\t\t\t\t*name;\n"
"\tunsigned\t\t\t\tnmember;\n\tconst struct vrt_dir_round_robin_e"
"ntry\t*members;\n};\n\n\n/*\n * other stuff.\n * XXX: document "
"when bored\n */\n\nstruct vrt_ref {\n\tunsigned\tsource;\n"
"\tunsigned\toffset;\n\tunsigned\tline;\n\tunsigned\tpos;\n"
"\tunsigned\tcount;\n\tconst char\t*token;\n};\n\n"
"/* ACL related */\n#define VRT_ACL_MAXADDR\t\t16\t/* max(IPv4, "
"IPv6) */\n\nvoid VRT_acl_log(const struct sess *, const char "
"*msg);\n\n/* Regexp related */\nvoid VRT_re_init(void **, "
"const char *);\nvoid VRT_re_fini(void *);\nint VRT_re_match(cons"
"t char *, void *re);\nconst char *VRT_regsub(const struct "
"sess *sp, int all, const char *,\n void *, const char *);\n"
"\nvoid VRT_panic(struct sess *sp, const char *, ...);\n"
"void VRT_ban(struct sess *sp, char *, ...);\nvoid VRT_ban_string"
"(struct sess *sp, const char *, ...);\nvoid VRT_purge(struct "
"sess *sp, double ttl, double grace);\nvoid VRT_log(struct "
"sess *, const char *msg, ...);\n\nvoid VRT_count(const struct "
"sess *, unsigned);\nint VRT_rewrite(const char *, const char "
"*);\nvoid VRT_error(struct sess *, unsigned, const char *);\n"
"int VRT_switch_config(const char *);\n\nenum gethdr_e { HDR_REQ,"
" HDR_RESP, HDR_OBJ, HDR_BEREQ, HDR_BERESP };\nchar *VRT_GetHdr(c"
"onst struct sess *, enum gethdr_e where, const char *);\n"
"void VRT_SetHdr(const struct sess *, enum gethdr_e where, "
"const char *,\n const char *, ...);\nvoid VRT_handling(struct"
" sess *sp, unsigned hand);\n\nvoid VRT_hashdata(struct sess "
"*sp, const char *str, ...);\n\n/* Simple stuff */\n"
"int VRT_strcmp(const char *s1, const char *s2);\n"
"void VRT_memmove(void *dst, const void *src, unsigned len);\n"
"\nvoid VRT_ESI(struct sess *sp);\nvoid VRT_Rollback(struct "
"sess *sp);\n\n/* Synthetic pages */\nvoid VRT_synth_page(struct "
"sess *sp, unsigned flags, const char *, ...);\n\n"
"/* Backend related */\nvoid VRT_init_dir(struct cli *, struct "
"director **, const char *name,\n int idx, const void *priv);\n"
"void VRT_fini_dir(struct cli *, struct director *);\n"
"\nchar *VRT_IP_string(const struct sess *sp, const struct "
"sockaddr *sa);\nchar *VRT_int_string(const struct sess *sp, "
"int);\nchar *VRT_double_string(const struct sess *sp, double);\n"
"char *VRT_time_string(const struct sess *sp, double);\n"
"const char *VRT_backend_string(struct sess *sp);\n"
"\n#define VRT_done(sp, hand)\t\t\t\\\n\tdo {\t\t\t\t\t\\\n"
"\t\tVRT_handling(sp, hand);\t\t\\\n\t\treturn (1);\t\t\t\\\n"
"\t} while (0)\n");
/* ../../include/vrt_obj.h */
vsb_cat(sb, "\n/*\n * $Id$\n *\n * NB: This file is machine "
"generated, DO NOT EDIT!\n *\n * Edit and run generate.py instead"
"\n */\nstruct sockaddr * VRT_r_client_ip(const struct sess "
"*);\nstruct sockaddr * VRT_r_server_ip(struct sess *);\n"
"const char * VRT_r_server_hostname(struct sess *);\n"
"const char * VRT_r_server_identity(struct sess *);\n"
"int VRT_r_server_port(struct sess *);\nconst char * VRT_r_req_re"
"quest(const struct sess *);\nvoid VRT_l_req_request(const "
"struct sess *, const char *, ...);\nconst char * VRT_r_req_url(c"
"onst struct sess *);\nvoid VRT_l_req_url(const struct sess "
"*, const char *, ...);\nconst char * VRT_r_req_proto(const "
"struct sess *);\nvoid VRT_l_req_proto(const struct sess *, "
"const char *, ...);\nstruct director * VRT_r_req_backend(struct "
"sess *);\nvoid VRT_l_req_backend(struct sess *, struct director "
"*);\nint VRT_r_req_restarts(const struct sess *);\n"
"double VRT_r_req_grace(struct sess *);\nvoid VRT_l_req_grace(str"
"uct sess *, double);\nconst char * VRT_r_req_xid(struct sess "
"*);\nunsigned VRT_r_req_esi(struct sess *);\nvoid VRT_l_req_esi("
"struct sess *, unsigned);\nunsigned VRT_r_req_backend_healthy(co"
"nst struct sess *);\nconst char * VRT_r_bereq_request(const "
"struct sess *);\nvoid VRT_l_bereq_request(const struct sess "
"*, const char *, ...);\nconst char * VRT_r_bereq_url(const "
"struct sess *);\nvoid VRT_l_bereq_url(const struct sess *, "
"const char *, ...);\nconst char * VRT_r_bereq_proto(const "
"struct sess *);\nvoid VRT_l_bereq_proto(const struct sess "
"*, const char *, ...);\ndouble VRT_r_bereq_connect_timeout(struc"
"t sess *);\nvoid VRT_l_bereq_connect_timeout(struct sess *, "
"double);\ndouble VRT_r_bereq_first_byte_timeout(struct sess "
"*);\nvoid VRT_l_bereq_first_byte_timeout(struct sess *, double);"
"\ndouble VRT_r_bereq_between_bytes_timeout(struct sess *);\n"
"void VRT_l_bereq_between_bytes_timeout(struct sess *, double);\n"
"const char * VRT_r_beresp_proto(const struct sess *);\n"
"void VRT_l_beresp_proto(const struct sess *, const char *, "
"...);\nvoid VRT_l_beresp_saintmode(const struct sess *, double);"
"\nint VRT_r_beresp_status(const struct sess *);\n"
"void VRT_l_beresp_status(const struct sess *, int);\n"
"const char * VRT_r_beresp_response(const struct sess *);\n"
"void VRT_l_beresp_response(const struct sess *, const char "
"*, ...);\nunsigned VRT_r_beresp_cacheable(const struct sess "
"*);\nvoid VRT_l_beresp_cacheable(const struct sess *, unsigned);"
"\ndouble VRT_r_beresp_ttl(const struct sess *);\n"
"void VRT_l_beresp_ttl(const struct sess *, double);\n"
"double VRT_r_beresp_grace(const struct sess *);\n"
"void VRT_l_beresp_grace(const struct sess *, double);\n"
"const char * VRT_r_obj_proto(const struct sess *);\n"
"void VRT_l_obj_proto(const struct sess *, const char *, ...);\n"
"int VRT_r_obj_status(const struct sess *);\nvoid VRT_l_obj_statu"
"s(const struct sess *, int);\nconst char * VRT_r_obj_response(co"
"nst struct sess *);\nvoid VRT_l_obj_response(const struct "
"sess *, const char *, ...);\nint VRT_r_obj_hits(const struct "
"sess *);\nunsigned VRT_r_obj_cacheable(const struct sess *);\n"
"void VRT_l_obj_cacheable(const struct sess *, unsigned);\n"
"double VRT_r_obj_ttl(const struct sess *);\nvoid VRT_l_obj_ttl(c"
"onst struct sess *, double);\ndouble VRT_r_obj_grace(const "
"struct sess *);\nvoid VRT_l_obj_grace(const struct sess *, "
"double);\ndouble VRT_r_obj_lastuse(const struct sess *);\n"
"const char * VRT_r_resp_proto(const struct sess *);\n"
"void VRT_l_resp_proto(const struct sess *, const char *, ...);\n"
"int VRT_r_resp_status(const struct sess *);\nvoid VRT_l_resp_sta"
"tus(const struct sess *, int);\nconst char * VRT_r_resp_response"
"(const struct sess *);\nvoid VRT_l_resp_response(const struct "
"sess *, const char *, ...);\ndouble VRT_r_now(const struct "
"sess *);\n");
}
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
#include "config.h"
#include <stdio.h>
#include "vcc_compile.h"
const struct var vcc_vars[] = {
{ "client.ip", IP, 9,
"VRT_r_client_ip(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "server.ip", IP, 9,
"VRT_r_server_ip(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "server.hostname", STRING, 15,
"VRT_r_server_hostname(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "server.identity", STRING, 15,
"VRT_r_server_identity(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "server.port", INT, 11,
"VRT_r_server_port(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "req.request", STRING, 11,
"VRT_r_req_request(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"VRT_l_req_request(sp, ",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
0,
},
{ "req.url", STRING, 7,
"VRT_r_req_url(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"VRT_l_req_url(sp, ",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
0,
},
{ "req.proto", STRING, 9,
"VRT_r_req_proto(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"VRT_l_req_proto(sp, ",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
0,
},
{ "req.http.", HEADER, 9,
"VRT_r_req_http_(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"VRT_l_req_http_(sp, ",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"HDR_REQ",
},
{ "req.backend", BACKEND, 11,
"VRT_r_req_backend(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"VRT_l_req_backend(sp, ",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
0,
},
{ "req.restarts", INT, 12,
"VRT_r_req_restarts(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "req.grace", DURATION, 9,
"VRT_r_req_grace(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
"VRT_l_req_grace(sp, ",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
0,
},
{ "req.xid", STRING, 7,
"VRT_r_req_xid(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "req.esi", BOOL, 7,
"VRT_r_req_esi(sp)",
VCL_MET_RECV | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR,
"VRT_l_req_esi(sp, ",
VCL_MET_RECV | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR,
0,
},
{ "req.backend.healthy", BOOL, 19,
"VRT_r_req_backend_healthy(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "bereq.request", STRING, 13,
"VRT_r_bereq_request(sp)",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
"VRT_l_bereq_request(sp, ",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
0,
},
{ "bereq.url", STRING, 9,
"VRT_r_bereq_url(sp)",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
"VRT_l_bereq_url(sp, ",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
0,
},
{ "bereq.proto", STRING, 11,
"VRT_r_bereq_proto(sp)",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
"VRT_l_bereq_proto(sp, ",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
0,
},
{ "bereq.http.", HEADER, 11,
"VRT_r_bereq_http_(sp)",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
"VRT_l_bereq_http_(sp, ",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
"HDR_BEREQ",
},
{ "bereq.connect_timeout", DURATION, 21,
"VRT_r_bereq_connect_timeout(sp)",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS,
"VRT_l_bereq_connect_timeout(sp, ",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS,
0,
},
{ "bereq.first_byte_timeout", DURATION, 24,
"VRT_r_bereq_first_byte_timeout(sp)",
VCL_MET_PASS | VCL_MET_MISS,
"VRT_l_bereq_first_byte_timeout(sp, ",
VCL_MET_PASS | VCL_MET_MISS,
0,
},
{ "bereq.between_bytes_timeout", DURATION, 27,
"VRT_r_bereq_between_bytes_timeout(sp)",
VCL_MET_PASS | VCL_MET_MISS,
"VRT_l_bereq_between_bytes_timeout(sp, ",
VCL_MET_PASS | VCL_MET_MISS,
0,
},
{ "beresp.proto", STRING, 12,
"VRT_r_beresp_proto(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_proto(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.saintmode", DURATION, 16,
NULL, /* No reads allowed */
0,
"VRT_l_beresp_saintmode(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.status", INT, 13,
"VRT_r_beresp_status(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_status(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.response", STRING, 15,
"VRT_r_beresp_response(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_response(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.http.", HEADER, 12,
"VRT_r_beresp_http_(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_http_(sp, ",
VCL_MET_FETCH,
"HDR_BERESP",
},
{ "beresp.cacheable", BOOL, 16,
"VRT_r_beresp_cacheable(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_cacheable(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.ttl", DURATION, 10,
"VRT_r_beresp_ttl(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_ttl(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.grace", DURATION, 12,
"VRT_r_beresp_grace(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_grace(sp, ",
VCL_MET_FETCH,
0,
},
{ "obj.proto", STRING, 9,
"VRT_r_obj_proto(sp)",
VCL_MET_HIT | VCL_MET_ERROR,
"VRT_l_obj_proto(sp, ",
VCL_MET_HIT | VCL_MET_ERROR,
0,
},
{ "obj.status", INT, 10,
"VRT_r_obj_status(sp)",
VCL_MET_ERROR,
"VRT_l_obj_status(sp, ",
VCL_MET_ERROR,
0,
},
{ "obj.response", STRING, 12,
"VRT_r_obj_response(sp)",
VCL_MET_ERROR,
"VRT_l_obj_response(sp, ",
VCL_MET_ERROR,
0,
},
{ "obj.hits", INT, 8,
"VRT_r_obj_hits(sp)",
VCL_MET_HIT | VCL_MET_DELIVER,
NULL, /* No writes allowed */
0,
0,
},
{ "obj.http.", HEADER, 9,
"VRT_r_obj_http_(sp)",
VCL_MET_HIT | VCL_MET_ERROR,
"VRT_l_obj_http_(sp, ",
VCL_MET_ERROR,
"HDR_OBJ",
},
{ "obj.cacheable", BOOL, 13,
"VRT_r_obj_cacheable(sp)",
VCL_MET_HIT,
"VRT_l_obj_cacheable(sp, ",
VCL_MET_HIT,
0,
},
{ "obj.ttl", DURATION, 7,
"VRT_r_obj_ttl(sp)",
VCL_MET_HIT | VCL_MET_ERROR,
"VRT_l_obj_ttl(sp, ",
VCL_MET_HIT | VCL_MET_ERROR,
0,
},
{ "obj.grace", DURATION, 9,
"VRT_r_obj_grace(sp)",
VCL_MET_HIT | VCL_MET_ERROR,
"VRT_l_obj_grace(sp, ",
VCL_MET_HIT | VCL_MET_ERROR,
0,
},
{ "obj.lastuse", DURATION, 11,
"VRT_r_obj_lastuse(sp)",
VCL_MET_HIT | VCL_MET_DELIVER | VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ "resp.proto", STRING, 10,
"VRT_r_resp_proto(sp)",
VCL_MET_DELIVER,
"VRT_l_resp_proto(sp, ",
VCL_MET_DELIVER,
0,
},
{ "resp.status", INT, 11,
"VRT_r_resp_status(sp)",
VCL_MET_DELIVER,
"VRT_l_resp_status(sp, ",
VCL_MET_DELIVER,
0,
},
{ "resp.response", STRING, 13,
"VRT_r_resp_response(sp)",
VCL_MET_DELIVER,
"VRT_l_resp_response(sp, ",
VCL_MET_DELIVER,
0,
},
{ "resp.http.", HEADER, 10,
"VRT_r_resp_http_(sp)",
VCL_MET_DELIVER,
"VRT_l_resp_http_(sp, ",
VCL_MET_DELIVER,
"HDR_RESP",
},
{ "now", TIME, 3,
"VRT_r_now(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
| VCL_MET_ERROR,
NULL, /* No writes allowed */
0,
0,
},
{ NULL }
};
/*
* $Id$
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
#define CNUM 128
#define CSRC 129
#define CSTR 130
#define EOI 131
#define ID 132
#define T_CAND 133
#define T_COR 134
#define T_DEC 135
#define T_DECR 136
#define T_DIV 137
#define T_ELSE 138
#define T_ELSEIF 139
#define T_ELSIF 140
#define T_EQ 141
#define T_GEQ 142
#define T_IF 143
#define T_INC 144
#define T_INCLUDE 145
#define T_INCR 146
#define T_LEQ 147
#define T_MUL 148
#define T_NEQ 149
#define T_NOMATCH 150
#define T_SHL 151
#define T_SHR 152
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