VCL_MET_MAC(miss,MISS,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_FETCH))
VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_DELIVER))
VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_INSERT))
+VCL_MET_MAC(deliver,DELIVER,(VCL_RET_ERROR|VCL_RET_DELIVER))
VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))
VCL_MET_MAC(discard,DISCARD,(VCL_RET_DISCARD|VCL_RET_KEEP))
#else
#define VCL_MET_MISS (1 << 4)
#define VCL_MET_HIT (1 << 5)
#define VCL_MET_FETCH (1 << 6)
-#define VCL_MET_TIMEOUT (1 << 7)
-#define VCL_MET_DISCARD (1 << 8)
+#define VCL_MET_DELIVER (1 << 7)
+#define VCL_MET_TIMEOUT (1 << 8)
+#define VCL_MET_DISCARD (1 << 9)
#endif
-#define N_METHODS 9
+#define N_METHODS 10
vsb_cat(sb, " vcl_func_f *miss_func;\n");
vsb_cat(sb, " vcl_func_f *hit_func;\n");
vsb_cat(sb, " vcl_func_f *fetch_func;\n");
+ vsb_cat(sb, " vcl_func_f *deliver_func;\n");
vsb_cat(sb, " vcl_func_f *timeout_func;\n");
vsb_cat(sb, " vcl_func_f *discard_func;\n");
vsb_cat(sb, "};\n");
vsb_cat(sb, " * Edit vcc_gen_obj.tcl instead\n");
vsb_cat(sb, " */\n");
vsb_cat(sb, "\n");
- vsb_cat(sb, "const char * VRT_r_backend_host(struct backend *);\n");
vsb_cat(sb, "void VRT_l_backend_host(struct backend *, const char *);\n");
- vsb_cat(sb, "const char * VRT_r_backend_port(struct backend *);\n");
vsb_cat(sb, "void VRT_l_backend_port(struct backend *, const char *);\n");
- vsb_cat(sb, "double VRT_r_backend_dnsttl(struct backend *);\n");
vsb_cat(sb, "void VRT_l_backend_dnsttl(struct backend *, double);\n");
vsb_cat(sb, "struct sockaddr * VRT_r_client_ip(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_client_ip(struct sess *, struct sockaddr *);\n");
vsb_cat(sb, "struct sockaddr * VRT_r_server_ip(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_server_ip(struct sess *, struct sockaddr *);\n");
vsb_cat(sb, "const char * VRT_r_req_request(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_req_request(struct sess *, const char *);\n");
- vsb_cat(sb, "const char * VRT_r_req_host(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_req_host(struct sess *, const char *);\n");
vsb_cat(sb, "const char * VRT_r_req_url(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_req_url(struct sess *, const char *);\n");
vsb_cat(sb, "const char * VRT_r_req_proto(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_req_proto(struct sess *, const char *);\n");
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, "const char * VRT_r_req_http_(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_req_http_(struct sess *, const char *);\n");
- vsb_cat(sb, "const char * VRT_r_req_hash(struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_hash(struct sess *, const char *);\n");
vsb_cat(sb, "unsigned VRT_r_obj_valid(struct sess *);\n");
vsb_cat(sb, "void VRT_l_obj_valid(struct sess *, unsigned);\n");
vsb_cat(sb, "double VRT_r_obj_ttl(struct sess *);\n");
vsb_cat(sb, "void VRT_l_obj_ttl(struct sess *, double);\n");
vsb_cat(sb, "const char * VRT_r_resp_proto(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_resp_proto(struct sess *, const char *);\n");
vsb_cat(sb, "int VRT_r_resp_status(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_resp_status(struct sess *, int);\n");
vsb_cat(sb, "const char * VRT_r_resp_response(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_resp_response(struct sess *, const char *);\n");
vsb_cat(sb, "const char * VRT_r_resp_http_(struct sess *);\n");
- vsb_cat(sb, "void VRT_l_resp_http_(struct sess *, const char *);\n");
}