summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCorubba Smith <corubba@gmx.de>2025-03-12 15:52:29 +0100
committerFlorian Westphal <fw@strlen.de>2025-03-12 16:05:14 +0100
commit64699d8103a43e09d2b5df57558c5f5a05583fe8 (patch)
treece9cb5af3065b34bc06efb1779cec15a9880c194 /include
parentb9f931e2f30e67af4d47f184f94a9d5af29b0df0 (diff)
ulogd: add ulogd_parse_configfile public function
Provide a new function `ulogd_parse_configfile()` in the public interface, which wraps `parse_config_file()` to parse a section of the config file and communicates found errors to the user. It can be used as a drop-in replacement because arguments and return value are compatible. This relieves plugins of the need to translate the individual error codes to human readable messages, and plugins are mostly interested if there is any error, not what specific error. This reuses the existing `parse_conffile()` function with slight adjustments. Signed-off-by: Corubba Smith <corubba@gmx.de> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include')
-rw-r--r--include/ulogd/ulogd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ulogd/ulogd.h b/include/ulogd/ulogd.h
index c7cf402..088d85d 100644
--- a/include/ulogd/ulogd.h
+++ b/include/ulogd/ulogd.h
@@ -362,6 +362,7 @@ void __ulogd_log(int level, char *file, int line, const char *message, ...)
int ulogd_key_size(struct ulogd_key *key);
int ulogd_wildcard_inputkeys(struct ulogd_pluginstance *upi);
+int ulogd_parse_configfile(const char *section, struct config_keyset *ce);
/***********************************************************************
* file descriptor handling