1/*
2 * Copyright (C) Joerg Lenneis 2003
3 * Copyright (C) Frank Lahm 2010
4 * All Rights Reserved.  See COPYING.
5 */
6
7#ifndef CNID_DBD_DB_PARAM_H
8#define CNID_DBD_DB_PARAM_H 1
9
10#include <sys/param.h>
11#include <sys/cdefs.h>
12
13#define DEFAULT_LOGFILE_AUTOREMOVE 1
14#define DEFAULT_CACHESIZE          (8 * 1024) /* KB, so 8 MB */
15#define DEFAULT_MAXLOCKS           20000
16#define DEFAULT_MAXLOCKOBJS        20000
17#define DEFAULT_FLUSH_FREQUENCY    1000
18#define DEFAULT_FLUSH_INTERVAL     1800
19#define DEFAULT_USOCK_FILE         "usock"
20#define DEFAULT_FD_TABLE_SIZE      512
21#define DEFAULT_IDLE_TIMEOUT       (10 * 60)
22
23struct db_param {
24    char *dir;
25    int logfile_autoremove;
26    int cachesize;              /* in KB */
27    int maxlocks;
28    int maxlockobjs;
29    int flush_interval;
30    int flush_frequency;
31    char usock_file[MAXPATHLEN + 1];
32    int fd_table_size;
33    int idle_timeout;
34    int max_vols;
35};
36
37extern struct db_param *db_param_read  (char *);
38
39#endif /* CNID_DBD_DB_PARAM_H */
40
41