#include <sys/time.h>
#include <common/chtbl.h>
+#include <common/config.h>
#include <common/hashpjw.h>
#include <common/list.h>
#ifndef _COMMON_BASE64_H
#define _COMMON_BASE64_H
+#include <common/config.h>
+
int a2base64(char *in, int ilen, char *out, int olen);
extern const char base64tab[];
#ifndef _COMMON_CFGPARSE_H
#define _COMMON_CFGPARSE_H
+#include <common/config.h>
+
/* configuration sections */
#define CFG_NONE 0
#define CFG_GLOBAL 1
#include <stdlib.h>
-#include "list.h"
+#include <common/config.h>
+#include <common/list.h>
/*****************************************************************************
* *
/* This is needed on Linux for Netfilter includes */
#include <sys/socket.h>
+#include <common/config.h>
/* INTBITS
* how many bits are needed to code the size of an int on the target platform.
*/
#define SCHEDULER_RESOLUTION 9
+/* CONFIG_HAP_MEM_OPTIM
+ * This enables use of memory pools instead of malloc()/free(). There
+ * is no reason to disable it, except perhaps for rare debugging.
+ */
+#ifndef CONFIG_HAP_NO_MEM_OPTIM
+# define CONFIG_HAP_MEM_OPTIM
+#endif /* CONFIG_HAP_NO_MEM_OPTIM */
+
+
#endif /* _COMMON_CONFIG_H */
#ifndef _COMMON_DEFAULTS_H
#define _COMMON_DEFAULTS_H
-
-/* CONFIG_HAP_MEM_OPTIM
- * This enables use of memory pools instead of malloc()/free(). There
- * is no reason to disable it, except perhaps for rare debugging.
- */
-#ifndef CONFIG_HAP_NO_MEM_OPTIM
-# define CONFIG_HAP_MEM_OPTIM
-#endif /* CONFIG_HAP_NO_MEM_OPTIM */
-
/*
* BUFSIZE defines the size of a read and write buffer. It is the maximum
* amount of bytes which can be stored by the proxy for each session. However,
#ifndef _COMMON_EPOLL_H
#define _COMMON_EPOLL_H
-#include <linux/unistd.h>
#include <stdint.h>
+#include <linux/unistd.h>
+
+#include <common/config.h>
/* epoll_ctl() commands */
#ifndef EPOLL_CTL_ADD
#ifndef _COMMON_HASHPJW_H
#define _COMMON_HASHPJW_H
+#include <common/config.h>
+
/*****************************************************************************
* *
* Define a table size for demonstration purposes only. *
#define _COMMON_LIST_H
#include <stdlib.h>
+#include <common/config.h>
/*****************************************************************************
* *
#ifndef _COMMON_MINI_CLIST_H
#define _COMMON_MINI_CLIST_H
+#include <common/config.h>
+
/* these are circular or bidirectionnal lists only. Each list pointer points to
* another list pointer in a structure, and not the structure itself. The
* pointer to the next element MUST be the first one so that the list is easily
#ifndef _COMMON_REGEX_H
#define _COMMON_REGEX_H
-#include <common/defaults.h>
+#include <common/config.h>
#ifdef USE_PCRE
#include <pcre.h>
#define _COMMON_STANDARD_H
#include <netinet/in.h>
-#include <common/defaults.h>
-#include <common/compat.h>
-
+#include <common/config.h>
/****** string-specific macros and functions ******/
/* if a > max, then bound <a> to <max>. The macro returns the new <a> */
#ifndef _COMMON_TEMPLATE_H
#define _COMMON_TEMPLATE_H
+#include <common/config.h>
#endif /* _COMMON_TEMPLATE_H */
#include <stdlib.h>
#include <sys/time.h>
+#include <common/config.h>
#define TIME_ETERNITY -1
#ifndef _COMMON_URI_AUTH_H
#define _COMMON_URI_AUTH_H
+
+#include <common/config.h>
+
/* here we find a very basic list of base64-encoded 'user:passwd' strings */
struct user_auth {
struct user_auth *next; /* next entry, NULL if none */
#ifndef _COMMON_VERSION_H
#define _COMMON_VERSION_H
+#include <common/config.h>
+
#ifdef CONFIG_PRODUCT_NAME
-#define PRODUCT_NAME CONFIG_PRODUCT_NAME
+#define PRODUCT_NAME CONFIG_PRODUCT_NAME
#else
-#define PRODUCT_NAME "HAProxy"
+#define PRODUCT_NAME "HAProxy"
#endif
-#ifndef HAPROXY_VERSION
+#ifdef CONFIG_HAPROXY_VERSION
+#define HAPROXY_VERSION CONFIG_HAPROXY_VERSION
+#else
#define HAPROXY_VERSION "1.3.0"
#endif
-#ifndef HAPROXY_DATE
+#ifdef CONFIG_HAPROXY_DATE
+#define HAPROXY_DATE CONFIG_HAPROXY_DATE
+#else
#define HAPROXY_DATE "2006/06/26"
#endif
#ifndef _PROTO_BACKEND_H
#define _PROTO_BACKEND_H
+#include <common/config.h>
#include <types/backend.h>
#include <types/session.h>
#ifndef _PROTO_BUFFERS_H
#define _PROTO_BUFFERS_H
-#include <common/defaults.h>
+#include <common/config.h>
#include <types/buffers.h>
/* returns 1 if the buffer is empty, 0 otherwise */
#define _PROTO_CHECKS_H
#include <types/task.h>
+#include <common/config.h>
int process_chk(struct task *t);
#ifndef _PROTO_CLIENT_H
#define _PROTO_CLIENT_H
+#include <common/config.h>
#include <types/client.h>
-
int event_accept(int fd);
#include <sys/types.h>
#include <unistd.h>
+#include <common/config.h>
#include <types/fd.h>
/* Deletes an FD from the fdsets, and recomputes the maxfd limit.
#include <stdio.h>
#include <syslog.h>
+#include <common/config.h>
#include <types/log.h>
#include <types/proxy.h>
#include <types/session.h>
#ifndef _PROTO_POLLING_H
#define _PROTO_POLLING_H
+#include <common/config.h>
#include <types/polling.h>
/*
#ifndef _PROTO_PROTO_HTTP_H
#define _PROTO_PROTO_HTTP_H
+#include <common/config.h>
#include <types/proto_http.h>
#include <types/session.h>
#include <types/task.h>
#ifndef _PROTO_PROXY_H
#define _PROTO_PROXY_H
-
+#include <common/config.h>
#include <types/proxy.h>
int start_proxies(int verbose);
#ifndef _PROTO_QUEUE_H
#define _PROTO_QUEUE_H
+#include <common/config.h>
#include <common/memory.h>
#include <common/mini-clist.h>
#include <unistd.h>
+#include <common/config.h>
#include <types/proxy.h>
#include <types/queue.h>
#include <types/server.h>
#ifndef _PROTO_SESSION_H
#define _PROTO_SESSION_H
-
+#include <common/config.h>
#include <types/session.h>
void session_free(struct session *s);
#include <sys/socket.h>
#include <sys/types.h>
-#include <common/defaults.h>
#include <common/config.h>
#include <sys/time.h>
-#include <types/task.h>
+
+#include <common/config.h>
#include <common/memory.h>
+#include <types/task.h>
/* puts the task <t> in run queue <q>, and returns <t> */
#ifndef _PROTO_TEMPLATE_H
#define _PROTO_TEMPLATE_H
-
+#include <common/config.h>
#include <types/template.h>
#ifndef _TYPES_BACKEND_H
#define _TYPES_BACKEND_H
+#include <common/config.h>
+
/* bits for proxy->options */
#define PR_O_REDISP 0x00000001 /* allow reconnection to dispatch in case of errors */
#define PR_O_TRANSP 0x00000002 /* transparent mode : use original DEST as dispatch */
#ifndef _TYPES_BUFFERS_H
#define _TYPES_BUFFERS_H
-#include <common/defaults.h>
+#include <common/config.h>
#include <common/memory.h>
/* describes a chunk of string */
#ifndef _TYPES_CAPTURE_H
#define _TYPES_CAPTURE_H
+#include <common/config.h>
+
struct cap_hdr {
struct cap_hdr *next;
char *name; /* header name, case insensitive */
#ifndef _TYPES_CLIENT_H
#define _TYPES_CLIENT_H
+#include <common/config.h>
+
/*
* FIXME: break this into HTTP state and TCP socket state.
* See server.h for the other end.
/*
- include/fd.h
+ include/types/fd.h
File descriptors states.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
#include <netinet/in.h>
+#include <common/config.h>
#include <types/task.h>
/* modes of operation (global.mode) */
#ifndef _TYPES_HTTPERR_H
#define _TYPES_HTTPERR_H
+#include <common/config.h>
+
/* various data sources for the responses */
#define DATA_SRC_NONE 0
#define DATA_SRC_STATS 1
#ifndef _TYPES_LOG_H
#define _TYPES_LOG_H
+#include <common/config.h>
#define MAX_SYSLOG_LEN 1024
#define NB_LOG_FACILITIES 24
#ifndef _TYPES_PROTO_HTTP_H
#define _TYPES_PROTO_HTTP_H
+#include <common/config.h>
/*
* FIXME: break this into HTTP state and TCP socket state.
#include <common/appsession.h>
#include <common/chtbl.h>
+#include <common/config.h>
#include <common/mini-clist.h>
#include <common/regex.h>
#ifndef _TYPES_QUEUE_H
#define _TYPES_QUEUE_H
+#include <common/config.h>
#include <common/mini-clist.h>
#include <types/server.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <common/config.h>
#include <common/mini-clist.h>
#include <types/buffers.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <common/config.h>
#include <common/mini-clist.h>
#include <types/buffers.h>
#ifndef _TYPES_TASK_H
#define _TYPES_TASK_H
-
#include <sys/time.h>
+#include <common/config.h>
/* values for task->state */
#define TASK_IDLE 0
#ifndef _TYPES_TEMPLATE_H
#define _TYPES_TEMPLATE_H
+#include <common/config.h>
#endif /* _TYPES_TEMPLATE_H */
#include <common/appsession.h>
#include <common/chtbl.h>
+#include <common/config.h>
#include <common/list.h>
#include <common/time.h>
#include <syslog.h>
#include <common/compat.h>
+#include <common/config.h>
#include <common/time.h>
#include <types/buffers.h>
*/
#include <common/base64.h>
+#include <common/config.h>
const char base64tab[64]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
*/
#include <string.h>
+
+#include <common/config.h>
#include <proto/buffers.h>
void **pool_buffer = NULL;
*/
#include <stdlib.h>
+
+#include <common/config.h>
#include <types/capture.h>
void **pool_capture = NULL;
#include <stdlib.h>
#include <string.h>
+#include <common/config.h>
#include <common/list.h>
#include <common/chtbl.h>
#include <sys/types.h>
#include <common/compat.h>
+#include <common/config.h>
#include <common/time.h>
#include <types/backend.h>
* *
*****************************************************************************/
+#include <common/config.h>
#include <common/hashpjw.h>
#include <common/appsession.h>
#include <stdlib.h>
#include <string.h>
+#include <common/config.h>
#include <common/list.h>
/*****************************************************************************
#include <sys/time.h>
+#include <common/config.h>
#include <common/standard.h>
#include <types/backend.h>
#include <common/defaults.h>
#include <common/compat.h>
+#include <common/config.h>
#include <common/time.h>
#include <types/global.h>
*
*/
+#include <common/config.h>
#include <common/time.h>
#include <types/proxy.h>
#include <stdlib.h>
#include <string.h>
+#include <common/config.h>
#include <common/regex.h>
#include <common/standard.h>
#include <proto/log.h>
*
*/
+#include <common/config.h>
#include <types/backend.h>
#include <types/proxy.h>
#include <types/server.h>
*/
#include <stdlib.h>
+
+#include <common/config.h>
#include <common/memory.h>
#include <types/backend.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <common/config.h>
#include <common/standard.h>
#include <proto/log.h>
#include <sys/types.h>
#include <common/compat.h>
+#include <common/config.h>
#include <common/time.h>
#include <types/backend.h>
*/
#include <sys/time.h>
+
+#include <common/config.h>
#include <common/time.h>
struct timeval now; /* the current date at any moment */
#include <string.h>
#include <common/base64.h>
+#include <common/config.h>
#include <common/uri_auth.h>