]> git.proxmox.com Git - mirror_frr.git/blob - vrrpd/vrrp_debug.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / vrrpd / vrrp_debug.h
1 /*
2 * VRRP debugging.
3 * Copyright (C) 2019 Cumulus Networks, Inc.
4 * Quentin Young
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * 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 #ifndef __VRRP_DEBUG_H__
21 #define __VRRP_DEBUG_H__
22
23 #include <zebra.h>
24
25 #include "lib/debug.h"
26
27 /* VRRP debugging records */
28 struct debug vrrp_dbg_arp;
29 struct debug vrrp_dbg_auto;
30 struct debug vrrp_dbg_ndisc;
31 struct debug vrrp_dbg_pkt;
32 struct debug vrrp_dbg_proto;
33 struct debug vrrp_dbg_sock;
34 struct debug vrrp_dbg_zebra;
35
36 /*
37 * Initialize VRRP debugging.
38 *
39 * Installs VTY commands and registers callbacks.
40 */
41 void vrrp_debug_init(void);
42
43 /*
44 * Print VRRP debugging configuration.
45 *
46 * vty
47 * VTY to print debugging configuration to.
48 */
49 int vrrp_config_write_debug(struct vty *vty);
50
51 /*
52 * Print VRRP debugging configuration, human readable form.
53 *
54 * vty
55 * VTY to print debugging configuration to.
56 */
57 int vrrp_debug_status_write(struct vty *vty);
58
59 /*
60 * Set debugging status.
61 *
62 * ifp
63 * Interface to set status on
64 *
65 * vrid
66 * VRID of instance to set status on
67 *
68 * vtynode
69 * vty->node
70 *
71 * onoff
72 * Whether to turn the specified debugs on or off
73 *
74 * proto
75 * Turn protocol debugging on or off
76 *
77 * autoconf
78 * Turn autoconfiguration debugging on or off
79 *
80 * pkt
81 * Turn packet debugging on or off
82 */
83 void vrrp_debug_set(struct interface *ifp, uint8_t vrid, int vtynode,
84 bool onoff, bool proto, bool autoconf, bool pkt, bool sock,
85 bool ndisc, bool arp, bool zebra);
86
87 #endif /* __VRRP_DEBUG_H__ */