summaryrefslogtreecommitdiffstats
path: root/include/ulogd/conffile.h
Commit message (Collapse)AuthorAgeFilesLines
* ulogd: improve integer option parsingCorubba Smith2025-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The `value` union member in `struct config_entry` is declared as `int` since basically the beginning in e07722e46001 ("config stuff added"). The parsing was switched from the original `atoi()` in 015849995f7f ("Fix hexadecimal parsing in config file") to `strtoul()`. Switch the function for parsing to the signed `strtol()` variant since the result will be stored in a signed int, and it makes sense to support negative numbers. Detect when `strtol()` does not properly consume the whole argument and return a new format error. Also check the numerical value to make sure the signed int does not overflow, in which case a new range error is returned. Unfortunately there is no `strtoi()` which would do the proper range check itself, so the intermediate `long` and range-check for `int` is required. I also considered changing the `value` union member from `int` to `long`, which would make it possible to use the parsed value as-is. But since this is part of the api towards plugins (including third party) such a potentially breaking change felt unwarranted. This also means that still only 16bit integer values are *guaranteed* to work, although most platforms use bigger widths for int. Signed-off-by: Corubba Smith <corubba@gmx.de> Signed-off-by: Florian Westphal <fw@strlen.de>
* Use stdint types everywhereFelix Janda2015-06-261-5/+5
| | | | Signed-off-by: Felix Janda <felix.janda@posteo.de>
* Add handling of too long line and arguments.Eric Leblond2013-02-181-0/+1
| | | | | When an argument or a line is too long, it can not be store into ulogd configuration and this must results in a error.
* Fix typo in comments.Eric Leblond2013-02-181-3/+3
|
* Get rid of SVN tag in comment.Eric Leblond2013-01-181-2/+0
| | | | This patch also update some copyright and licence declaration.
* conf: add flag to allow option setup tuningEric Leblond2013-01-181-0/+4
| | | | | | This patch adds a flag to the config_entry structure to be able to tune setup. First usage is to ask config parser not to update a key if it has been already set.
* Introduce config_stop() functionEric Leblond2008-12-091-0/+3
| | | | | This patch adds the config_stop function which is in charge of releasing ressources allocated for configuration file parsing.
* use 'const char' in parser function/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org2005-12-141-1/+1
|
* - remove 'config_entry_t' typedef. use structure name.laforge2004-10-031-6/+10
| | | | | | - fix typo in debug message - now uses arrays of 'struct config_entry' instead of linked list - introduce 'struct config_kset' to describe array of config_entries
* new configuration file syntax (Magnus Boden)laforge2003-09-281-7/+4
|
* added a few syntactic correctionslaforge2001-05-261-2/+2
|
* huge reorganization for 0.9laforge2000-11-201-0/+69
- added hashtables everywhere - no more dynamic allocation for each packet - mysql output plugin - more keys in ulogd_BASE - moved libipulog into ulogd directory - introduced autoconf