tcp.c \
varnishd.c
+varnishd_LDFLAGS = -export-dynamic
+
varnishd_LDADD = \
$(top_builddir)/lib/libvarnish/libvarnish.la \
$(top_builddir)/lib/libsbuf/libsbuf.la \
+ $(top_builddir)/lib/libvcl/libvcl.la \
$(top_builddir)/contrib/libevent/libevent.la \
-lpthread
const char *p;
int i;
- printf("%s(%d, %d, ...)\n", __func__, fd, event);
assert(VCA_RXBUFSIZE - sp->rcv_len > 0);
i = read(fd, sp->rcv + sp->rcv_len, VCA_RXBUFSIZE - sp->rcv_len);
if (i <= 0) {
sp->hdr_e = p;
event_del(sp->rd_e);
HttpdAnalyze(sp);
+
+ /* XXX: for now, pass everything */
+ sp->handling = HND_Pass;
}
static void
#include <cli.h>
#include <cli_priv.h>
#include <libvarnish.h>
+#include <libvcl.h>
#include "mgt.h"
#include "heritage.h"
/* for development purposes */
#include <printf.h>
+#include <err.h>
+
+#include <dlfcn.h>
+
+void
+VCL_count(unsigned u)
+{
+}
int
main(int argc, char *argv[])
unsigned dflag = 1; /* XXX: debug=on for now */
register_printf_render_std((const unsigned char *)"HVQ");
+
+ {
+ struct sbuf *sb;
+
+ VCL_InitCompile();
+ sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
+ assert(sb != NULL);
+ VCL_Compile(sb,
+ "backend default { set backend.ip = 10.0.0.1; } ",
+ NULL);
+ sbuf_finish(sb);
+ fprintf(stderr, "Result: %s\n", sbuf_data(sb));
+
+ {
+ void *dlhandle;
+
+ dlhandle = dlopen("/tmp/_.so.1",
+ RTLD_NOW | RTLD_LOCAL );
+ if (dlhandle == NULL)
+ err(1, "dlopen %s", dlerror());
+
+ }
+ exit (0);
+ }
while ((o = getopt(argc, argv, "dp:")) != -1)
switch (o) {