]>
Commit | Line | Data |
---|---|---|
e5c83d9b DS |
1 | /* |
2 | * PBR - debugging | |
3 | * Copyright (C) 2018 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 __PBR_DEBUG_H__ | |
21 | #define __PBR_DEBUG_H__ | |
22 | ||
23 | #include <zebra.h> | |
24 | ||
25 | #include "debug.h" | |
26 | ||
27 | /* PBR debugging records */ | |
28 | extern struct debug pbr_dbg_map; | |
29 | extern struct debug pbr_dbg_zebra; | |
30 | extern struct debug pbr_dbg_nht; | |
31 | extern struct debug pbr_dbg_event; | |
32 | ||
33 | /* | |
34 | * Initialize PBR debugging. | |
35 | * | |
36 | * Installs VTY commands and registers callbacks. | |
37 | */ | |
38 | void pbr_debug_init(void); | |
39 | ||
40 | /* | |
e14f43cc QY |
41 | * Set or unset flags on all debugs for pbrd. |
42 | * | |
43 | * flags | |
44 | * The flags to set | |
45 | * | |
46 | * set | |
47 | * Whether to set or unset the specified flags | |
48 | */ | |
49 | void pbr_debug_set_all(uint32_t flags, bool set); | |
50 | ||
51 | /* | |
52 | * Config write helper. | |
53 | * | |
54 | * vty | |
55 | * Vty to write to | |
56 | * | |
57 | * config | |
58 | * Whether we are writing to show run or saving config file | |
59 | * | |
60 | * Returns: | |
61 | * 0 for convenience | |
e5c83d9b | 62 | */ |
e14f43cc | 63 | int pbr_debug_config_write_helper(struct vty *vty, bool config); |
e5c83d9b DS |
64 | |
65 | /* | |
66 | * Print PBR debugging configuration. | |
67 | * | |
68 | * vty | |
69 | * VTY to print debugging configuration to. | |
70 | */ | |
71 | int pbr_debug_config_write(struct vty *vty); | |
72 | ||
73 | #endif /* __PBR_DEBUG_H__ */ |