diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2016-11-13 17:48:56 +0900 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-08 00:15:36 +0100 | 
| commit | eb05883f3ecd94be017eb7d15181a989f26541ee (patch) | |
| tree | f3de680c33e3af0f95520eadf8fb0060dc1ee76c /lib/libfrr.h | |
| parent | 857b5446497505f582417e4a5ada029712743cbc (diff) | |
*: add frr_config_fork()
Centralise read_config/daemonize/dryrun/pidfile/vty_serv into libfrr.
This also makes multi-instance pid/config handling available as part of
the library.  It's only wired up in ospfd, but the code is in lib/.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/libfrr.h')
| -rw-r--r-- | lib/libfrr.h | 17 | 
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h index 97526dde5c..e7e209f606 100644 --- a/lib/libfrr.h +++ b/lib/libfrr.h @@ -30,17 +30,25 @@  #define FRR_NO_PRIVSEP		(1 << 0)  #define FRR_NO_TCPVTY		(1 << 1)  #define FRR_LIMITED_CLI		(1 << 2) +#define FRR_NO_CFG_PID_DRY		(1 << 3) +#define FRR_NO_ZCLIENT		(1 << 4)  struct frr_daemon_info {  	unsigned flags;  	const char *progname; +	const char *name;  	zlog_proto_t log_id;  	unsigned short instance;  	char *vty_addr;  	int vty_port;  	char *vty_sock_path; +	bool dryrun; +	bool daemon_mode; +	const char *config_file; +	const char *pid_file; +	const char *vty_path;  	const char *proghelp;  	void (*printhelp)(FILE *target); @@ -63,6 +71,7 @@ struct frr_daemon_info {   */  #define FRR_DAEMON_INFO(execname, constname, ...) \  	static struct frr_daemon_info execname ##_di = { \ +		.name = # execname, \  		.log_id = ZLOG_ ## constname, \  		__VA_ARGS__ \  	}; @@ -76,6 +85,12 @@ extern void frr_help_exit(int status);  extern struct thread_master *frr_init(void); -extern void frr_vty_serv(const char *path); +extern void frr_config_fork(void); + +extern void frr_vty_serv(void); + +extern char config_default[256]; +extern const char frr_sysconfdir[]; +extern const char frr_vtydir[];  #endif /* _ZEBRA_FRR_H */  | 
