summaryrefslogtreecommitdiffstats
path: root/lib/libfrr.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-03-04 21:48:35 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-03-07 18:03:15 +0100
commitda2fc19187d47602f14fc4a52c99a18accd4bdbc (patch)
tree72c57b4b6d046d47bd922b5a71f18c10c529ae76 /lib/libfrr.h
parentlib: make live log sockets non-blocking (diff)
downloadfrr-da2fc19187d47602f14fc4a52c99a18accd4bdbc.tar.xz
frr-da2fc19187d47602f14fc4a52c99a18accd4bdbc.zip
lib: support multiple `--log` options
Allow simultaneously enabling syslog, stdout and/or file logs. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index 65c1df967..69054e426 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -21,6 +21,7 @@
#ifndef _ZEBRA_FRR_H
#define _ZEBRA_FRR_H
+#include "typesafe.h"
#include "sigevent.h"
#include "privs.h"
#include "thread.h"
@@ -52,6 +53,14 @@ extern "C" {
*/
#define FRR_DETACH_LATER (1 << 6)
+PREDECL_DLIST(log_args);
+struct log_arg {
+ struct log_args_item itm;
+
+ char target[0];
+};
+DECLARE_DLIST(log_args, struct log_arg, itm);
+
enum frr_cli_mode {
FRR_CLI_CLASSIC = 0,
FRR_CLI_TRANSACTIONAL,
@@ -88,7 +97,7 @@ struct frr_daemon_info {
const char *pathspace;
bool zpathspace;
- const char *early_logging;
+ struct log_args_head early_logging[1];
const char *early_loglevel;
const char *proghelp;