diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-02-03 10:59:16 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-02-03 10:59:16 +0000 |
commit | 13d8c6b35b58325941ab9118d6c24684188ea9eb (patch) | |
tree | 114a87f26eb27a879c1e9f8562cba3c6af843e29 /include/ulogd/db.h | |
parent | a532e3ec873e74bf3837e3e62ba7208efd1c78db (diff) |
From: Eric leblond <eric@inl.fr>
This patch adds new SQL schema for MySQL and PGsql. The goal is to improve the one line per entry format. There is no more a big table with all fields because this sort of storage is causing bad performance (databases don't like to have a lot of NULL fields to store).
Main changes are :
* Add new schema for MySQL and PGsql
* Use call to configurable procedure in SQL OUTPUT modules
* Arguments of a procedure are given by the list of fields of a selected table
Diffstat (limited to 'include/ulogd/db.h')
-rw-r--r-- | include/ulogd/db.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/ulogd/db.h b/include/ulogd/db.h index 94752ae..94cdbcb 100644 --- a/include/ulogd/db.h +++ b/include/ulogd/db.h @@ -41,13 +41,19 @@ struct db_instance { { \ .key = "connect_timeout", \ .type = CONFIG_TYPE_INT, \ + }, \ + { \ + .key = "procedure", \ + .type = CONFIG_TYPE_STRING, \ + .options = CONFIG_OPT_MANDATORY, \ } -#define DB_CE_NUM 4 +#define DB_CE_NUM 5 #define table_ce(x) (x->ces[0]) #define reconnect_ce(x) (x->ces[1]) #define asstring_ce(x) (x->ces[2]) #define timeout_ce(x) (x->ces[3]) +#define procedure_ce(x) (x->ces[4]) void ulogd_db_signal(struct ulogd_pluginstance *upi, int signal); int ulogd_db_start(struct ulogd_pluginstance *upi); |