Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 1 | /* |
| 2 | include/types/backend.h |
| 3 | This file rassembles definitions for backends |
| 4 | |
Willy Tarreau | 1a20a5d | 2007-11-01 21:08:19 +0100 | [diff] [blame] | 5 | Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +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 | */ |
| 21 | |
| 22 | #ifndef _TYPES_BACKEND_H |
| 23 | #define _TYPES_BACKEND_H |
| 24 | |
Willy Tarreau | e3ba5f0 | 2006-06-29 18:54:54 +0200 | [diff] [blame] | 25 | #include <common/config.h> |
| 26 | |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 27 | /* bits for proxy->options */ |
| 28 | #define PR_O_REDISP 0x00000001 /* allow reconnection to dispatch in case of errors */ |
| 29 | #define PR_O_TRANSP 0x00000002 /* transparent mode : use original DEST as dispatch */ |
| 30 | #define PR_O_COOK_RW 0x00000004 /* rewrite all direct cookies with the right serverid */ |
| 31 | #define PR_O_COOK_IND 0x00000008 /* keep only indirect cookies */ |
| 32 | #define PR_O_COOK_INS 0x00000010 /* insert cookies when not accessing a server directly */ |
| 33 | #define PR_O_COOK_PFX 0x00000020 /* rewrite all cookies by prefixing the right serverid */ |
| 34 | #define PR_O_COOK_ANY (PR_O_COOK_RW | PR_O_COOK_IND | PR_O_COOK_INS | PR_O_COOK_PFX) |
Willy Tarreau | 1a20a5d | 2007-11-01 21:08:19 +0100 | [diff] [blame] | 35 | #define PR_O_SMTP_CHK 0x00000040 /* use SMTP EHLO check for server health - pvandijk@vision6.com.au */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 36 | #define PR_O_KEEPALIVE 0x00000080 /* follow keep-alive sessions */ |
| 37 | #define PR_O_FWDFOR 0x00000100 /* insert x-forwarded-for with client address */ |
| 38 | #define PR_O_BIND_SRC 0x00000200 /* bind to a specific source address when connect()ing */ |
| 39 | #define PR_O_NULLNOLOG 0x00000400 /* a connect without request will not be logged */ |
| 40 | #define PR_O_COOK_NOC 0x00000800 /* add a 'Cache-control' header with the cookie */ |
| 41 | #define PR_O_COOK_POST 0x00001000 /* don't insert cookies for requests other than a POST */ |
| 42 | #define PR_O_HTTP_CHK 0x00002000 /* use HTTP 'OPTIONS' method to check server health */ |
| 43 | #define PR_O_PERSIST 0x00004000 /* server persistence stays effective even when server is down */ |
| 44 | #define PR_O_LOGASAP 0x00008000 /* log as soon as possible, without waiting for the session to complete */ |
| 45 | #define PR_O_HTTP_CLOSE 0x00010000 /* force 'connection: close' in both directions */ |
| 46 | #define PR_O_CHK_CACHE 0x00020000 /* require examination of cacheability of the 'set-cookie' field */ |
| 47 | #define PR_O_TCP_CLI_KA 0x00040000 /* enable TCP keep-alive on client-side sessions */ |
| 48 | #define PR_O_TCP_SRV_KA 0x00080000 /* enable TCP keep-alive on server-side sessions */ |
| 49 | #define PR_O_USE_ALL_BK 0x00100000 /* load-balance between backup servers */ |
| 50 | #define PR_O_FORCE_CLO 0x00200000 /* enforce the connection close immediately after server response */ |
Willy Tarreau | 1a20a5d | 2007-11-01 21:08:19 +0100 | [diff] [blame] | 51 | #define PR_O_TCP_NOLING 0x00400000 /* disable lingering on client and server connections */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 52 | #define PR_O_ABRT_CLOSE 0x00800000 /* immediately abort request when client closes */ |
Willy Tarreau | f3c6920 | 2006-07-09 16:42:34 +0200 | [diff] [blame] | 53 | #define PR_O_SSL3_CHK 0x01000000 /* use SSLv3 CLIENT_HELLO packets for server health */ |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 54 | |
Willy Tarreau | 1a20a5d | 2007-11-01 21:08:19 +0100 | [diff] [blame] | 55 | /* TPXY: exclusive values */ |
Willy Tarreau | 77074d5 | 2006-11-12 23:57:19 +0100 | [diff] [blame] | 56 | #define PR_O_TPXY_ADDR 0x02000000 /* bind to this non-local address when connect()ing */ |
| 57 | #define PR_O_TPXY_CIP 0x04000000 /* bind to the client's IP address when connect()ing */ |
| 58 | #define PR_O_TPXY_CLI 0x06000000 /* bind to the client's IP+port when connect()ing */ |
| 59 | #define PR_O_TPXY_MASK 0x06000000 /* bind to a non-local address when connect()ing */ |
Willy Tarreau | 8f922fc | 2007-01-06 21:11:49 +0100 | [diff] [blame] | 60 | #define PR_O_TCPSPLICE 0x08000000 /* delegate data transfer to linux kernel's tcp_splice */ |
Willy Tarreau | 1a20a5d | 2007-11-01 21:08:19 +0100 | [diff] [blame] | 61 | |
| 62 | /* BALANCE: exclusive values */ |
| 63 | #define PR_O_BALANCE_RR 0x10000000 /* balance in round-robin mode */ |
| 64 | #define PR_O_BALANCE_SH 0x20000000 /* balance on source IP hash */ |
| 65 | #define PR_O_BALANCE_L4 0x30000000 /* mask to match layer4-based algorithms */ |
| 66 | #define PR_O_BALANCE_UH 0x40000000 /* balance on URI hash */ |
Willy Tarreau | 0173280 | 2007-11-01 22:48:15 +0100 | [diff] [blame] | 67 | #define PR_O_BALANCE_PH 0x50000000 /* balance on URL parameter hash */ |
Willy Tarreau | 1a20a5d | 2007-11-01 21:08:19 +0100 | [diff] [blame] | 68 | #define PR_O_BALANCE_L7 0x40000000 /* mask to match layer7-based algorithms */ |
| 69 | #define PR_O_BALANCE 0x70000000 /* mask to extract BALANCE algorithm */ |
Willy Tarreau | 77074d5 | 2006-11-12 23:57:19 +0100 | [diff] [blame] | 70 | |
| 71 | |
Willy Tarreau | baaee00 | 2006-06-26 02:48:02 +0200 | [diff] [blame] | 72 | #endif /* _TYPES_BACKEND_H */ |
| 73 | |
| 74 | /* |
| 75 | * Local variables: |
| 76 | * c-indent-level: 8 |
| 77 | * c-basic-offset: 8 |
| 78 | * End: |
| 79 | */ |