File: appsession.h

package info (click to toggle)
haproxy 1.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 7,732 kB
  • sloc: ansic: 62,860; xml: 1,754; python: 925; makefile: 551; perl: 550; sh: 491
file content (52 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef _COMMON_APPSESS_H
#define _COMMON_APPSESS_H

/*
 * The time between two calls of appsession_refresh in ms.
 */
#define TBLCHKINT 5000

#include <sys/time.h>

#include <common/config.h>
#include <common/memory.h>

#include <types/task.h>

typedef struct appsessions {
	char *sessid;
	char *serverid;
	int   expire;		/* next expiration time for this application session (in tick) */
	unsigned long int request_count;
	struct list hash_list;
} appsess;

extern struct pool_head *pool2_appsess;

struct app_pool {
	struct pool_head *sessid;
	struct pool_head *serverid;
};

extern struct app_pool apools;
extern int have_appsession;


/* Callback for hash_lookup */
int match_str(const void *key1, const void *key2);

/* Callback for destroy */
void destroy(appsess *data);

int appsession_task_init(void);
int appsession_init(void);
void appsession_cleanup(void);

#endif /* _COMMON_APPSESS_H */

/*
 * Local variables:
 *  c-indent-level: 8
 *  c-basic-offset: 8
 * End:
 */