]> git.proxmox.com Git - mirror_frr.git/blob - watchfrr/watchfrr.h
Merge pull request #9737 from idryzhov/yang-pattern
[mirror_frr.git] / watchfrr / watchfrr.h
1 /*
2 * Common definitions for watchfrr API socket.
3 *
4 * Copyright (C) 2016 David Lamparter for NetDEF, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #ifndef FRR_WATCHFRR_H
22 #define FRR_WATCHFRR_H
23
24 #include "lib/memory.h"
25
26 DECLARE_MGROUP(WATCHFRR);
27
28 /*
29 * This is the name of the pathspace we are in `-N XXX`
30 * If the default then this is NULL
31 */
32 extern const char *pathspace;
33
34 extern void watchfrr_vty_init(void);
35
36 extern pid_t integrated_write_pid;
37 extern void integrated_write_sigchld(int status);
38
39 struct vty;
40 extern void watchfrr_status(struct vty *vty);
41
42 /*
43 * Check if all daemons we are monitoring are in the DAEMON_UP state.
44 *
45 * Returns:
46 * True if they are all DAEMON_UP, false otherwise.
47 */
48 extern bool check_all_up(void);
49
50 extern void watchfrr_set_ignore_daemon(struct vty *vty, const char *dname,
51 bool ignore);
52 #endif /* FRR_WATCHFRR_H */