Commit Graph

26 Commits (3a86aeac65bedb5a002fa929940dde2c55ba60ce)

Author SHA1 Message Date
Jason Ish ae23144b67 --set - handle spaces on either side of '='
Discard spaces when provided as part of --set around the '='. For
example, "val=key", "val = key", "val= key" and "val =key" are
all equivalent now.
11 years ago
Jason Ish a243a42bdf New function to test if a configuration node is a sequence or not. 11 years ago
Victor Julien 844065bf58 conf api: use const pointers where possible
Use const pointers where possible in the Conf API.
11 years ago
Jason Ish c981a16579 Function to prune all non-final nodes from a configuration node. 12 years ago
Jason Ish b8e13d4bd6 More concise API for setting config values that
can be overrided or not (final values).
12 years ago
Eric Leblond 0bddf4f02f conf: introduce WithDefault function
This patch introduces a new set of functions to the ConfGetChildValue
family. They permit to look under a default node if looking under
base node as failed. This will be used to access to default parameters
for a data type (for instance, first usage will be interface).
13 years ago
Victor Julien 489b8b8bcc Allow other yaml files to be included in the main yaml. 14 years ago
Victor Julien 55da9787a4 Win32 compile fixes. 14 years ago
Eileen Donlon 89599d3b9b fixed bug 288; corrected config boolean parsing problems 14 years ago
Eric Leblond dc667af1a1 conf: Introduce new function to input configuration.
The input modules are needing a per interface configuration. This
implies some new operations to be able to parse easily te configuration.

The syntax of the configuration file is for example:
af-packet:
  - interface: eth0
    threads: 2
  - interface: eth1
    threads: 3
We need a way to express get a configuration variable for interface[eth0].
This is by using ConfNodeLookupKeyValue() to get the matching node. And
after that value can be fetch by using ConfGetChildValue*() functions.
14 years ago
Jason Ish 7257fed0f3 Fix bug 288, accept true in output configuration.
Refactor a bit to run checks for truth through a common function
that takes yes, true, on and 1 as true values.
15 years ago
Victor Julien cb0bb668eb Add support for retrieving float and double variables from the configuration. 16 years ago
Jason Ish 18e5ac8cde Basic rule profiling even though the results may be skewed by a bad rule in a grouping of rules. 16 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 16 years ago
Jason Ish ea277a0b36 Cleanup of configuration internals. Use an n-ary type tree for everything instead of a first level hash branching off into n-ary type trees.
Reduces the code and uses a uniform internal data structure.
16 years ago
Jason Ish 844c444af1 Use the configuration file to setup alert logging (and http logging).
Only setup for the live pcap modes at the moment.
16 years ago
Jason Ish 6cc0771d6f - Fix memory leak error when freeing node.
- Cleanup ConfDump output a little.
16 years ago
Jason Ish 90c46ee2c9 Add the ability to lookup a child ConfNode, or just the value of a child ConfNode. 16 years ago
Victor Julien ecf86f9c23 Rename to Suricata. 16 years ago
Anoop Saldanha dc44700ce5 Support vars lookup from conf file. Current patch support address and port group vars lookup 16 years ago
Jason Ish ec9fa7b0a7 Files missed in last commit.
Update Conf API to allow direct access to nodes.

    A configuration node is now a tailq head and a tailq entry.  This allows us to build
    n-ary type trees to build something DOM like.

    Properly process lists so a list of rule files (for example) can be loaded.
16 years ago
Victor Julien 0d0ffb9963 Reorganize header inclusions. 16 years ago
Jason Ish f508d1e0fd Add getters for integer and boolean values. 16 years ago
Jason Ish 3f51fc2ce7 - Add a configuration dumper.
- Fix a bug where you could override a configuration value that did not
  set allow_override to true.
16 years ago
Victor Julien d7de22d0f0 Removing GPLv2 license info as our bylaws aren't final yet and we will redist code non-GPL as well. Rename struct conf_node to ConfNode to comply with engine coding style. 16 years ago
Jason Ish e3b538c7d7 Simple configuration API.
Allow the log directory to be changed.
16 years ago