Mailing List Archive

r3340 - in trunk/varnish-cache: include lib/libvcl
Author: phk
Date: 2008-10-20 22:06:17 +0200 (Mon, 20 Oct 2008)
New Revision: 3340

Modified:
trunk/varnish-cache/include/vcl.h
trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
Log:
Regenerate, and take the huge-diff hit for the last time.



Modified: trunk/varnish-cache/include/vcl.h
===================================================================
--- trunk/varnish-cache/include/vcl.h 2008-10-20 20:05:25 UTC (rev 3339)
+++ trunk/varnish-cache/include/vcl.h 2008-10-20 20:06:17 UTC (rev 3340)
@@ -14,15 +14,15 @@
typedef int vcl_func_f(struct sess *sp);

struct VCL_conf {
- unsigned magic;
-#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
+ 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;
+ struct director **director;
+ unsigned ndirector;
+ struct vrt_ref *ref;
+ unsigned nref;
+ unsigned busy;
+ unsigned discard;

unsigned nsrc;
const char **srcname;
@@ -30,8 +30,8 @@

unsigned nhashcount;

- vcl_init_f *init_func;
- vcl_fini_f *fini_func;
+ vcl_init_f *init_func;
+ vcl_fini_f *fini_func;

vcl_func_f *recv_func;
vcl_func_f *pipe_func;

Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2008-10-20 20:05:25 UTC (rev 3339)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2008-10-20 20:06:17 UTC (rev 3340)
@@ -167,182 +167,199 @@

/* ../../include/vcl.h */

- vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 3324 2008-10-18 20");
- vsb_cat(sb, ":50:10Z phk $\n *\n * NB: This file is machine genera");
+ vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 3339 2008-10-20 20");
+ vsb_cat(sb, ":05:25Z phk $\n *\n * NB: This file is machine genera");
vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit vcc_gen_fixed_token.tcl");
- vsb_cat(sb, " instead\n */\n\nstruct sess;\nstruct cli;\n\ntypedef ");
- vsb_cat(sb, "void vcl_init_f(struct cli *);\ntypedef void vcl_fini_");
- vsb_cat(sb, "f(struct cli *);\ntypedef int vcl_func_f(struct sess *");
- vsb_cat(sb, "sp);\n\nstruct VCL_conf {\n\tunsigned magic;\n#");
- vsb_cat(sb, "define VCL_CONF_MAGIC 0x7406c509 /* from /dev/ra");
- vsb_cat(sb, "ndom */\n\n struct director **director;\n ");
- vsb_cat(sb, " unsigned ndirector;\n struct vrt_ref ");
- vsb_cat(sb, " *ref;\n unsigned nref;\n unsigne");
- vsb_cat(sb, "d busy;\n unsigned discard;\n\n\t");
- vsb_cat(sb, "unsigned\tnsrc;\n\tconst char\t**srcname;\n\tconst cha");
- vsb_cat(sb, "r\t**srcbody;\n\n\tunsigned\tnhashcount;\n\n vc");
- vsb_cat(sb, "l_init_f *init_func;\n vcl_fini_f *fi");
- vsb_cat(sb, "ni_func;\n\n\tvcl_func_f\t*recv_func;\n\tvcl_func_f\t*");
- vsb_cat(sb, "pipe_func;\n\tvcl_func_f\t*pass_func;\n\tvcl_func_f\t*");
- vsb_cat(sb, "hash_func;\n\tvcl_func_f\t*miss_func;\n\tvcl_func_f\t*");
- vsb_cat(sb, "hit_func;\n\tvcl_func_f\t*fetch_func;\n\tvcl_func_f\t*");
- vsb_cat(sb, "deliver_func;\n\tvcl_func_f\t*prefetch_func;\n\tvcl_fu");
- vsb_cat(sb, "nc_f\t*timeout_func;\n\tvcl_func_f\t*discard_func;\n\t");
- vsb_cat(sb, "vcl_func_f\t*error_func;\n};\n");
+ vsb_cat(sb, " instead\n */\n\nstruct sess;\n");
+ vsb_cat(sb, "struct cli;\n\ntypedef void vcl_init_f(struct cli *);\n");
+ vsb_cat(sb, "typedef void vcl_fini_f(struct cli *);\n");
+ vsb_cat(sb, "typedef int vcl_func_f(struct sess *sp);\n");
+ vsb_cat(sb, "\nstruct VCL_conf {\n\tunsigned\tmagic;\n");
+ vsb_cat(sb, "#define VCL_CONF_MAGIC\t0x7406c509\t/* from /dev/rando");
+ vsb_cat(sb, "m */\n\n\tstruct director\t**director;\n");
+ vsb_cat(sb, "\tunsigned\tndirector;\n\tstruct vrt_ref\t*ref;\n");
+ vsb_cat(sb, "\tunsigned\tnref;\n\tunsigned\tbusy;\n");
+ vsb_cat(sb, "\tunsigned\tdiscard;\n\n\tunsigned\tnsrc;\n");
+ vsb_cat(sb, "\tconst char\t**srcname;\n\tconst char\t**srcbody;\n");
+ vsb_cat(sb, "\n\tunsigned\tnhashcount;\n\n\tvcl_init_f\t*init_func;");
+ vsb_cat(sb, "\n\tvcl_fini_f\t*fini_func;\n\n");
+ vsb_cat(sb, "\tvcl_func_f\t*recv_func;\n\tvcl_func_f\t*pipe_func;\n");
+ vsb_cat(sb, "\tvcl_func_f\t*pass_func;\n\tvcl_func_f\t*hash_func;\n");
+ vsb_cat(sb, "\tvcl_func_f\t*miss_func;\n\tvcl_func_f\t*hit_func;\n");
+ vsb_cat(sb, "\tvcl_func_f\t*fetch_func;\n\tvcl_func_f\t*deliver_fun");
+ vsb_cat(sb, "c;\n\tvcl_func_f\t*prefetch_func;\n");
+ vsb_cat(sb, "\tvcl_func_f\t*timeout_func;\n\tvcl_func_f\t*discard_f");
+ vsb_cat(sb, "unc;\n\tvcl_func_f\t*error_func;\n");
+ vsb_cat(sb, "};\n");

/* ../../include/vrt.h */

- vsb_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n * Copyrig");
- vsb_cat(sb, "ht (c) 2006-2008 Linpro AS\n * All rights reserved.\n ");
- vsb_cat(sb, "*\n * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>\n");
- vsb_cat(sb, " *\n * Redistribution and use in source and binary for");
- vsb_cat(sb, "ms, with or without\n * modification, are permitted pr");
- vsb_cat(sb, "ovided that the following conditions\n * are met:\n * ");
- vsb_cat(sb, "1. Redistributions of source code must retain the abov");
- vsb_cat(sb, "e copyright\n * notice, this list of conditions and");
- vsb_cat(sb, " the following disclaimer.\n * 2. Redistributions in b");
- vsb_cat(sb, "inary form must reproduce the above copyright\n * n");
- vsb_cat(sb, "otice, this list of conditions and the following discl");
- vsb_cat(sb, "aimer in the\n * documentation and/or other materia");
- vsb_cat(sb, "ls provided with the distribution.\n *\n * THIS SOFTWA");
- vsb_cat(sb, "RE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'");
- vsb_cat(sb, "' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING");
- vsb_cat(sb, ", BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF ME");
- vsb_cat(sb, "RCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n *");
- vsb_cat(sb, " ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBU");
- vsb_cat(sb, "TORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTA");
- vsb_cat(sb, "L, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (I");
- vsb_cat(sb, "NCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUT");
- vsb_cat(sb, "E GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS");
- vsb_cat(sb, "; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ");
- vsb_cat(sb, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n");
+ vsb_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n");
+ vsb_cat(sb, " * Copyright (c) 2006-2008 Linpro AS\n");
+ vsb_cat(sb, " * All rights reserved.\n *\n * Author: Poul-Henning K");
+ vsb_cat(sb, "amp <phk at phk.freebsd.dk>\n *\n * Redistribution and us");
+ vsb_cat(sb, "e in source and binary forms, with or without\n");
+ vsb_cat(sb, " * modification, are permitted provided that the follo");
+ vsb_cat(sb, "wing conditions\n * are met:\n * 1. Redistributions of");
+ vsb_cat(sb, " source code must retain the above copyright\n");
+ vsb_cat(sb, " * notice, this list of conditions and the followin");
+ vsb_cat(sb, "g disclaimer.\n * 2. Redistributions in binary form mu");
+ vsb_cat(sb, "st reproduce the above copyright\n");
+ vsb_cat(sb, " * notice, this list of conditions and the followin");
+ vsb_cat(sb, "g disclaimer in the\n * documentation and/or other ");
+ vsb_cat(sb, "materials provided with the distribution.\n");
+ vsb_cat(sb, " *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CON");
+ vsb_cat(sb, "TRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WAR");
+ vsb_cat(sb, "RANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n");
+ vsb_cat(sb, " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS F");
+ vsb_cat(sb, "OR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVE");
+ vsb_cat(sb, "NT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n");
+ vsb_cat(sb, " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEM");
+ vsb_cat(sb, "PLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NO");
+ vsb_cat(sb, "T LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n");
+ vsb_cat(sb, " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSI");
+ vsb_cat(sb, "NESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEOR");
+ vsb_cat(sb, "Y OF LIABILITY, WHETHER IN CONTRACT, STRICT\n");
vsb_cat(sb, " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWI");
vsb_cat(sb, "SE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFT");
- vsb_cat(sb, "WARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH D");
- vsb_cat(sb, "AMAGE.\n *\n * $Id: vrt.h 3324 2008-10-18 20:50:10Z ph");
- vsb_cat(sb, "k $\n *\n * Runtime support for compiled VCL programs.");
- vsb_cat(sb, "\n *\n * XXX: When this file is changed, lib/libvcl/vc");
- vsb_cat(sb, "c_gen_fixed_token.tcl\n * XXX: *MUST* be rerun.\n */\n");
- vsb_cat(sb, "\nstruct sess;\nstruct vsb;\nstruct cli;\nstruct direc");
- vsb_cat(sb, "tor;\nstruct VCL_conf;\nstruct sockaddr;\n\n/*\n * A b");
- vsb_cat(sb, "ackend probe specification\n */\n\nextern void *vrt_ma");
- vsb_cat(sb, "gic_string_end;\n\nstruct vrt_backend_probe {\n\tconst");
- vsb_cat(sb, " char\t*url;\n\tconst char\t*request;\n\tdouble\t\ttim");
- vsb_cat(sb, "eout;\n\tdouble\t\tinterval;\n\tunsigned\twindow;\n\tu");
- vsb_cat(sb, "nsigned\tthreshold;\n};\n\n/*\n * A backend is a host+");
- vsb_cat(sb, "port somewhere on the network\n */\nstruct vrt_backend");
- vsb_cat(sb, " {\n\tconst char\t\t\t*vcl_name;\n\tconst char\t\t\t*i");
- vsb_cat(sb, "dent;\n\n\tconst char\t\t\t*hosthdr;\n\n\tconst unsign");
- vsb_cat(sb, "ed char\t\t*ipv4_sockaddr;\n\tconst unsigned char\t\t*");
- vsb_cat(sb, "ipv6_sockaddr;\n\n\tdouble\t\t\t\tconnect_timeout;\n\t");
- vsb_cat(sb, "unsigned\t\t\tmax_connections;\n\tstruct vrt_backend_p");
- vsb_cat(sb, "robe\tprobe;\n};\n\n/*\n * A director with a predictab");
- vsb_cat(sb, "le reply\n */\n\nstruct vrt_dir_simple {\n\tconst char");
- vsb_cat(sb, "\t\t\t\t*name;\n\tconst struct vrt_backend\t\t*host;\n");
- vsb_cat(sb, "};\n\n/*\n * A director with an unpredictable reply\n ");
- vsb_cat(sb, "*/\n\nstruct vrt_dir_random_entry {\n\tconst struct vr");
- vsb_cat(sb, "t_backend\t\t*host;\n\tdouble\t\t\t\t\tweight;\n};\n\n");
- vsb_cat(sb, "struct vrt_dir_random {\n\tconst char\t\t\t\t*name;\n\t");
- vsb_cat(sb, "unsigned\t\t\t\tretries;\n\tunsigned\t\t\t\tnmember;\n");
- vsb_cat(sb, "\tconst struct vrt_dir_random_entry\t*members;\n};\n\n");
- vsb_cat(sb, "/*\n * A director with round robin selection\n */\n\ns");
- vsb_cat(sb, "truct vrt_dir_round_robin_entry {\n\tconst struct vrt_");
- vsb_cat(sb, "backend\t\t*host;\n};\n\nstruct vrt_dir_round_robin {\n");
+ vsb_cat(sb, "WARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n");
+ vsb_cat(sb, " * SUCH DAMAGE.\n *\n * $Id: vrt.h 3324 2008-10-18 20:");
+ vsb_cat(sb, "50:10Z phk $\n *\n * Runtime support for compiled VCL ");
+ vsb_cat(sb, "programs.\n *\n * XXX: When this file is changed, lib/");
+ vsb_cat(sb, "libvcl/vcc_gen_fixed_token.tcl\n");
+ vsb_cat(sb, " * XXX: *MUST* be rerun.\n */\n");
+ vsb_cat(sb, "\nstruct sess;\nstruct vsb;\nstruct cli;\n");
+ vsb_cat(sb, "struct director;\nstruct VCL_conf;\n");
+ vsb_cat(sb, "struct sockaddr;\n\n/*\n * A backend probe specificati");
+ vsb_cat(sb, "on\n */\n\nextern void *vrt_magic_string_end;\n");
+ vsb_cat(sb, "\nstruct vrt_backend_probe {\n\tconst char\t*url;\n");
+ vsb_cat(sb, "\tconst char\t*request;\n\tdouble\t\ttimeout;\n");
+ vsb_cat(sb, "\tdouble\t\tinterval;\n\tunsigned\twindow;\n");
+ vsb_cat(sb, "\tunsigned\tthreshold;\n};\n\n/*\n");
+ vsb_cat(sb, " * A backend is a host+port somewhere on the network\n");
+ vsb_cat(sb, " */\nstruct vrt_backend {\n\tconst char\t\t\t*vcl_name");
+ vsb_cat(sb, ";\n\tconst char\t\t\t*ident;\n\n");
+ vsb_cat(sb, "\tconst char\t\t\t*hosthdr;\n\n");
+ vsb_cat(sb, "\tconst unsigned char\t\t*ipv4_sockaddr;\n");
+ vsb_cat(sb, "\tconst unsigned char\t\t*ipv6_sockaddr;\n");
+ vsb_cat(sb, "\n\tdouble\t\t\t\tconnect_timeout;\n");
+ vsb_cat(sb, "\tunsigned\t\t\tmax_connections;\n");
+ vsb_cat(sb, "\tstruct vrt_backend_probe\tprobe;\n");
+ vsb_cat(sb, "};\n\n/*\n * A director with a predictable reply\n");
+ vsb_cat(sb, " */\n\nstruct vrt_dir_simple {\n");
+ vsb_cat(sb, "\tconst char\t\t\t\t*name;\n\tconst struct vrt_backend");
+ vsb_cat(sb, "\t\t*host;\n};\n\n/*\n * A director with an unpredicta");
+ vsb_cat(sb, "ble reply\n */\n\nstruct vrt_dir_random_entry {\n");
+ vsb_cat(sb, "\tconst struct vrt_backend\t\t*host;\n");
+ vsb_cat(sb, "\tdouble\t\t\t\t\tweight;\n};\n");
+ vsb_cat(sb, "\nstruct vrt_dir_random {\n\tconst char\t\t\t\t*name;\n");
+ vsb_cat(sb, "\tunsigned\t\t\t\tretries;\n\tunsigned\t\t\t\tnmember;");
+ vsb_cat(sb, "\n\tconst struct vrt_dir_random_entry\t*members;\n");
+ vsb_cat(sb, "};\n\n/*\n * A director with round robin selection\n");
+ vsb_cat(sb, " */\n\nstruct vrt_dir_round_robin_entry {\n");
+ vsb_cat(sb, "\tconst struct vrt_backend\t\t*host;\n");
+ vsb_cat(sb, "};\n\nstruct vrt_dir_round_robin {\n");
vsb_cat(sb, "\tconst char\t\t\t\t*name;\n\tunsigned\t\t\t\tnmember;");
vsb_cat(sb, "\n\tconst struct vrt_dir_round_robin_entry\t*members;\n");
vsb_cat(sb, "};\n\n\n/*\n * other stuff.\n * XXX: document when bor");
- vsb_cat(sb, "ed\n */\n\nstruct vrt_ref {\n\tunsigned\tsource;\n\tun");
- vsb_cat(sb, "signed\toffset;\n\tunsigned\tline;\n\tunsigned\tpos;\n");
- vsb_cat(sb, "\tunsigned\tcount;\n\tconst char\t*token;\n};\n\n/* AC");
- vsb_cat(sb, "L related */\n#define VRT_ACL_MAXADDR\t\t16\t/* max(IP");
- vsb_cat(sb, "v4, IPv6) */\n\nvoid VRT_acl_log(const struct sess *, ");
- vsb_cat(sb, "const char *msg);\n\n/* Regexp related */\nvoid VRT_re");
- vsb_cat(sb, "_init(void **, const char *, int sub);\nvoid VRT_re_fi");
- vsb_cat(sb, "ni(void *);\nint VRT_re_match(const char *, void *re);");
- vsb_cat(sb, "\nint VRT_re_test(struct vsb *, const char *, int sub)");
- vsb_cat(sb, ";\nconst char *VRT_regsub(const struct sess *sp, int a");
- vsb_cat(sb, "ll, const char *,\n void *, const char *);\n\nvoid ");
- vsb_cat(sb, "VRT_panic(struct sess *sp, const char *, ...);\nvoid ");
- vsb_cat(sb, "VRT_purge(const char *, int hash);\n\nvoid VRT_count(c");
- vsb_cat(sb, "onst struct sess *, unsigned);\nint VRT_rewrite(const ");
- vsb_cat(sb, "char *, const char *);\nvoid VRT_error(struct sess *, ");
- vsb_cat(sb, "unsigned, const char *);\nint VRT_switch_config(const ");
- vsb_cat(sb, "char *);\n\nenum gethdr_e { HDR_REQ, HDR_RESP, HDR_OBJ");
- vsb_cat(sb, ", HDR_BEREQ };\nchar *VRT_GetHdr(const struct sess *, ");
- vsb_cat(sb, "enum gethdr_e where, const char *);\nvoid VRT_SetHdr(c");
- vsb_cat(sb, "onst struct sess *, enum gethdr_e where, const char *,");
- vsb_cat(sb, "\n const char *, ...);\nvoid VRT_handling(struct se");
- vsb_cat(sb, "ss *sp, unsigned hand);\n\n/* Simple stuff */\nint VRT");
- vsb_cat(sb, "_strcmp(const char *s1, const char *s2);\nvoid VRT_mem");
- vsb_cat(sb, "move(void *dst, const void *src, unsigned len);\n\nvoi");
- vsb_cat(sb, "d VRT_ESI(struct sess *sp);\nvoid VRT_Rollback(struct ");
- vsb_cat(sb, "sess *sp);\n\n/* Synthetic pages */\nvoid VRT_synth_pa");
- vsb_cat(sb, "ge(struct sess *sp, unsigned flags, const char *, ...)");
- vsb_cat(sb, ";\n\n/* Backend related */\nvoid VRT_init_dir_simple(s");
- vsb_cat(sb, "truct cli *, struct director **,\n const struct vrt");
- vsb_cat(sb, "_dir_simple *);\nvoid VRT_init_dir_random(struct cli *");
- vsb_cat(sb, ", struct director **,\n const struct vrt_dir_random");
- vsb_cat(sb, " *);\nvoid VRT_init_dir_round_robin(struct cli *, stru");
- vsb_cat(sb, "ct director **,\n const struct vrt_dir_round_robin ");
- vsb_cat(sb, "*);\nvoid VRT_fini_dir(struct cli *, struct director *");
- vsb_cat(sb, ");\n\nchar *VRT_IP_string(const struct sess *sp, const");
- vsb_cat(sb, " struct sockaddr *sa);\nchar *VRT_int_string(const str");
- vsb_cat(sb, "uct sess *sp, int);\nchar *VRT_double_string(const str");
- vsb_cat(sb, "uct sess *sp, double);\nconst char *VRT_backend_string");
- vsb_cat(sb, "(struct sess *sp);\n\n#define VRT_done(sp, hand)\t\t\t");
- vsb_cat(sb, "\\\n\tdo {\t\t\t\t\t\\\n\t\tVRT_handling(sp, hand);\t\t");
- vsb_cat(sb, "\\\n\t\treturn (1);\t\t\t\\\n\t} while (0)\n");
+ vsb_cat(sb, "ed\n */\n\nstruct vrt_ref {\n\tunsigned\tsource;\n");
+ vsb_cat(sb, "\tunsigned\toffset;\n\tunsigned\tline;\n");
+ vsb_cat(sb, "\tunsigned\tpos;\n\tunsigned\tcount;\n");
+ vsb_cat(sb, "\tconst char\t*token;\n};\n\n/* ACL related */\n");
+ vsb_cat(sb, "#define VRT_ACL_MAXADDR\t\t16\t/* max(IPv4, IPv6) */\n");
+ vsb_cat(sb, "\nvoid VRT_acl_log(const struct sess *, const char *ms");
+ vsb_cat(sb, "g);\n\n/* Regexp related */\nvoid VRT_re_init(void **,");
+ vsb_cat(sb, " const char *, int sub);\nvoid VRT_re_fini(void *);\n");
+ vsb_cat(sb, "int VRT_re_match(const char *, void *re);\n");
+ vsb_cat(sb, "int VRT_re_test(struct vsb *, const char *, int sub);\n");
+ vsb_cat(sb, "const char *VRT_regsub(const struct sess *sp, int all,");
+ vsb_cat(sb, " const char *,\n void *, const char *);\n");
+ vsb_cat(sb, "\nvoid VRT_panic(struct sess *sp, const char *, ...);");
+ vsb_cat(sb, "\nvoid VRT_purge(const char *, int hash);\n");
+ vsb_cat(sb, "\nvoid VRT_count(const struct sess *, unsigned);\n");
+ vsb_cat(sb, "int VRT_rewrite(const char *, const char *);\n");
+ vsb_cat(sb, "void VRT_error(struct sess *, unsigned, const char *);");
+ vsb_cat(sb, "\nint VRT_switch_config(const char *);\n");
+ vsb_cat(sb, "\nenum gethdr_e { HDR_REQ, HDR_RESP, HDR_OBJ, HDR_BERE");
+ vsb_cat(sb, "Q };\nchar *VRT_GetHdr(const struct sess *, enum gethd");
+ vsb_cat(sb, "r_e where, const char *);\nvoid VRT_SetHdr(const struc");
+ vsb_cat(sb, "t sess *, enum gethdr_e where, const char *,\n");
+ vsb_cat(sb, " const char *, ...);\nvoid VRT_handling(struct sess");
+ vsb_cat(sb, " *sp, unsigned hand);\n\n/* Simple stuff */\n");
+ vsb_cat(sb, "int VRT_strcmp(const char *s1, const char *s2);\n");
+ vsb_cat(sb, "void VRT_memmove(void *dst, const void *src, unsigned ");
+ vsb_cat(sb, "len);\n\nvoid VRT_ESI(struct sess *sp);\n");
+ vsb_cat(sb, "void VRT_Rollback(struct sess *sp);\n");
+ vsb_cat(sb, "\n/* Synthetic pages */\nvoid VRT_synth_page(struct se");
+ vsb_cat(sb, "ss *sp, unsigned flags, const char *, ...);\n");
+ vsb_cat(sb, "\n/* Backend related */\nvoid VRT_init_dir_simple(stru");
+ vsb_cat(sb, "ct cli *, struct director **,\n");
+ vsb_cat(sb, " const struct vrt_dir_simple *);\n");
+ vsb_cat(sb, "void VRT_init_dir_random(struct cli *, struct director");
+ vsb_cat(sb, " **,\n const struct vrt_dir_random *);\n");
+ vsb_cat(sb, "void VRT_init_dir_round_robin(struct cli *, struct dir");
+ vsb_cat(sb, "ector **,\n const struct vrt_dir_round_robin *);\n");
+ vsb_cat(sb, "void VRT_fini_dir(struct cli *, struct director *);\n");
+ vsb_cat(sb, "\nchar *VRT_IP_string(const struct sess *sp, const str");
+ vsb_cat(sb, "uct sockaddr *sa);\nchar *VRT_int_string(const struct ");
+ vsb_cat(sb, "sess *sp, int);\nchar *VRT_double_string(const struct ");
+ vsb_cat(sb, "sess *sp, double);\nconst char *VRT_backend_string(str");
+ vsb_cat(sb, "uct sess *sp);\n\n#define VRT_done(sp, hand)\t\t\t\\\n");
+ vsb_cat(sb, "\tdo {\t\t\t\t\t\\\n\t\tVRT_handling(sp, hand);\t\t\\\n");
+ vsb_cat(sb, "\t\treturn (1);\t\t\t\\\n\t} while (0)\n");

/* ../../include/vrt_obj.h */

vsb_cat(sb, "/*\n * $Id: vcc_gen_obj.tcl 3324 2008-10-18 20:50:10Z ");
vsb_cat(sb, "phk $\n *\n * NB: This file is machine generated, DO ");
- vsb_cat(sb, "NOT EDIT!\n *\n * Edit vcc_gen_obj.tcl instead\n */\n\n");
- vsb_cat(sb, "struct sockaddr * VRT_r_client_ip(const struct sess *)");
- vsb_cat(sb, ";\nstruct sockaddr * VRT_r_server_ip(struct sess *);\n");
- vsb_cat(sb, "int VRT_r_server_port(struct sess *);\nconst char * VR");
- vsb_cat(sb, "T_r_req_request(const struct sess *);\nvoid VRT_l_req_");
- vsb_cat(sb, "request(const struct sess *, const char *, ...);\ncons");
- vsb_cat(sb, "t char * VRT_r_req_url(const struct sess *);\nvoid VRT");
- vsb_cat(sb, "_l_req_url(const struct sess *, const char *, ...);\nc");
- vsb_cat(sb, "onst char * VRT_r_req_proto(const struct sess *);\nvoi");
- vsb_cat(sb, "d VRT_l_req_proto(const struct sess *, const char *, .");
- vsb_cat(sb, "..);\nvoid VRT_l_req_hash(struct sess *, const char *)");
- vsb_cat(sb, ";\nstruct director * VRT_r_req_backend(struct sess *);");
- vsb_cat(sb, "\nvoid VRT_l_req_backend(struct sess *, struct directo");
- vsb_cat(sb, "r *);\nint VRT_r_req_restarts(const struct sess *);\nd");
- vsb_cat(sb, "ouble VRT_r_req_grace(struct sess *);\nvoid VRT_l_req_");
- vsb_cat(sb, "grace(struct sess *, double);\nconst char * VRT_r_req_");
- vsb_cat(sb, "xid(struct sess *);\nconst char * VRT_r_bereq_request(");
- vsb_cat(sb, "const struct sess *);\nvoid VRT_l_bereq_request(const ");
- vsb_cat(sb, "struct sess *, const char *, ...);\nconst char * VRT_r");
- vsb_cat(sb, "_bereq_url(const struct sess *);\nvoid VRT_l_bereq_url");
- vsb_cat(sb, "(const struct sess *, const char *, ...);\nconst char ");
- vsb_cat(sb, "* VRT_r_bereq_proto(const struct sess *);\nvoid VRT_l_");
- vsb_cat(sb, "bereq_proto(const struct sess *, const char *, ...);\n");
- vsb_cat(sb, "const char * VRT_r_obj_proto(const struct sess *);\nvo");
- vsb_cat(sb, "id VRT_l_obj_proto(const struct sess *, const char *, ");
- vsb_cat(sb, "...);\nint VRT_r_obj_status(const struct sess *);\nvoi");
- vsb_cat(sb, "d VRT_l_obj_status(const struct sess *, int);\nconst c");
- vsb_cat(sb, "har * VRT_r_obj_response(const struct sess *);\nvoid V");
- vsb_cat(sb, "RT_l_obj_response(const struct sess *, const char *, .");
- vsb_cat(sb, "..);\nint VRT_r_obj_hits(const struct sess *);\nunsign");
- vsb_cat(sb, "ed VRT_r_obj_cacheable(const struct sess *);\nvoid VRT");
- vsb_cat(sb, "_l_obj_cacheable(const struct sess *, unsigned);\ndoub");
- vsb_cat(sb, "le VRT_r_obj_ttl(const struct sess *);\nvoid VRT_l_obj");
- vsb_cat(sb, "_ttl(const struct sess *, double);\ndouble VRT_r_obj_g");
- vsb_cat(sb, "race(const struct sess *);\nvoid VRT_l_obj_grace(const");
- vsb_cat(sb, " struct sess *, double);\ndouble VRT_r_obj_prefetch(co");
- vsb_cat(sb, "nst struct sess *);\nvoid VRT_l_obj_prefetch(const str");
- vsb_cat(sb, "uct sess *, double);\ndouble VRT_r_obj_lastuse(const s");
- vsb_cat(sb, "truct sess *);\nconst char * VRT_r_obj_hash(const stru");
- vsb_cat(sb, "ct sess *);\nconst char * VRT_r_resp_proto(const struc");
- vsb_cat(sb, "t sess *);\nvoid VRT_l_resp_proto(const struct sess *,");
- vsb_cat(sb, " const char *, ...);\nint VRT_r_resp_status(const stru");
- vsb_cat(sb, "ct sess *);\nvoid VRT_l_resp_status(const struct sess ");
- vsb_cat(sb, "*, int);\nconst char * VRT_r_resp_response(const struc");
- vsb_cat(sb, "t sess *);\nvoid VRT_l_resp_response(const struct sess");
- vsb_cat(sb, " *, const char *, ...);\ndouble VRT_r_now(const struct");
- vsb_cat(sb, " sess *);\nunsigned VRT_r_req_backend_healthy(const st");
- vsb_cat(sb, "ruct sess *);\n");
+ vsb_cat(sb, "NOT EDIT!\n *\n * Edit vcc_gen_obj.tcl instead\n");
+ vsb_cat(sb, " */\n\nstruct sockaddr * VRT_r_client_ip(const struct ");
+ vsb_cat(sb, "sess *);\nstruct sockaddr * VRT_r_server_ip(struct ses");
+ vsb_cat(sb, "s *);\nint VRT_r_server_port(struct sess *);\n");
+ vsb_cat(sb, "const char * VRT_r_req_request(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_req_request(const struct sess *, const char");
+ vsb_cat(sb, " *, ...);\nconst char * VRT_r_req_url(const struct ses");
+ vsb_cat(sb, "s *);\nvoid VRT_l_req_url(const struct sess *, const c");
+ vsb_cat(sb, "har *, ...);\nconst char * VRT_r_req_proto(const struc");
+ vsb_cat(sb, "t sess *);\nvoid VRT_l_req_proto(const struct sess *, ");
+ vsb_cat(sb, "const char *, ...);\nvoid VRT_l_req_hash(struct sess *");
+ vsb_cat(sb, ", const char *);\nstruct director * VRT_r_req_backend(");
+ vsb_cat(sb, "struct sess *);\nvoid VRT_l_req_backend(struct sess *,");
+ vsb_cat(sb, " struct director *);\nint VRT_r_req_restarts(const str");
+ vsb_cat(sb, "uct sess *);\ndouble VRT_r_req_grace(struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_req_grace(struct sess *, double);\n");
+ vsb_cat(sb, "const char * VRT_r_req_xid(struct sess *);\n");
+ vsb_cat(sb, "const char * VRT_r_bereq_request(const struct sess *);");
+ vsb_cat(sb, "\nvoid VRT_l_bereq_request(const struct sess *, const ");
+ vsb_cat(sb, "char *, ...);\nconst char * VRT_r_bereq_url(const stru");
+ vsb_cat(sb, "ct sess *);\nvoid VRT_l_bereq_url(const struct sess *,");
+ vsb_cat(sb, " const char *, ...);\nconst char * VRT_r_bereq_proto(c");
+ vsb_cat(sb, "onst struct sess *);\nvoid VRT_l_bereq_proto(const str");
+ vsb_cat(sb, "uct sess *, const char *, ...);\n");
+ vsb_cat(sb, "const char * VRT_r_obj_proto(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_proto(const struct sess *, const char *");
+ vsb_cat(sb, ", ...);\nint VRT_r_obj_status(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_status(const struct sess *, int);\n");
+ vsb_cat(sb, "const char * VRT_r_obj_response(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_response(const struct sess *, const cha");
+ vsb_cat(sb, "r *, ...);\nint VRT_r_obj_hits(const struct sess *);\n");
+ vsb_cat(sb, "unsigned VRT_r_obj_cacheable(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_cacheable(const struct sess *, unsigned");
+ vsb_cat(sb, ");\ndouble VRT_r_obj_ttl(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_ttl(const struct sess *, double);\n");
+ vsb_cat(sb, "double VRT_r_obj_grace(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_grace(const struct sess *, double);\n");
+ vsb_cat(sb, "double VRT_r_obj_prefetch(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_obj_prefetch(const struct sess *, double);\n");
+ vsb_cat(sb, "double VRT_r_obj_lastuse(const struct sess *);\n");
+ vsb_cat(sb, "const char * VRT_r_obj_hash(const struct sess *);\n");
+ vsb_cat(sb, "const char * VRT_r_resp_proto(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_resp_proto(const struct sess *, const char ");
+ vsb_cat(sb, "*, ...);\nint VRT_r_resp_status(const struct sess *);\n");
+ vsb_cat(sb, "void VRT_l_resp_status(const struct sess *, int);\n");
+ vsb_cat(sb, "const char * VRT_r_resp_response(const struct sess *);");
+ vsb_cat(sb, "\nvoid VRT_l_resp_response(const struct sess *, const ");
+ vsb_cat(sb, "char *, ...);\ndouble VRT_r_now(const struct sess *);\n");
+ vsb_cat(sb, "unsigned VRT_r_req_backend_healthy(const struct sess *");
+ vsb_cat(sb, ");\n");
}