[master] 17937b2 Move the varnishd table building #includes under tbl/ as well.

Poul-Henning Kamp phk at varnish-cache.org
Sat Oct 8 16:57:06 CEST 2011


commit 17937b2954fb6b422d8c7b9b0b68a95f46fc825b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Oct 8 14:56:41 2011 +0000

    Move the varnishd table building #includes under tbl/ as well.

diff --git a/bin/varnishd/Makefile.am b/bin/varnishd/Makefile.am
index 0dbc745..b1f2a5c 100644
--- a/bin/varnishd/Makefile.am
+++ b/bin/varnishd/Makefile.am
@@ -78,21 +78,16 @@ varnishd_SOURCES = \
 	vsm.c
 
 noinst_HEADERS = \
-	acct_fields.h \
-	body_status.h \
 	cache.h \
 	cache_backend.h \
-	cache_backend_poll.h \
 	cache_esi.h \
 	cache_waiter.h \
 	common.h \
 	default_vcl.h \
 	hash_slinger.h \
 	heritage.h \
-	locks.h \
 	mgt.h \
 	mgt_cli.h \
-	steps.h \
 	stevedore.h \
 	storage_persistent.h \
 	vparam.h
diff --git a/bin/varnishd/acct_fields.h b/bin/varnishd/acct_fields.h
deleted file mode 100644
index 154f106..0000000
--- a/bin/varnishd/acct_fields.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * Copyright (c) 2008 Verdens Gang AS
- * Copyright (c) 2008-2009 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at 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.
- *
- * These are the stats we keep track of per session.  They will be summed,
- * via the sp->wrk->stats into the s_<name> fields in the SHM file.
- * NB: Remember to mark those in vsc_fields.h to be included in struct dstat.
- */
-
-ACCT(sess)
-ACCT(req)
-ACCT(pipe)
-ACCT(pass)
-ACCT(fetch)
-ACCT(hdrbytes)
-ACCT(bodybytes)
diff --git a/bin/varnishd/body_status.h b/bin/varnishd/body_status.h
deleted file mode 100644
index 33803f9..0000000
--- a/bin/varnishd/body_status.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * Copyright (c) 2011 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at 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.
- *
- * Various ways to handle the body coming from the backend.
- */
-
-/*lint -save -e525 -e539 */
-BODYSTATUS(NONE, none)
-BODYSTATUS(ZERO, zero)
-BODYSTATUS(ERROR, error)
-BODYSTATUS(CHUNKED, chunked)
-BODYSTATUS(LENGTH, length)
-BODYSTATUS(EOF, eof)
-/*lint -restore */
diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h
index f46634a..c9b3ac2 100644
--- a/bin/varnishd/cache.h
+++ b/bin/varnishd/cache.h
@@ -67,7 +67,7 @@
 
 enum body_status {
 #define BODYSTATUS(U,l)	BS_##U,
-#include "body_status.h"
+#include "tbl/body_status.h"
 #undef BODYSTATUS
 };
 
@@ -76,7 +76,7 @@ body_status(enum body_status e)
 {
 	switch(e) {
 #define BODYSTATUS(U,l)	case BS_##U: return (#l);
-#include "body_status.h"
+#include "tbl/body_status.h"
 #undef BODYSTATUS
 	default:
 		return ("?");
@@ -143,7 +143,7 @@ typedef struct {
 
 enum step {
 #define STEP(l, u)	STP_##u,
-#include "steps.h"
+#include "tbl/steps.h"
 #undef STEP
 };
 
@@ -213,7 +213,7 @@ struct http_conn {
 struct acct {
 	double			first;
 #define ACCT(foo)	uint64_t	foo;
-#include "acct_fields.h"
+#include "tbl/acct_fields.h"
 #undef ACCT
 };
 
@@ -834,7 +834,7 @@ int Lck_CondWait(pthread_cond_t *cond, struct lock *lck, struct timespec *ts);
 #define Lck_AssertHeld(a) Lck__Assert(a, 1)
 
 #define LOCK(nam) extern struct VSC_C_lck *lck_##nam;
-#include "locks.h"
+#include "tbl/locks.h"
 #undef LOCK
 
 /* cache_panic.c */
diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c
index 5fae557..be8ee6a 100644
--- a/bin/varnishd/cache_backend_poll.c
+++ b/bin/varnishd/cache_backend_poll.c
@@ -78,7 +78,7 @@ struct vbp_target {
 
 	/* Collected statistics */
 #define BITMAP(n, c, t, b)	uint64_t	n;
-#include "cache_backend_poll.h"
+#include "tbl/backend_poll.h"
 #undef BITMAP
 
 	double				last;
@@ -236,7 +236,7 @@ vbp_start_poke(struct vbp_target *vt)
 	CHECK_OBJ_NOTNULL(vt, VBP_TARGET_MAGIC);
 
 #define BITMAP(n, c, t, b)	vt->n <<= 1;
-#include "cache_backend_poll.h"
+#include "tbl/backend_poll.h"
 #undef BITMAP
 
 	vt->last = 0;
@@ -262,7 +262,7 @@ vbp_has_poked(struct vbp_target *vt)
 
 	i = 0;
 #define BITMAP(n, c, t, b)	bits[i++] = (vt->n & 1) ? c : '-';
-#include "cache_backend_poll.h"
+#include "tbl/backend_poll.h"
 #undef BITMAP
 	bits[i] = '\0';
 
@@ -396,7 +396,7 @@ vbp_health_one(struct cli *cli, const struct vbp_target *vt)
 #define BITMAP(n, c, t, b)					\
 		if ((vt->n != 0) || (b))			\
 			vbp_bitmap(cli, (c), vt->n, (t));
-#include "cache_backend_poll.h"
+#include "tbl/backend_poll.h"
 #undef BITMAP
 }
 
diff --git a/bin/varnishd/cache_backend_poll.h b/bin/varnishd/cache_backend_poll.h
deleted file mode 100644
index a9ee3a3..0000000
--- a/bin/varnishd/cache_backend_poll.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * Copyright (c) 2008-2011 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at 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.
- *
- */
-
-BITMAP(good_ipv4, '4', "Good IPv4", 0)
-BITMAP(good_ipv6, '6', "Good IPv6", 0)
-BITMAP( err_xmit, 'x', "Error Xmit", 0)
-BITMAP(good_xmit, 'X', "Good Xmit", 0)
-BITMAP( err_recv, 'r', "Error Recv", 0)
-BITMAP(good_recv, 'R', "Good Recv", 0)
-BITMAP(happy,     'H', "Happy", 1)
diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index b4a056d..7e91137 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -1605,7 +1605,7 @@ CNT_Session(struct sess *sp)
 				cnt_diag(sp, #u); \
 			done = cnt_##l(sp); \
 		        break;
-#include "steps.h"
+#include "tbl/steps.h"
 #undef STEP
 		default:
 			WRONG("State engine misfire");
@@ -1621,7 +1621,7 @@ CNT_Session(struct sess *sp)
 	AZ(w->do_gunzip);
 	AZ(w->do_esi);
 #define ACCT(foo)	AZ(w->acct_tmp.foo);
-#include "acct_fields.h"
+#include "tbl/acct_fields.h"
 #undef ACCT
 	assert(WRW_IsReleased(w));
 }
diff --git a/bin/varnishd/cache_lck.c b/bin/varnishd/cache_lck.c
index b9229b3..18d1b41 100644
--- a/bin/varnishd/cache_lck.c
+++ b/bin/varnishd/cache_lck.c
@@ -196,7 +196,7 @@ Lck_Delete(struct lock *lck)
 }
 
 #define LOCK(nam) struct VSC_C_lck *lck_##nam;
-#include "locks.h"
+#include "tbl/locks.h"
 #undef LOCK
 
 void
@@ -207,6 +207,6 @@ LCK_Init(void)
 #define LOCK(nam)						\
 	lck_##nam = VSM_Alloc(sizeof(struct VSC_C_lck),		\
 	   VSC_CLASS, VSC_TYPE_LCK, #nam);
-#include "locks.h"
+#include "tbl/locks.h"
 #undef LOCK
 }
diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c
index 8ca1b4f..a9c5c15 100644
--- a/bin/varnishd/cache_panic.c
+++ b/bin/varnishd/cache_panic.c
@@ -223,7 +223,7 @@ pan_sess(const struct sess *sp)
 	    sp->port ? sp->port : "?");
 	switch (sp->step) {
 #define STEP(l, u) case STP_##u: stp = "STP_" #u; break;
-#include "steps.h"
+#include "tbl/steps.h"
 #undef STEP
 		default: stp = NULL;
 	}
diff --git a/bin/varnishd/cache_session.c b/bin/varnishd/cache_session.c
index 1f500ba..bb96780 100644
--- a/bin/varnishd/cache_session.c
+++ b/bin/varnishd/cache_session.c
@@ -83,7 +83,7 @@ SES_Charge(struct sess *sp)
 	sp->wrk->stats.s_##foo += a->foo;	\
 	sp->acct_ses.foo += a->foo;		\
 	a->foo = 0;
-#include "acct_fields.h"
+#include "tbl/acct_fields.h"
 #undef ACCT
 }
 
diff --git a/bin/varnishd/locks.h b/bin/varnishd/locks.h
deleted file mode 100644
index f1b634b..0000000
--- a/bin/varnishd/locks.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 2010 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at 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.
- *
- */
-
-/*lint -save -e525 -e539 */
-LOCK(sms)
-LOCK(smp)
-LOCK(sma)
-LOCK(smf)
-LOCK(hsl)
-LOCK(hcb)
-LOCK(hcl)
-LOCK(vcl)
-LOCK(sessmem)
-LOCK(wstat)
-LOCK(herder)
-LOCK(wq)
-LOCK(objhdr)
-LOCK(exp)
-LOCK(lru)
-LOCK(cli)
-LOCK(ban)
-LOCK(vbp)
-LOCK(vbe)
-LOCK(backend)
-LOCK(vcapace)
-/*lint -restore */
diff --git a/bin/varnishd/steps.h b/bin/varnishd/steps.h
deleted file mode 100644
index c88e434..0000000
--- a/bin/varnishd/steps.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2011 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at 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.
- *
- */
-
-/*lint -save -e525 -e539 */
-STEP(wait,	WAIT)
-STEP(first,	FIRST)
-STEP(recv,	RECV)
-STEP(start,	START)
-STEP(pipe,	PIPE)
-STEP(pass,	PASS)
-STEP(lookup,	LOOKUP)
-STEP(miss,	MISS)
-STEP(hit,	HIT)
-STEP(fetch,	FETCH)
-STEP(fetchbody,	FETCHBODY)
-STEP(streambody,STREAMBODY)
-STEP(prepresp,	PREPRESP)
-STEP(deliver,	DELIVER)
-STEP(error,	ERROR)
-STEP(done,	DONE)
-/*lint -restore */
diff --git a/include/Makefile.am b/include/Makefile.am
index de1b19a..652689b 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,6 +1,11 @@
 #
 
 pkginclude_HEADERS = \
+	tbl/acct_fields.h \
+	tbl/backend_poll.h \
+	tbl/body_status.h \
+	tbl/locks.h \
+	tbl/steps.h \
 	tbl/vsc_all.h \
 	tbl/vsc_fields.h \
 	tbl/vsl_tags.h \
diff --git a/include/tbl/acct_fields.h b/include/tbl/acct_fields.h
new file mode 100644
index 0000000..154f106
--- /dev/null
+++ b/include/tbl/acct_fields.h
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2008 Verdens Gang AS
+ * Copyright (c) 2008-2009 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at 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.
+ *
+ * These are the stats we keep track of per session.  They will be summed,
+ * via the sp->wrk->stats into the s_<name> fields in the SHM file.
+ * NB: Remember to mark those in vsc_fields.h to be included in struct dstat.
+ */
+
+ACCT(sess)
+ACCT(req)
+ACCT(pipe)
+ACCT(pass)
+ACCT(fetch)
+ACCT(hdrbytes)
+ACCT(bodybytes)
diff --git a/include/tbl/backend_poll.h b/include/tbl/backend_poll.h
new file mode 100644
index 0000000..a9ee3a3
--- /dev/null
+++ b/include/tbl/backend_poll.h
@@ -0,0 +1,36 @@
+/*-
+ * Copyright (c) 2008-2011 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at 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.
+ *
+ */
+
+BITMAP(good_ipv4, '4', "Good IPv4", 0)
+BITMAP(good_ipv6, '6', "Good IPv6", 0)
+BITMAP( err_xmit, 'x', "Error Xmit", 0)
+BITMAP(good_xmit, 'X', "Good Xmit", 0)
+BITMAP( err_recv, 'r', "Error Recv", 0)
+BITMAP(good_recv, 'R', "Good Recv", 0)
+BITMAP(happy,     'H', "Happy", 1)
diff --git a/include/tbl/body_status.h b/include/tbl/body_status.h
new file mode 100644
index 0000000..33803f9
--- /dev/null
+++ b/include/tbl/body_status.h
@@ -0,0 +1,38 @@
+/*-
+ * Copyright (c) 2011 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at 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.
+ *
+ * Various ways to handle the body coming from the backend.
+ */
+
+/*lint -save -e525 -e539 */
+BODYSTATUS(NONE, none)
+BODYSTATUS(ZERO, zero)
+BODYSTATUS(ERROR, error)
+BODYSTATUS(CHUNKED, chunked)
+BODYSTATUS(LENGTH, length)
+BODYSTATUS(EOF, eof)
+/*lint -restore */
diff --git a/include/tbl/locks.h b/include/tbl/locks.h
new file mode 100644
index 0000000..f1b634b
--- /dev/null
+++ b/include/tbl/locks.h
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2010 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at 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.
+ *
+ */
+
+/*lint -save -e525 -e539 */
+LOCK(sms)
+LOCK(smp)
+LOCK(sma)
+LOCK(smf)
+LOCK(hsl)
+LOCK(hcb)
+LOCK(hcl)
+LOCK(vcl)
+LOCK(sessmem)
+LOCK(wstat)
+LOCK(herder)
+LOCK(wq)
+LOCK(objhdr)
+LOCK(exp)
+LOCK(lru)
+LOCK(cli)
+LOCK(ban)
+LOCK(vbp)
+LOCK(vbe)
+LOCK(backend)
+LOCK(vcapace)
+/*lint -restore */
diff --git a/include/tbl/steps.h b/include/tbl/steps.h
new file mode 100644
index 0000000..c88e434
--- /dev/null
+++ b/include/tbl/steps.h
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2006 Verdens Gang AS
+ * Copyright (c) 2006-2011 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at 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.
+ *
+ */
+
+/*lint -save -e525 -e539 */
+STEP(wait,	WAIT)
+STEP(first,	FIRST)
+STEP(recv,	RECV)
+STEP(start,	START)
+STEP(pipe,	PIPE)
+STEP(pass,	PASS)
+STEP(lookup,	LOOKUP)
+STEP(miss,	MISS)
+STEP(hit,	HIT)
+STEP(fetch,	FETCH)
+STEP(fetchbody,	FETCHBODY)
+STEP(streambody,STREAMBODY)
+STEP(prepresp,	PREPRESP)
+STEP(deliver,	DELIVER)
+STEP(error,	ERROR)
+STEP(done,	DONE)
+/*lint -restore */



More information about the varnish-commit mailing list