Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 1 | /* |
Willy Tarreau | 5b4c2b5 | 2009-10-03 11:21:53 +0200 | [diff] [blame] | 2 | * include/types/proxy.h |
| 3 | * This file defines everything related to proxies. |
| 4 | * |
Willy Tarreau | ff011f2 | 2011-01-06 17:51:27 +0100 | [diff] [blame] | 5 | * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu |
Willy Tarreau | 5b4c2b5 | 2009-10-03 11:21:53 +0200 | [diff] [blame] | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public |
| 9 | * License as published by the Free Software Foundation, version 2.1 |
| 10 | * exclusively. |
| 11 | * |
| 12 | * This library is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * Lesser General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Lesser General Public |
| 18 | * License along with this library; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 21 | |
| 22 | #ifndef _TYPES_PROXY_H |
| 23 | #define _TYPES_PROXY_H |
| 24 | |
Willy Tarreau | 7d67768 | 2006-10-15 23:18:47 +0200 | [diff] [blame] | 25 | #include <sys/types.h> |
| 26 | #include <sys/socket.h> |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 27 | #include <netinet/in.h> |
| 28 | #include <arpa/inet.h> |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 29 | |
Willy Tarreau | 2dd0d47 | 2006-06-29 17:53:05 +0200 | [diff] [blame] | 30 | #include <common/appsession.h> |
Willy Tarreau | c7e4238 | 2012-08-24 19:22:53 +0200 | [diff] [blame] | 31 | #include <common/chunk.h> |
Willy Tarreau | e3ba5f0 | 2006-06-29 18:54:54 +0200 | [diff] [blame] | 32 | #include <common/config.h> |
Willy Tarreau | 2dd0d47 | 2006-06-29 17:53:05 +0200 | [diff] [blame] | 33 | #include <common/mini-clist.h> |
| 34 | #include <common/regex.h> |
Willy Tarreau | 51041c7 | 2007-09-09 21:56:53 +0200 | [diff] [blame] | 35 | #include <common/sessionhash.h> |
Willy Tarreau | a8cff1d | 2007-04-09 16:10:57 +0200 | [diff] [blame] | 36 | #include <common/tools.h> |
Willy Tarreau | 45cb4fb | 2009-10-26 21:10:04 +0100 | [diff] [blame] | 37 | #include <eb32tree.h> |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 38 | |
Willy Tarreau | eb0c614 | 2007-05-07 00:53:22 +0200 | [diff] [blame] | 39 | #include <types/acl.h> |
Willy Tarreau | 5b4c2b5 | 2009-10-03 11:21:53 +0200 | [diff] [blame] | 40 | #include <types/backend.h> |
Krzysztof Piotr Oledzki | 052d4fd | 2009-10-04 14:52:57 +0200 | [diff] [blame] | 41 | #include <types/counters.h> |
Willy Tarreau | 7f062c4 | 2009-03-05 18:43:00 +0100 | [diff] [blame] | 42 | #include <types/freq_ctr.h> |
Willy Tarreau | d1d5454 | 2012-09-12 22:58:11 +0200 | [diff] [blame] | 43 | #include <types/listener.h> |
Robert Tsai | 81ae195 | 2007-12-05 10:47:29 +0100 | [diff] [blame] | 44 | #include <types/log.h> |
Willy Tarreau | 3fdb366 | 2012-11-12 00:42:33 +0100 | [diff] [blame] | 45 | #include <types/obj_type.h> |
Willy Tarreau | 436d9ed | 2011-05-11 16:10:11 +0200 | [diff] [blame] | 46 | #include <types/proto_http.h> |
Willy Tarreau | cd3b094 | 2012-04-27 21:52:18 +0200 | [diff] [blame] | 47 | #include <types/sample.h> |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 48 | #include <types/session.h> |
| 49 | #include <types/server.h> |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 50 | #include <types/stick_table.h> |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 51 | |
| 52 | /* values for proxy->state */ |
Willy Tarreau | 562515c | 2011-07-25 08:11:52 +0200 | [diff] [blame] | 53 | enum { |
| 54 | PR_STNEW = 0, /* proxy has not been initialized yet */ |
| 55 | PR_STREADY, /* proxy has been initialized and is ready */ |
| 56 | PR_STFULL, /* frontend is full (maxconn reached) */ |
| 57 | PR_STPAUSED, /* frontend is paused (during hot restart) */ |
| 58 | PR_STSTOPPED, /* proxy is stopped (end of a restart) */ |
| 59 | PR_STERROR, /* proxy experienced an unrecoverable error */ |
| 60 | }; |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 61 | |
| 62 | /* values for proxy->mode */ |
| 63 | #define PR_MODE_TCP 0 |
| 64 | #define PR_MODE_HTTP 1 |
| 65 | #define PR_MODE_HEALTH 2 |
| 66 | |
Willy Tarreau | 977b8e4 | 2006-12-29 14:19:17 +0100 | [diff] [blame] | 67 | /* flag values for proxy->cap. This is a bitmask of capabilities supported by the proxy */ |
| 68 | #define PR_CAP_NONE 0x0000 |
| 69 | #define PR_CAP_FE 0x0001 |
| 70 | #define PR_CAP_BE 0x0002 |
| 71 | #define PR_CAP_RS 0x0004 |
| 72 | #define PR_CAP_LISTEN (PR_CAP_FE|PR_CAP_BE|PR_CAP_RS) |
| 73 | |
Willy Tarreau | 3168223 | 2007-11-29 15:38:04 +0100 | [diff] [blame] | 74 | /* bits for proxy->options */ |
| 75 | #define PR_O_REDISP 0x00000001 /* allow reconnection to dispatch in case of errors */ |
| 76 | #define PR_O_TRANSP 0x00000002 /* transparent mode : use original DEST as dispatch */ |
Willy Tarreau | 6740213 | 2012-05-31 20:40:20 +0200 | [diff] [blame] | 77 | /* unused: 0x04, 0x08, 0x10, 0x20 */ |
Willy Tarreau | 1620ec3 | 2011-08-06 17:05:02 +0200 | [diff] [blame] | 78 | #define PR_O_DISPATCH 0x00000040 /* use dispatch mode */ |
Willy Tarreau | 3168223 | 2007-11-29 15:38:04 +0100 | [diff] [blame] | 79 | #define PR_O_KEEPALIVE 0x00000080 /* follow keep-alive sessions */ |
Willy Tarreau | 87cf514 | 2011-08-19 22:57:24 +0200 | [diff] [blame] | 80 | #define PR_O_FWDFOR 0x00000100 /* conditionally insert x-forwarded-for with client address */ |
Willy Tarreau | ef9a360 | 2012-12-08 22:29:20 +0100 | [diff] [blame] | 81 | /* unused: 0x00000200 */ |
Willy Tarreau | 3168223 | 2007-11-29 15:38:04 +0100 | [diff] [blame] | 82 | #define PR_O_NULLNOLOG 0x00000400 /* a connect without request will not be logged */ |
Willy Tarreau | 6740213 | 2012-05-31 20:40:20 +0200 | [diff] [blame] | 83 | /* unused: 0x0800, 0x1000 */ |
Willy Tarreau | 87cf514 | 2011-08-19 22:57:24 +0200 | [diff] [blame] | 84 | #define PR_O_FF_ALWAYS 0x00002000 /* always set x-forwarded-for */ |
Willy Tarreau | 3168223 | 2007-11-29 15:38:04 +0100 | [diff] [blame] | 85 | #define PR_O_PERSIST 0x00004000 /* server persistence stays effective even when server is down */ |
| 86 | #define PR_O_LOGASAP 0x00008000 /* log as soon as possible, without waiting for the session to complete */ |
| 87 | #define PR_O_HTTP_CLOSE 0x00010000 /* force 'connection: close' in both directions */ |
| 88 | #define PR_O_CHK_CACHE 0x00020000 /* require examination of cacheability of the 'set-cookie' field */ |
| 89 | #define PR_O_TCP_CLI_KA 0x00040000 /* enable TCP keep-alive on client-side sessions */ |
| 90 | #define PR_O_TCP_SRV_KA 0x00080000 /* enable TCP keep-alive on server-side sessions */ |
| 91 | #define PR_O_USE_ALL_BK 0x00100000 /* load-balance between backup servers */ |
| 92 | #define PR_O_FORCE_CLO 0x00200000 /* enforce the connection close immediately after server response */ |
| 93 | #define PR_O_TCP_NOLING 0x00400000 /* disable lingering on client and server connections */ |
| 94 | #define PR_O_ABRT_CLOSE 0x00800000 /* immediately abort request when client closes */ |
Willy Tarreau | 3168223 | 2007-11-29 15:38:04 +0100 | [diff] [blame] | 95 | |
Willy Tarreau | ef9a360 | 2012-12-08 22:29:20 +0100 | [diff] [blame] | 96 | /* unused: 0x01000000, 0x02000000, 0x04000000 */ |
Willy Tarreau | b608feb | 2010-01-02 22:47:18 +0100 | [diff] [blame] | 97 | #define PR_O_SERVER_CLO 0x08000000 /* option http-server-close */ |
Willy Tarreau | 3168223 | 2007-11-29 15:38:04 +0100 | [diff] [blame] | 98 | #define PR_O_CONTSTATS 0x10000000 /* continous counters */ |
Alexandre Cassen | 5eb1a90 | 2007-11-29 15:43:32 +0100 | [diff] [blame] | 99 | #define PR_O_HTTP_PROXY 0x20000000 /* Enable session to use HTTP proxy operations */ |
Willy Tarreau | 48494c0 | 2007-11-30 10:41:39 +0100 | [diff] [blame] | 100 | #define PR_O_DISABLE404 0x40000000 /* Disable a server on a 404 response to a health-check */ |
Maik Broemme | 2850cb4 | 2009-04-17 18:53:21 +0200 | [diff] [blame] | 101 | #define PR_O_ORGTO 0x80000000 /* insert x-original-to with destination address */ |
Willy Tarreau | 66aa61f | 2009-01-18 21:44:07 +0100 | [diff] [blame] | 102 | |
| 103 | /* bits for proxy->options2 */ |
| 104 | #define PR_O2_SPLIC_REQ 0x00000001 /* transfer requests using linux kernel's splice() */ |
| 105 | #define PR_O2_SPLIC_RTR 0x00000002 /* transfer responses using linux kernel's splice() */ |
| 106 | #define PR_O2_SPLIC_AUT 0x00000004 /* automatically use linux kernel's splice() */ |
| 107 | #define PR_O2_SPLIC_ANY (PR_O2_SPLIC_REQ|PR_O2_SPLIC_RTR|PR_O2_SPLIC_AUT) |
Willy Tarreau | 32a4ec0 | 2009-04-02 11:35:18 +0200 | [diff] [blame] | 108 | #define PR_O2_REQBUG_OK 0x00000008 /* let buggy requests pass through */ |
| 109 | #define PR_O2_RSPBUG_OK 0x00000010 /* let buggy responses pass through */ |
Willy Tarreau | c9bd0cc | 2009-05-10 11:57:02 +0200 | [diff] [blame] | 110 | #define PR_O2_NOLOGNORM 0x00000020 /* don't log normal traffic, only errors and retries */ |
| 111 | #define PR_O2_LOGERRORS 0x00000040 /* log errors and retries at level LOG_ERR */ |
Willy Tarreau | 9ea05a7 | 2009-06-14 12:07:01 +0200 | [diff] [blame] | 112 | #define PR_O2_SMARTACC 0x00000080 /* don't immediately ACK request after accept */ |
Willy Tarreau | d88edf2 | 2009-06-14 15:48:17 +0200 | [diff] [blame] | 113 | #define PR_O2_SMARTCON 0x00000100 /* don't immediately send empty ACK after connect */ |
Emeric Brun | 647caf1 | 2009-06-30 17:57:00 +0200 | [diff] [blame] | 114 | #define PR_O2_RDPC_PRST 0x00000200 /* Actvate rdp cookie analyser */ |
Emeric Brun | 3a058f3 | 2009-06-30 18:26:00 +0200 | [diff] [blame] | 115 | #define PR_O2_CLFLOG 0x00000400 /* log into clf format */ |
Krzysztof Piotr Oledzki | 213014e | 2009-09-27 15:50:02 +0200 | [diff] [blame] | 116 | #define PR_O2_LOGHCHKS 0x00000800 /* log health checks */ |
Jamie Gloudon | 801a0a3 | 2012-08-25 00:18:33 -0400 | [diff] [blame] | 117 | #define PR_O2_INDEPSTR 0x00001000 /* independent streams, don't update rex on write */ |
Krzysztof Piotr Oledzki | aeebf9b | 2009-10-04 15:43:17 +0200 | [diff] [blame] | 118 | #define PR_O2_SOCKSTAT 0x00002000 /* collect & provide separate statistics for sockets */ |
Cyril Bonté | b21570a | 2009-11-29 20:04:48 +0100 | [diff] [blame] | 119 | |
| 120 | /* appsession */ |
| 121 | #define PR_O2_AS_REQL 0x00004000 /* learn the session id from the request */ |
| 122 | #define PR_O2_AS_PFX 0x00008000 /* match on the cookie prefix */ |
| 123 | |
| 124 | /* Encoding of appsession cookie matching modes : 2 possible values => 1 bit */ |
| 125 | #define PR_O2_AS_M_PP 0x00000000 /* path-parameters mode (the default mode) */ |
| 126 | #define PR_O2_AS_M_QS 0x00010000 /* query-string mode */ |
| 127 | #define PR_O2_AS_M_ANY 0x00010000 /* mask covering all PR_O2_AS_M_* values */ |
Willy Tarreau | 1620ec3 | 2011-08-06 17:05:02 +0200 | [diff] [blame] | 128 | #define PR_O2_NODELAY 0x00020000 /* fully interactive mode, never delay outgoing data */ |
Willy Tarreau | 88d349d | 2010-01-25 12:15:43 +0100 | [diff] [blame] | 129 | #define PR_O2_USE_PXHDR 0x00040000 /* use Proxy-Connection for proxy requests */ |
Willy Tarreau | ef78104 | 2010-01-27 11:53:01 +0100 | [diff] [blame] | 130 | #define PR_O2_CHK_SNDST 0x00080000 /* send the state of each server along with HTTP health checks */ |
William Lallemand | b7ff6a3 | 2012-03-02 14:35:21 +0100 | [diff] [blame] | 131 | |
| 132 | #define PR_O2_SRC_ADDR 0x00100000 /* get the source ip and port for logs */ |
| 133 | |
Willy Tarreau | 8a8e1d9 | 2010-04-05 16:15:16 +0200 | [diff] [blame] | 134 | #define PR_O2_FAKE_KA 0x00200000 /* pretend we do keep-alive with server eventhough we close */ |
Willy Tarreau | 1620ec3 | 2011-08-06 17:05:02 +0200 | [diff] [blame] | 135 | /* unused: 0x00400000 */ |
Willy Tarreau | bd74154 | 2010-03-16 18:46:54 +0100 | [diff] [blame] | 136 | #define PR_O2_EXP_NONE 0x00000000 /* http-check : no expect rule */ |
| 137 | #define PR_O2_EXP_STS 0x00800000 /* http-check expect status */ |
| 138 | #define PR_O2_EXP_RSTS 0x01000000 /* http-check expect rstatus */ |
| 139 | #define PR_O2_EXP_STR 0x01800000 /* http-check expect string */ |
| 140 | #define PR_O2_EXP_RSTR 0x02000000 /* http-check expect rstring */ |
| 141 | #define PR_O2_EXP_TYPE 0x03800000 /* mask for http-check expect type */ |
| 142 | #define PR_O2_EXP_INV 0x04000000 /* http-check expect !<rule> */ |
Willy Tarreau | 6740213 | 2012-05-31 20:40:20 +0200 | [diff] [blame] | 143 | /* unused: 0x08000000 */ |
Rauf Kuliyev | 38b4156 | 2011-01-04 15:14:13 +0100 | [diff] [blame] | 144 | |
Willy Tarreau | 1620ec3 | 2011-08-06 17:05:02 +0200 | [diff] [blame] | 145 | /* server health checks */ |
| 146 | #define PR_O2_CHK_NONE 0x00000000 /* no L7 health checks configured (TCP by default) */ |
Rauf Kuliyev | 38b4156 | 2011-01-04 15:14:13 +0100 | [diff] [blame] | 147 | #define PR_O2_PGSQL_CHK 0x10000000 /* use PGSQL check for server health */ |
Willy Tarreau | 1620ec3 | 2011-08-06 17:05:02 +0200 | [diff] [blame] | 148 | #define PR_O2_REDIS_CHK 0x20000000 /* use LDAP check for server health */ |
| 149 | #define PR_O2_SMTP_CHK 0x30000000 /* use SMTP EHLO check for server health - pvandijk@vision6.com.au */ |
| 150 | #define PR_O2_HTTP_CHK 0x40000000 /* use HTTP 'OPTIONS' method to check server health */ |
| 151 | #define PR_O2_MYSQL_CHK 0x50000000 /* use MYSQL check for server health */ |
| 152 | #define PR_O2_LDAP_CHK 0x60000000 /* use LDAP check for server health */ |
| 153 | #define PR_O2_SSL3_CHK 0x70000000 /* use SSLv3 CLIENT_HELLO packets for server health */ |
Simon Horman | a2b9dad | 2013-02-12 10:45:54 +0900 | [diff] [blame] | 154 | #define PR_O2_LB_AGENT_CHK 0x80000000 /* use a TCP connection to obtain a metric of server health */ |
| 155 | /* unused: 0x90000000 to 0xF000000, reserved for health checks */ |
Willy Tarreau | 1620ec3 | 2011-08-06 17:05:02 +0200 | [diff] [blame] | 156 | #define PR_O2_CHK_ANY 0xF0000000 /* Mask to cover any check */ |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 157 | /* end of proxy->options2 */ |
| 158 | |
Willy Tarreau | 6740213 | 2012-05-31 20:40:20 +0200 | [diff] [blame] | 159 | /* Cookie settings for pr->ck_opts */ |
Willy Tarreau | b5ba17e | 2012-05-31 20:43:11 +0200 | [diff] [blame] | 160 | #define PR_CK_RW 0x00000001 /* rewrite all direct cookies with the right serverid */ |
| 161 | #define PR_CK_IND 0x00000002 /* keep only indirect cookies */ |
| 162 | #define PR_CK_INS 0x00000004 /* insert cookies when not accessing a server directly */ |
| 163 | #define PR_CK_PFX 0x00000008 /* rewrite all cookies by prefixing the right serverid */ |
| 164 | #define PR_CK_ANY (PR_CK_RW | PR_CK_IND | PR_CK_INS | PR_CK_PFX) |
| 165 | #define PR_CK_NOC 0x00000010 /* add a 'Cache-control' header with the cookie */ |
| 166 | #define PR_CK_POST 0x00000020 /* don't insert cookies for requests other than a POST */ |
| 167 | #define PR_CK_PSV 0x00000040 /* cookie ... preserve */ |
Willy Tarreau | 4992dd2 | 2012-05-31 21:02:17 +0200 | [diff] [blame] | 168 | #define PR_CK_HTTPONLY 0x00000080 /* emit the "HttpOnly" attribute */ |
| 169 | #define PR_CK_SECURE 0x00000100 /* emit the "Secure" attribute */ |
Willy Tarreau | 6740213 | 2012-05-31 20:40:20 +0200 | [diff] [blame] | 170 | |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 171 | /* bits for sticking rules */ |
| 172 | #define STK_IS_MATCH 0x00000001 /* match on request fetch */ |
| 173 | #define STK_IS_STORE 0x00000002 /* store on request fetch */ |
| 174 | #define STK_ON_RSP 0x00000004 /* store on response fetch */ |
Hervé COMMOWICK | 698ae00 | 2010-01-12 09:25:13 +0100 | [diff] [blame] | 175 | |
Willy Tarreau | f073a83 | 2009-03-01 23:21:47 +0100 | [diff] [blame] | 176 | struct error_snapshot { |
| 177 | struct timeval when; /* date of this event, (tv_sec == 0) means "never" */ |
| 178 | unsigned int len; /* original length of the last invalid request/response */ |
| 179 | unsigned int pos; /* position of the first invalid character */ |
| 180 | unsigned int sid; /* ID of the faulty session */ |
Willy Tarreau | 10479e4 | 2010-12-12 14:00:34 +0100 | [diff] [blame] | 181 | unsigned int ev_id; /* event number (counter incremented for each capture) */ |
Willy Tarreau | 078272e | 2010-12-12 12:46:33 +0100 | [diff] [blame] | 182 | unsigned int state; /* message state before the error (when saved) */ |
Willy Tarreau | d04b1bc | 2012-05-08 11:03:10 +0200 | [diff] [blame] | 183 | unsigned int b_flags; /* buffer flags */ |
| 184 | unsigned int s_flags; /* session flags */ |
| 185 | unsigned int t_flags; /* transaction flags */ |
| 186 | unsigned int m_flags; /* message flags */ |
| 187 | unsigned int b_out; /* pending output bytes */ |
| 188 | unsigned int b_wrap; /* position where the buffer is expected to wrap */ |
| 189 | unsigned long long b_tot; /* total bytes transferred via this buffer */ |
| 190 | unsigned long long m_clen; /* chunk len for this message */ |
| 191 | unsigned long long m_blen; /* body len for this message */ |
Willy Tarreau | f073a83 | 2009-03-01 23:21:47 +0100 | [diff] [blame] | 192 | struct server *srv; /* server associated with the error (or NULL) */ |
| 193 | struct proxy *oe; /* other end = frontend or backend involved */ |
| 194 | struct sockaddr_storage src; /* client's address */ |
| 195 | char buf[BUFSIZE]; /* copy of the beginning of the message */ |
| 196 | }; |
| 197 | |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 198 | struct proxy { |
Willy Tarreau | 3fdb366 | 2012-11-12 00:42:33 +0100 | [diff] [blame] | 199 | enum obj_type obj_type; /* object type == OBJ_TYPE_PROXY */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 200 | int state; /* proxy state */ |
Willy Tarreau | 35d66b0 | 2007-01-02 00:28:21 +0100 | [diff] [blame] | 201 | int options; /* PR_O_REDISP, PR_O_TRANSP, ... */ |
Willy Tarreau | 66aa61f | 2009-01-18 21:44:07 +0100 | [diff] [blame] | 202 | int options2; /* PR_O2_* */ |
Willy Tarreau | 3fdb366 | 2012-11-12 00:42:33 +0100 | [diff] [blame] | 203 | struct in_addr mon_net, mon_mask; /* don't forward connections from this net (network order) FIXME: should support IPv6 */ |
Willy Tarreau | 6740213 | 2012-05-31 20:40:20 +0200 | [diff] [blame] | 204 | unsigned int ck_opts; /* PR_CK_* (cookie options) */ |
Willy Tarreau | c1a2167 | 2009-08-16 22:37:44 +0200 | [diff] [blame] | 205 | unsigned int fe_req_ana, be_req_ana; /* bitmap of common request protocol analysers for the frontend and backend */ |
Willy Tarreau | 4e5b828 | 2009-08-16 22:57:50 +0200 | [diff] [blame] | 206 | unsigned int fe_rsp_ana, be_rsp_ana; /* bitmap of common response protocol analysers for the frontend and backend */ |
Willy Tarreau | 35d66b0 | 2007-01-02 00:28:21 +0100 | [diff] [blame] | 207 | int mode; /* mode = PR_MODE_TCP, PR_MODE_HTTP or PR_MODE_HEALTH */ |
Willy Tarreau | 5fdfb91 | 2007-01-01 23:11:07 +0100 | [diff] [blame] | 208 | union { |
| 209 | struct proxy *be; /* default backend, or NULL if none set */ |
| 210 | char *name; /* default backend name during config parse */ |
| 211 | } defbe; |
Willy Tarreau | eb0c614 | 2007-05-07 00:53:22 +0200 | [diff] [blame] | 212 | struct list acl; /* ACL declared on this proxy */ |
Willy Tarreau | ff011f2 | 2011-01-06 17:51:27 +0100 | [diff] [blame] | 213 | struct list http_req_rules; /* HTTP request rules: allow/deny/http-auth */ |
Willy Tarreau | 5c8e3e0 | 2007-05-07 00:58:25 +0200 | [diff] [blame] | 214 | struct list block_cond; /* early blocking conditions (chained) */ |
Willy Tarreau | b463dfb | 2008-06-07 23:08:56 +0200 | [diff] [blame] | 215 | struct list redirect_rules; /* content redirecting rules (chained) */ |
Willy Tarreau | 55ea757 | 2007-06-17 19:56:27 +0200 | [diff] [blame] | 216 | struct list switching_rules; /* content switching rules (chained) */ |
Cyril Bonté | 47fdd8e | 2010-04-25 00:00:51 +0200 | [diff] [blame] | 217 | struct list persist_rules; /* 'force-persist' and 'ignore-persist' rules (chained) */ |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 218 | struct list sticking_rules; /* content sticking rules (chained) */ |
| 219 | struct list storersp_rules; /* content store response rules (chained) */ |
Willy Tarreau | 4a5cade | 2012-04-05 21:09:48 +0200 | [diff] [blame] | 220 | struct list server_rules; /* server switching rules (chained) */ |
Willy Tarreau | b686644 | 2008-07-14 23:54:42 +0200 | [diff] [blame] | 221 | struct { /* TCP request processing */ |
Willy Tarreau | c7e961e | 2008-08-17 17:13:47 +0200 | [diff] [blame] | 222 | unsigned int inspect_delay; /* inspection delay */ |
Willy Tarreau | b686644 | 2008-07-14 23:54:42 +0200 | [diff] [blame] | 223 | struct list inspect_rules; /* inspection rules */ |
Willy Tarreau | ab78619 | 2010-05-23 22:39:25 +0200 | [diff] [blame] | 224 | struct list l4_rules; /* layer4 rules */ |
Willy Tarreau | b686644 | 2008-07-14 23:54:42 +0200 | [diff] [blame] | 225 | } tcp_req; |
Emeric Brun | 97679e7 | 2010-09-23 17:56:44 +0200 | [diff] [blame] | 226 | struct { /* TCP request processing */ |
| 227 | unsigned int inspect_delay; /* inspection delay */ |
| 228 | struct list inspect_rules; /* inspection rules */ |
| 229 | } tcp_rep; |
Willy Tarreau | a9fb083 | 2009-07-10 20:53:53 +0200 | [diff] [blame] | 230 | int acl_requires; /* Elements required to satisfy all ACLs (ACL_USE_*) */ |
Krzysztof Piotr Oledzki | c6df066 | 2010-01-05 16:38:49 +0100 | [diff] [blame] | 231 | struct server *srv, defsrv; /* known servers; default server configuration */ |
Willy Tarreau | b625a08 | 2007-11-26 01:15:43 +0100 | [diff] [blame] | 232 | int srv_act, srv_bck; /* # of servers eligible for LB (UP|!checked) AND (enabled+weight!=0) */ |
Willy Tarreau | 5b4c2b5 | 2009-10-03 11:21:53 +0200 | [diff] [blame] | 233 | struct lbprm lbprm; /* load-balancing parameters */ |
Krzysztof Piotr Oledzki | 1acf217 | 2008-05-29 23:03:34 +0200 | [diff] [blame] | 234 | char *cookie_domain; /* domain used to insert the cookie */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 235 | char *cookie_name; /* name of the cookie to look for */ |
| 236 | int cookie_len; /* strlen(cookie_name), computed only once */ |
Willy Tarreau | 3193685 | 2010-10-06 16:59:56 +0200 | [diff] [blame] | 237 | unsigned int cookie_maxidle; /* max idle time for this cookie */ |
| 238 | unsigned int cookie_maxlife; /* max life time for this cookie */ |
Emeric Brun | 647caf1 | 2009-06-30 17:57:00 +0200 | [diff] [blame] | 239 | char *rdp_cookie_name; /* name of the RDP cookie to look for */ |
| 240 | int rdp_cookie_len; /* strlen(rdp_cookie_name), computed only once */ |
Willy Tarreau | 0173280 | 2007-11-01 22:48:15 +0100 | [diff] [blame] | 241 | char *url_param_name; /* name of the URL parameter used for hashing */ |
| 242 | int url_param_len; /* strlen(url_param_name), computed only once */ |
matt.farnsworth@nokia.com | 1c2ab96 | 2008-04-14 20:47:37 +0200 | [diff] [blame] | 243 | unsigned url_param_post_limit; /* if checking POST body for URI parameter, max body to wait for */ |
Marek Majkowski | 9c30fc1 | 2008-04-27 23:25:55 +0200 | [diff] [blame] | 244 | int uri_len_limit; /* character limit for uri balancing algorithm */ |
| 245 | int uri_dirs_depth1; /* directories+1 (slashes) limit for uri balancing algorithm */ |
Oskar Stolc | 8dc4184 | 2012-05-19 10:19:54 +0100 | [diff] [blame] | 246 | int uri_whole; /* if != 0, calculates the hash from the whole uri. Still honors the len_limit and dirs_depth1 */ |
Benoit | affb481 | 2009-03-25 13:02:10 +0100 | [diff] [blame] | 247 | char *hh_name; /* name of the header parameter used for hashing */ |
| 248 | int hh_len; /* strlen(hh_name), computed only once */ |
| 249 | int hh_match_domain; /* toggle use of special match function */ |
Willy Tarreau | 1c47f85 | 2006-07-09 08:22:27 +0200 | [diff] [blame] | 250 | char *appsession_name; /* name of the cookie to look for */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 251 | int appsession_name_len; /* strlen(appsession_name), computed only once */ |
Willy Tarreau | 1c47f85 | 2006-07-09 08:22:27 +0200 | [diff] [blame] | 252 | int appsession_len; /* length of the appsession cookie value to be used */ |
Willy Tarreau | 51041c7 | 2007-09-09 21:56:53 +0200 | [diff] [blame] | 253 | struct appsession_hash htbl_proxy; /* Per Proxy hashtable */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 254 | char *capture_name; /* beginning of the name of the cookie to capture */ |
Willy Tarreau | 1c47f85 | 2006-07-09 08:22:27 +0200 | [diff] [blame] | 255 | int capture_namelen; /* length of the cookie name to match */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 256 | int capture_len; /* length of the string to be captured */ |
| 257 | struct uri_auth *uri_auth; /* if non-NULL, the (list of) per-URI authentications */ |
Willy Tarreau | 1c47f85 | 2006-07-09 08:22:27 +0200 | [diff] [blame] | 258 | char *monitor_uri; /* a special URI to which we respond with HTTP/200 OK */ |
| 259 | int monitor_uri_len; /* length of the string above. 0 if unused */ |
Willy Tarreau | b80c230 | 2007-11-30 20:51:32 +0100 | [diff] [blame] | 260 | struct list mon_fail_cond; /* list of conditions to fail monitoring requests (chained) */ |
Willy Tarreau | 3a70f94 | 2008-02-15 11:15:34 +0100 | [diff] [blame] | 261 | struct { /* WARNING! check proxy_reset_timeouts() in proxy.h !!! */ |
Willy Tarreau | 0c303ee | 2008-07-07 00:09:58 +0200 | [diff] [blame] | 262 | int client; /* client I/O timeout (in ticks) */ |
| 263 | int tarpit; /* tarpit timeout, defaults to connect if unspecified */ |
| 264 | int queue; /* queue timeout, defaults to connect if unspecified */ |
| 265 | int connect; /* connect timeout (in ticks) */ |
| 266 | int server; /* server I/O timeout (in ticks) */ |
| 267 | int appsession; /* appsession cookie expiration */ |
| 268 | int httpreq; /* maximum time for complete HTTP request */ |
Willy Tarreau | b16a574 | 2010-01-10 14:46:16 +0100 | [diff] [blame] | 269 | int httpka; /* maximum time for a new HTTP request when using keep-alive */ |
Willy Tarreau | 0c303ee | 2008-07-07 00:09:58 +0200 | [diff] [blame] | 270 | int check; /* maximum time for complete check */ |
Willy Tarreau | ce887fd | 2012-05-12 12:50:00 +0200 | [diff] [blame] | 271 | int tunnel; /* I/O timeout to use in tunnel mode (in ticks) */ |
Willy Tarreau | 1fa3126 | 2007-12-03 00:36:16 +0100 | [diff] [blame] | 272 | } timeout; |
Krzysztof Piotr Oledzki | 48cb2ae | 2009-10-02 22:51:14 +0200 | [diff] [blame] | 273 | char *id, *desc; /* proxy id (name) and description */ |
Willy Tarreau | 1c47f85 | 2006-07-09 08:22:27 +0200 | [diff] [blame] | 274 | struct list pendconns; /* pending connections with no server assigned yet */ |
Willy Tarreau | ac68c5d | 2009-10-04 23:12:44 +0200 | [diff] [blame] | 275 | int nbpend; /* number of pending connections with no server assigned yet */ |
Willy Tarreau | 1c47f85 | 2006-07-09 08:22:27 +0200 | [diff] [blame] | 276 | int totpend; /* total number of pending connections on this instance (for stats) */ |
Krzysztof Piotr Oledzki | 052d4fd | 2009-10-04 14:52:57 +0200 | [diff] [blame] | 277 | unsigned int feconn, beconn; /* # of active frontend and backends sessions */ |
Willy Tarreau | d9b587f | 2010-02-26 10:05:55 +0100 | [diff] [blame] | 278 | struct freq_ctr fe_req_per_sec; /* HTTP requests per second on the frontend */ |
Willy Tarreau | b36b424 | 2010-06-04 20:59:39 +0200 | [diff] [blame] | 279 | struct freq_ctr fe_conn_per_sec; /* received connections per second on the frontend */ |
| 280 | struct freq_ctr fe_sess_per_sec; /* accepted sessions per second on the frontend (after tcp rules) */ |
Willy Tarreau | 7f062c4 | 2009-03-05 18:43:00 +0100 | [diff] [blame] | 281 | struct freq_ctr be_sess_per_sec; /* sessions per second on the backend */ |
Willy Tarreau | 8603431 | 2006-12-29 00:10:33 +0100 | [diff] [blame] | 282 | unsigned int maxconn; /* max # of active sessions on the frontend */ |
Willy Tarreau | 13a34bd | 2009-05-10 18:52:49 +0200 | [diff] [blame] | 283 | unsigned int fe_sps_lim; /* limit on new sessions per second on the frontend */ |
Willy Tarreau | 8603431 | 2006-12-29 00:10:33 +0100 | [diff] [blame] | 284 | unsigned int fullconn; /* #conns on backend above which servers are used at full load */ |
Willy Tarreau | 7ac51f6 | 2007-03-25 16:00:04 +0200 | [diff] [blame] | 285 | struct in_addr except_net, except_mask; /* don't x-forward-for for this address. FIXME: should support IPv6 */ |
Maik Broemme | 2850cb4 | 2009-04-17 18:53:21 +0200 | [diff] [blame] | 286 | struct in_addr except_to; /* don't x-original-to for this address. */ |
| 287 | struct in_addr except_mask_to; /* the netmask for except_to. */ |
Ross West | af72a1d | 2008-08-03 10:51:45 +0200 | [diff] [blame] | 288 | char *fwdfor_hdr_name; /* header to use - default: "x-forwarded-for" */ |
| 289 | int fwdfor_hdr_len; /* length of "x-forwarded-for" header */ |
Maik Broemme | 2850cb4 | 2009-04-17 18:53:21 +0200 | [diff] [blame] | 290 | char *orgto_hdr_name; /* header to use - default: "x-original-to" */ |
| 291 | int orgto_hdr_len; /* length of "x-original-to" header */ |
Mark Lamourine | c2247f0 | 2012-01-04 13:02:01 -0500 | [diff] [blame] | 292 | char *server_id_hdr_name; /* the header to use to send the server id (name) */ |
| 293 | int server_id_hdr_len; /* the length of the id (name) header... name */ |
Krzysztof Oledzki | 8513094 | 2007-10-22 16:21:10 +0200 | [diff] [blame] | 294 | |
| 295 | unsigned down_trans; /* up-down transitions */ |
| 296 | unsigned down_time; /* total time the proxy was down */ |
| 297 | time_t last_change; /* last time, when the state was changed */ |
| 298 | |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 299 | int conn_retries; /* maximum number of connect retries */ |
Willy Tarreau | 977b8e4 | 2006-12-29 14:19:17 +0100 | [diff] [blame] | 300 | int cap; /* supported capabilities (PR_CAP_*) */ |
Willy Tarreau | f229eb8 | 2010-06-01 17:14:24 +0200 | [diff] [blame] | 301 | int (*accept)(struct session *s); /* application layer's accept() */ |
Willy Tarreau | ef9a360 | 2012-12-08 22:29:20 +0100 | [diff] [blame] | 302 | struct conn_src conn_src; /* connection source settings */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 303 | struct proxy *next; |
William Lallemand | 0f99e34 | 2011-10-12 17:50:54 +0200 | [diff] [blame] | 304 | struct list logsrvs; |
William Lallemand | 723b73a | 2012-02-08 16:37:49 +0100 | [diff] [blame] | 305 | struct list logformat; /* log_format linked list */ |
William Lallemand | a73203e | 2012-03-12 12:48:57 +0100 | [diff] [blame] | 306 | char *header_unique_id; /* unique-id header */ |
| 307 | struct list format_unique_id; /* unique-id format */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 308 | int to_log; /* things to be logged (LW_*) */ |
Willy Tarreau | 0c303ee | 2008-07-07 00:09:58 +0200 | [diff] [blame] | 309 | int stop_time; /* date to stop listening, when stopping != 0 (int ticks) */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 310 | struct hdr_exp *req_exp; /* regular expressions for request headers */ |
| 311 | struct hdr_exp *rsp_exp; /* regular expressions for response headers */ |
| 312 | int nb_req_cap, nb_rsp_cap; /* # of headers to be captured */ |
| 313 | struct cap_hdr *req_cap; /* chained list of request headers to be captured */ |
| 314 | struct cap_hdr *rsp_cap; /* chained list of response headers to be captured */ |
Willy Tarreau | cf7f320 | 2007-05-13 22:46:04 +0200 | [diff] [blame] | 315 | struct pool_head *req_cap_pool, /* pools of pre-allocated char ** used to build the sessions */ |
| 316 | *rsp_cap_pool; |
Willy Tarreau | deb9ed8 | 2010-01-03 21:03:22 +0100 | [diff] [blame] | 317 | struct list req_add, rsp_add; /* headers to be added */ |
Willy Tarreau | 7d0aaf3 | 2011-03-10 23:25:56 +0100 | [diff] [blame] | 318 | struct pxcounters be_counters; /* backend statistics counters */ |
| 319 | struct pxcounters fe_counters; /* frontend statistics counters */ |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 320 | |
Willy Tarreau | 07687c1 | 2011-07-24 23:55:06 +0200 | [diff] [blame] | 321 | struct list listener_queue; /* list of the temporarily limited listeners because of lack of a proxy resource */ |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 322 | struct stktable table; /* table for storing sticking sessions */ |
| 323 | |
Willy Tarreau | d1a33e3 | 2012-10-04 00:14:33 +0200 | [diff] [blame] | 324 | struct task *task; /* the associated task, mandatory to manage rate limiting, stopping and resource shortage, NULL if disabled */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 325 | int grace; /* grace time after stop request */ |
Willy Tarreau | f3c6920 | 2006-07-09 16:42:34 +0200 | [diff] [blame] | 326 | char *check_req; /* HTTP or SSL request to use for PR_O_HTTP_CHK|PR_O_SSL3_CHK */ |
| 327 | int check_len; /* Length of the HTTP or SSL3 request */ |
Willy Tarreau | 1ee51a6 | 2011-08-19 20:04:17 +0200 | [diff] [blame] | 328 | char *expect_str; /* http-check expected content : string or text version of the regex */ |
Willy Tarreau | bd74154 | 2010-03-16 18:46:54 +0100 | [diff] [blame] | 329 | regex_t *expect_regex; /* http-check expected content */ |
Willy Tarreau | 0f77253 | 2006-12-23 20:51:41 +0100 | [diff] [blame] | 330 | struct chunk errmsg[HTTP_ERR_SIZE]; /* default or customized error messages for known errors */ |
Willy Tarreau | dcd4771 | 2007-11-04 23:35:08 +0100 | [diff] [blame] | 331 | int uuid; /* universally unique proxy ID, used for SNMP */ |
Willy Tarreau | c73ce2b | 2008-01-06 10:55:10 +0100 | [diff] [blame] | 332 | unsigned int backlog; /* force the frontend's listen backlog */ |
Willy Tarreau | 0b9c02c | 2009-02-04 22:05:05 +0100 | [diff] [blame] | 333 | unsigned int bind_proc; /* bitmask of processes using this proxy. 0 = all. */ |
Willy Tarreau | 7b81563 | 2011-10-21 18:51:57 +0200 | [diff] [blame] | 334 | |
| 335 | /* warning: these structs are huge, keep them at the bottom */ |
| 336 | struct sockaddr_storage dispatch_addr; /* the default address to connect to */ |
Willy Tarreau | f073a83 | 2009-03-01 23:21:47 +0100 | [diff] [blame] | 337 | struct error_snapshot invalid_req, invalid_rep; /* captures of last errors */ |
Willy Tarreau | 84b57da | 2009-06-14 11:10:45 +0200 | [diff] [blame] | 338 | |
| 339 | /* used only during configuration parsing */ |
| 340 | int no_options; /* PR_O_REDISP, PR_O_TRANSP, ... */ |
| 341 | int no_options2; /* PR_O2_* */ |
Krzysztof Piotr Oledzki | 052d4fd | 2009-10-04 14:52:57 +0200 | [diff] [blame] | 342 | |
Willy Tarreau | 196729e | 2012-05-31 19:30:26 +0200 | [diff] [blame] | 343 | char *logformat_string; /* log format string */ |
| 344 | char *uniqueid_format_string; /* unique-id format string */ |
Willy Tarreau | 90a570f | 2009-10-04 20:54:54 +0200 | [diff] [blame] | 345 | struct { |
Willy Tarreau | 8113a5d | 2012-10-04 08:01:43 +0200 | [diff] [blame] | 346 | char *file; /* file where the section appears */ |
Willy Tarreau | 90a570f | 2009-10-04 20:54:54 +0200 | [diff] [blame] | 347 | int line; /* line where the section appears */ |
Willy Tarreau | 53fb4ae | 2009-10-04 23:04:08 +0200 | [diff] [blame] | 348 | struct eb32_node id; /* place in the tree of used IDs */ |
| 349 | struct eb_root used_listener_id;/* list of listener IDs in use */ |
| 350 | struct eb_root used_server_id; /* list of server IDs in use */ |
Willy Tarreau | 2a65ff0 | 2012-09-13 17:54:29 +0200 | [diff] [blame] | 351 | struct list bind; /* list of bind settings */ |
Willy Tarreau | 4348fad | 2012-09-20 16:48:07 +0200 | [diff] [blame] | 352 | struct list listeners; /* list of listeners belonging to this frontend */ |
Willy Tarreau | 90a570f | 2009-10-04 20:54:54 +0200 | [diff] [blame] | 353 | } conf; /* config information */ |
Willy Tarreau | 258a14b | 2010-07-13 16:24:48 +0200 | [diff] [blame] | 354 | void *parent; /* parent of the proxy when applicable */ |
William Lallemand | 82fe75c | 2012-10-23 10:25:10 +0200 | [diff] [blame] | 355 | struct comp *comp; /* http compression */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 356 | }; |
| 357 | |
Willy Tarreau | 55ea757 | 2007-06-17 19:56:27 +0200 | [diff] [blame] | 358 | struct switching_rule { |
| 359 | struct list list; /* list linked to from the proxy */ |
| 360 | struct acl_cond *cond; /* acl condition to meet */ |
| 361 | union { |
| 362 | struct proxy *backend; /* target backend */ |
| 363 | char *name; /* target backend name during config parsing */ |
| 364 | } be; |
| 365 | }; |
| 366 | |
Willy Tarreau | 4a5cade | 2012-04-05 21:09:48 +0200 | [diff] [blame] | 367 | struct server_rule { |
| 368 | struct list list; /* list linked to from the proxy */ |
| 369 | struct acl_cond *cond; /* acl condition to meet */ |
| 370 | union { |
| 371 | struct server *ptr; /* target server */ |
| 372 | char *name; /* target server name during config parsing */ |
| 373 | } srv; |
| 374 | }; |
| 375 | |
Cyril Bonté | 47fdd8e | 2010-04-25 00:00:51 +0200 | [diff] [blame] | 376 | struct persist_rule { |
Willy Tarreau | 4de9149 | 2010-01-22 19:10:05 +0100 | [diff] [blame] | 377 | struct list list; /* list linked to from the proxy */ |
| 378 | struct acl_cond *cond; /* acl condition to meet */ |
Cyril Bonté | 47fdd8e | 2010-04-25 00:00:51 +0200 | [diff] [blame] | 379 | int type; |
Willy Tarreau | 4de9149 | 2010-01-22 19:10:05 +0100 | [diff] [blame] | 380 | }; |
| 381 | |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 382 | struct sticking_rule { |
| 383 | struct list list; /* list linked to from the proxy */ |
| 384 | struct acl_cond *cond; /* acl condition to meet */ |
Willy Tarreau | 1278578 | 2012-04-27 21:37:17 +0200 | [diff] [blame] | 385 | struct sample_expr *expr; /* fetch expr to fetch key */ |
Emeric Brun | b982a3d | 2010-01-04 15:45:53 +0100 | [diff] [blame] | 386 | int flags; /* STK_* */ |
| 387 | union { |
| 388 | struct stktable *t; /* target table */ |
| 389 | char *name; /* target table name during config parsing */ |
| 390 | } table; |
| 391 | }; |
| 392 | |
| 393 | |
Willy Tarreau | b463dfb | 2008-06-07 23:08:56 +0200 | [diff] [blame] | 394 | struct redirect_rule { |
| 395 | struct list list; /* list linked to from the proxy */ |
| 396 | struct acl_cond *cond; /* acl condition to meet */ |
| 397 | int type; |
| 398 | int rdr_len; |
| 399 | char *rdr_str; |
| 400 | int code; |
Willy Tarreau | 79da469 | 2008-11-19 20:03:04 +0100 | [diff] [blame] | 401 | unsigned int flags; |
Willy Tarreau | 0140f25 | 2008-11-19 21:07:09 +0100 | [diff] [blame] | 402 | int cookie_len; |
| 403 | char *cookie_str; |
Willy Tarreau | b463dfb | 2008-06-07 23:08:56 +0200 | [diff] [blame] | 404 | }; |
| 405 | |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 406 | extern struct proxy *proxy; |
Willy Tarreau | 53fb4ae | 2009-10-04 23:04:08 +0200 | [diff] [blame] | 407 | extern struct eb_root used_proxy_id; /* list of proxy IDs in use */ |
Willy Tarreau | 10479e4 | 2010-12-12 14:00:34 +0100 | [diff] [blame] | 408 | extern unsigned int error_snapshot_id; /* global ID assigned to each error then incremented */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 409 | |
| 410 | #endif /* _TYPES_PROXY_H */ |
| 411 | |
| 412 | /* |
| 413 | * Local variables: |
| 414 | * c-indent-level: 8 |
| 415 | * c-basic-offset: 8 |
| 416 | * End: |
| 417 | */ |