/*
 * NB:  This file is machine generated, DO NOT EDIT!
 *
 * Edit and run lib/libvcc/generate.py instead.
 */



#include "config.h"

#include "vcc_compile.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 '{':
		M1();
	case '|':
		M2('|', T_COR);
		M1();
	case '}':
		M1();
	case '~':
		M1();
	default:
		return (0);
	}
}

const char * const vcl_tnames[256] = {
	['!'] = "'!'",
	['%'] = "'%'",
	['&'] = "'&'",
	['('] = "'('",
	[')'] = "')'",
	['*'] = "'*'",
	['+'] = "'+'",
	[','] = "','",
	['-'] = "'-'",
	['.'] = "'.'",
	['/'] = "'/'",
	[';'] = "';'",
	['<'] = "'<'",
	['='] = "'='",
	['>'] = "'>'",
	['{'] = "'{'",
	['|'] = "'|'",
	['}'] = "'}'",
	['~'] = "'~'",
	[CBLOB] = "CBLOB",
	[CNUM] = "CNUM",
	[CSRC] = "CSRC",
	[CSTR] = "CSTR",
	[EOI] = "EOI",
	[FNUM] = "FNUM",
	[ID] = "ID",
	[T_CAND] = "&&",
	[T_COR] = "||",
	[T_DEC] = "--",
	[T_DECR] = "-=",
	[T_DIV] = "/=",
	[T_EQ] = "==",
	[T_GEQ] = ">=",
	[T_INC] = "++",
	[T_INCR] = "+=",
	[T_LEQ] = "<=",
	[T_MUL] = "*=",
	[T_NEQ] = "!=",
	[T_NOMATCH] = "!~",
	[T_SHL] = "<<",
	[T_SHR] = ">>",
};

void
vcl_output_lang_h(struct vsb *sb)
{

	/* ../include/vdef.h */

	VSB_cat(sb, "/* ---===### include/vdef.h ###===--- */\n\n");
	VSB_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n"
	    " * Copyright (c) 2012 Fastly Inc\n * Copyright (c) 2006-2015 "
	    "Varnish Software AS\n * All rights reserved.\n *\n"
	    " * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>\n"
	    " * Author: Rogier 'DocWilco' Mulhuijzen <rogier@fastly.com>\n"
	    " *\n * Inspired by FreeBSD's <sys/cdefs.h>\n *\n * SPDX-License-"
	    "Identifier: BSD-2-Clause\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 following 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 CONTRIB"
	    "UTORS 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 * Names of the form \"v_[a-z_]*_\" is "
	    "reserved for this file.\n *\n * This file should always be "
	    "the first non <...> include in a .c file.\n */\n\n"
	    "#include <stddef.h>\n#include <stdint.h>\n\n#ifdef VDEF_H_INCLUD"
	    "ED\n#  error \"vdef.h included multiple times\"\n"
	    "#endif\n#define VDEF_H_INCLUDED\n\n/* Safe printf into a fixed-s"
	    "ize buffer */\n#define bprintf(buf, fmt, ...)\t\t\t\t\t\t\\\n"
	    "\tdo {\t\t\t\t\t\t\t\t\\\n\t\tint ibprintf;\t\t\t\t\t\t\\\n"
	    "\t\tibprintf = snprintf(buf, sizeof buf, fmt, __VA_ARGS__);\t"
	    "\\\n\t\tassert(ibprintf >= 0 && ibprintf < (int)sizeof buf);\t"
	    "\\\n\t} while (0)\n\n/* Safe printf into a fixed-size buffer "
	    "*/\n#define vbprintf(buf, fmt, ap)\t\t\t\t\t\t\\\n"
	    "\tdo {\t\t\t\t\t\t\t\t\\\n\t\tint ivbprintf;\t\t\t\t\t\t\\\n"
	    "\t\tivbprintf = vsnprintf(buf, sizeof buf, fmt, ap);\t\\\n"
	    "\t\tassert(ivbprintf >= 0 && ivbprintf < (int)sizeof buf);\t"
	    "\\\n\t} while (0)\n\n/* Safe strcpy into a fixed-size buffer "
	    "*/\n#define bstrcpy(dst, src)\t\t\t\t\t\t\\\n\tdo {\t\t\t\t"
	    "\t\t\t\t\\\n\t\tassert(strlen(src) + 1 <= sizeof (dst));\t\t"
	    "\\\n\t\tstrcpy((dst), (src));\t\t\t\t\t\\\n\t} while (0)\n"
	    "\n// TODO #define strcpy BANNED\n// TODO then revert 0fa4baead49"
	    "f0a45f68d3db0b7743c5e4e93ad4d\n// TODO and replace with flexelin"
	    "t exception\n\n/* Close and discard filedescriptor */\n"
	    "#define closefd(fdp)\t\t\t\t\\\n\tdo {\t\t\t\t\t\\\n"
	    "\t\tassert(*(fdp) >= 0);\t\t\\\n\t\tAZ(close(*(fdp)));\t\t\\\n"
	    "\t\t*(fdp) = -1;\t\t\t\\\n\t} while (0)\n\n#if !defined(__has_fe"
	    "ature)\n#  define __has_feature(x)\t0\n#endif\n\n"
	    "#ifndef __GNUC_PREREQ__\n# if defined __GNUC__ && defined "
	    "__GNUC_MINOR__\n#  define __GNUC_PREREQ__(maj, min) \\\n"
	    "\t(__GNUC__ > (maj) || (__GNUC__ == (maj) && __GNUC_MINOR__ "
	    ">= (min)))\n# else\n#  define __GNUC_PREREQ__(maj, min) 0\n"
	    "# endif\n#endif\n\n#if __GNUC_PREREQ__(2, 95) || defined(__INTEL"
	    "_COMPILER)\n#  define v_printflike_(f,a) __attribute__((format(p"
	    "rintf, f, a)))\n#else\n#  define v_printflike_(f,a)\n"
	    "#endif\n\n#define v_noreturn_ __attribute__((__noreturn__))\n"
	    "\n#ifdef __GNUC__\n#  define v_deprecated_ __attribute__((deprec"
	    "ated))\n#else\n#  define v_deprecated_\n#endif\n\n"
	    "#if __GNUC_PREREQ__(4,4) // added 2008-07-23\n#  define v_dont_o"
	    "ptimize __attribute__((optimize(\"O\")))\n#else\n"
	    "#  define v_dont_optimize\n#endif\n\n#ifdef HAVE___GCOV_FLUSH\n"
	    "#  define v_gcov_flush() __gcov_flush()\nint __gcov_flush(void);"
	    "\n#elif defined HAVE___GCOV_DUMP\n#  define v_gcov_flush() "
	    "__gcov_dump()\nvoid __gcov_dump(void);\n#elif defined HAVE___LLV"
	    "M_GCOV_FLUSH\n#  define v_gcov_flush() __llvm_gcov_flush()\n"
	    "int __llvm_gcov_flush(void);\n#else\n#  define v_gcov_flush() "
	    "do { } while (0)\n#endif\n\n/***********************************"
	    "**********************************\n * Fundamental numerical "
	    "limits\n  * These limits track RFC8941\n * We use hex notation "
	    "because 999999999999.999 is not perfectly\n * representable "
	    "in ieee64 doubles.\n */\n\n#define VRT_INTEGER_MAX 9999999999999"
	    "99\n#define VRT_INTEGER_MIN -999999999999999\n#define VRT_DECIMA"
	    "L_MAX 0x1.d1a94a1fffff8p+39\n#define VRT_DECIMAL_MIN -0x1.d1a94a"
	    "1fffff8p+39\n\n/************************************************"
	    "*********************\n * Pointer alignment magic\n"
	    " */\n\n#if defined(__sparc__)\n/* NB: Overbroad test for 32bit "
	    "userland on 64bit SPARC cpus. */\n#  define PALGN\t    (sizeof(d"
	    "ouble) - 1)\t/* size of alignment */\n#else\n#  define PALGN\t"
	    "    (sizeof(void *) - 1)\t/* size of alignment */\n"
	    "#endif\n#define PAOK(p)\t    (((uintptr_t)(p) & PALGN) == "
	    "0)\t/* is aligned */\n#define PRNDDN(p)   ((uintptr_t)(p) "
	    "& ~PALGN)\t\t/* Round down */\n#define PRNDUP(p)   (((uintptr_t)"
	    "(p) + PALGN) & ~PALGN)\t/* Round up */\n\n/*********************"
	    "************************************************\n"
	    " * To be used as little as possible to wash off const/volatile "
	    "etc.\n */\n#define TRUST_ME(ptr)\t((void*)(uintptr_t)(ptr))\n"
	    "\n/*************************************************************"
	    "*********\n * Generic power-2 rounding macros\n */\n"
	    "\n#define PWR2(x)     ((((x)-1UL)&(x))==0)\t\t/* Is a power "
	    "of two */\n#define RDN2(x, y)  ((x)&(~((uintptr_t)(y)-1UL)))\t"
	    "/* PWR2(y) true */\n#define RUP2(x, y)  (((x)+((y)-1))&(~((uintp"
	    "tr_t)(y)-1UL))) /* PWR2(y) true */\n\n/*************************"
	    "*********************************************\n * Find the "
	    "minimum or maximum values.\n * Only evaluate the expression "
	    "once and perform type checking.\n */\n\n/* ref: https://stackove"
	    "rflow.com/a/17624752 */\n\n#define VINDIRECT(a, b, c)\ta ## "
	    "b ## c\n#define VCOMBINE(a, b, c)\tVINDIRECT(a, b, c)\n"
	    "\n#if defined(__COUNTER__)\n#\tdefine VUNIQ_NAME(base)\tVCOMBINE"
	    "(base, __LINE__, __COUNTER__)\n#else\n#\tdefine VUNIQ_NAME(base)"
	    "\tVCOMBINE(base, __LINE__, 0)\n#endif\n\n#ifdef _lint\n"
	    "#define typeof(x) __typeof__(x)\n#endif\n\n/* ref: https://gcc.g"
	    "nu.org/onlinedocs/gcc/Typeof.html */\n\n#define _vtake(op, "
	    "ta, tb, a, b, _va, _vb)\t\t\t\t\\\n\t({\t\t\t\t\t\t\t\t\\\n"
	    "\tta _va = (a);\t\t\t\t\t\t\t\\\n\ttb _vb = (b);\t\t\t\t\t\t"
	    "\t\\\n\t(void)(&_va == &_vb);\t\t\t\t\t\t\\\n\t_va op _vb "
	    "? _va : _vb;\t\t\t\t\t\t\\\n})\n\n#define opmin <\n"
	    "#define opmax >\n#define vtake(n, ta, tb, a, b)\t_vtake(op "
	    "## n, ta, tb, a, b,\t\t\\\n    VUNIQ_NAME(_v ## n ## A), VUNIQ_N"
	    "AME(_v ## n ## B))\n\n#define vmin(a, b)\t\tvtake(min, typeof(a)"
	    ", typeof(b), a, b)\n#define vmax(a, b)\t\tvtake(max, typeof(a), "
	    "typeof(b), a, b)\n\n#define vmin_t(type, a, b)\tvtake(min, "
	    "type, type, a, b)\n#define vmax_t(type, a, b)\tvtake(max, "
	    "type, type, a, b)\n\n/******************************************"
	    "****************************\n * Clamp the value between two "
	    "limits.\n */\n\n#define vlimit(a, l, u)\t\tvmax((l), vmin((a), "
	    "(u)))\n#define vlimit_t(type, a, l, u)\tvmax_t(type, (l), "
	    "vmin_t(type, (a), (u)))\n\n/************************************"
	    "**********************************\n * Number of elements "
	    "in an array\n *\n * Data on bikeshedding:\n * https://thephd.dev"
	    "/the-big-array-size-survey-for-c-results\n */\n#define vcountof("
	    "arr)\t((sizeof(arr) / sizeof((arr)[0])))\n\n/*******************"
	    "***************************************************\n"
	    " * FlexeLint and compiler shutuppery\n */\n\n/*\n"
	    " * In OO-light situations, functions have to match their prototy"
	    "pe\n * even if that means not const'ing a const'able argument.\n"
	    " * The typedef should be specified as argument to the macro.\n"
	    " */\n#define v_matchproto_(xxx)\t\t/*lint --e{818} */\n"
	    "\n/*\n * State variables may change value before we have conside"
	    "red the\n * previous value\n */\n#define v_statevariable_(varnam"
	    "e)\tvarname /*lint -esym(838,varname) */\n\n#ifdef __SUNPRO_C\n"
	    "#  define NEEDLESS(s)\t\t{}\n#else\n#  define NEEDLESS(s)\t"
	    "\ts\n#endif\n\n#if __GNUC_PREREQ__(2, 7)\n#  define v_unused_ "
	    "__attribute__((__unused__))\n#else\n#  define v_unused_\n"
	    "#endif\n\n#if __GNUC_PREREQ__(4, 3) || defined(__clang__)\n"
	    "#  define v_cold_    __attribute__((cold))\n#  define v_used_(x)"
	    " __attribute__((x, used))\n#else\n#  define v_cold_\n"
	    "#  define v_used_(x)\n#endif\n\n#if defined __has_attribute\n"
	    "#  if __has_attribute(counted_by)\n#    define v_counted_by_(fie"
	    "ld) __attribute__((counted_by(field)))\n#  endif\n"
	    "#endif\n\n#ifndef v_counted_by_\n#  define v_counted_by_(field)\n"
	    "#endif\n\n/* VTIM API overhaul WIP */\ntypedef double vtim_mono;"
	    "\ntypedef double vtim_real;\ntypedef double vtim_dur;\n"
	    "\n/*************************************************************"
	    "*********\n * txt (vas.h needed for the macros)\n"
	    " */\n\ntypedef struct {\n\tconst char\t\t*b;\n\tconst char\t"
	    "\t*e;\n} txt;\n\n#define Tcheck(t)\tdo { (void)pdiff((t).b, "
	    "(t).e); } while (0)\n#define Tlen(t)\t\t(pdiff((t).b, (t).e))\n"
	    "#define Tstr(s)\t\t(/*lint -e(446)*/ (txt){(s), (s) + strlen(s)}"
	    ")\n#define Tstreq(t, s)\t(Tlen(t) == strlen(s) && !vmemcmp((t).b"
	    ", (s), Tlen(t)))\n#define Tforeach(c, t)\tfor ((c) = (t).b; "
	    "(c) < (t).e; (c)++)\n\n/* #3020 dummy definitions until PR "
	    "is merged*/\n#define LIKELY(x)\t(x)\n#define UNLIKELY(x)\t(x)\n"
	    "\n#ifndef __DEQUALIFY\n#define __DEQUALIFY(type, var)  ((type)(u"
	    "intptr_t)(const volatile void *)(var))\n#endif\n\n"
	    "/***************************************************************"
	    "*******\n * vqueue.h presupposes the __containerof() macro "
	    "for VSTAILQ_LAST(),\n * which is in FreeBSD cdefs.h.\n"
	    " *\n * This differs from cdefs.h in that uintptr_t is taken "
	    "from stdint.h, and\n * offsetof() is taken from stddef.h.\n"
	    " */\n\n/*\n * Given the pointer x to the member m of the struct "
	    "s, return\n * a pointer to the containing structure.  When "
	    "using GCC, we first\n * assign pointer x to a local variable, "
	    "to check that its type is\n * compatible with member m.\n"
	    " */\n#ifndef __containerof\n#if __GNUC_PREREQ__(3, 1)\n"
	    "#define __containerof(x, s, m) ({                         "
	    "              \\\n        const volatile __typeof(((s *)0)->m) "
	    "*__x = (x);                \\\n        __DEQUALIFY(s *, (const "
	    "volatile char *)__x - offsetof(s, m));  \\\n})\n#else\n"
	    "#define __containerof(x, s, m)         ");
	VSB_cat(sb, "                                 \\\n"
	    "        __DEQUALIFY(s *, (const volatile char *)(x) - offsetof(s"
	    ", m))\n#endif\n#endif\n\n/**************************************"
	    "********************************\n * various optinal built-ins\n"
	    " *\n * https://clang.llvm.org/docs/LanguageExtensions.html#built"
	    "in-functions\n *\n */\n#ifndef __has_builtin\n#  define __has_bu"
	    "iltin(x) 0\n#endif\n\n#if __has_builtin(__builtin_strcmp)\n"
	    "#  define vstrcmp(s1, s2) __builtin_strcmp(s1, s2)\n"
	    "#else\n#  define vstrcmp(s1, s2) strcmp(s1, s2)\n"
	    "#endif\n\n#if __has_builtin(__builtin_strlen)\n#  define vstrlen"
	    "(s) __builtin_strlen(s)\n#else\n#  define vstrlen(s) strlen(s)\n"
	    "#endif\n\n#if __has_builtin(__builtin_memcmp)\n#  define vmemcmp"
	    "(s1, s2, n) __builtin_memcmp(s1, s2, n)\n#else\n#  define "
	    "vmemcmp(s1, s2, n) memcmp(s1, s2, n)\n#endif\n\n// ... to "
	    "be extended\n"
	);
	VSB_cat(sb, "\n");

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

	VSB_cat(sb, "/* ---===### include/vrt.h ###===--- */\n\n");
	VSB_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n"
	    " * Copyright (c) 2006-2021 Varnish Software AS\n * All rights "
	    "reserved.\n *\n * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>"
	    "\n *\n * SPDX-License-Identifier: BSD-2-Clause\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 * Runtime support for "
	    "compiled VCL programs and VMODs.\n *\n * NB: When this file "
	    "is changed, lib/libvcc/generate.py *MUST* be rerun.\n"
	    " */\n\n#ifdef CACHE_H_INCLUDED\n#  error \"vrt.h included "
	    "after cache.h - they are inclusive\"\n#endif\n\n#ifdef VRT_H_INC"
	    "LUDED\n#  error \"vrt.h included multiple times\"\n"
	    "#endif\n#define VRT_H_INCLUDED\n\n#ifndef VDEF_H_INCLUDED\n"
	    "#  error \"include vdef.h before vrt.h\"\n#endif\n"
	    "\n#define VRT_MAJOR_VERSION\t23U\n\n#define VRT_MINOR_VERSION\t"
	    "0U\n\n/*********************************************************"
	    "**************\n * Major and minor VRT API versions.\n"
	    " *\n * Whenever something is added, increment MINOR version\n"
	    " * Whenever something is deleted or changed in a way which "
	    "is not\n * binary/load-time compatible, increment MAJOR version\n"
	    " *\n * 23.0 (2026-03-16)\n *\t[cache.h] http_method_eq() added\n"
	    " *\t[cache.h] http_method_among() added\n *\t[cache.h] http_SetW"
	    "ellKnownMethod() added\n *\tVRT_r_req_max_age() added\n"
	    " *\tVRT_l_req_max_age() added\n *\tVRT_u_req_max_age() added\n"
	    " *\tVRT_r_bereq_retry_connect() added\n *\tVRT_l_bereq_retry_con"
	    "nect() added\n *\tVRT_r_beresp_storage_hint() removed\n"
	    " *\tVRT_l_beresp_storage_hint() removed\n *\t\"vcl_name\" "
	    "member added to vrt_backend_probe{}\n *\tVRT_PROBE_string() "
	    "added\n * 22.0 (2025-09-15)\n *\tVRT_r_obj_stale_age() added\n"
	    " *\tVRT_r_obj_stale_can_esi() added\n *\tVRT_r_obj_stale_grace()"
	    " added\n *\tVRT_r_obj_stale_hits() added\n *\tVRT_r_obj_stale_ke"
	    "ep() added\n *\tVRT_r_obj_stale_proto() added\n *\tVRT_r_obj_sta"
	    "le_reason() added\n *\tVRT_r_obj_stale_status() added\n"
	    " *\tVRT_r_obj_stale_storage() added\n *\tVRT_r_obj_stale_time() "
	    "added\n *\tVRT_r_obj_stale_ttl() added\n *\tVRT_r_obj_stale_unca"
	    "cheable() added\n *\tVRT_r_obj_stale_is_valid() added\n"
	    " *\tenum gethdr_e has new value HDR_OBJ_STALE\n *\ttypedef "
	    "hdr_t added\n *\tstruct gethdr_s.what changed to hdr_t\n"
	    " *\tVRT_VSC_Alloc() renamed to VRT_VSC_Allocv()\n"
	    " *\tnew VRT_VSC_Alloc() added\n *\tVRT_r_param_backend_idle_time"
	    "out() added\n *\tVRT_r_param_backend_wait_limit() added\n"
	    " *\tVRT_r_param_backend_wait_timeout() added\n *\tVRT_r_param_be"
	    "tween_bytes_timeout() added\n *\tVRT_r_param_connect_timeout() "
	    "added\n *\tVRT_r_param_default_grace() added\n *\tVRT_r_param_de"
	    "fault_keep() added\n *\tVRT_r_param_default_ttl() added\n"
	    " *\tVRT_r_param_first_byte_timeout() added\n *\tVRT_r_param_idle"
	    "_send_timeout() added\n *\tVRT_r_param_max_esi_depth() added\n"
	    " *\tVRT_r_param_max_restarts() added\n *\tVRT_r_param_max_retrie"
	    "s() added\n *\tVRT_r_param_pipe_task_deadline() added\n"
	    " *\tVRT_r_param_pipe_timeout() added\n *\tVRT_r_param_send_timeo"
	    "ut() added\n *\tVRT_r_param_shortlived() added\n *\tVRT_r_param_"
	    "timeout_idle() added\n *\tVRT_r_param_transit_buffer() added\n"
	    " *\tVRT_r_param_uncacheable_ttl() added\n *\tVRT_AddVFP() "
	    "removed\n *\tVRT_AddVDP() removed\n *\tVRT_RemoveVFP() removed\n"
	    " *\tVRT_RemoveVDP() removed\n *\tstruct vrt_blob magic added\n"
	    " *\tstruct strands magic added;\n * 21.0 (2025-03-17)\n"
	    " *\tVRT_u_req_grace() added\n *\tVRT_u_req_ttl() added\n"
	    " *\tVRT_r_req_filters() added\n *\tVRT_l_req_filters() added\n"
	    " *\tVRT_r_bereq_filters() added\n *\tVRT_l_bereq_filters() "
	    "added\n * 20.1 (2024-11-08 7.6.1)\n *\tVDI_EVENT_SICK added "
	    "to enum vcl_event_e\n * 20.0 (2024-09-13)\n *\tstruct vrt_backen"
	    "d.backend_wait_timeout added\n *\tstruct vrt_backend.backend_wai"
	    "t_limit  added\n * 19.1 (2024-05-27)\n *\t[cache_vinyld.h] "
	    "ObjWaitExtend() gained statep argument\n * 19.0 (2024-03-18)\n"
	    " *\t[cache.h] (struct req).filter_list renamed to vdp_filter_lis"
	    "t\n *\torder of vcl/vmod and director COLD events reversed "
	    "to directors first\n *\tVRT_u_sess_idle_send_timeout() added\n"
	    " *\tVRT_u_sess_send_timeout() added\n *\tVRT_u_sess_timeout_idle"
	    "() added\n *\tVRT_u_sess_timeout_linger() added\n"
	    " *\t(struct vrt_backend).*_timeout must be initialized to "
	    "a negative value\n *\tVRT_BACKEND_INIT() helper macro added\n"
	    " *\tVRT_l_bereq_task_deadline() added\n *\tVRT_r_bereq_task_dead"
	    "line() added\n *\tVRT_u_bereq_task_deadline() added\n"
	    " *\tVRT_u_bereq_between_bytes_timeout() added\n *\tVRT_u_bereq_c"
	    "onnect_timeout() added\n *\tVRT_u_bereq_first_byte_timeout() "
	    "added\n * 18.1 (2023-12-05)\n *\tvbf_objiterate() implementation"
	    " changed #4013\n * 18.0 (2023-09-15)\n *\t[cache_filter.h] "
	    "struct vdp gained priv1 member\n *\tVRT_trace() added\n"
	    " * 17.0 (2023-03-15)\n *\tVXID is 64 bit\n *\t[cache.h] http_Get"
	    "Range() changed\n *\texp_close added to struct vrt_backend_probe"
	    "\n *\tVRT_new_backend() signature changed\n *\tVRT_new_backend_c"
	    "lustered() signature changed\n *\tauthority field added to "
	    "struct vrt_backend\n *\trelease field added to struct vdi_method"
	    "s\n * 16.0 (2022-09-15)\n *\tVMOD C-prototypes moved into "
	    "JSON\n *\tVRT_AddVDP() deprecated\n *\tVRT_AddVFP() deprecated\n"
	    " *\tVRT_RemoveVDP() deprecated\n *\tVRT_RemoveVFP() deprecated\n"
	    " * 15.0 (2022-03-15)\n *\tVRT_r_req_transport() added\n"
	    " *\tVRT_Assign_Backend() added\n *\tVRT_StaticDirector() added\n"
	    " *\tenum lbody_e changed\n *\t- previous enum lbody_e values "
	    "are defined as macros\n *\tThe following functions changed "
	    "to take `const char *, BODY`:\n *\t- VRT_l_beresp_body()\n"
	    " *\t- VRT_l_resp_body()\n *\tBODY can either be a BLOB or "
	    "a STRANDS, but only a STRANDS\n *\tcan take a non-NULL const "
	    "char * prefix. The changes to BODY\n *\tassignments doesn't "
	    "break the ABI or the API.\n *\tTOSTRAND() and TOSTRANDS() "
	    "macros added\n *\t[cache.h] enum sess_close replaced by struct "
	    "stream_close\n *\t[cache.h] http_IsHdr() added\n *\t[cache_filte"
	    "r.h] vfp_init_f() changed to take a VRT_CTX\n *\t[cache_filter.h"
	    "] vdp_init_f() changed to take a VRT_CTX\n *\t[cache_filter.h] "
	    "VRT_AddFilter() added\n *\t[cache_filter.h] VRT_RemoveFilter() "
	    "added\n * 14.0 (2021-09-15)\n *\tVIN_n_Arg() no directly returns"
	    " the directory name.\n *\tVSB_new() and VSB_delete() removed\n"
	    " *\tVCL_STRINGLIST, vrt_magic_string_end removed\n"
	    " *\tVRT_String(), VRT_StringList(), VRT_CollectString() removed\n"
	    " *\tVRT_CollectStrands() renamed to VRT_STRANDS_string()\n"
	    " *\tThe following functions changed to take `const char *, "
	    "STRANDS`:\n *\t- VRT_l_client_identity()\n *\t- VRT_l_req_method"
	    "()\n *\t- VRT_l_req_url()\n *\t- VRT_l_req_proto()\n"
	    " *\t- VRT_l_bereq_method()\n *\t- VRT_l_bereq_url()\n"
	    " *\t- VRT_l_bereq_proto()\n *\t- VRT_l_beresp_body()\n"
	    " *\t- VRT_l_beresp_proto()\n *\t- VRT_l_beresp_reason()\n"
	    " *\t- VRT_l_beresp_storage_hint()\n *\t- VRT_l_beresp_filters()\n"
	    " *\t- VRT_l_resp_body()\n *\t- VRT_l_resp_proto()\n"
	    " *\t- VRT_l_resp_reason()\n *\t- VRT_l_resp_filters()\n"
	    " *\t- VRT_SetHdr()\n *\tVRT_UnsetHdr() added\n *\tvrt_magic_stri"
	    "ng_unset removed (use VRT_UnsetHdr() instead)\n *\tVNUMpfx() "
	    "removed, SF_Parse_{Integer|Decimal|Number} added\n"
	    " *\tvrt_null_strands added\n *\tvrt_null_blob added\n"
	    " *\tVRT_NULL_BLOB_TYPE added as the .type of vrt_null_blob\n"
	    " *\tVRT_blob() changed to return vrt_null_blob for\n"
	    " *\t    len == 0 or src == NULL arguments\n *\t[cache.h] WS_Fron"
	    "t() removed\n *\t[cache.h] WS_Inside() removed\n *\t[cache.h] "
	    "WS_Assert_Allocated() removed\n *\t[cache.h] WS_Allocated() "
	    "added\n *\t[cache.h] WS_Dump() added\n * 13.0 (2021-03-15)\n"
	    " *\tMove VRT_synth_page() to deprecated status\n *\tAdd VRT_synt"
	    "h_strands() and VRT_synth_blob()\n *\tstruct vrt_type now "
	    "produced by generate.py\n *\tVRT_acl_log() moved to VPI_acl_log("
	    ")\n *\tVRT_Endpoint_Clone() added.\n *\tCalling convention "
	    "for VDP implementation changed\n *\tVRT_ValidHdr() added.\n"
	    " *\tstruct vmod_priv_methods added\n *\tstruct vmod_priv free "
	    "member replaced with methods\n *\tVRT_CTX_Assert() added\n"
	    " *\tVRT_ban_string() signature changed\n *\tVRT_priv_task_get() "
	    "added\n *\tVRT_priv_top_get() added\n *\tVRT_re_init removed\n"
	    " *\tVRT_re_fini removed\n *\tVRT_re_match signature changed\n"
	    " *\tVRT_regsub signature changed\n *\tVRT_call() added\n"
	    " *\tVRT_check_call() added\n *\tVRT_handled() added\n"
	    " * 12.0 (2020-09-15)\n *\tAdded VRT_DirectorResolve()\n"
	    " *\tAdded VCL_STRING VRT_BLOB_string(VRT_CTX, VCL_BLOB)\n"
	    " *\t[cache.h] WS_Reserve() removed\n *\t[cache.h] WS_Printf() "
	    "changed\n *\t[cache.h] WS_ReservationSize() added\n"
	    " *\t[cache.h] WS_Front() deprecated\n *\t[cache.h] WS_Reservatio"
	    "n() added\n * 11.0 (2020-03-16)\n *\tChanged type of vsa_suckadd"
	    "r_len from int to size_t\n *\tNew prefix_{ptr|len} fields "
	    "in vrt_backend\n *\tVRT_HashStrands32() added\n *\tVRT_l_resp_bo"
	    "dy() changed\n *\tVRT_l_beresp_body() changed\n *\tVRT_Format_Pr"
	    "oxy() added\t// transitional interface\n *\tVRT_AllocStrandsWS()"
	    " added\n * 10.0 (2019-09-15)\n *\tVRT_UpperLowerStrands added.\n"
	    " *\tVRT_synth_page now takes STRANDS argument\n *\tVRT_hashdata("
	    ") now takes STRANDS argument\n *\tVCL_BOOL VRT_Strands2Bool(VCL_"
	    "STRANDS) added.\n *\tVRT_BundleStrands() moved to vcc_interface."
	    "h\n *\tVRT_VCL_{Busy|Unbusy} changed to VRT_VCL_{Prevent|Allow}_"
	    "Cold\n *\tVRT_re[fl]_vcl changed to VRT_VCL_{Prevent|Allow}_Disc"
	    "ard\n *\tVRT_Vmod_{Init|Unload} moved to vcc_interface.h\n"
	    " *\tVRT_count moved to vcc_interface.h\n *\tVRT_VCL_Prevent_Cold"
	    "() and VRT_VCL_Allow_Cold() added");
	VSB_cat(sb, ".\n *\tVRT_vcl_get moved to vcc_interface.h\n"
	    " *\tVRT_vcl_rel moved to vcc_interface.h\n *\tVRT_vcl_select "
	    "moved to vcc_interface.h\n *\tVRT_VSA_GetPtr() changed\n"
	    " *\tVRT_ipcmp() changed\n *\tVRT_Stv_*() functions renamed "
	    "to VRT_stevedore_*()\n *\t[cache.h] WS_ReserveAll() added\n"
	    " *\t[cache.h] WS_Reserve(ws, 0) deprecated\n * 9.0 (2019-03-15)\n"
	    " *\tMake 'len' in vmod_priv 'long'\n *\tHTTP_Copy() removed\n"
	    " *\tHTTP_Dup() added\n *\tHTTP_Clone() added\n *\tVCL_BLOB "
	    "changed to newly introduced struct vrt_blob *\n *\tVRT_blob() "
	    "changed\n *\treq->req_bodybytes removed\n *\t    use: AZ(ObjGetU"
	    "64(req->wrk, req->body_oc, OA_LEN, &u));\n *\tstruct vdi_methods"
	    " .list callback signature changed\n *\tVRT_LookupDirector() "
	    "added\n *\tVRT_SetChanged() added\n *\tVRT_SetHealth() removed\n"
	    " *\t// in cache_filter.h:\n *\tVRT_AddVDP() added\n"
	    " *\tVRT_RemoveVDP() added\n * 8.0 (2018-09-15)\n *\tVRT_Strands("
	    ") added\n *\tVRT_StrandsWS() added\n *\tVRT_CollectStrands() "
	    "added\n *\tVRT_STRANDS_string() removed from vrt.h (never "
	    "implemented)\n *\tVRT_Vmod_Init signature changed\n"
	    " *\tVRT_Vmod_Fini changed to VRT_Vmod_Unload\n *\t// directors\n"
	    " *\tVRT_backend_healthy() removed\n *\tVRT_Healthy() changed "
	    "prototype\n *\tstruct vdi_methods and callback prototypes "
	    "added\n *\tstruct director added;\n *\tVRT_AddDirector() added\n"
	    " *\tVRT_SetHealth() added\n *\tVRT_DisableDirector() added\n"
	    " *\tVRT_DelDirector() added\n *\t// in cache_filter.h:\n"
	    " *\tVRT_AddVFP() added\n *\tVRT_RemoveVFP() added\n"
	    " * 7.0 (2018-03-15)\n *\tlots of stuff moved from cache.h "
	    "to cache_vinyld.h\n *\t   (ie: from \"$Abi vrt\" to \"$Abi "
	    "strict\")\n *\tVCL_INT and VCL_BYTES are always 64 bits.\n"
	    " *\tpath field added to struct vrt_backend\n *\tVRT_Healthy() "
	    "added\n *\tVRT_VSC_Alloc() added\n *\tVRT_VSC_Destroy() added\n"
	    " *\tVRT_VSC_Hide() added\n *\tVRT_VSC_Reveal() added\n"
	    " *\tVRT_VSC_Overhead() added\n *\tstruct director.event added\n"
	    " *\tstruct director.destroy added\n *\tVRT_r_beresp_storage_hint"
	    "() VCL <= 4.0  #2509\n *\tVRT_l_beresp_storage_hint() VCL "
	    "<= 4.0  #2509\n *\tVRT_blob() added\n *\tVCL_STRANDS added\n"
	    " * 6.1 (2017-09-15 aka 5.2)\n *\thttp_CollectHdrSep added\n"
	    " *\tVRT_purge modified (may fail a transaction, signature "
	    "changed)\n *\tVRT_r_req_hash() added\n *\tVRT_r_bereq_hash() "
	    "added\n * 6.0 (2017-03-15):\n *\tVRT_hit_for_pass added\n"
	    " *\tVRT_ipcmp added\n *\tVRT_Vmod_Init signature changed\n"
	    " *\tVRT_vcl_lookup removed\n *\tVRT_fail added\n *\t[cache.h] "
	    "WS_Reset and WS_Snapshot signatures changed\n *\t[cache.h] "
	    "WS_Front added\n *\t[cache.h] WS_ReserveLumps added\n"
	    " *\t[cache.h] WS_Inside added\n *\t[cache.h] WS_Assert_Allocated"
	    " added\n * 5.0:\n *\tVarnish 5.0 release \"better safe than "
	    "sorry\" bump\n * 4.0:\n *\tVCL_BYTES changed to long long\n"
	    " *\tVRT_CacheReqBody changed signature\n * 3.2:\n"
	    " *\tvrt_backend grew .proxy_header field\n *\tvrt_ctx grew "
	    ".sp field.\n *\tvrt_acl type added\n */\n\n/********************"
	    "***************************************************/\n"
	    "\n#include <stddef.h>\t\t// NULL, size_t\n#include <stdint.h>\t"
	    "\t// [u]int%d_t\n\nstruct busyobj;\nstruct director;\n"
	    "struct http;\nstruct lock;\nstruct req;\nstruct stevedore;\n"
	    "struct stream_close;\nstruct suckaddr;\nstruct vcl;\n"
	    "struct vcldir;\nstruct VCL_conf;\nstruct vcl_sub;\n"
	    "struct vmod;\nstruct vmod_priv;\nstruct vrt_acl;\n"
	    "struct vsb;\nstruct VSC_main;\nstruct vsc_seg;\nstruct vsl_log;\n"
	    "struct vsmw_cluster;\nstruct wrk_vpi;\nstruct ws;\n"
	    "\ntypedef const struct stream_close *stream_close_t;\n"
	    "\n/*************************************************************"
	    "**********\n * VCL_STRANDS:\n *\n * An argc+argv type of data "
	    "structure where n indicates the number of\n * strings in the "
	    "p array. Individual components of a strands may be null.\n"
	    " *\n * A STRANDS allows you to work on a strings concatenation "
	    "with the\n * option to collect it into a single STRING, or "
	    "if possible work\n * directly on individual parts.\n"
	    " *\n * The memory management is very strict: a VMOD function "
	    "receiving a\n * STRANDS argument should keep no reference "
	    "after the function returns.\n * Retention of a STRANDS further "
	    "in the ongoing task is undefined\n * behavior and may result "
	    "in a panic or data corruption.\n */\n\nstruct strands {\n"
	    "\tunsigned\tmagic;\n#define STRANDS_MAGIC\t0x5d5ab196\n"
	    "\tint\t\tn;\n\tconst char\t**p;\n};\n\n/*\n * A VCL_STRANDS "
	    "return value must never be NULL. Use this instead\n"
	    " */\nextern const struct strands *const vrt_null_strands;\n"
	    "\n/*\n * Macros for VCL_STRANDS creation\n */\n#define TOSTRAND("
	    "s)(&(struct strands)\t\t\t\t\\\n\t{.magic=STRANDS_MAGIC,.n=1,.p="
	    "(const char *[1]){(s)}})\n#define TOSTRANDS(x, ...)(&(struct "
	    "strands)\t\t\t\\\n\t{.magic=STRANDS_MAGIC,.n=x,.p=(const char "
	    "*[x]){__VA_ARGS__}})\n\n/***************************************"
	    "********************************\n * VCL_BLOB:\n *\n"
	    " * Opaque, immutable data (pointer + length), minimum lifetime "
	    "is the\n * VCL task.\n *\n * Type (optional) is owned by the "
	    "creator of the blob. blob consumers\n * may use it for checks, "
	    "but should not assert on it.\n *\n * The data behind the blob "
	    "pointer is assumed to be immutable for the\n * blob's lifetime.\n"
	    " *\n * - memory for shortlived blobs can be put on the tasks "
	    "workspace\n *\n * - management of memory for longer lived "
	    "blobs is up to the vmod\n *   (in which case the blob will "
	    "probably be embedded in an object or\n *    referenced by "
	    "other state with vcl lifetime)\n */\n\nstruct vrt_blob {\n"
	    "\tunsigned\tmagic;\n#define VRT_BLOB_MAGIC\t0xe114db9e\n"
	    "\tunsigned\ttype;\n\tsize_t\t\tlen;\n\tconst void\t*blob;\n"
	    "};\n\n#define VRT_NULL_BLOB_TYPE 0xfade4fa0\nextern const "
	    "struct vrt_blob *const vrt_null_blob;\n\n/**********************"
	    "*************************************************\n"
	    " * This is the central definition of the mapping from VCL "
	    "types to\n * C-types.  The python scripts read these from "
	    "here.\n * (keep alphabetic order)\n */\n\ntypedef const struct "
	    "vrt_acl *\t\t\tVCL_ACL;\ntypedef const struct director *\t\t"
	    "\tVCL_BACKEND;\ntypedef const struct vrt_blob *\t\t\tVCL_BLOB;\n"
	    "typedef const void *\t\t\t\tVCL_BODY;\ntypedef unsigned\t\t"
	    "\t\tVCL_BOOL;\ntypedef int64_t\t\t\t\t\tVCL_BYTES;\n"
	    "typedef vtim_dur\t\t\t\tVCL_DURATION;\ntypedef const char "
	    "*\t\t\t\tVCL_ENUM;\ntypedef const struct gethdr_s *\t\t\tVCL_HEA"
	    "DER;\ntypedef struct http *\t\t\t\tVCL_HTTP;\ntypedef void\t"
	    "\t\t\t\tVCL_INSTANCE;\ntypedef int64_t\t\t\t\t\tVCL_INT;\n"
	    "typedef const struct suckaddr *\t\t\tVCL_IP;\ntypedef const "
	    "struct vrt_backend_probe *\tVCL_PROBE;\ntypedef double\t\t\t"
	    "\t\tVCL_REAL;\ntypedef const struct vre *\t\t\tVCL_REGEX;\n"
	    "typedef const struct stevedore *\t\tVCL_STEVEDORE;\n"
	    "typedef const struct strands *\t\t\tVCL_STRANDS;\n"
	    "typedef const char *\t\t\t\tVCL_STRING;\ntypedef const struct "
	    "vcl_sub *\t\t\tVCL_SUB;\ntypedef vtim_real\t\t\t\tVCL_TIME;\n"
	    "typedef struct vcl *\t\t\t\tVCL_VCL;\ntypedef void\t\t\t\t\t"
	    "VCL_VOID;\n\n/**************************************************"
	    "*********************\n * This is the composite \"context\" "
	    "argument for compiled VCL, VRT and\n * VMOD functions.\n"
	    " */\n\nstruct vrt_ctx {\n\tunsigned\t\t\tmagic;\n"
	    "#define VRT_CTX_MAGIC\t\t\t0x6bb8f0db\n\n\tunsigned\t\t\tsyntax;"
	    "\n\tunsigned\t\t\tvclver;\n\tunsigned\t\t\tmethod;\n"
	    "\n\tstruct wrk_vpi\t\t\t*vpi;\n\n\t/*\n\t * msg is for error "
	    "messages and exists only for\n\t * VCL_EVENT_LOAD\n"
	    "\t * VCL_EVENT_WARM\n\t */\n\tstruct vsb\t\t\t*msg;\n"
	    "\tstruct vsl_log\t\t\t*vsl;\n\tVCL_VCL\t\t\t\tvcl;\n"
	    "\tstruct ws\t\t\t*ws;\n\n\tstruct sess\t\t\t*sp;\n"
	    "\n\tstruct req\t\t\t*req;\n\tVCL_HTTP\t\t\thttp_req;\n"
	    "\tVCL_HTTP\t\t\thttp_req_top;\n\tVCL_HTTP\t\t\thttp_resp;\n"
	    "\n\tstruct busyobj\t\t\t*bo;\n\tVCL_HTTP\t\t\thttp_bereq;\n"
	    "\tVCL_HTTP\t\t\thttp_beresp;\n\n\tvtim_real\t\t\tnow;\n"
	    "\n\t/*\n\t * method specific argument:\n\t *    hash:\t\tstruct "
	    "VSHA256Context\n\t *    synth+error:\tstruct vsb *\n"
	    "\t */\n\tvoid\t\t\t\t*specific;\n\t/* if present, vbitmap "
	    "of called subs */\n\tvoid\t\t\t\t*called;\n};\n\n"
	    "#define VRT_CTX\t\tconst struct vrt_ctx *ctx\nvoid VRT_CTX_Asser"
	    "t(VRT_CTX);\n\nenum vcl_func_call_e {\n\tVSUB_STATIC,\t// "
	    "VCL \"call\" action, only allowed from VCC\n\tVSUB_DYNAMIC,\t"
	    "// VRT_call()\n\tVSUB_CHECK\t// VRT_check_call()\n"
	    "};\n\nenum vcl_func_fail_e {\n\tVSUB_E_OK,\n\tVSUB_E_RECURSE, "
	    "// call would recurse\n\tVSUB_E_METHOD\t// cannot be called "
	    "from this method\n};\n\ntypedef void vcl_func_f(VRT_CTX, enum "
	    "vcl_func_call_e, enum vcl_func_fail_e *);\n\n/******************"
	    "*****************************************************\n"
	    " * This is the interface structure to a compiled VMOD\n"
	    " * (produced by vmodtool.py)\n */\n\nstruct vmod_data {\n"
	    "\t/* The version/id fields must be first, they protect the "
	    "rest */\n\tunsigned\t\t\tvrt_major;\n\tunsigned\t\t\tvrt_minor;\n"
	    "\tconst char\t\t\t*file_id;\n\n\tconst char\t\t\t*name;\n"
	    "\tconst char\t\t\t*func_name;\n\tconst void\t\t\t*func;\n"
	    "\tint\t\t\t\tfunc_len;\n\tconst char\t\t\t*proto;\n"
	    "\tconst char\t\t\t*json;\n\tconst char\t\t\t*abi;\n"
	    "\tconst char\t\t\t*vcs;\n\tconst char\t\t\t*version;\n"
	    "};\n\n/*********************************************************"
	    "**************\n * Events sent to VMODs and directors:\n"
	    " * - VCL: VCL temperature events\n * - VDI: director events\n"
	    " */\n\nenum vcl_event_e {\n\tVCL_EVENT_LOAD,\n\tVCL_EVENT_WARM,\n"
	    "\tVCL_EVENT_COLD,\n\tVCL_EVENT_DISCARD,\n\n\tVDI_EVENT_SICK,\n"
	    "};\n\ntypedef int vmod_event_f(VRT_CTX, struct vmod_priv *, "
	    "enum vcl_event_e);\n\n/*****************************************"
	    "******************************\n * Utility functions operating "
	    "on VCL_types\n * (alphabetic by type-ish)\n */\n\n"
	    "/* VCL_ACL */\nint VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);\n"
	    "\n/* VCL_BACKEND */\nVCL_BACKEND VRT_DirectorResolve(VRT_CTX, "
	    "VCL_BACKEND);\n\n/* VCL_BLOB */\nVCL_BLOB VRT_blob(VRT_CTX, "
	    "const char *, const void *, size_t, unsigned);\n\n"
	    "/* VCL_INT */\nint VRT_INT_is_valid(VCL_INT);\n\n"
	    "/* VCL_IP */\nint VRT_VSA_GetPtr(VRT_CTX, VCL_IP sua, const "
	    "unsigned char ** dst);\nVCL_BOOL VRT_ipcmp(VRT_CTX, VCL_IP, "
	    "VCL_IP);\nvoid VRT_Format_Proxy(struct vsb *, VCL_INT, VCL_IP, "
	    "VCL_IP, VCL_STRING);\n\n/* VCL_REAL */\nint VRT_REAL_is_valid(VC"
	    "L_REAL);\n\n/* VCL_REGEX */\nVCL_BOOL VRT_re_match(VRT_CTX, "
	    "VCL_STRING, VCL_REGEX);\nVCL_STRING VRT_regsub(VRT_CTX, int "
	    "all, VCL_STRING, VCL_REGEX, VCL_STRING);\n\n/* VCL_STEVEDORE "
	    "*/\nVCL_STEVEDORE VRT_stevedore(const char *nm);\n"
	    "\n/* VCL_STRANDS */\nstruct strands * VRT_AllocStrandsWS(struct "
	    "ws *, int);\nint VRT_CompareStrands(VCL_STRANDS a, VCL_STRANDS "
	    "b);\nVCL_BOOL VRT_Strands2Bool(VCL_STRANDS);\nuint32_t VRT_HashS"
	    "trands32(VCL_STRANDS);\nchar *VRT_Strands(char *, size_t, "
	    "VCL_STRANDS);\nVCL_STRING VRT_StrandsWS(s");
	VSB_cat(sb, "truct ws *, const char *, VCL_STRANDS);\n"
	    "VCL_STRING VRT_UpperLowerStrands(VRT_CTX, VCL_STRANDS s, int "
	    "up);\n\n/* VCL_SUB */\nVCL_STRING VRT_check_call(VRT_CTX, "
	    "VCL_SUB);\nVCL_VOID VRT_call(VRT_CTX, VCL_SUB);\n"
	    "\n/* Functions to turn types into canonical strings */\n"
	    "\nVCL_STRING VRT_BACKEND_string(VCL_BACKEND);\nVCL_STRING "
	    "VRT_BOOL_string(VCL_BOOL);\nVCL_STRING VRT_BLOB_string(VRT_CTX, "
	    "VCL_BLOB);\nVCL_STRING VRT_INT_string(VRT_CTX, VCL_INT);\n"
	    "VCL_STRING VRT_IP_string(VRT_CTX, VCL_IP);\nVCL_STRING VRT_PROBE"
	    "_string(VCL_PROBE);\nVCL_STRING VRT_REAL_string(VRT_CTX, VCL_REA"
	    "L);\nVCL_STRING VRT_STEVEDORE_string(VCL_STEVEDORE);\n"
	    "VCL_STRING VRT_STRANDS_string(VRT_CTX, VCL_STRANDS);\n"
	    "VCL_STRING VRT_TIME_string(VRT_CTX, VCL_TIME);\n\n"
	    "/* historical */\nint VRT_strcmp(const char *s1, const char "
	    "*s2);\nvoid VRT_memmove(void *dst, const void *src, unsigned "
	    "len);\n\n/******************************************************"
	    "*****************\n * We want the VCC to spit this structs "
	    "out as const, but when VMODs\n * come up with them we want "
	    "to clone them into malloc'ed space which\n * we can free again.\n"
	    " * We collect all the knowledge here by macroizing the fields "
	    "and make\n * a macro for handling them all.\n * See also: "
	    " cache_backend.h & cache_backend_cfg.c\n * One of those things.."
	    ".\n */\n\nstruct vrt_endpoint {\n\tunsigned\t\t\tmagic;\n"
	    "#define VRT_ENDPOINT_MAGIC\t\t0xcc419347\n\tVCL_IP\t\t\t\tipv4;\n"
	    "\tVCL_IP\t\t\t\tipv6;\n\tconst char\t\t\t*uds_path;\n"
	    "\tconst struct vrt_blob\t\t*preamble;\n};\n\n#define VRT_BACKEND"
	    "_FIELDS(rigid)\t\t\t\t\\\n\trigid char\t\t\t*vcl_name;\t\t\\\n"
	    "\trigid char\t\t\t*hosthdr;\t\t\\\n\trigid char\t\t\t*authority;"
	    "\t\t\\\n\tvtim_dur\t\t\tconnect_timeout;\t\\\n\tvtim_dur\t\t"
	    "\tfirst_byte_timeout;\t\\\n\tvtim_dur\t\t\tbetween_bytes_timeout"
	    ";\t\\\n\tvtim_dur\t\t\tbackend_wait_timeout;\t\\\n"
	    "\tunsigned\t\t\tmax_connections;\t\\\n\tunsigned\t\t\tproxy_head"
	    "er;\t\t\\\n\tunsigned\t\t\tbackend_wait_limit;\n\n"
	    "#define VRT_BACKEND_INIT(be)\t\t\t\t\t\\\n\tdo {\t\t\t\t\t\t"
	    "\t\\\n\t\tINIT_OBJ(be, VRT_BACKEND_MAGIC);\t\t\\\n"
	    "\t\t(be)->connect_timeout = -1.0;\t\t\t\\\n\t\t(be)->first_byte_"
	    "timeout = -1.0;\t\t\\\n\t\t(be)->between_bytes_timeout = -1.0;\t"
	    "\t\\\n\t\t(be)->backend_wait_timeout = -1.0;\t\t\\\n"
	    "\t} while(0)\n\n#define VRT_BACKEND_HANDLE()\t\t\t\\\n"
	    "\tdo {\t\t\t\t\t\\\n\t\tDA(vcl_name);\t\t\t\\\n\t\tDA(hosthdr);\t"
	    "\t\t\\\n\t\tDA(authority);\t\t\t\\\n\t\tDN(connect_timeout);\t"
	    "\t\\\n\t\tDN(first_byte_timeout);\t\t\\\n\t\tDN(between_bytes_ti"
	    "meout);\t\\\n\t\tDN(backend_wait_timeout);\t\\\n\t\tDN(max_conne"
	    "ctions);\t\t\\\n\t\tDN(proxy_header);\t\t\\\n\t\tDN(backend_wait"
	    "_limit);\t\t\\\n\t} while(0)\n\nstruct vrt_backend {\n"
	    "\tunsigned\t\t\tmagic;\n#define VRT_BACKEND_MAGIC\t\t0x4799ce6c\n"
	    "\tconst struct vrt_endpoint\t*endpoint;\n\tVRT_BACKEND_FIELDS(co"
	    "nst)\n\tVCL_PROBE\t\t\tprobe;\n};\n\n#define VRT_BACKEND_PROBE_F"
	    "IELDS(rigid)\t\t\t\t\\\n\tvtim_dur\t\t\ttimeout;\t\t\\\n"
	    "\tvtim_dur\t\t\tinterval;\t\t\\\n\tunsigned\t\t\texp_status;\t"
	    "\t\\\n\tunsigned\t\t\twindow;\t\t\t\\\n\tunsigned\t\t\tthreshold"
	    ";\t\t\\\n\tunsigned\t\t\tinitial;\t\t\\\n\tunsigned\t\t\texp_clo"
	    "se;\n\n#define VRT_BACKEND_PROBE_HANDLE()\t\t\\\n"
	    "\tdo {\t\t\t\t\t\\\n\t\tDN(timeout);\t\t\t\\\n\t\tDN(interval);\t"
	    "\t\t\\\n\t\tDN(exp_status);\t\t\t\\\n\t\tDN(window);\t\t\t\\\n"
	    "\t\tDN(threshold);\t\t\t\\\n\t\tDN(initial);\t\t\t\\\n"
	    "\t\tDN(exp_close);\t\t\t\\\n\t} while (0)\n\nstruct vrt_backend_"
	    "probe {\n\tunsigned\t\t\tmagic;\n#define VRT_BACKEND_PROBE_MAGIC"
	    "\t\t0x84998490\n\tconst char\t\t\t*url;\n\tconst char\t\t\t"
	    "*request;\n\tVRT_BACKEND_PROBE_FIELDS(const)\n\tconst char\t"
	    "\t\t*vcl_name;\n};\n\n/* Backend related */\nVCL_BACKEND VRT_new"
	    "_backend(VRT_CTX, const struct vrt_backend *, VCL_BACKEND);\n"
	    "VCL_BACKEND VRT_new_backend_clustered(VRT_CTX,\n    struct "
	    "vsmw_cluster *, const struct vrt_backend *, VCL_BACKEND);\n"
	    "size_t VRT_backend_vsm_need(VRT_CTX);\nvoid VRT_delete_backend(V"
	    "RT_CTX, VCL_BACKEND *);\nstruct vrt_endpoint *VRT_Endpoint_Clone"
	    "(const struct vrt_endpoint *vep);\n\n\n/************************"
	    "***********************************************\n"
	    " * Getting hold of the various struct http\n */\n"
	    "\nenum gethdr_e {\n\tHDR_REQ,\n\tHDR_REQ_TOP,\n\tHDR_RESP,\n"
	    "\tHDR_OBJ,\n\tHDR_BEREQ,\n\tHDR_BERESP,\n\tHDR_OBJ_STALE\n"
	    "};\n\ntypedef const struct {\n\tunsigned char\tlen;\n"
	    "\tconst char\tstr[];\n} *hdr_t;\n\n//lint -esym(754, _hdr_s, "
	    "_hdr_l) local struct member ... not referenced\n//lint -emacro(7"
	    "40, HDR) unusual cast\n#define HDR(name)\t\t\t\t\t\t\t\\\n"
	    "\t((hdr_t)&(const struct {\t\t\t\t\t\\\n\t\tunsigned char "
	    "_hdr_l;\t\t\t\t\t\\\n\t\tchar _hdr_s[sizeof(name \":\")];\t"
	    "\t\t\t\\\n\t}){ sizeof(name), name \":\" })\n\n#define CHECK_HDR"
	    "(hdr)\t\t\t\t\t\t\t\\\n\tdo {\t\t\t\t\t\t\t\t\\\n"
	    "\t\tAN(hdr);\t\t\t\t\t\t\\\n\t\tassert((hdr)->len > 0);\t\t"
	    "\t\t\t\\\n\t\tassert((hdr)->len == strlen((hdr)->str));\t\t"
	    "\\\n\t\tassert((hdr)->str[(hdr)->len - 1] == ':');\t\t\\\n"
	    "\t} while (0)\n\n#define CAST_HDR(hdr, str)\t\t\t\t\t\t\\\n"
	    "\tdo {\t\t\t\t\t\t\t\t\\\n\t\thdr = (hdr_t)(str);\t\t\t\t\t"
	    "\\\n\t\tCHECK_HDR(hdr);\t\t\t\t\t\t\\\n\t} while (0)\n"
	    "\nstruct gethdr_s {\n\tenum gethdr_e\twhere;\n\thdr_t\t\twhat;\n"
	    "};\n\nVCL_HTTP VRT_selecthttp(VRT_CTX, enum gethdr_e);\n"
	    "VCL_STRING VRT_GetHdr(VRT_CTX, VCL_HEADER);\n\n/****************"
	    "*******************************************************\n"
	    " * req related\n */\n\nenum lbody_e {\n\tLBODY_SET_STRING,\n"
	    "\tLBODY_ADD_STRING,\n\tLBODY_SET_BLOB,\n\tLBODY_ADD_BLOB,\n"
	    "};\n\n#define LBODY_SET LBODY_SET_STRING\n#define LBODY_ADD "
	    "LBODY_ADD_STRING\n\nVCL_BYTES VRT_CacheReqBody(VRT_CTX, VCL_BYTE"
	    "S maxsize);\n\nVCL_STRING VRT_ban_string(VRT_CTX, VCL_STRING);\n"
	    "VCL_INT VRT_purge(VRT_CTX, VCL_DURATION, VCL_DURATION, VCL_DURAT"
	    "ION);\nVCL_VOID VRT_synth(VRT_CTX, VCL_INT, VCL_STRING);\n"
	    "VCL_VOID VRT_hit_for_pass(VRT_CTX, VCL_DURATION);\n"
	    "\nVCL_BOOL VRT_ValidHdr(VRT_CTX, VCL_STRANDS);\nVCL_VOID VRT_Uns"
	    "etHdr(VRT_CTX, VCL_HEADER);\nVCL_VOID VRT_SetHdr(VRT_CTX, "
	    "VCL_HEADER, const char *pfx, VCL_STRANDS);\nVCL_VOID VRT_handlin"
	    "g(VRT_CTX, unsigned hand);\nunsigned VRT_handled(VRT_CTX);\n"
	    "VCL_VOID VRT_trace(VRT_CTX, VCL_BOOL);\nVCL_VOID VRT_fail(VRT_CT"
	    "X, const char *fmt, ...) v_printflike_(2,3) v_cold_;\n"
	    "VCL_VOID VRT_hashdata(VRT_CTX, VCL_STRANDS);\n\nVCL_VOID VRT_Rol"
	    "lback(VRT_CTX, VCL_HTTP);\n\n/* Synthetic pages */\n"
	    "VCL_VOID VRT_synth_strands(VRT_CTX, VCL_STRANDS);\n"
	    "VCL_VOID VRT_synth_blob(VRT_CTX, VCL_BLOB);\n\n/****************"
	    "*******************************************************\n"
	    " * VDI - Director API\n */\ntypedef VCL_BOOL vdi_healthy_f(VRT_C"
	    "TX, VCL_BACKEND, VCL_TIME *);\ntypedef VCL_BACKEND vdi_resolve_f"
	    "(VRT_CTX, VCL_BACKEND);\ntypedef int vdi_gethdrs_f(VRT_CTX, "
	    "VCL_BACKEND);\ntypedef VCL_IP vdi_getip_f(VRT_CTX, VCL_BACKEND);"
	    "\ntypedef void vdi_finish_f(VRT_CTX, VCL_BACKEND);\n"
	    "typedef stream_close_t vdi_http1pipe_f(VRT_CTX, VCL_BACKEND);\n"
	    "typedef void vdi_event_f(VCL_BACKEND, enum vcl_event_e);\n"
	    "typedef void vdi_release_f(VCL_BACKEND);\ntypedef void vdi_destr"
	    "oy_f(VCL_BACKEND);\ntypedef void vdi_panic_f(VCL_BACKEND, "
	    "struct vsb *);\ntypedef void vdi_list_f(VRT_CTX, VCL_BACKEND, "
	    "struct vsb *, int, int);\n\nstruct vdi_methods {\n"
	    "\tunsigned\t\t\tmagic;\n#define VDI_METHODS_MAGIC\t\t0x4ec0c4bb\n"
	    "\tconst char\t\t\t*type;\n\tvdi_http1pipe_f\t\t\t*http1pipe;\n"
	    "\tvdi_healthy_f\t\t\t*healthy;\n\tvdi_resolve_f\t\t\t*resolve;\n"
	    "\tvdi_gethdrs_f\t\t\t*gethdrs;\n\tvdi_getip_f\t\t\t*getip;\n"
	    "\tvdi_finish_f\t\t\t*finish;\n\tvdi_event_f\t\t\t*event;\n"
	    "\t// called by VRT_DelDirector: deref all backends\n"
	    "\tvdi_release_f\t\t\t*release;\n\t// when refcount goes 0\n"
	    "\tvdi_destroy_f\t\t\t*destroy;\n\tvdi_panic_f\t\t\t*panic;\n"
	    "\tvdi_list_f\t\t\t*list;\n};\n\nstruct director {\n"
	    "\tunsigned\t\t\tmagic;\n#define DIRECTOR_MAGIC\t\t\t0x3336351d\n"
	    "\tvoid\t\t\t\t*priv;\n\tchar\t\t\t\t*vcl_name;\n\tstruct vcldir\t"
	    "\t\t*vdir;\n\tstruct lock\t\t\t*mtx;\n};\n\nVCL_BOOL VRT_Healthy"
	    "(VRT_CTX, VCL_BACKEND, VCL_TIME *);\nVCL_VOID VRT_SetChanged(VCL"
	    "_BACKEND, VCL_TIME);\nVCL_BACKEND VRT_AddDirector(VRT_CTX, "
	    "const struct vdi_methods *,\n    void *, const char *, ...) "
	    "v_printflike_(4, 5);\nvoid VRT_DisableDirector(VCL_BACKEND);\n"
	    "void VRT_StaticDirector(VCL_BACKEND);\nVCL_BACKEND VRT_LookupDir"
	    "ector(VRT_CTX, VCL_STRING);\nvoid VRT_DelDirector(VCL_BACKEND "
	    "*);\nvoid VRT_Assign_Backend(VCL_BACKEND *dst, VCL_BACKEND "
	    "src);\n\n/******************************************************"
	    "*****************\n * vmod_priv related\n */\ntypedef void "
	    "vmod_priv_fini_f(VRT_CTX, void *);\n\nstruct vmod_priv_methods "
	    "{\n\tunsigned\t\t\tmagic;\n#define VMOD_PRIV_METHODS_MAGIC\t"
	    "0xcea5ff99\n\tconst char\t\t\t*type;\n\tvmod_priv_fini_f\t\t"
	    "*fini;\n};\n\nstruct vmod_priv {\n\tvoid\t\t\t\t*priv;\n"
	    "\tlong\t\t\t\tlen;\n\tconst struct vmod_priv_methods\t*methods;\n"
	    "};\n\nvoid VRT_priv_fini(VRT_CTX, const struct vmod_priv *p);\n"
	    "struct vmod_priv *VRT_priv_task(VRT_CTX, const void *vmod_id);\n"
	    "struct vmod_priv *VRT_priv_task_get(VRT_CTX, const void *vmod_id"
	    ");\nstruct vmod_priv *VRT_priv_top(VRT_CTX, const void *vmod_id)"
	    ";\nstruct vmod_priv *VRT_priv_top_get(VRT_CTX, const void "
	    "*vmod_id);\n\n/*************************************************"
	    "**********************\n * VSM and VSC\n */\n\nstruct vsmw_clust"
	    "er *VRT_VSM_Cluster_New(VRT_CTX, size_t);\nvoid VRT_VSM_Cluster_"
	    "Destroy(VRT_CTX, struct vsmw_cluster **);\n\n#ifdef va_start\t"
	    "// XXX: hackish\nvoid *VRT_VSC_Allocv(struct vsmw_cluster "
	    "*, struct vsc_seg **,\n    const char *, size_t, const unsigned "
	    "char *, size_t, const char *, va_list);\nvoid *VRT_VSC_Alloc(str"
	    "uct vsmw_cluster *, struct vsc_seg **,\n    const char *, "
	    "size_t, const unsigned char *, size_t, const char *, ...);\n"
	    "#endif\nvoid VRT_VSC_Destroy(const char *, struct vsc_seg "
	    "*);\nvoid VRT_VSC_Hide(const struct vsc_seg *);\n"
	    "void VRT_VSC_Reveal(const struct vsc_seg *);\nsize_t VRT_VSC_Ove"
	    "rhead(size_t);\n\n/*********************************************"
	    "**************************\n * API to restrict the VCL in "
	    "various ways\n */\n\nstruct vclref;\nstruct vclref * VRT_VCL_Pre"
	    "vent_Cold(VRT_CTX, const char *);\nvoid VRT_VCL_Allow_Cold(struc"
	    "t vclref **);\n\nstruct vclref * VRT_VCL_Prevent_Discard(VRT_CTX"
	    ", const char *);\nvoid VRT_VCL_Allow_Discard(struct vclref "
	    "**);\n\n/*******************************************************"
	    "****************\n * Deprecated interfaces, do not use, they "
	    "will disappear at some point.\n */\n\nVCL_VOID VRT_synth_page(VR"
	    "T_CTX, VCL_STRANDS);\nint VRT_Stv(const char *nm);\n"
	);
	VSB_cat(sb, "\n");

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

	VSB_cat(sb, "/* ---===### include/vcl.h ###===--- */\n\n");
	VSB_cat(sb, "/*\n * NB:  This file is machine generated, DO "
	    "NOT EDIT!\n *\n * Edit and run lib/libvcc/generate.py instead.\n"
	    " */\n\n\n#ifdef VCL_H_INCLUDED\n#  error \"vcl.h included "
	    "multiple times\"\n#endif\n#define VCL_H_INCLUDED\n"
	    "\n#ifndef VRT_H_INCLUDED\n#  error \"include vrt.h before "
	    "vcl.h\"\n#endif\n\n/* VCL Methods */\n#define VCL_MET_RECV\t"
	    "\t\t(1U << 1)\n#define VCL_MET_PIPE\t\t\t(1U << 2)\n"
	    "#define VCL_MET_PASS\t\t\t(1U << 3)\n#define VCL_MET_HASH\t"
	    "\t\t(1U << 4)\n#define VCL_MET_PURGE\t\t\t(1U << 5)\n"
	    "#define VCL_MET_MISS\t\t\t(1U << 6)\n#define VCL_MET_HIT\t\t"
	    "\t(1U << 7)\n#define VCL_MET_DELIVER\t\t\t(1U << 8)\n"
	    "#define VCL_MET_SYNTH\t\t\t(1U << 9)\n#define VCL_MET_BACKEND_FE"
	    "TCH\t\t(1U << 10)\n#define VCL_MET_BACKEND_REFRESH\t\t(1U "
	    "<< 11)\n#define VCL_MET_BACKEND_RESPONSE\t(1U << 12)\n"
	    "#define VCL_MET_BACKEND_ERROR\t\t(1U << 13)\n#define VCL_MET_INI"
	    "T\t\t\t(1U << 14)\n#define VCL_MET_FINI\t\t\t(1U << 15)\n"
	    "\n#define VCL_MET_MAX\t\t\t16\n\n#define VCL_MET_MASK\t\t\t"
	    "0xffff\n\n#define VCL_MET_TASK_B\t\t\t( VCL_MET_BACKEND_FETCH "
	    "| \\\n\t\t\t\t\t  VCL_MET_BACKEND_REFRESH | \\\n\t\t\t\t\t "
	    " VCL_MET_BACKEND_RESPONSE | \\\n\t\t\t\t\t  VCL_MET_BACKEND_ERRO"
	    "R )\n#define VCL_MET_TASK_C\t\t\t( VCL_MET_RECV | \\\n"
	    "\t\t\t\t\t  VCL_MET_PIPE | \\\n\t\t\t\t\t  VCL_MET_PASS | "
	    "\\\n\t\t\t\t\t  VCL_MET_HASH | \\\n\t\t\t\t\t  VCL_MET_PURGE "
	    "| \\\n\t\t\t\t\t  VCL_MET_MISS | \\\n\t\t\t\t\t  VCL_MET_HIT "
	    "| \\\n\t\t\t\t\t  VCL_MET_DELIVER | \\\n\t\t\t\t\t  VCL_MET_SYNT"
	    "H )\n#define VCL_MET_TASK_H\t\t\t( VCL_MET_INIT | \\\n"
	    "\t\t\t\t\t  VCL_MET_FINI )\n\n#define VCL_MET_TASK_ALL\t\t( "
	    "VCL_MET_TASK_C | \\\n\t\t\t\t\t  VCL_MET_TASK_B | \\\n"
	    "\t\t\t\t\t  VCL_MET_TASK_H )\n/* VCL Returns */\n"
	    "#define VCL_RET_ABANDON\t\t\t1\n#define VCL_RET_BERESP\t\t\t"
	    "2\n#define VCL_RET_DELIVER\t\t\t3\n#define VCL_RET_ERROR\t\t"
	    "\t4\n#define VCL_RET_FAIL\t\t\t5\n#define VCL_RET_FETCH\t\t"
	    "\t6\n#define VCL_RET_HASH\t\t\t7\n#define VCL_RET_LOOKUP\t\t"
	    "\t8\n#define VCL_RET_MERGE\t\t\t9\n#define VCL_RET_OBJ_STALE\t"
	    "\t10\n#define VCL_RET_OK\t\t\t11\n#define VCL_RET_PASS\t\t\t"
	    "12\n#define VCL_RET_PIPE\t\t\t13\n#define VCL_RET_PURGE\t\t"
	    "\t14\n#define VCL_RET_RESTART\t\t\t15\n#define VCL_RET_RETRY\t"
	    "\t\t16\n#define VCL_RET_SYNTH\t\t\t17\n#define VCL_RET_VCL\t"
	    "\t\t18\n\n#define VCL_RET_MAX\t\t\t19\n\n/* VCL Types */\n"
	    "\nstruct vrt_type {\n\tunsigned\t\tmagic;\n#define VRT_TYPE_MAGI"
	    "C\t\t0xa943bc32\n\tconst char\t\t*lname;\n\tconst char\t\t*uname"
	    ";\n\tconst char\t\t*ctype;\n\tsize_t\t\t\tszof;\n"
	    "};\n\nextern const struct vrt_type VCL_TYPE_ACL[1];\n"
	    "extern const struct vrt_type VCL_TYPE_BACKEND[1];\n"
	    "extern const struct vrt_type VCL_TYPE_BLOB[1];\nextern const "
	    "struct vrt_type VCL_TYPE_BODY[1];\nextern const struct vrt_type "
	    "VCL_TYPE_BOOL[1];\nextern const struct vrt_type VCL_TYPE_BYTES[1"
	    "];\nextern const struct vrt_type VCL_TYPE_DURATION[1];\n"
	    "extern const struct vrt_type VCL_TYPE_ENUM[1];\nextern const "
	    "struct vrt_type VCL_TYPE_HEADER[1];\nextern const struct vrt_typ"
	    "e VCL_TYPE_HTTP[1];\nextern const struct vrt_type VCL_TYPE_INSTA"
	    "NCE[1];\nextern const struct vrt_type VCL_TYPE_INT[1];\n"
	    "extern const struct vrt_type VCL_TYPE_IP[1];\nextern const "
	    "struct vrt_type VCL_TYPE_PROBE[1];\nextern const struct vrt_type"
	    " VCL_TYPE_REAL[1];\nextern const struct vrt_type VCL_TYPE_REGEX["
	    "1];\nextern const struct vrt_type VCL_TYPE_STEVEDORE[1];\n"
	    "extern const struct vrt_type VCL_TYPE_STRANDS[1];\n"
	    "extern const struct vrt_type VCL_TYPE_STRING[1];\n"
	    "extern const struct vrt_type VCL_TYPE_STRINGS[1];\n"
	    "extern const struct vrt_type VCL_TYPE_SUB[1];\nextern const "
	    "struct vrt_type VCL_TYPE_TIME[1];\nextern const struct vrt_type "
	    "VCL_TYPE_VCL[1];\nextern const struct vrt_type VCL_TYPE_VOID[1];"
	    "\n\n/* Compiled VCL Interface */\ntypedef int vcl_event_f(VRT_CT"
	    "X, enum vcl_event_e);\ntypedef int vcl_init_f(VRT_CTX);\n"
	    "typedef void vcl_fini_f(VRT_CTX);\n\nstruct VCL_conf {\n"
	    "\tunsigned\t\tmagic;\n#define VCL_CONF_MAGIC\t\t0x7406c509 "
	    "     /* from /dev/random */\n\n\tunsigned\t\tsyntax;\n"
	    "\tVCL_BACKEND\t\t*default_director;\n\tVCL_PROBE\t\tdefault_prob"
	    "e;\n\tunsigned\t\tnref;\n\tconst struct vpi_ref\t*ref;\n"
	    "\n\tunsigned\t\tnsrc;\n\tunsigned\t\tnsub;\n\tconst char\t\t"
	    "**srcname;\n\tconst char\t\t**srcbody;\n\n\tint\t\t\tnvmod;\n"
	    "\tconst struct vpi_ii\t*instance_info;\n\n\tvcl_event_f\t\t"
	    "*event_vcl;\n\tvcl_func_f\t\t*recv_func;\n\tvcl_func_f\t\t*pipe_"
	    "func;\n\tvcl_func_f\t\t*pass_func;\n\tvcl_func_f\t\t*hash_func;\n"
	    "\tvcl_func_f\t\t*purge_func;\n\tvcl_func_f\t\t*miss_func;\n"
	    "\tvcl_func_f\t\t*hit_func;\n\tvcl_func_f\t\t*deliver_func;\n"
	    "\tvcl_func_f\t\t*synth_func;\n\tvcl_func_f\t\t*backend_fetch_fun"
	    "c;\n\tvcl_func_f\t\t*backend_refresh_func;\n\tvcl_func_f\t\t"
	    "*backend_response_func;\n\tvcl_func_f\t\t*backend_error_func;\n"
	    "\tvcl_func_f\t\t*init_func;\n\tvcl_func_f\t\t*fini_func;\n"
	    "\n};\n"
	);
	VSB_cat(sb, "\n");

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

	VSB_cat(sb, "/* ---===### include/vrt_obj.h ###===--- */\n\n");
	VSB_cat(sb, "/*\n * NB:  This file is machine generated, DO "
	    "NOT EDIT!\n *\n * Edit and run lib/libvcc/generate.py instead.\n"
	    " */\n\n\nVCL_STRING VRT_r_client_identity(VRT_CTX);\n"
	    "void VRT_l_client_identity(VRT_CTX, const char *, VCL_STRANDS);\n"
	    "\nVCL_IP VRT_r_client_ip(VRT_CTX);\n\nVCL_STRING VRT_r_server_ho"
	    "stname(VRT_CTX);\n\nVCL_STRING VRT_r_server_identity(VRT_CTX);\n"
	    "\nVCL_IP VRT_r_server_ip(VRT_CTX);\n\nVCL_IP VRT_r_remote_ip(VRT"
	    "_CTX);\n\nVCL_STRING VRT_r_local_endpoint(VRT_CTX);\n"
	    "\nVCL_IP VRT_r_local_ip(VRT_CTX);\n\nVCL_STRING VRT_r_local_sock"
	    "et(VRT_CTX);\n\nVCL_HTTP VRT_r_req(VRT_CTX);\n\nVCL_BACKEND "
	    "VRT_r_req_backend_hint(VRT_CTX);\nvoid VRT_l_req_backend_hint(VR"
	    "T_CTX, VCL_BACKEND);\n\nVCL_BOOL VRT_r_req_can_gzip(VRT_CTX);\n"
	    "\nVCL_BOOL VRT_r_req_esi(VRT_CTX);\nvoid VRT_l_req_esi(VRT_CTX, "
	    "VCL_BOOL);\n\nVCL_INT VRT_r_req_esi_level(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_req_filters(VRT_CTX);\nvoid VRT_l_req_filters"
	    "(VRT_CTX, const char *, VCL_STRANDS);\n\nVCL_DURATION VRT_r_req_"
	    "grace(VRT_CTX);\nvoid VRT_l_req_grace(VRT_CTX, VCL_DURATION);\n"
	    "void VRT_u_req_grace(VRT_CTX);\n\nVCL_BLOB VRT_r_req_hash(VRT_CT"
	    "X);\n\nVCL_BOOL VRT_r_req_hash_always_miss(VRT_CTX);\n"
	    "void VRT_l_req_hash_always_miss(VRT_CTX, VCL_BOOL);\n"
	    "\nVCL_BOOL VRT_r_req_hash_ignore_busy(VRT_CTX);\n"
	    "void VRT_l_req_hash_ignore_busy(VRT_CTX, VCL_BOOL);\n"
	    "\nVCL_BOOL VRT_r_req_hash_ignore_vary(VRT_CTX);\n"
	    "void VRT_l_req_hash_ignore_vary(VRT_CTX, VCL_BOOL);\n"
	    "\nvoid VRT_u_req_http(VRT_CTX);\n\n\n\nVCL_BOOL VRT_r_req_is_hit"
	    "miss(VRT_CTX);\n\nVCL_BOOL VRT_r_req_is_hitpass(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_req_method(VRT_CTX);\nvoid VRT_l_req_method(V"
	    "RT_CTX, const char *, VCL_STRANDS);\n\nVCL_STRING VRT_r_req_prot"
	    "o(VRT_CTX);\nvoid VRT_l_req_proto(VRT_CTX, const char *, VCL_STR"
	    "ANDS);\n\n\nVCL_INT VRT_r_req_restarts(VRT_CTX);\n"
	    "\nVCL_STEVEDORE VRT_r_req_storage(VRT_CTX);\nvoid VRT_l_req_stor"
	    "age(VRT_CTX, VCL_STEVEDORE);\n\nVCL_TIME VRT_r_req_time(VRT_CTX)"
	    ";\n\nVCL_BOOL VRT_r_req_trace(VRT_CTX);\nvoid VRT_l_req_trace(VR"
	    "T_CTX, VCL_BOOL);\n\nVCL_STRING VRT_r_req_transport(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_req_max_age(VRT_CTX);\nvoid VRT_l_req_max_a"
	    "ge(VRT_CTX, VCL_DURATION);\nvoid VRT_u_req_max_age(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_req_ttl(VRT_CTX);\nvoid VRT_l_req_ttl(VRT_C"
	    "TX, VCL_DURATION);\nvoid VRT_u_req_ttl(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_req_url(VRT_CTX);\nvoid VRT_l_req_url(VRT_CTX"
	    ", const char *, VCL_STRANDS);\n\nVCL_INT VRT_r_req_xid(VRT_CTX);"
	    "\n\n\nVCL_STRING VRT_r_req_top_method(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_req_top_proto(VRT_CTX);\n\nVCL_TIME VRT_r_req"
	    "_top_time(VRT_CTX);\n\nVCL_STRING VRT_r_req_top_url(VRT_CTX);\n"
	    "\nVCL_HTTP VRT_r_bereq(VRT_CTX);\n\nVCL_BACKEND VRT_r_bereq_back"
	    "end(VRT_CTX);\nvoid VRT_l_bereq_backend(VRT_CTX, VCL_BACKEND);\n"
	    "\nVCL_DURATION VRT_r_bereq_between_bytes_timeout(VRT_CTX);\n"
	    "void VRT_l_bereq_between_bytes_timeout(VRT_CTX, VCL_DURATION);\n"
	    "void VRT_u_bereq_between_bytes_timeout(VRT_CTX);\n"
	    "\nvoid VRT_u_bereq_body(VRT_CTX);\n\nVCL_DURATION VRT_r_bereq_co"
	    "nnect_timeout(VRT_CTX);\nvoid VRT_l_bereq_connect_timeout(VRT_CT"
	    "X, VCL_DURATION);\nvoid VRT_u_bereq_connect_timeout(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_bereq_filters(VRT_CTX);\nvoid VRT_l_bereq_fil"
	    "ters(VRT_CTX, const char *, VCL_STRANDS);\n\nVCL_DURATION "
	    "VRT_r_bereq_first_byte_timeout(VRT_CTX);\nvoid VRT_l_bereq_first"
	    "_byte_timeout(VRT_CTX, VCL_DURATION);\nvoid VRT_u_bereq_first_by"
	    "te_timeout(VRT_CTX);\n\nVCL_BLOB VRT_r_bereq_hash(VRT_CTX);\n"
	    "\nvoid VRT_u_bereq_http(VRT_CTX);\n\n\n\nVCL_BOOL VRT_r_bereq_is"
	    "_bgfetch(VRT_CTX);\n\nVCL_BOOL VRT_r_bereq_is_hitmiss(VRT_CTX);\n"
	    "\nVCL_BOOL VRT_r_bereq_is_hitpass(VRT_CTX);\n\nVCL_STRING "
	    "VRT_r_bereq_method(VRT_CTX);\nvoid VRT_l_bereq_method(VRT_CTX, "
	    "const char *, VCL_STRANDS);\n\nVCL_STRING VRT_r_bereq_proto(VRT_"
	    "CTX);\nvoid VRT_l_bereq_proto(VRT_CTX, const char *, VCL_STRANDS"
	    ");\n\n\nVCL_INT VRT_r_bereq_retries(VRT_CTX);\n\n"
	    "VCL_BOOL VRT_r_bereq_retry_connect(VRT_CTX);\nvoid VRT_l_bereq_r"
	    "etry_connect(VRT_CTX, VCL_BOOL);\n\nVCL_DURATION VRT_r_bereq_tas"
	    "k_deadline(VRT_CTX);\nvoid VRT_l_bereq_task_deadline(VRT_CTX, "
	    "VCL_DURATION);\nvoid VRT_u_bereq_task_deadline(VRT_CTX);\n"
	    "\nVCL_TIME VRT_r_bereq_time(VRT_CTX);\n\nVCL_BOOL VRT_r_bereq_tr"
	    "ace(VRT_CTX);\nvoid VRT_l_bereq_trace(VRT_CTX, VCL_BOOL);\n"
	    "\nVCL_BOOL VRT_r_bereq_uncacheable(VRT_CTX);\n\nVCL_STRING "
	    "VRT_r_bereq_url(VRT_CTX);\nvoid VRT_l_bereq_url(VRT_CTX, const "
	    "char *, VCL_STRANDS);\n\nVCL_INT VRT_r_bereq_xid(VRT_CTX);\n"
	    "\nVCL_HTTP VRT_r_beresp(VRT_CTX);\n\nVCL_DURATION VRT_r_beresp_a"
	    "ge(VRT_CTX);\n\nVCL_BACKEND VRT_r_beresp_backend(VRT_CTX);\n"
	    "\nVCL_IP VRT_r_beresp_backend_ip(VRT_CTX);\n\nVCL_STRING VRT_r_b"
	    "eresp_backend_name(VRT_CTX);\n\nvoid VRT_l_beresp_body(VRT_CTX, "
	    "enum lbody_e, const char *, const void *);\n\nVCL_BOOL VRT_r_ber"
	    "esp_do_esi(VRT_CTX);\nvoid VRT_l_beresp_do_esi(VRT_CTX, VCL_BOOL"
	    ");\n\nVCL_BOOL VRT_r_beresp_do_gunzip(VRT_CTX);\n"
	    "void VRT_l_beresp_do_gunzip(VRT_CTX, VCL_BOOL);\n"
	    "\nVCL_BOOL VRT_r_beresp_do_gzip(VRT_CTX);\nvoid VRT_l_beresp_do_"
	    "gzip(VRT_CTX, VCL_BOOL);\n\nVCL_BOOL VRT_r_beresp_do_stream(VRT_"
	    "CTX);\nvoid VRT_l_beresp_do_stream(VRT_CTX, VCL_BOOL);\n"
	    "\nVCL_STRING VRT_r_beresp_filters(VRT_CTX);\nvoid VRT_l_beresp_f"
	    "ilters(VRT_CTX, const char *, VCL_STRANDS);\n\nVCL_DURATION "
	    "VRT_r_beresp_grace(VRT_CTX);\nvoid VRT_l_beresp_grace(VRT_CTX, "
	    "VCL_DURATION);\n\nvoid VRT_u_beresp_http(VRT_CTX);\n"
	    "\n\n\nVCL_DURATION VRT_r_beresp_keep(VRT_CTX);\nvoid VRT_l_beres"
	    "p_keep(VRT_CTX, VCL_DURATION);\n\nVCL_STRING VRT_r_beresp_proto("
	    "VRT_CTX);\nvoid VRT_l_beresp_proto(VRT_CTX, const char *, "
	    "VCL_STRANDS);\n\n\nVCL_STRING VRT_r_beresp_reason(VRT_CTX);\n"
	    "void VRT_l_beresp_reason(VRT_CTX, const char *, VCL_STRANDS);\n"
	    "\nVCL_INT VRT_r_beresp_status(VRT_CTX);\nvoid VRT_l_beresp_statu"
	    "s(VRT_CTX, VCL_INT);\n\nVCL_STEVEDORE VRT_r_beresp_storage(VRT_C"
	    "TX);\nvoid VRT_l_beresp_storage(VRT_CTX, VCL_STEVEDORE);\n"
	    "\nVCL_TIME VRT_r_beresp_time(VRT_CTX);\n\nVCL_BYTES VRT_r_beresp"
	    "_transit_buffer(VRT_CTX);\nvoid VRT_l_beresp_transit_buffer(VRT_"
	    "CTX, VCL_BYTES);\n\nVCL_DURATION VRT_r_beresp_ttl(VRT_CTX);\n"
	    "void VRT_l_beresp_ttl(VRT_CTX, VCL_DURATION);\n\n"
	    "VCL_BOOL VRT_r_beresp_uncacheable(VRT_CTX);\nvoid VRT_l_beresp_u"
	    "ncacheable(VRT_CTX, VCL_BOOL);\n\nVCL_BOOL VRT_r_beresp_was_304("
	    "VRT_CTX);\n\nVCL_DURATION VRT_r_obj_stale_age(VRT_CTX);\n"
	    "\nVCL_BOOL VRT_r_obj_stale_can_esi(VRT_CTX);\n\nVCL_DURATION "
	    "VRT_r_obj_stale_grace(VRT_CTX);\n\nVCL_INT VRT_r_obj_stale_hits("
	    "VRT_CTX);\n\n\nVCL_DURATION VRT_r_obj_stale_keep(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_obj_stale_proto(VRT_CTX);\n\nVCL_STRING "
	    "VRT_r_obj_stale_reason(VRT_CTX);\n\nVCL_INT VRT_r_obj_stale_stat"
	    "us(VRT_CTX);\n\nVCL_STEVEDORE VRT_r_obj_stale_storage(VRT_CTX);\n"
	    "\nVCL_TIME VRT_r_obj_stale_time(VRT_CTX);\n\nVCL_DURATION "
	    "VRT_r_obj_stale_ttl(VRT_CTX);\n\nVCL_BOOL VRT_r_obj_stale_uncach"
	    "eable(VRT_CTX);\n\nVCL_BOOL VRT_r_obj_stale_is_valid(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_obj_age(VRT_CTX);\n\nVCL_BOOL VRT_r_obj_can"
	    "_esi(VRT_CTX);\n\nVCL_DURATION VRT_r_obj_grace(VRT_CTX);\n"
	    "\nVCL_INT VRT_r_obj_hits(VRT_CTX);\n\n\nVCL_DURATION VRT_r_obj_k"
	    "eep(VRT_CTX);\n\nVCL_STRING VRT_r_obj_proto(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_obj_reason(VRT_CTX);\n\nVCL_INT VRT_r_obj_sta"
	    "tus(VRT_CTX);\n\nVCL_STEVEDORE VRT_r_obj_storage(VRT_CTX);\n"
	    "\nVCL_TIME VRT_r_obj_time(VRT_CTX);\n\nVCL_DURATION VRT_r_obj_tt"
	    "l(VRT_CTX);\n\nVCL_BOOL VRT_r_obj_uncacheable(VRT_CTX);\n"
	    "\nVCL_HTTP VRT_r_resp(VRT_CTX);\n\nvoid VRT_l_resp_body(VRT_CTX,"
	    " enum lbody_e, const char *, const void *);\n\nVCL_BOOL VRT_r_re"
	    "sp_do_esi(VRT_CTX);\nvoid VRT_l_resp_do_esi(VRT_CTX, VCL_BOOL);\n"
	    "\nVCL_STRING VRT_r_resp_filters(VRT_CTX);\nvoid VRT_l_resp_filte"
	    "rs(VRT_CTX, const char *, VCL_STRANDS);\n\nvoid VRT_u_resp_http("
	    "VRT_CTX);\n\n\n\nVCL_BOOL VRT_r_resp_is_streaming(VRT_CTX);\n"
	    "\nVCL_STRING VRT_r_resp_proto(VRT_CTX);\nvoid VRT_l_resp_proto(V"
	    "RT_CTX, const char *, VCL_STRANDS);\n\n\nVCL_STRING VRT_r_resp_r"
	    "eason(VRT_CTX);\nvoid VRT_l_resp_reason(VRT_CTX, const char "
	    "*, VCL_STRANDS);\n\nVCL_INT VRT_r_resp_status(VRT_CTX);\n"
	    "void VRT_l_resp_status(VRT_CTX, VCL_INT);\n\nVCL_TIME VRT_r_resp"
	    "_time(VRT_CTX);\n\nVCL_TIME VRT_r_now(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_sess_idle_send_timeout(VRT_CTX);\n"
	    "void VRT_l_sess_idle_send_timeout(VRT_CTX, VCL_DURATION);\n"
	    "void VRT_u_sess_idle_send_timeout(VRT_CTX);\n\nVCL_DURATION "
	    "VRT_r_sess_send_timeout(VRT_CTX);\nvoid VRT_l_sess_send_timeout("
	    "VRT_CTX, VCL_DURATION);\nvoid VRT_u_sess_send_timeout(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_sess_timeout_idle(VRT_CTX);\n"
	    "void VRT_l_sess_timeout_idle(VRT_CTX, VCL_DURATION);\n"
	    "void VRT_u_sess_timeout_idle(VRT_CTX);\n\nVCL_DURATION VRT_r_ses"
	    "s_timeout_linger(VRT_CTX);\nvoid VRT_l_sess_timeout_linger(VRT_C"
	    "TX, VCL_DURATION);\nvoid VRT_u_sess_timeout_linger(VRT_CTX);\n"
	    "\nVCL_INT VRT_r_sess_xid(VRT_CTX);\n\nVCL_DURATION VRT_r_param_b"
	    "ackend_idle_timeout(VRT_CTX);\n\nVCL_INT VRT_r_param_backend_wai"
	    "t_limit(VRT_CTX);\n\nVCL_DURATION VRT_r_param_backend_wait_timeo"
	    "ut(VRT_CTX);\n\nVCL_DURATION VRT_r_param_between_bytes_timeout(V"
	    "RT_CTX);\n\nVCL_DURATION VRT_r_param_connect_timeout(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_default_grace(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_default_keep(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_default_ttl(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_first_byte_timeout(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_idle_send_timeout(VRT_CTX);\n"
	    "\nVCL_INT VRT_r_param_max_esi_depth(VRT_CTX);\n\n"
	    "VCL_INT VRT_r_param_max_restarts(VRT_CTX);\n\nVCL_INT VRT_r_para"
	    "m_max_retries(VRT_CTX);\n\nVCL_DURATION VRT_r_param_pipe_task_de"
	    "adline(VRT_CTX);\n\nVCL_DURATION VRT_r_param_pipe_timeout(VRT_CT"
	    "X);\n\nVCL_DURATION VRT_r_param_send_timeout(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_shortlived(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_timeout_idle(VRT_CTX);\n"
	    "\nVCL_BYTES VRT_r_param_transit_buffer(VRT_CTX);\n"
	    "\nVCL_DURATION VRT_r_param_uncacheable_ttl(VRT_CTX);\n"
	    "VCL_BYTES VRT_stevedore_free_space(VCL_STEVEDORE);\n"
	    "VCL_BYTES VRT_stevedore_used_space(VCL_STEVEDORE);\n"
	    "VCL_BOOL VRT_stevedore_happy(VCL_STEVEDORE);\n"
	);
	VSB_cat(sb, "\n");

	/* ../include/vcc_interface.h */

	VSB_cat(sb, "/* ---===### include/vcc_interface.h ###===--- */\n\n");
	VSB_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n"
	    " * Copyright (c) 2006-2019 Varnish Software AS\n * All rights "
	    "reserved.\n *\n * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>"
	    "\n *\n * SPDX-License-Identifier: BSD-2-Clause\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 * Runtime support for "
	    "compiled VCL programs and VMODs.\n *\n * This file contains "
	    "prototypes for functions nobody but VCC may call.\n"
	    " *\n * NB: When this file is changed, lib/libvcc/generate.py "
	    "*MUST* be rerun.\n */\n\nVCL_VCL VPI_vcl_get(VRT_CTX, const "
	    "char *);\nvoid VPI_vcl_rel(VRT_CTX, VCL_VCL);\nvoid VPI_vcl_sele"
	    "ct(VRT_CTX, VCL_VCL);\nvoid v_noreturn_ VPI_Fail(const char "
	    "*func, const char *file, int line,\n    const char *cond);\n"
	    "\n/*************************************************************"
	    "**********\n * VPI_count() refers to this structure for coordina"
	    "tes into the VCL source.\n */\n\nstruct vpi_ref {\n"
	    "\tunsigned\tmagic;\n#define VPI_REF_MAGIC\t0xd955f567\n"
	    "\tunsigned\tsource;\n\tunsigned\toffset;\n\tunsigned\tline;\n"
	    "\tunsigned\tpos;\n\tconst char\t*token;\n};\n\n/* VPI's private "
	    "part of the worker */\nstruct wrk_vpi {\n\tunsigned\tmagic;\n"
	    "#define WRK_VPI_MAGIC\t0xaa3d3df3\n\tunsigned\thandling;\n"
	    "\tunsigned\ttrace;\t// caches (be)req.trace\n\tunsigned\tref;\t"
	    "// index into (struct vpi_ref)[]\n};\n\n#define VPI_count(ctx, "
	    "max, u) \\\n\tdo {\t\t\t\t\t\t\t\\\n\t\tassert(u < max);\t\t"
	    "\t\t\\\n\t\t(ctx)->vpi->ref = u;\t\t\t\t\\\n\t} while(0)\n"
	    "void VPI_trace(VRT_CTX, unsigned);\nvoid VPI_vcl_fini(VRT_CTX);\n"
	    "\nint VPI_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, "
	    "void *ptr, int len,\n    const char *nm, const char *path, "
	    "const char *file_id, const char *backup);\nvoid VPI_Vmod_Unload("
	    "VRT_CTX, struct vmod **hdl);\n\ntypedef int acl_match_f(VRT_CTX,"
	    " const VCL_IP);\nint VPI_acl_table(VRT_CTX, VCL_IP, unsigned "
	    "n, unsigned m, const uint8_t *tbl,\n    const char * const "
	    "*str, const char *fin);\n\nstruct vrt_acl {\n\tunsigned   "
	    "     magic;\n#define VRT_ACL_MAGIC   0x78329d96\n"
	    "\tacl_match_f     *match;\n\tconst char\t*name;\n"
	    "};\n\nvoid VPI_acl_log(VRT_CTX, const char *);\n\n"
	    "/* vmod object instance info */\nstruct vpi_ii {\n"
	    "\tuintptr_t *\t\t\tp;\n\tconst char * const\t\tname;\n"
	    "};\n\n/* Compile time regexp */\n\nvoid VPI_re_init(struct "
	    "vre **, const char *);\nvoid VPI_re_fini(struct vre *);\n"
	    "\n/* VCL_SUB type */\n\nstruct vcl_sub {\n\tunsigned\t\tmagic;\n"
	    "#define VCL_SUB_MAGIC\t\t0x12c1750b\n\tconst unsigned\t\tmethods"
	    ";\t// ok &= ctx->method\n\tconst char * const\tname;\n"
	    "\tconst struct VCL_conf\t*vcl_conf;\n\tvcl_func_f\t\t*func;\n"
	    "\tunsigned\t\tn;\n\tunsigned\t\tnref;\n\tunsigned\t\tcalled;\n"
	    "};\n\nenum vcl_func_fail_e VPI_Call_Check(VRT_CTX, const struct "
	    "VCL_conf *conf,\n    unsigned methods, unsigned n);\n"
	    "void VPI_Call_Begin(VRT_CTX, unsigned n);\nvoid VPI_Call_End(VRT"
	    "_CTX, unsigned n);\nVCL_BOOL VPI_PtrCmp(const void *p1, const "
	    "void *p2);\n"
	);
	VSB_cat(sb, "\n");
	VSB_cat(sb, "/* ---===### vgc asserts (generate.py) ###===--- */\n\n");
	VSB_cat(sb, "#define assert(e)\t\t\t\t\t\t\t\\\ndo {\t\t\t\t"
	    "\t\t\t\t\t\\\n\tif (!(e)) {\t\t\t\t\t\t\t\\\n\t\tVPI_Fail(__func"
	    "__, __FILE__, __LINE__, #e);\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n"
	    "} while (0)\n"
	);
	VSB_cat(sb, "\n");

}
