From f7ff7dbaeddb4c86334968c667ea6b1a8cb4583c Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 18 Mar 2020 20:50:47 +0100 Subject: [PATCH] config: common definitions --- src/Makefile.am | 1 + src/util-config.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 src/util-config.h diff --git a/src/Makefile.am b/src/Makefile.am index 839adc3174..876925423b 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -441,6 +441,7 @@ util-byte.c util-byte.h \ util-checksum.c util-checksum.h \ util-cidr.c util-cidr.h \ util-classification-config.c util-classification-config.h \ +util-config.h \ util-conf.c util-conf.h \ util-coredump-config.c util-coredump-config.h \ util-cpu.c util-cpu.h \ diff --git a/src/util-config.h b/src/util-config.h new file mode 100644 index 0000000000..e0a5bdb20e --- /dev/null +++ b/src/util-config.h @@ -0,0 +1,53 @@ +/* Copyright (C) 2020 Open Information Security Foundation + * + * You can copy, redistribute or modify this Program under the terms of + * the GNU General Public License version 2 as published by the Free + * Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * version 2 along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +/** + * \file + * + * \author Victor Julien + */ + +#ifndef __UTIL_CONFIG_H__ +#define __UTIL_CONFIG_H__ + +enum ConfigAction { + CONFIG_ACTION_UNSET = 0, + CONFIG_ACTION_SET = 1, +}; + +enum ConfigSubsys { + CONFIG_SUBSYS_LOGGING = 0, +}; + +enum ConfigType { + CONFIG_TYPE_TX = 0, /* transaction logging */ + CONFIG_TYPE_FLOW, /* flow logging */ + CONFIG_TYPE_ALERT, /* alert logging */ + CONFIG_TYPE_ANOMALY, /* anomaly logging */ + CONFIG_TYPE_FILE, /* file logging */ + CONFIG_TYPE_PCAP, /* pcap logging */ + CONFIG_TYPE_DROP, /* drop logging */ +#define CONFIG_TYPE_DEFAULT CONFIG_TYPE_TX +}; + +enum ConfigScope { + CONFIG_SCOPE_TX = 0, /* per transaction */ + CONFIG_SCOPE_FLOW, /* per flow */ +#define CONFIG_SCOPE_DEFAULT CONFIG_SCOPE_TX +}; + +#endif