Commit 371611dd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

GC support code for the old backend specification code.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2420 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c37823b0
......@@ -6,10 +6,6 @@
* Edit vcc_gen_obj.tcl instead
*/
void VRT_l_backend_host(struct backend *, const char *);
void VRT_l_backend_port(struct backend *, const char *);
void VRT_l_backend_dnsttl(struct backend *, double);
void VRT_l_backend_set(struct backend *, struct vrt_backend_entry *);
struct sockaddr * VRT_r_client_ip(const struct sess *);
struct sockaddr * VRT_r_server_ip(struct sess *);
const char * VRT_r_req_request(const struct sess *);
......
......@@ -692,15 +692,10 @@ VCC_CompileFile(struct vsb *sb, const char *fn, int fd)
void
VCC_InitCompile(const char *default_vcl)
{
struct var *v;
vcc_default_vcl_b = default_vcl;
vcc_default_vcl_e = strchr(default_vcl, '\0');
assert(vcc_default_vcl_e != NULL);
vcl_init_tnames();
for (v = vcc_vars; v->name != NULL; v++)
v->len = strlen(v->name);
for (v = vcc_be_vars; v->name != NULL; v++)
v->len = strlen(v->name);
}
......@@ -106,11 +106,8 @@ enum var_type {
RTIME,
STRING,
IP,
HOSTNAME,
PORTNAME,
HASH,
HEADER,
SET
HEADER
};
enum var_access {
......@@ -177,7 +174,6 @@ void TlFree(struct tokenlist *tl, void *p);
void *TlAlloc(struct tokenlist *tl, unsigned len);
/* vcc_obj.c */
extern struct var vcc_be_vars[];
extern struct var vcc_vars[];
/* vcc_parse.c */
......
......@@ -505,10 +505,6 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, " * Edit vcc_gen_obj.tcl instead\n");
vsb_cat(sb, " */\n");
vsb_cat(sb, "\n");
vsb_cat(sb, "void VRT_l_backend_host(struct backend *, const char *);\n");
vsb_cat(sb, "void VRT_l_backend_port(struct backend *, const char *);\n");
vsb_cat(sb, "void VRT_l_backend_dnsttl(struct backend *, double);\n");
vsb_cat(sb, "void VRT_l_backend_set(struct backend *, struct vrt_backend_entry *);\n");
vsb_cat(sb, "struct sockaddr * VRT_r_client_ip(const struct sess *);\n");
vsb_cat(sb, "struct sockaddr * VRT_r_server_ip(struct sess *);\n");
vsb_cat(sb, "const char * VRT_r_req_request(const struct sess *);\n");
......@@ -521,8 +517,8 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, "struct backend * VRT_r_req_backend(struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_backend(struct sess *, struct backend *);\n");
vsb_cat(sb, "int VRT_r_req_restarts(const struct sess *);\n");
vsb_cat(sb, "double VRT_r_req_grace(const struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_grace(const struct sess *, double);\n");
vsb_cat(sb, "double 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_bereq_request(const struct sess *);\n");
vsb_cat(sb, "void VRT_l_bereq_request(const struct sess *, const char *, ...);\n");
vsb_cat(sb, "const char * VRT_r_bereq_url(const struct sess *);\n");
......
......@@ -30,13 +30,6 @@
# Generate various .c and .h files for the VCL compiler and the interfaces
# for it.
# Objects available in backends
set beobj {
{ backend.host WO HOSTNAME {} "struct backend *"}
{ backend.port WO PORTNAME {} "struct backend *"}
{ backend.dnsttl WO TIME {} "struct backend *"}
{ backend.set WO SET {} "struct backend *"}
}
# Variables available in sessions
# Comments are stripped from #...\n
......@@ -316,12 +309,6 @@ puts $fo "#include <stdio.h>"
puts $fo "#include \"vcc_compile.h\""
puts $fo ""
puts $fo "struct var vcc_be_vars\[\] = {"
vars $beobj "backend"
puts $fo "};"
puts $fo ""
puts $fo "struct var vcc_vars\[\] = {"
vars $spobj "sp"
puts $fo "};"
......
......@@ -9,38 +9,6 @@
#include <stdio.h>
#include "vcc_compile.h"
struct var vcc_be_vars[] = {
{ "backend.host", HOSTNAME, 12,
NULL,
"VRT_l_backend_host(backend, ",
V_WO,
0,
0
},
{ "backend.port", PORTNAME, 12,
NULL,
"VRT_l_backend_port(backend, ",
V_WO,
0,
0
},
{ "backend.dnsttl", TIME, 14,
NULL,
"VRT_l_backend_dnsttl(backend, ",
V_WO,
0,
0
},
{ "backend.set", SET, 11,
NULL,
"VRT_l_backend_set(backend, ",
V_WO,
0,
0
},
{ NULL }
};
struct var vcc_vars[] = {
{ "client.ip", IP, 9,
"VRT_r_client_ip(sp)",
......
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