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

Start segregating the very private API between VCC and Varnishd

which nobody else is allowed to even think about calling.
parent ee042fc9
......@@ -38,6 +38,8 @@
#include "vcl.h"
#include "vtim.h"
#include "vcc_interface.h"
#include "cache_director.h"
#include "cache_vcl.h"
......
......@@ -35,7 +35,7 @@
///////////////////////////////////////////////////////////////////////
// General stylistic issues
-e663 // Suspicious array to pointer conversion
-e574 // Signed-unsigned mix with relational
//-e574 // Signed-unsigned mix with relational
-e641 // Converting enum '...' to int
-e716 // while(1) ...
-e726 // Extraneous comma ignored
......
......@@ -86,6 +86,7 @@ nobase_noinst_HEADERS = \
compat/daemon.h \
vfl.h \
libvcc.h \
vcc_interface.h \
vcli_serve.h \
vcs_version.h \
vct.h \
......
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2019 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Runtime support for compiled VCL programs and VMODs.
*
* This file contains prototypes for functions nobody but VCC may call.
*
* NB: When this file is changed, lib/libvcc/generate.py *MUST* be rerun.
*/
VCL_VCL VRT_vcl_get(VRT_CTX, const char *);
void VRT_vcl_rel(VRT_CTX, VCL_VCL);
void VRT_vcl_select(VRT_CTX, VCL_VCL);
......@@ -52,6 +52,9 @@
* binary/load-time compatible, increment MAJOR version
*
* unreleased (planned for 2019-09-15)
* VRT_vcl_get moved to vcc_interface.h
* VRT_vcl_rel emoved to vcc_interface.h
* VRT_vcl_select emoved to vcc_interface.h
* [cache.h] WS_ReserveAll() added
* [cache.h] WS_Reserve(ws, 0) deprecated
* 9.0 (2019-03-15)
......@@ -110,8 +113,6 @@
* VRT_ipcmp added
* VRT_Vmod_Init signature changed
* VRT_vcl_lookup removed
* VRT_vcl_get added
* VRT_vcl_rel added
* VRT_fail added
* [cache.h] WS_Reset and WS_Snapshot signatures changed
* [cache.h] WS_Front added
......@@ -527,11 +528,6 @@ int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
const char *nm, const char *path, const char *file_id, const char *backup);
void VRT_Vmod_Unload(VRT_CTX, struct vmod **hdl);
/* VCL program related */
VCL_VCL VRT_vcl_get(VRT_CTX, const char *);
void VRT_vcl_rel(VRT_CTX, VCL_VCL);
void VRT_vcl_select(VRT_CTX, VCL_VCL);
typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e);
typedef void vmod_priv_free_f(void *);
......
......@@ -779,6 +779,7 @@ vcl_output_lang_h(struct vsb *sb)
emit_file(fo, srcroot, "include/vdef.h")
emit_file(fo, srcroot, "include/vrt.h")
emit_file(fo, srcroot, "include/vcc_interface.h")
emit_file(fo, buildroot, "include/vcl.h")
emit_file(fo, buildroot, "include/vrt_obj.h")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment