]> git.proxmox.com Git - mirror_frr.git/blob - zebra/debug.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / debug.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Zebra debug related function
4 * Copyright (C) 1999 Kunihiro Ishiguro
5 */
6
7 #ifndef _ZEBRA_DEBUG_H
8 #define _ZEBRA_DEBUG_H
9
10 #include "lib/vty.h"
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /* Debug flags. */
17 #define ZEBRA_DEBUG_EVENT 0x01
18
19 #define ZEBRA_DEBUG_PACKET 0x01
20 #define ZEBRA_DEBUG_SEND 0x20
21 #define ZEBRA_DEBUG_RECV 0x40
22 #define ZEBRA_DEBUG_DETAIL 0x80
23
24 #define ZEBRA_DEBUG_KERNEL 0x01
25 #define ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND 0x20
26 #define ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV 0x40
27
28 #define ZEBRA_DEBUG_RIB 0x01
29 #define ZEBRA_DEBUG_RIB_DETAILED 0x02
30
31 #define ZEBRA_DEBUG_FPM 0x01
32
33 #define ZEBRA_DEBUG_NHT 0x01
34 #define ZEBRA_DEBUG_NHT_DETAILED 0x02
35
36 #define ZEBRA_DEBUG_MPLS 0x01
37 #define ZEBRA_DEBUG_MPLS_DETAILED 0x02
38
39 #define ZEBRA_DEBUG_VXLAN 0x01
40
41 #define ZEBRA_DEBUG_PW 0x01
42
43 #define ZEBRA_DEBUG_DPLANE 0x01
44 #define ZEBRA_DEBUG_DPLANE_DETAILED 0x02
45
46 #define ZEBRA_DEBUG_DPLANE_DPDK 0x01
47 #define ZEBRA_DEBUG_DPLANE_DPDK_DETAIL 0x02
48
49 #define ZEBRA_DEBUG_MLAG 0x01
50
51 #define ZEBRA_DEBUG_NHG 0x01
52 #define ZEBRA_DEBUG_NHG_DETAILED 0x02
53
54 #define ZEBRA_DEBUG_EVPN_MH_ES 0x01
55 #define ZEBRA_DEBUG_EVPN_MH_NH 0x02
56 #define ZEBRA_DEBUG_EVPN_MH_MAC 0x04
57 #define ZEBRA_DEBUG_EVPN_MH_NEIGH 0x08
58
59 #define ZEBRA_DEBUG_PBR 0x01
60
61 #define ZEBRA_DEBUG_NEIGH 0x01
62
63 #define ZEBRA_DEBUG_TC 0x01
64
65 /* Debug related macro. */
66 #define IS_ZEBRA_DEBUG_EVENT (zebra_debug_event & ZEBRA_DEBUG_EVENT)
67
68 #define IS_ZEBRA_DEBUG_PACKET (zebra_debug_packet & ZEBRA_DEBUG_PACKET)
69 #define IS_ZEBRA_DEBUG_SEND (zebra_debug_packet & ZEBRA_DEBUG_SEND)
70 #define IS_ZEBRA_DEBUG_RECV (zebra_debug_packet & ZEBRA_DEBUG_RECV)
71 #define IS_ZEBRA_DEBUG_DETAIL (zebra_debug_packet & ZEBRA_DEBUG_DETAIL)
72
73 #define IS_ZEBRA_DEBUG_KERNEL (zebra_debug_kernel & ZEBRA_DEBUG_KERNEL)
74 #define IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND \
75 (zebra_debug_kernel & ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
76 #define IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV \
77 (zebra_debug_kernel & ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
78
79 #define IS_ZEBRA_DEBUG_RIB \
80 (zebra_debug_rib & (ZEBRA_DEBUG_RIB | ZEBRA_DEBUG_RIB_DETAILED))
81 #define IS_ZEBRA_DEBUG_RIB_DETAILED (zebra_debug_rib & ZEBRA_DEBUG_RIB_DETAILED)
82
83 #define IS_ZEBRA_DEBUG_FPM (zebra_debug_fpm & ZEBRA_DEBUG_FPM)
84
85 #define IS_ZEBRA_DEBUG_NHT (zebra_debug_nht & ZEBRA_DEBUG_NHT)
86 #define IS_ZEBRA_DEBUG_NHT_DETAILED (zebra_debug_nht & ZEBRA_DEBUG_NHT_DETAILED)
87
88 #define IS_ZEBRA_DEBUG_MPLS (zebra_debug_mpls & ZEBRA_DEBUG_MPLS)
89 #define IS_ZEBRA_DEBUG_MPLS_DETAIL \
90 (zebra_debug_mpls & ZEBRA_DEBUG_MPLS_DETAILED)
91 #define IS_ZEBRA_DEBUG_VXLAN (zebra_debug_vxlan & ZEBRA_DEBUG_VXLAN)
92 #define IS_ZEBRA_DEBUG_PW (zebra_debug_pw & ZEBRA_DEBUG_PW)
93
94 #define IS_ZEBRA_DEBUG_DPLANE (zebra_debug_dplane & ZEBRA_DEBUG_DPLANE)
95 #define IS_ZEBRA_DEBUG_DPLANE_DETAIL \
96 (zebra_debug_dplane & ZEBRA_DEBUG_DPLANE_DETAILED)
97
98 #define IS_ZEBRA_DEBUG_DPLANE_DPDK \
99 (zebra_debug_dplane_dpdk & ZEBRA_DEBUG_DPLANE_DPDK)
100 #define IS_ZEBRA_DEBUG_DPLANE_DPDK_DETAIL \
101 (zebra_debug_dplane_dpdk & ZEBRA_DEBUG_DPLANE_DPDK_DETAIL)
102
103 #define IS_ZEBRA_DEBUG_MLAG (zebra_debug_mlag & ZEBRA_DEBUG_MLAG)
104
105 #define IS_ZEBRA_DEBUG_NHG (zebra_debug_nexthop & ZEBRA_DEBUG_NHG)
106
107 #define IS_ZEBRA_DEBUG_NHG_DETAIL \
108 (zebra_debug_nexthop & ZEBRA_DEBUG_NHG_DETAILED)
109
110 #define IS_ZEBRA_DEBUG_EVPN_MH_ES \
111 (zebra_debug_evpn_mh & ZEBRA_DEBUG_EVPN_MH_ES)
112 #define IS_ZEBRA_DEBUG_EVPN_MH_NH \
113 (zebra_debug_evpn_mh & ZEBRA_DEBUG_EVPN_MH_NH)
114 #define IS_ZEBRA_DEBUG_EVPN_MH_MAC \
115 (zebra_debug_evpn_mh & ZEBRA_DEBUG_EVPN_MH_MAC)
116 #define IS_ZEBRA_DEBUG_EVPN_MH_NEIGH \
117 (zebra_debug_evpn_mh & ZEBRA_DEBUG_EVPN_MH_NEIGH)
118
119 #define IS_ZEBRA_DEBUG_PBR (zebra_debug_pbr & ZEBRA_DEBUG_PBR)
120
121 #define IS_ZEBRA_DEBUG_NEIGH (zebra_debug_neigh & ZEBRA_DEBUG_NEIGH)
122
123 #define IS_ZEBRA_DEBUG_TC (zebra_debug_tc & ZEBRA_DEBUG_TC)
124
125 extern unsigned long zebra_debug_event;
126 extern unsigned long zebra_debug_packet;
127 extern unsigned long zebra_debug_kernel;
128 extern unsigned long zebra_debug_rib;
129 extern unsigned long zebra_debug_fpm;
130 extern unsigned long zebra_debug_nht;
131 extern unsigned long zebra_debug_mpls;
132 extern unsigned long zebra_debug_vxlan;
133 extern unsigned long zebra_debug_pw;
134 extern unsigned long zebra_debug_dplane;
135 extern unsigned long zebra_debug_dplane_dpdk;
136 extern unsigned long zebra_debug_mlag;
137 extern unsigned long zebra_debug_nexthop;
138 extern unsigned long zebra_debug_evpn_mh;
139 extern unsigned long zebra_debug_pbr;
140 extern unsigned long zebra_debug_neigh;
141 extern unsigned long zebra_debug_tc;
142
143 extern void zebra_debug_init(void);
144
145 DECLARE_HOOK(zebra_debug_show_debugging, (struct vty *vty), (vty));
146
147 #ifdef __cplusplus
148 }
149 #endif
150
151 #endif /* _ZEBRA_DEBUG_H */