]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
e5c83d9b DS |
2 | /* |
3 | * PBR - debugging | |
4 | * Copyright (C) 2018 Cumulus Networks, Inc. | |
5 | * Quentin Young | |
e5c83d9b DS |
6 | */ |
7 | #ifndef __PBR_DEBUG_H__ | |
8 | #define __PBR_DEBUG_H__ | |
9 | ||
10 | #include <zebra.h> | |
11 | ||
12 | #include "debug.h" | |
13 | ||
14 | /* PBR debugging records */ | |
15 | extern struct debug pbr_dbg_map; | |
16 | extern struct debug pbr_dbg_zebra; | |
17 | extern struct debug pbr_dbg_nht; | |
18 | extern struct debug pbr_dbg_event; | |
19 | ||
20 | /* | |
21 | * Initialize PBR debugging. | |
22 | * | |
23 | * Installs VTY commands and registers callbacks. | |
24 | */ | |
25 | void pbr_debug_init(void); | |
26 | ||
27 | /* | |
e14f43cc QY |
28 | * Set or unset flags on all debugs for pbrd. |
29 | * | |
30 | * flags | |
31 | * The flags to set | |
32 | * | |
33 | * set | |
34 | * Whether to set or unset the specified flags | |
35 | */ | |
36 | void pbr_debug_set_all(uint32_t flags, bool set); | |
37 | ||
38 | /* | |
39 | * Config write helper. | |
40 | * | |
41 | * vty | |
42 | * Vty to write to | |
43 | * | |
44 | * config | |
45 | * Whether we are writing to show run or saving config file | |
46 | * | |
47 | * Returns: | |
48 | * 0 for convenience | |
e5c83d9b | 49 | */ |
e14f43cc | 50 | int pbr_debug_config_write_helper(struct vty *vty, bool config); |
e5c83d9b DS |
51 | |
52 | /* | |
53 | * Print PBR debugging configuration. | |
54 | * | |
55 | * vty | |
56 | * VTY to print debugging configuration to. | |
57 | */ | |
58 | int pbr_debug_config_write(struct vty *vty); | |
59 | ||
60 | #endif /* __PBR_DEBUG_H__ */ |