summaryrefslogtreecommitdiffstats
path: root/lib/libfrr.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-11-17 19:30:05 +0100
committerMark Stapp <mjs@voltanet.io>2020-11-18 21:34:35 +0100
commit1a9f340b6b63cbb9e19fc1372ef01e265d529e45 (patch)
treebeae6c483a575ad05062c57aba2fa2fa6800eab0 /lib/libfrr.h
parentvtysh: remove weird whitespace (diff)
downloadfrr-1a9f340b6b63cbb9e19fc1372ef01e265d529e45.tar.xz
frr-1a9f340b6b63cbb9e19fc1372ef01e265d529e45.zip
lib: add startup option to limit fds
Add a startup-time option to limit the number of fds used by the thread/event infrastructure. If nothing is configured, the system ulimit is used. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/libfrr.h')
-rw-r--r--lib/libfrr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h
index ab7229920..2e4dcbe09 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -102,6 +102,9 @@ struct frr_daemon_info {
size_t n_yang_modules;
bool log_always;
+
+ /* Optional upper limit on the number of fds used in select/poll */
+ uint32_t limit_fds;
};
/* execname is the daemon's executable (and pidfile and configfile) name,
@@ -134,6 +137,7 @@ extern __attribute__((__noreturn__)) void frr_help_exit(int status);
extern struct thread_master *frr_init(void);
extern const char *frr_get_progname(void);
extern enum frr_cli_mode frr_get_cli_mode(void);
+uint32_t frr_get_fd_limit(void);
DECLARE_HOOK(frr_late_init, (struct thread_master * tm), (tm))
DECLARE_HOOK(frr_very_late_init, (struct thread_master * tm), (tm))