2006-06-29 15:53:05 +00:00
|
|
|
#ifndef _COMMON_APPSESS_H
|
|
|
|
#define _COMMON_APPSESS_H
|
2006-06-26 00:48:02 +00:00
|
|
|
|
2007-09-09 19:56:53 +00:00
|
|
|
/*
|
|
|
|
* The time between two calls of appsession_refresh in ms.
|
|
|
|
*/
|
|
|
|
#define TBLCHKINT 5000
|
2006-06-26 00:48:02 +00:00
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
2006-06-29 16:54:54 +00:00
|
|
|
#include <common/config.h>
|
2007-05-13 19:29:55 +00:00
|
|
|
#include <common/memory.h>
|
2006-06-26 00:48:02 +00:00
|
|
|
|
|
|
|
#include <types/task.h>
|
|
|
|
|
|
|
|
typedef struct appsessions {
|
|
|
|
char *sessid;
|
|
|
|
char *serverid;
|
2008-07-06 22:09:58 +00:00
|
|
|
int expire; /* next expiration time for this application session (in tick) */
|
2006-06-26 00:48:02 +00:00
|
|
|
unsigned long int request_count;
|
2007-09-09 19:56:53 +00:00
|
|
|
struct list hash_list;
|
2006-06-26 00:48:02 +00:00
|
|
|
} appsess;
|
|
|
|
|
2007-05-13 19:29:55 +00:00
|
|
|
extern struct pool_head *pool2_appsess;
|
2006-06-26 00:48:02 +00:00
|
|
|
|
|
|
|
struct app_pool {
|
2007-05-13 19:29:55 +00:00
|
|
|
struct pool_head *sessid;
|
|
|
|
struct pool_head *serverid;
|
2006-06-26 00:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 */
|
2007-09-09 19:56:53 +00:00
|
|
|
void destroy(appsess *data);
|
2006-06-26 00:48:02 +00:00
|
|
|
|
2009-03-08 08:38:41 +00:00
|
|
|
struct task *appsession_refresh(struct task *t);
|
2006-06-26 00:48:02 +00:00
|
|
|
int appsession_task_init(void);
|
|
|
|
int appsession_init(void);
|
|
|
|
void appsession_cleanup(void);
|
|
|
|
|
2006-06-29 15:53:05 +00:00
|
|
|
#endif /* _COMMON_APPSESS_H */
|
2006-06-26 00:48:02 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* c-indent-level: 8
|
|
|
|
* c-basic-offset: 8
|
|
|
|
* End:
|
|
|
|
*/
|