blob: 8a31034598790f24c105de52cc66e12ab0e7c296 [file] [log] [blame]
willy tarreau598da412005-12-18 01:07:29 +01001#ifndef _APPSESS_H
2#define _APPSESS_H
3
4#define TBLSIZ 10
5#define TBLCHKINT 5000 /* The time between two calls of appsession_refresh in ms */
6
7/*
8 These Parts are copied from
9
10 http://www.oreilly.com/catalog/masteralgoc/index.html
11 Mastering Algorithms with C
12 By Kyle Loudon
13 ISBN: 1-56592-453-3
14 Publishd by O'Reilly
15
16 We have added our own struct to these function.
17 */
18
19#include <include/list.h>
20#include <include/chtbl.h>
21#include <include/hashpjw.h>
22/* end of copied parts */
23
24struct app_pool {
25 void **sessid;
26 void **serverid;
27 int ses_waste, ses_use, ses_msize;
28 int ser_waste, ser_use, ser_msize;
29};
30
31struct app_pool apools;
32int have_appsession;
33
34/* Callback for hash_lookup */
35int match_str(const void *key1, const void *key2);
36
37/* Callback for destroy */
38void destroy(void *data);
39
40#if defined(DEBUG_HASH)
41static void print_table(const CHTbl *htbl);
42#endif
43
44#endif