/src/frr/zebra/debug_clippy.c
Line | Count | Source |
1 | | /* debug_zebra_mpls => "debug zebra mpls [detailed$detail]" */ |
2 | | DEFUN_CMD_FUNC_DECL(debug_zebra_mpls) |
3 | | #define funcdecl_debug_zebra_mpls static int debug_zebra_mpls_magic(\ |
4 | | const struct cmd_element *self __attribute__ ((unused)),\ |
5 | | struct vty *vty __attribute__ ((unused)),\ |
6 | | int argc __attribute__ ((unused)),\ |
7 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
8 | | const char * detail) |
9 | | funcdecl_debug_zebra_mpls; |
10 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_mpls) |
11 | 0 | { |
12 | 0 | #if 1 /* anything to parse? */ |
13 | 0 | int _i; |
14 | | #if 0 /* anything that can fail? */ |
15 | | unsigned _fail = 0, _failcnt = 0; |
16 | | #endif |
17 | 0 | const char *detail = NULL; |
18 | |
|
19 | 0 | for (_i = 0; _i < argc; _i++) { |
20 | 0 | if (!argv[_i]->varname) |
21 | 0 | continue; |
22 | | #if 0 /* anything that can fail? */ |
23 | | _fail = 0; |
24 | | #endif |
25 | | |
26 | 0 | if (!strcmp(argv[_i]->varname, "detail")) { |
27 | 0 | detail = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
28 | 0 | } |
29 | | #if 0 /* anything that can fail? */ |
30 | | if (_fail) |
31 | | vty_out (vty, "%% invalid input for %s: %s\n", |
32 | | argv[_i]->varname, argv[_i]->arg); |
33 | | _failcnt += _fail; |
34 | | #endif |
35 | 0 | } |
36 | | #if 0 /* anything that can fail? */ |
37 | | if (_failcnt) |
38 | | return CMD_WARNING; |
39 | | #endif |
40 | 0 | #endif |
41 | |
|
42 | 0 | return debug_zebra_mpls_magic(self, vty, argc, argv, detail); |
43 | 0 | } |
44 | | |
45 | | /* debug_zebra_vxlan => "debug zebra vxlan" */ |
46 | | DEFUN_CMD_FUNC_DECL(debug_zebra_vxlan) |
47 | | #define funcdecl_debug_zebra_vxlan static int debug_zebra_vxlan_magic(\ |
48 | | const struct cmd_element *self __attribute__ ((unused)),\ |
49 | | struct vty *vty __attribute__ ((unused)),\ |
50 | | int argc __attribute__ ((unused)),\ |
51 | | struct cmd_token *argv[] __attribute__ ((unused))) |
52 | | funcdecl_debug_zebra_vxlan; |
53 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_vxlan) |
54 | 0 | { |
55 | | #if 0 /* anything to parse? */ |
56 | | int _i; |
57 | | #if 0 /* anything that can fail? */ |
58 | | unsigned _fail = 0, _failcnt = 0; |
59 | | #endif |
60 | | |
61 | | for (_i = 0; _i < argc; _i++) { |
62 | | if (!argv[_i]->varname) |
63 | | continue; |
64 | | #if 0 /* anything that can fail? */ |
65 | | _fail = 0; |
66 | | #endif |
67 | | |
68 | | #if 0 /* anything that can fail? */ |
69 | | if (_fail) |
70 | | vty_out (vty, "%% invalid input for %s: %s\n", |
71 | | argv[_i]->varname, argv[_i]->arg); |
72 | | _failcnt += _fail; |
73 | | #endif |
74 | | } |
75 | | #if 0 /* anything that can fail? */ |
76 | | if (_failcnt) |
77 | | return CMD_WARNING; |
78 | | #endif |
79 | | #endif |
80 | |
|
81 | 0 | return debug_zebra_vxlan_magic(self, vty, argc, argv); |
82 | 0 | } |
83 | | |
84 | | /* debug_zebra_dplane_dpdk => "[no$no] debug zebra dplane dpdk [detailed$detail]" */ |
85 | | DEFUN_CMD_FUNC_DECL(debug_zebra_dplane_dpdk) |
86 | | #define funcdecl_debug_zebra_dplane_dpdk static int debug_zebra_dplane_dpdk_magic(\ |
87 | | const struct cmd_element *self __attribute__ ((unused)),\ |
88 | | struct vty *vty __attribute__ ((unused)),\ |
89 | | int argc __attribute__ ((unused)),\ |
90 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
91 | | const char * no,\ |
92 | | const char * detail) |
93 | | funcdecl_debug_zebra_dplane_dpdk; |
94 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_dplane_dpdk) |
95 | 0 | { |
96 | 0 | #if 2 /* anything to parse? */ |
97 | 0 | int _i; |
98 | | #if 0 /* anything that can fail? */ |
99 | | unsigned _fail = 0, _failcnt = 0; |
100 | | #endif |
101 | 0 | const char *no = NULL; |
102 | 0 | const char *detail = NULL; |
103 | |
|
104 | 0 | for (_i = 0; _i < argc; _i++) { |
105 | 0 | if (!argv[_i]->varname) |
106 | 0 | continue; |
107 | | #if 0 /* anything that can fail? */ |
108 | | _fail = 0; |
109 | | #endif |
110 | | |
111 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
112 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
113 | 0 | } |
114 | 0 | if (!strcmp(argv[_i]->varname, "detail")) { |
115 | 0 | detail = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
116 | 0 | } |
117 | | #if 0 /* anything that can fail? */ |
118 | | if (_fail) |
119 | | vty_out (vty, "%% invalid input for %s: %s\n", |
120 | | argv[_i]->varname, argv[_i]->arg); |
121 | | _failcnt += _fail; |
122 | | #endif |
123 | 0 | } |
124 | | #if 0 /* anything that can fail? */ |
125 | | if (_failcnt) |
126 | | return CMD_WARNING; |
127 | | #endif |
128 | 0 | #endif |
129 | |
|
130 | 0 | return debug_zebra_dplane_dpdk_magic(self, vty, argc, argv, no, detail); |
131 | 0 | } |
132 | | |
133 | | /* debug_zebra_neigh => "[no$no] debug zebra neigh" */ |
134 | | DEFUN_CMD_FUNC_DECL(debug_zebra_neigh) |
135 | | #define funcdecl_debug_zebra_neigh static int debug_zebra_neigh_magic(\ |
136 | | const struct cmd_element *self __attribute__ ((unused)),\ |
137 | | struct vty *vty __attribute__ ((unused)),\ |
138 | | int argc __attribute__ ((unused)),\ |
139 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
140 | | const char * no) |
141 | | funcdecl_debug_zebra_neigh; |
142 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_neigh) |
143 | 0 | { |
144 | 0 | #if 1 /* anything to parse? */ |
145 | 0 | int _i; |
146 | | #if 0 /* anything that can fail? */ |
147 | | unsigned _fail = 0, _failcnt = 0; |
148 | | #endif |
149 | 0 | const char *no = NULL; |
150 | |
|
151 | 0 | for (_i = 0; _i < argc; _i++) { |
152 | 0 | if (!argv[_i]->varname) |
153 | 0 | continue; |
154 | | #if 0 /* anything that can fail? */ |
155 | | _fail = 0; |
156 | | #endif |
157 | | |
158 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
159 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
160 | 0 | } |
161 | | #if 0 /* anything that can fail? */ |
162 | | if (_fail) |
163 | | vty_out (vty, "%% invalid input for %s: %s\n", |
164 | | argv[_i]->varname, argv[_i]->arg); |
165 | | _failcnt += _fail; |
166 | | #endif |
167 | 0 | } |
168 | | #if 0 /* anything that can fail? */ |
169 | | if (_failcnt) |
170 | | return CMD_WARNING; |
171 | | #endif |
172 | 0 | #endif |
173 | |
|
174 | 0 | return debug_zebra_neigh_magic(self, vty, argc, argv, no); |
175 | 0 | } |
176 | | |
177 | | /* debug_zebra_mlag => "[no$no] debug zebra mlag" */ |
178 | | DEFUN_CMD_FUNC_DECL(debug_zebra_mlag) |
179 | | #define funcdecl_debug_zebra_mlag static int debug_zebra_mlag_magic(\ |
180 | | const struct cmd_element *self __attribute__ ((unused)),\ |
181 | | struct vty *vty __attribute__ ((unused)),\ |
182 | | int argc __attribute__ ((unused)),\ |
183 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
184 | | const char * no) |
185 | | funcdecl_debug_zebra_mlag; |
186 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_mlag) |
187 | 0 | { |
188 | 0 | #if 1 /* anything to parse? */ |
189 | 0 | int _i; |
190 | | #if 0 /* anything that can fail? */ |
191 | | unsigned _fail = 0, _failcnt = 0; |
192 | | #endif |
193 | 0 | const char *no = NULL; |
194 | |
|
195 | 0 | for (_i = 0; _i < argc; _i++) { |
196 | 0 | if (!argv[_i]->varname) |
197 | 0 | continue; |
198 | | #if 0 /* anything that can fail? */ |
199 | | _fail = 0; |
200 | | #endif |
201 | | |
202 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
203 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
204 | 0 | } |
205 | | #if 0 /* anything that can fail? */ |
206 | | if (_fail) |
207 | | vty_out (vty, "%% invalid input for %s: %s\n", |
208 | | argv[_i]->varname, argv[_i]->arg); |
209 | | _failcnt += _fail; |
210 | | #endif |
211 | 0 | } |
212 | | #if 0 /* anything that can fail? */ |
213 | | if (_failcnt) |
214 | | return CMD_WARNING; |
215 | | #endif |
216 | 0 | #endif |
217 | |
|
218 | 0 | return debug_zebra_mlag_magic(self, vty, argc, argv, no); |
219 | 0 | } |
220 | | |
221 | | /* debug_zebra_evpn_mh => "[no$no] debug zebra evpn mh <es$es|mac$mac|neigh$neigh|nh$nh>" */ |
222 | | DEFUN_CMD_FUNC_DECL(debug_zebra_evpn_mh) |
223 | | #define funcdecl_debug_zebra_evpn_mh static int debug_zebra_evpn_mh_magic(\ |
224 | | const struct cmd_element *self __attribute__ ((unused)),\ |
225 | | struct vty *vty __attribute__ ((unused)),\ |
226 | | int argc __attribute__ ((unused)),\ |
227 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
228 | | const char * no,\ |
229 | | const char * es,\ |
230 | | const char * mac,\ |
231 | | const char * neigh,\ |
232 | | const char * nh) |
233 | | funcdecl_debug_zebra_evpn_mh; |
234 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_evpn_mh) |
235 | 0 | { |
236 | 0 | #if 5 /* anything to parse? */ |
237 | 0 | int _i; |
238 | | #if 0 /* anything that can fail? */ |
239 | | unsigned _fail = 0, _failcnt = 0; |
240 | | #endif |
241 | 0 | const char *no = NULL; |
242 | 0 | const char *es = NULL; |
243 | 0 | const char *mac = NULL; |
244 | 0 | const char *neigh = NULL; |
245 | 0 | const char *nh = NULL; |
246 | |
|
247 | 0 | for (_i = 0; _i < argc; _i++) { |
248 | 0 | if (!argv[_i]->varname) |
249 | 0 | continue; |
250 | | #if 0 /* anything that can fail? */ |
251 | | _fail = 0; |
252 | | #endif |
253 | | |
254 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
255 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
256 | 0 | } |
257 | 0 | if (!strcmp(argv[_i]->varname, "es")) { |
258 | 0 | es = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
259 | 0 | } |
260 | 0 | if (!strcmp(argv[_i]->varname, "mac")) { |
261 | 0 | mac = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
262 | 0 | } |
263 | 0 | if (!strcmp(argv[_i]->varname, "neigh")) { |
264 | 0 | neigh = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
265 | 0 | } |
266 | 0 | if (!strcmp(argv[_i]->varname, "nh")) { |
267 | 0 | nh = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
268 | 0 | } |
269 | | #if 0 /* anything that can fail? */ |
270 | | if (_fail) |
271 | | vty_out (vty, "%% invalid input for %s: %s\n", |
272 | | argv[_i]->varname, argv[_i]->arg); |
273 | | _failcnt += _fail; |
274 | | #endif |
275 | 0 | } |
276 | | #if 0 /* anything that can fail? */ |
277 | | if (_failcnt) |
278 | | return CMD_WARNING; |
279 | | #endif |
280 | 0 | #endif |
281 | |
|
282 | 0 | return debug_zebra_evpn_mh_magic(self, vty, argc, argv, no, es, mac, neigh, nh); |
283 | 0 | } |
284 | | |
285 | | /* debug_zebra_nexthop => "[no$no] debug zebra nexthop [detail$detail]" */ |
286 | | DEFUN_CMD_FUNC_DECL(debug_zebra_nexthop) |
287 | | #define funcdecl_debug_zebra_nexthop static int debug_zebra_nexthop_magic(\ |
288 | | const struct cmd_element *self __attribute__ ((unused)),\ |
289 | | struct vty *vty __attribute__ ((unused)),\ |
290 | | int argc __attribute__ ((unused)),\ |
291 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
292 | | const char * no,\ |
293 | | const char * detail) |
294 | | funcdecl_debug_zebra_nexthop; |
295 | | DEFUN_CMD_FUNC_TEXT(debug_zebra_nexthop) |
296 | 0 | { |
297 | 0 | #if 2 /* anything to parse? */ |
298 | 0 | int _i; |
299 | | #if 0 /* anything that can fail? */ |
300 | | unsigned _fail = 0, _failcnt = 0; |
301 | | #endif |
302 | 0 | const char *no = NULL; |
303 | 0 | const char *detail = NULL; |
304 | |
|
305 | 0 | for (_i = 0; _i < argc; _i++) { |
306 | 0 | if (!argv[_i]->varname) |
307 | 0 | continue; |
308 | | #if 0 /* anything that can fail? */ |
309 | | _fail = 0; |
310 | | #endif |
311 | | |
312 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
313 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
314 | 0 | } |
315 | 0 | if (!strcmp(argv[_i]->varname, "detail")) { |
316 | 0 | detail = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
317 | 0 | } |
318 | | #if 0 /* anything that can fail? */ |
319 | | if (_fail) |
320 | | vty_out (vty, "%% invalid input for %s: %s\n", |
321 | | argv[_i]->varname, argv[_i]->arg); |
322 | | _failcnt += _fail; |
323 | | #endif |
324 | 0 | } |
325 | | #if 0 /* anything that can fail? */ |
326 | | if (_failcnt) |
327 | | return CMD_WARNING; |
328 | | #endif |
329 | 0 | #endif |
330 | |
|
331 | 0 | return debug_zebra_nexthop_magic(self, vty, argc, argv, no, detail); |
332 | 0 | } |
333 | | |