blob: 536f453d6bf0ee00db1a235d26b42c969c094305 [file] [log] [blame]
Willy Tarreaubaaee002006-06-26 02:48:02 +02001/*
2 include/types/backend.h
3 This file rassembles definitions for backends
4
Willy Tarreau1a20a5d2007-11-01 21:08:19 +01005 Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
Willy Tarreaubaaee002006-06-26 02:48:02 +02006
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 Tarreaue3ba5f02006-06-29 18:54:54 +020025#include <common/config.h>
26
Willy Tarreau31682232007-11-29 15:38:04 +010027/* Parameters for proxy->lbprm.algo. Those values are exclusive */
28#define BE_LB_ALGO_RR 0x00000001 /* balance in round-robin mode */
29#define BE_LB_ALGO_SH 0x00000002 /* balance on source IP hash */
30#define BE_LB_ALGO_L4 0x00000003 /* mask to match layer4-based algorithms */
31#define BE_LB_ALGO_UH 0x00000004 /* balance on URI hash */
32#define BE_LB_ALGO_PH 0x00000005 /* balance on URL parameter hash */
33#define BE_LB_ALGO_L7 0x00000004 /* mask to match layer7-based algorithms */
34#define BE_LB_ALGO 0x00000007 /* mask to extract BALANCE algorithm */
Willy Tarreaub625a082007-11-26 01:15:43 +010035
36/* various constants */
37#define BE_WEIGHT_SCALE 256 /* scale between user weight and effective weight */
38
Willy Tarreaubaaee002006-06-26 02:48:02 +020039#endif /* _TYPES_BACKEND_H */
40
41/*
42 * Local variables:
43 * c-indent-level: 8
44 * c-basic-offset: 8
45 * End:
46 */