#include <haproxy/buf-t.h>
#include <haproxy/list-t.h>
#include <haproxy/protobuf-t.h>
+#include <haproxy/vars-t.h>
-#include <types/vars.h>
#include <types/stick_table.h>
/* encoding of each arg type : up to 31 types are supported */
--- /dev/null
+/*
+ * include/haproxy/vars-t.h
+ * Macros and structures definitions for variables.
+ *
+ * Copyright (C) 2015 Thierry FOURNIER <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _HAPROXY_VARS_T_H
+#define _HAPROXY_VARS_T_H
+
+#include <haproxy/list-t.h>
+#include <haproxy/sample-t.h>
+#include <haproxy/thread-t.h>
+
+enum vars_scope {
+ SCOPE_SESS = 0,
+ SCOPE_TXN,
+ SCOPE_REQ,
+ SCOPE_RES,
+ SCOPE_PROC,
+ SCOPE_CHECK,
+};
+
+struct vars {
+ struct list head;
+ enum vars_scope scope;
+ unsigned int size;
+ __decl_thread(HA_RWLOCK_T rwlock);
+};
+
+/* This struct describes a variable. */
+struct var_desc {
+ const char *name; /* Contains the normalized variable name. */
+ enum vars_scope scope;
+};
+
+struct var {
+ struct list l; /* Used for chaining vars. */
+ const char *name; /* Contains the variable name. */
+ struct sample_data data; /* data storage. */
+};
+
+#endif
--- /dev/null
+/*
+ * include/haproxy/vars.h
+ * Prototypes for variables.
+ *
+ * Copyright (C) 2015 Thierry FOURNIER <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _HAPROXY_VARS_H
+#define _HAPROXY_VARS_H
+
+#include <types/session.h>
+#include <types/stream.h>
+#include <haproxy/api-t.h>
+#include <haproxy/vars-t.h>
+
+void vars_init(struct vars *vars, enum vars_scope scope);
+void vars_prune(struct vars *vars, struct session *sess, struct stream *strm);
+void vars_prune_per_sess(struct vars *vars);
+int vars_get_by_name(const char *name, size_t len, struct sample *smp);
+int vars_set_by_name_ifexist(const char *name, size_t len, struct sample *smp);
+int vars_set_by_name(const char *name, size_t len, struct sample *smp);
+int vars_unset_by_name_ifexist(const char *name, size_t len, struct sample *smp);
+int vars_get_by_desc(const struct var_desc *var_desc, struct sample *smp);
+int vars_check_arg(struct arg *arg, char **err);
+
+#endif
+++ /dev/null
-#ifndef _PROTO_VARS_H
-#define _PROTO_VARS_H
-
-#include <types/vars.h>
-
-void vars_init(struct vars *vars, enum vars_scope scope);
-void vars_prune(struct vars *vars, struct session *sess, struct stream *strm);
-void vars_prune_per_sess(struct vars *vars);
-int vars_get_by_name(const char *name, size_t len, struct sample *smp);
-int vars_set_by_name_ifexist(const char *name, size_t len, struct sample *smp);
-int vars_set_by_name(const char *name, size_t len, struct sample *smp);
-int vars_unset_by_name_ifexist(const char *name, size_t len, struct sample *smp);
-int vars_get_by_desc(const struct var_desc *var_desc, struct sample *smp);
-int vars_check_arg(struct arg *arg, char **err);
-
-#endif
#include <haproxy/api-t.h>
#include <haproxy/thread.h>
+#include <haproxy/vars-t.h>
#include <haproxy/freq_ctr-t.h>
#include <types/proxy.h>
#include <types/task.h>
-#include <types/vars.h>
#ifndef UNIX_MAX_PATH
#define UNIX_MAX_PATH 108
#include <haproxy/api-t.h>
#include <haproxy/list-t.h>
#include <haproxy/obj_type-t.h>
+#include <haproxy/vars-t.h>
#include <types/proxy.h>
#include <types/stick_table.h>
#include <types/task.h>
-#include <types/vars.h>
struct sess_srv_list {
void *target;
#include <haproxy/hlua-t.h>
#include <haproxy/list-t.h>
#include <haproxy/obj_type-t.h>
+#include <haproxy/vars-t.h>
#include <types/channel.h>
#include <types/filters.h>
#include <types/stream_interface.h>
#include <types/task.h>
#include <types/stick_table.h>
-#include <types/vars.h>
/* Various Stream Flags, bits values 0x01 to 0x100 (shift 0) */
#define SF_DIRECT 0x00000001 /* connection made on the server matching the client cookie */
+++ /dev/null
-#ifndef _TYPES_VARS_H
-#define _TYPES_VARS_H
-
-#include <haproxy/list-t.h>
-#include <haproxy/thread.h>
-
-#include <haproxy/sample-t.h>
-
-enum vars_scope {
- SCOPE_SESS = 0,
- SCOPE_TXN,
- SCOPE_REQ,
- SCOPE_RES,
- SCOPE_PROC,
- SCOPE_CHECK,
-};
-
-struct vars {
- struct list head;
- enum vars_scope scope;
- unsigned int size;
- __decl_thread(HA_RWLOCK_T rwlock);
-};
-
-/* This struct describes a variable. */
-struct var_desc {
- const char *name; /* Contains the normalized variable name. */
- enum vars_scope scope;
-};
-
-struct var {
- struct list l; /* Used for chaining vars. */
- const char *name; /* Contains the variable name. */
- struct sample_data data; /* data storage. */
-};
-
-#endif
#include <haproxy/http_htx.h>
#include <haproxy/h1.h>
#include <haproxy/htx.h>
+#include <haproxy/vars.h>
#include <types/global.h>
#include <types/stats.h>
#include <proto/signal.h>
#include <proto/stream_interface.h>
#include <proto/task.h>
-#include <proto/vars.h>
#include <proto/log.h>
#include <haproxy/proto_udp.h>
#include <proto/ssl_sock.h>
#include <haproxy/time.h>
#include <haproxy/ticks.h>
#include <haproxy/net_helper.h>
+#include <haproxy/vars.h>
#include <types/applet.h>
#include <types/cli.h>
#include <proto/proxy.h>
#include <proto/stream_interface.h>
#include <proto/tcp_rules.h>
-#include <proto/vars.h>
struct list dns_resolvers = LIST_HEAD_INIT(dns_resolvers);
struct list dns_srvrq_list = LIST_HEAD_INIT(dns_srvrq_list);
#include <haproxy/thread.h>
#include <haproxy/pool.h>
#include <haproxy/time.h>
+#include <haproxy/vars.h>
#include <haproxy/arg-t.h>
#include <types/global.h>
#include <proto/stream_interface.h>
#include <proto/task.h>
#include <proto/tcp_rules.h>
-#include <proto/vars.h>
#if defined(DEBUG_SPOE) || defined(DEBUG_FULL)
#define SPOE_PRINTF(x...) fprintf(x)
#include <common/uri_auth.h>
#include <haproxy/version.h>
#include <haproxy/thread.h>
+#include <haproxy/vars.h>
#include <haproxy/capture-t.h>
#include <types/cli.h>
#include <proto/stream.h>
#include <proto/signal.h>
#include <proto/task.h>
-#include <proto/vars.h>
#include <proto/ssl_sock.h>
/* array of init calls for older platforms */
#include <haproxy/payload.h>
#include <haproxy/sample.h>
#include <haproxy/tools.h>
+#include <haproxy/vars.h>
#include <types/cli.h>
#include <types/proxy.h>
#include <proto/stream_interface.h>
#include <proto/task.h>
#include <proto/tcp_rules.h>
-#include <proto/vars.h>
/* Lua uses longjmp to perform yield or throwing errors. This
* macro is used only for identifying the function that can
#include <haproxy/htx.h>
#include <haproxy/net_helper.h>
#include <haproxy/regex.h>
+#include <haproxy/vars.h>
#include <common/uri_auth.h>
#include <haproxy/capture-t.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
#include <proto/stats.h>
-#include <proto/vars.h>
#define TRACE_SOURCE &trace_strm
#include <haproxy/regex.h>
#include <haproxy/sample.h>
#include <haproxy/tools.h>
+#include <haproxy/vars.h>
#include <common/uri_auth.h>
#include <haproxy/base64.h>
#include <proto/proxy.h>
#include <haproxy/sink.h>
#include <proto/stick_table.h>
-#include <proto/vars.h>
#include <import/sha1.h>
#include <import/xxhash.h>
#include <haproxy/http.h>
#include <haproxy/listener.h>
#include <haproxy/pool.h>
+#include <haproxy/vars.h>
#include <types/global.h>
#include <types/session.h>
#include <proto/session.h>
#include <proto/stream.h>
#include <proto/tcp_rules.h>
-#include <proto/vars.h>
DECLARE_POOL(pool_head_session, "session", sizeof(struct session));
DECLARE_POOL(pool_head_sess_srv_list, "session server list",
#include <haproxy/ticks.h>
#include <haproxy/time.h>
#include <haproxy/base64.h>
+#include <haproxy/vars.h>
#include <import/ebpttree.h>
#include <import/ebsttree.h>
#include <proto/ssl_sock.h>
#include <proto/stream.h>
#include <proto/task.h>
-#include <proto/vars.h>
/* ***** READ THIS before adding code here! *****
*
#include <haproxy/thread.h>
#include <haproxy/htx.h>
#include <haproxy/pool.h>
+#include <haproxy/vars.h>
#include <types/applet.h>
#include <types/cli.h>
#include <proto/stream_interface.h>
#include <proto/task.h>
#include <proto/tcp_rules.h>
-#include <proto/vars.h>
DECLARE_POOL(pool_head_stream, "stream", sizeof(struct stream));
DECLARE_POOL(pool_head_uniqueid, "uniqueid", UNIQUEID_LEN);
#include <haproxy/http_rules.h>
#include <haproxy/list.h>
#include <haproxy/sample.h>
-
-#include <types/vars.h>
+#include <haproxy/vars.h>
#include <haproxy/arg.h>
#include <proto/http_ana.h>
#include <proto/stream.h>
#include <proto/tcp_rules.h>
-#include <proto/vars.h>
#include <proto/checks.h>
/* This contains a pool of struct vars */