#include <haproxy/regex-t.h>
#include <types/applet.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
enum act_from {
ACT_F_TCP_REQ_CON, /* tcp-request connection */
#include <haproxy/protobuf-t.h>
#include <haproxy/vars-t.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
/* encoding of each arg type : up to 31 types are supported */
#define ARGT_BITS 5
#include <types/http_ana.h>
#include <types/proxy.h>
#include <types/server.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
#define CLASS_CORE "Core"
#define CLASS_TXN "TXN"
#include <haproxy/time.h>
#include <types/proxy.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
#include <types/stream.h>
extern struct peers *cfg_peers;
#include <haproxy/arg-t.h>
#include <haproxy/api.h>
#include <haproxy/sample-t.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
extern sample_cast_fct sample_casts[SMP_TYPES][SMP_TYPES];
extern const unsigned int fetch_cap[SMP_SRC_ENTRIES];
/*
- * include/types/stick_table.h
+ * include/haproxy/stick_table-t.h
* Macros, variables and structures for stick tables management.
*
* Copyright (C) 2009-2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TYPES_STICK_TABLE_H
-#define _TYPES_STICK_TABLE_H
+#ifndef _HAPROXY_STICK_TABLE_T_H
+#define _HAPROXY_STICK_TABLE_T_H
#include <sys/socket.h>
#include <netinet/in.h>
-#include <import/ebtree.h>
-#include <import/ebmbtree.h>
#include <import/eb32tree.h>
-#include <haproxy/dict-t.h>
-#include <haproxy/pool-t.h>
+#include <import/ebmbtree.h>
+#include <import/ebpttree.h>
+
#include <haproxy/freq_ctr-t.h>
-#include <haproxy/peers-t.h>
-#include <haproxy/sample-t.h>
+#include <haproxy/thread-t.h>
+#include <haproxy/api-t.h>
+
/* The types of extra data we can store in a stick table */
enum {
ARG_T_DELAY, /* a delay which supports time units */
};
+/* stick table key type flags */
+#define STK_F_CUSTOM_KEYSIZE 0x00000001 /* this table's key size is configurable */
+
+/* WARNING: if new fields are added, they must be initialized in stream_accept()
+ * and freed in stream_free() !
+ *
+ * What's the purpose of there two macro:
+ * - STKCTR_TRACK_BACKEND indicates that a tracking pointer was set from the backend
+ * and thus that when a keep-alive request goes to another backend, the track
+ * must cease.
+ *
+ * - STKCTR_TRACK_CONTENT indicates that the tracking pointer was set in a
+ * content-aware rule (tcp-request content or http-request) and that the
+ * tracking has to be performed in the stream and not in the session, and
+ * will cease for a new keep-alive request over the same connection.
+ *
+ * These values are mixed with the stksess pointer in stkctr->entry.
+ */
+#define STKCTR_TRACK_BACKEND 1
+#define STKCTR_TRACK_CONTENT 2
+
/* stick_table extra data. This is mainly used for casting or size computation */
union stktable_data {
/* standard types for easy casting */
int arg_type; /* type of optional argument, ARG_T_* */
};
-/* stick table key type flags */
-#define STK_F_CUSTOM_KEYSIZE 0x00000001 /* this table's key size is configurable */
-
/* stick table keyword type */
struct stktable_type {
const char *kw; /* keyword string */
size_t default_size; /* default key size */
};
-extern struct stktable_type stktable_types[];
-
/* Sticky session.
* Any additional data related to the stuck session is installed *before*
* stksess (with negative offsets). This allows us to run variable-sized
size_t key_len; /* data len to read in buff in case of null terminated string */
};
-/* WARNING: if new fields are added, they must be initialized in stream_accept()
- * and freed in stream_free() !
- *
- * What's the purpose of there two macro:
- * - STKCTR_TRACK_BACKEND indicates that a tracking pointer was set from the backend
- * and thus that when a keep-alive request goes to another backend, the track
- * must cease.
- *
- * - STKCTR_TRACK_CONTENT indicates that the tracking pointer was set in a
- * content-aware rule (tcp-request content or http-request) and that the
- * tracking has to be performed in the stream and not in the session, and
- * will cease for a new keep-alive request over the same connection.
- */
-#define STKCTR_TRACK_BACKEND 1
-#define STKCTR_TRACK_CONTENT 2
-
/* stick counter. The <entry> member is a composite address (caddr) made of a
* pointer to an stksess struct, and two flags among STKCTR_TRACK_* above.
*/
} table;
};
-#endif /* _TYPES_STICK_TABLE_H */
+#endif /* _HAPROXY_STICK_TABLE_T_H */
/*
- * include/proto/stick_table.h
+ * include/haproxy/stick_table.h
* Functions for stick tables management.
*
* Copyright (C) 2009-2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_STICK_TABLE_H
-#define _PROTO_STICK_TABLE_H
+#ifndef _HAPROXY_STICK_TABLE_H
+#define _HAPROXY_STICK_TABLE_H
+#include <haproxy/api.h>
#include <haproxy/dict-t.h>
#include <haproxy/errors.h>
+#include <haproxy/sample-t.h>
+#include <haproxy/stick_table-t.h>
#include <haproxy/tools.h>
#include <haproxy/ticks.h>
#include <haproxy/time.h>
-#include <types/stick_table.h>
extern struct stktable *stktables_list;
+extern struct stktable_type stktable_types[];
#define stktable_data_size(type) (sizeof(((union stktable_data*)0)->type))
#define stktable_data_cast(ptr, type) ((union stktable_data*)(ptr))->type
stkctr->entry = caddr_clr_flags(stkctr->entry, flags);
}
-#endif /* _PROTO_STICK_TABLE_H */
+#endif /* _HAPROXY_STICK_TABLE_H */
#include <haproxy/global-t.h>
#include <types/session.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <proto/server.h>
extern struct pool_head *pool_head_session;
#include <haproxy/freq_ctr.h>
#include <haproxy/obj_type.h>
#include <proto/queue.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <haproxy/task.h>
#include <proto/trace.h>
#include <types/log.h>
#include <haproxy/sample-t.h>
#include <types/server.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
/* values for proxy->state */
enum pr_state {
#include <haproxy/obj_type-t.h>
#include <haproxy/vars-t.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
#include <haproxy/task-t.h>
struct sess_srv_list {
#include <types/session.h>
#include <types/stream_interface.h>
#include <haproxy/task-t.h>
-#include <types/stick_table.h>
+#include <haproxy/stick_table-t.h>
/* Various Stream Flags, bits values 0x01 to 0x100 (shift 0) */
#define SF_DIRECT 0x00000001 /* connection made on the server matching the client cookie */
#include <proto/log.h>
#include <proto/proxy.h>
#include <haproxy/sample.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <import/ebsttree.h>
#include <proto/log.h>
#include <proto/proxy.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
/* Find and check the target table used by an action track-sc*. This
#include <haproxy/http_htx.h>
#include <haproxy/http_rules.h>
#include <haproxy/listener.h>
+#include <haproxy/peers.h>
#include <haproxy/sample.h>
#include <types/stats.h>
#include <haproxy/protocol.h>
#include <proto/proxy.h>
#include <proto/server.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
/* Report a warning if a rule is placed after a 'tcp-request session' rule.
* Return 1 if the warning has been emitted, otherwise 0.
#include <proto/session.h>
#include <proto/server.h>
#include <proto/stream.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <haproxy/tcp_rules.h>
#include <proto/proxy.h>
#include <proto/server.h>
#include <proto/stats.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
/* Contains the class reference of the concat object. */
static int class_concat_ref;
#include <proto/proxy.h>
#include <proto/session.h>
#include <proto/stream.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <proto/stream_interface.h>
#include <proto/log.h>
#include <proto/proxy.h>
#include <haproxy/sink.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <import/sha1.h>
#include <import/xxhash.h>
#include <haproxy/sample.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
/* structure used to return a table key built from a sample */
static THREAD_LOCAL struct stktable_key static_table_key;
#include <proto/proxy.h>
#include <proto/queue.h>
#include <proto/server.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <proto/stream_interface.h>
DECLARE_POOL(pool_head_stream, "stream", sizeof(struct stream));
#include <proto/channel.h>
#include <proto/log.h>
#include <proto/proxy.h>
-#include <proto/stick_table.h>
+#include <haproxy/stick_table.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>