-#ifndef _HAPROXY_APPSESS_H
-#define _HAPROXY_APPSESS_H
+#ifndef _COMMON_APPSESS_H
+#define _COMMON_APPSESS_H
#define TBLSIZ 10
#define TBLCHKINT 5000 /* The time between two calls of appsession_refresh in ms */
#include <sys/time.h>
-#include <haproxy/chtbl.h>
-#include <haproxy/hashpjw.h>
-#include <haproxy/list.h>
+#include <common/chtbl.h>
+#include <common/hashpjw.h>
+#include <common/list.h>
#include <types/task.h>
int appsession_init(void);
void appsession_cleanup(void);
-#endif /* _HAPROXY_APPSESS_H */
+#endif /* _COMMON_APPSESS_H */
/*
* Local variables:
/*
- * include/haproxy/base64.h
+ * include/common/base64.h
* Ascii to Base64 conversion as described in RFC1421.
*
* Copyright 2006 Willy Tarreau <w@1wt.eu>
*
*/
-#ifndef _HAPROXY_BASE64_H
-#define _HAPROXY_BASE64_H
+#ifndef _COMMON_BASE64_H
+#define _COMMON_BASE64_H
int a2base64(char *in, int ilen, char *out, int olen);
extern const char base64tab[];
-#endif /* _HAPROXY_BASE64_H */
+#endif /* _COMMON_BASE64_H */
/*
- include/haproxy/cfgparse.h
+ include/common/cfgparse.h
Configuration parsing functions.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_CFGPARSE_H
-#define _HAPROXY_CFGPARSE_H
+#ifndef _COMMON_CFGPARSE_H
+#define _COMMON_CFGPARSE_H
/* configuration sections */
#define CFG_NONE 0
int readcfgfile(char *file);
-#endif /* _HAPROXY_CFGPARSE_H */
+#endif /* _COMMON_CFGPARSE_H */
/*
* Local variables:
* *
*****************************************************************************/
-#ifndef _HAPROXY_CHTBL_H
-#define _HAPROXY_CHTBL_H
+#ifndef _COMMON_CHTBL_H
+#define _COMMON_CHTBL_H
#include <stdlib.h>
#define chtbl_size(htbl) ((htbl)->size)
-#endif /* _HAPROXY_CHTBL_H */
+#endif /* _COMMON_CHTBL_H */
/*
- include/haproxy/compat.h
+ include/common/compat.h
Operating system compatibility interface.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_COMPAT_H
-#define _HAPROXY_COMPAT_H
+#ifndef _COMMON_COMPAT_H
+#define _COMMON_COMPAT_H
/* This is needed on Linux for Netfilter includes */
#include <sys/socket.h>
#include <strings.h>
#endif
-#endif /* _HAPROXY_COMPAT_H */
+#endif /* _COMMON_COMPAT_H */
/*
* Local variables:
/*
- include/haproxy/config.h
+ include/common/config.h
This files contains most of the user-configurable settings.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_CONFIG_H
-#define _HAPROXY_CONFIG_H
+#ifndef _COMMON_CONFIG_H
+#define _COMMON_CONFIG_H
-#include <haproxy/defaults.h>
+#include <common/defaults.h>
/* this reduces the number of calls to select() by choosing appropriate
* sheduler precision in milliseconds. It should be near the minimum
*/
#define SCHEDULER_RESOLUTION 9
-#endif /* _HAPROXY_CONFIG_H */
+#endif /* _COMMON_CONFIG_H */
/*
- include/haproxy/defaults.h
+ include/common/defaults.h
Miscellaneous default values.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_DEFAULTS_H
-#define _HAPROXY_DEFAULTS_H
+#ifndef _COMMON_DEFAULTS_H
+#define _COMMON_DEFAULTS_H
/* CONFIG_HAP_MEM_OPTIM
#define DEFAULT_MAXCONN SYSTEM_MAXCONN
#endif
-#endif /* _HAPROXY_DEFAULTS_H */
+#endif /* _COMMON_DEFAULTS_H */
/*
- include/haproxy/epoll.h
+ include/common/epoll.h
epoll definitions for older libc.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
* just a basic definition.
*/
-#ifndef _HAPROXY_EPOLL_H
-#define _HAPROXY_EPOLL_H
+#ifndef _COMMON_EPOLL_H
+#define _COMMON_EPOLL_H
#include <linux/unistd.h>
#include <stdint.h>
extern int epoll_ctl(int epfd, int op, int fd, struct epoll_event * event);
extern int epoll_wait(int epfd, struct epoll_event * events, int maxevents, int timeout);
-#endif /* _HAPROXY_EPOLL_H */
+#endif /* _COMMON_EPOLL_H */
/*
* *
*****************************************************************************/
-#ifndef _HAPROXY_HASHPJW_H
-#define _HAPROXY_HASHPJW_H
+#ifndef _COMMON_HASHPJW_H
+#define _COMMON_HASHPJW_H
/*****************************************************************************
* *
int hashpjw(const void *key);
-#endif /* _HAPROXY_HASHPJW_H */
+#endif /* _COMMON_HASHPJW_H */
* *
*****************************************************************************/
-#ifndef _HAPROXY_LIST_H
-#define _HAPROXY_LIST_H
+#ifndef _COMMON_LIST_H
+#define _COMMON_LIST_H
#include <stdlib.h>
#define list_next(element) ((element)->next)
-#endif /* _HAPROXY_LIST_H */
+#endif /* _COMMON_LIST_H */
/*
* Local variables:
/*
- include/haproxy/memory.h
+ include/common/memory.h
Memory management definitions..
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_MEMORY_H
-#define _HAPROXY_MEMORY_H
+#ifndef _COMMON_MEMORY_H
+#define _COMMON_MEMORY_H
#include <stdlib.h>
-#include <haproxy/config.h>
+#include <common/config.h>
#define sizeof_requri REQURI_LEN
#define sizeof_capture CAPTURE_LEN
}
}
-#endif /* _HAPROXY_MEMORY_H */
+#endif /* _COMMON_MEMORY_H */
/*
* Local variables:
*
*/
-#ifndef _HAPROXY_MINI_CLIST_H
-#define _HAPROXY_MINI_CLIST_H
+#ifndef _COMMON_MINI_CLIST_H
+#define _COMMON_MINI_CLIST_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
for ( ; (iterator) != (end_item); (iterator) = (backup), \
backup = LIST_ELEM((iterator)->struct_member.n, struct_type, struct_member))
-#endif /* _HAPROXY_MINI_CLIST_H */
+#endif /* _COMMON_MINI_CLIST_H */
/*
- include/haproxy/regex.h
+ include/common/regex.h
This file defines everything related to regular expressions.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_REGEX_H
-#define _HAPROXY_REGEX_H
+#ifndef _COMMON_REGEX_H
+#define _COMMON_REGEX_H
-#include <haproxy/defaults.h>
+#include <common/defaults.h>
#ifdef USE_PCRE
#include <pcre.h>
char *check_replace_string(char *str);
char *chain_regex(struct hdr_exp **head, regex_t *preg, int action, char *replace);
-#endif /* _HAPROXY_REGEX_H */
+#endif /* _COMMON_REGEX_H */
/*
* Local variables:
/*
- include/haproxy/standard.h
+ include/common/standard.h
This files contains some general purpose functions and macros.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_STANDARD_H
-#define _HAPROXY_STANDARD_H
+#ifndef _COMMON_STANDARD_H
+#define _COMMON_STANDARD_H
#include <netinet/in.h>
-#include <haproxy/defaults.h>
-#include <haproxy/compat.h>
+#include <common/defaults.h>
+#include <common/compat.h>
/****** string-specific macros and functions ******/
const char escape, const fd_set *map,
const char *string);
-#endif /* _HAPROXY_STANDARD_H */
+#endif /* _COMMON_STANDARD_H */
/*
- include/haproxy/template.h
+ include/common/template.h
This file serves as a template for future include files.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_TEMPLATE_H
-#define _HAPROXY_TEMPLATE_H
+#ifndef _COMMON_TEMPLATE_H
+#define _COMMON_TEMPLATE_H
-#endif /* _HAPROXY_TEMPLATE_H */
+#endif /* _COMMON_TEMPLATE_H */
/*
* Local variables:
/*
- include/haproxy/time.h
+ include/common/time.h
Time calculation functions and macros.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_TIME_H
-#define _HAPROXY_TIME_H
+#ifndef _COMMON_TIME_H
+#define _COMMON_TIME_H
#include <stdlib.h>
#include <sys/time.h>
}
-#endif /* _HAPROXY_TIME_H */
+#endif /* _COMMON_TIME_H */
/*
* Local variables:
*
*/
-#ifndef _HAPROXY_URI_AUTH_H
-#define _HAPROXY_URI_AUTH_H
+#ifndef _COMMON_URI_AUTH_H
+#define _COMMON_URI_AUTH_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 */
struct uri_auth *stats_add_auth(struct uri_auth **root, char *user);
struct uri_auth *stats_add_scope(struct uri_auth **root, char *scope);
-#endif /* _HAPROXY_URI_AUTH_H */
+#endif /* _COMMON_URI_AUTH_H */
/*
- include/haproxy/version.h
+ include/common/version.h
This file serves as a template for future include files.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_VERSION_H
-#define _HAPROXY_VERSION_H
+#ifndef _COMMON_VERSION_H
+#define _COMMON_VERSION_H
#ifdef CONFIG_PRODUCT_NAME
#define PRODUCT_NAME CONFIG_PRODUCT_NAME
#define HAPROXY_DATE "2006/06/26"
#endif
-#endif /* _HAPROXY_VERSION_H */
+#endif /* _COMMON_VERSION_H */
#ifndef _PROTO_BUFFERS_H
#define _PROTO_BUFFERS_H
-#include <haproxy/defaults.h>
+#include <common/defaults.h>
#include <types/buffers.h>
/* returns 1 if the buffer is empty, 0 otherwise */
#ifndef _PROTO_QUEUE_H
#define _PROTO_QUEUE_H
-#include <haproxy/memory.h>
-#include <haproxy/mini-clist.h>
+#include <common/memory.h>
+#include <common/mini-clist.h>
#include <types/proxy.h>
#include <types/queue.h>
#include <sys/socket.h>
#include <sys/types.h>
-#include <haproxy/defaults.h>
-#include <haproxy/config.h>
+#include <common/defaults.h>
+#include <common/config.h>
/* FIXME: merge those ones together */
#include <sys/time.h>
#include <types/task.h>
-#include <haproxy/memory.h>
+#include <common/memory.h>
/* puts the task <t> in run queue <q>, and returns <t> */
#ifndef _TYPES_BUFFERS_H
#define _TYPES_BUFFERS_H
-#include <haproxy/defaults.h>
-#include <haproxy/memory.h>
+#include <common/defaults.h>
+#include <common/memory.h>
/* describes a chunk of string */
struct chunk {
#include <sys/types.h>
#include <unistd.h>
-#include <haproxy/config.h>
+#include <common/config.h>
#include <types/task.h>
/* different possible states for the fd */
#include <sys/types.h>
#include <unistd.h>
-#include <haproxy/config.h>
+#include <common/config.h>
/* for POLL_* */
#if defined(ENABLE_POLL)
#if !defined(USE_MY_EPOLL)
#include <sys/epoll.h>
#else
-#include <haproxy/epoll.h>
+#include <common/epoll.h>
#endif
#endif
#include <arpa/inet.h>
#include <sys/socket.h>
-#include <haproxy/appsession.h>
-#include <haproxy/chtbl.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/regex.h>
+#include <common/appsession.h>
+#include <common/chtbl.h>
+#include <common/mini-clist.h>
+#include <common/regex.h>
#include <types/buffers.h>
#include <types/session.h>
#ifndef _TYPES_QUEUE_H
#define _TYPES_QUEUE_H
-#include <haproxy/mini-clist.h>
+#include <common/mini-clist.h>
#include <types/server.h>
#include <types/session.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/mini-clist.h>
+#include <common/mini-clist.h>
#include <types/buffers.h>
#include <types/proxy.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/mini-clist.h>
+#include <common/mini-clist.h>
#include <types/buffers.h>
#include <types/proxy.h>
*/
#include <stdio.h>
+#include <string.h>
-#include <haproxy/appsession.h>
-#include <haproxy/chtbl.h>
-#include <haproxy/list.h>
-#include <haproxy/time.h>
+#include <common/appsession.h>
+#include <common/chtbl.h>
+#include <common/list.h>
+#include <common/time.h>
#include <types/buffers.h>
#include <types/global.h>
#include <stdlib.h>
#include <syslog.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/buffers.h>
#include <types/global.h>
*
*/
-#include <haproxy/base64.h>
+#include <common/base64.h>
const char base64tab[64]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
#include <netdb.h>
#include <ctype.h>
-#include <haproxy/cfgparse.h>
-#include <haproxy/config.h>
-#include <haproxy/memory.h>
-#include <haproxy/standard.h>
-#include <haproxy/time.h>
-#include <haproxy/uri_auth.h>
+#include <common/cfgparse.h>
+#include <common/config.h>
+#include <common/memory.h>
+#include <common/standard.h>
+#include <common/time.h>
+#include <common/uri_auth.h>
#include <types/capture.h>
#include <types/global.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/mini-clist.h>
+#include <common/time.h>
#include <types/global.h>
#include <types/polling.h>
#include <stdlib.h>
#include <string.h>
-#include <haproxy/list.h>
-#include <haproxy/chtbl.h>
+#include <common/list.h>
+#include <common/chtbl.h>
/*****************************************************************************
* *
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/backend.h>
#include <types/buffers.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/time.h>
#include <types/fd.h>
#include <types/global.h>
fd_set *PrevReadEvent = NULL, *PrevWriteEvent = NULL;
#if defined(USE_MY_EPOLL)
+#include <errno.h>
+#include <sys/syscall.h>
_syscall1 (int, epoll_create, int, size);
_syscall4 (int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event);
_syscall4 (int, epoll_wait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout);
#include <assert.h>
#endif
-#include <haproxy/appsession.h>
-#include <haproxy/base64.h>
-#include <haproxy/cfgparse.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/defaults.h>
-#include <haproxy/memory.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/regex.h>
-#include <haproxy/standard.h>
-#include <haproxy/time.h>
-#include <haproxy/uri_auth.h>
-#include <haproxy/version.h>
+#include <common/appsession.h>
+#include <common/base64.h>
+#include <common/cfgparse.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/defaults.h>
+#include <common/memory.h>
+#include <common/mini-clist.h>
+#include <common/regex.h>
+#include <common/standard.h>
+#include <common/time.h>
+#include <common/uri_auth.h>
+#include <common/version.h>
#include <types/capture.h>
#include <types/global.h>
* *
*****************************************************************************/
-#include <haproxy/hashpjw.h>
-#include <haproxy/appsession.h>
+#include <common/hashpjw.h>
+#include <common/appsession.h>
/*****************************************************************************
* *
#include <stdlib.h>
#include <string.h>
-#include <haproxy/list.h>
+#include <common/list.h>
/*****************************************************************************
* *
#include <sys/time.h>
-#include <haproxy/standard.h>
+#include <common/standard.h>
#include <types/backend.h>
#include <types/global.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/time.h>
#include <types/fd.h>
#include <types/global.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <haproxy/appsession.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/memory.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/standard.h>
-#include <haproxy/time.h>
-#include <haproxy/uri_auth.h>
-#include <haproxy/version.h>
+#include <common/appsession.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/memory.h>
+#include <common/mini-clist.h>
+#include <common/standard.h>
+#include <common/time.h>
+#include <common/uri_auth.h>
+#include <common/version.h>
#include <types/capture.h>
#include <types/client.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <haproxy/defaults.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/defaults.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/global.h>
#include <types/polling.h>
*
*/
-#include <haproxy/time.h>
+#include <common/time.h>
#include <types/proxy.h>
#include <types/session.h>
#include <stdlib.h>
#include <string.h>
-#include <haproxy/regex.h>
-#include <haproxy/standard.h>
+#include <common/regex.h>
+#include <common/standard.h>
#include <proto/log.h>
/* regex trash buffer used by various regex tests */
*/
#include <stdlib.h>
-#include <haproxy/memory.h>
+#include <common/memory.h>
#include <types/backend.h>
#include <types/capture.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/standard.h>
+#include <common/standard.h>
#include <proto/log.h>
/* enough to store 2^63=18446744073709551615 */
#include <sys/stat.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/backend.h>
#include <types/buffers.h>
*
*/
-#include <haproxy/config.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/time.h>
+#include <common/config.h>
+#include <common/mini-clist.h>
+#include <common/time.h>
#include <proto/task.h>
*/
#include <sys/time.h>
-#include <haproxy/time.h>
+#include <common/time.h>
struct timeval now; /* the current date at any moment */
struct timeval start_date; /* the process's start date */
#include <stdlib.h>
#include <string.h>
-#include <haproxy/base64.h>
-#include <haproxy/uri_auth.h>
+#include <common/base64.h>
+#include <common/uri_auth.h>
/*