/src/frr/bgpd/bgp_debug_clippy.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* debug_bgp_bestpath_prefix => "debug bgp bestpath <A.B.C.D/M|X:X::X:X/M>$prefix" */ |
2 | | DEFUN_CMD_FUNC_DECL(debug_bgp_bestpath_prefix) |
3 | | #define funcdecl_debug_bgp_bestpath_prefix static int debug_bgp_bestpath_prefix_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 struct prefix * prefix,\ |
9 | | const char * prefix_str __attribute__ ((unused))) |
10 | | funcdecl_debug_bgp_bestpath_prefix; |
11 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_bestpath_prefix) |
12 | 0 | { |
13 | 0 | #if 1 /* anything to parse? */ |
14 | 0 | int _i; |
15 | 0 | #if 1 /* anything that can fail? */ |
16 | 0 | unsigned _fail = 0, _failcnt = 0; |
17 | 0 | #endif |
18 | 0 | struct prefix prefix = { }; |
19 | 0 | const char *prefix_str = NULL; |
20 | |
|
21 | 0 | for (_i = 0; _i < argc; _i++) { |
22 | 0 | if (!argv[_i]->varname) |
23 | 0 | continue; |
24 | 0 | #if 1 /* anything that can fail? */ |
25 | 0 | _fail = 0; |
26 | 0 | #endif |
27 | |
|
28 | 0 | if (!strcmp(argv[_i]->varname, "prefix")) { |
29 | 0 | prefix_str = argv[_i]->arg; |
30 | 0 | _fail = !str2prefix(argv[_i]->arg, &prefix); |
31 | 0 | } |
32 | 0 | #if 1 /* anything that can fail? */ |
33 | 0 | if (_fail) |
34 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
35 | 0 | argv[_i]->varname, argv[_i]->arg); |
36 | 0 | _failcnt += _fail; |
37 | 0 | #endif |
38 | 0 | } |
39 | 0 | #if 1 /* anything that can fail? */ |
40 | 0 | if (_failcnt) |
41 | 0 | return CMD_WARNING; |
42 | 0 | #endif |
43 | 0 | #endif |
44 | 0 | if (!prefix_str) { |
45 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "prefix_str"); |
46 | 0 | return CMD_WARNING; |
47 | 0 | } |
48 | | |
49 | 0 | return debug_bgp_bestpath_prefix_magic(self, vty, argc, argv, &prefix, prefix_str); |
50 | 0 | } |
51 | | |
52 | | /* no_debug_bgp_bestpath_prefix => "no debug bgp bestpath <A.B.C.D/M|X:X::X:X/M>$prefix" */ |
53 | | DEFUN_CMD_FUNC_DECL(no_debug_bgp_bestpath_prefix) |
54 | | #define funcdecl_no_debug_bgp_bestpath_prefix static int no_debug_bgp_bestpath_prefix_magic(\ |
55 | | const struct cmd_element *self __attribute__ ((unused)),\ |
56 | | struct vty *vty __attribute__ ((unused)),\ |
57 | | int argc __attribute__ ((unused)),\ |
58 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
59 | | const struct prefix * prefix,\ |
60 | | const char * prefix_str __attribute__ ((unused))) |
61 | | funcdecl_no_debug_bgp_bestpath_prefix; |
62 | | DEFUN_CMD_FUNC_TEXT(no_debug_bgp_bestpath_prefix) |
63 | 0 | { |
64 | 0 | #if 1 /* anything to parse? */ |
65 | 0 | int _i; |
66 | 0 | #if 1 /* anything that can fail? */ |
67 | 0 | unsigned _fail = 0, _failcnt = 0; |
68 | 0 | #endif |
69 | 0 | struct prefix prefix = { }; |
70 | 0 | const char *prefix_str = NULL; |
71 | |
|
72 | 0 | for (_i = 0; _i < argc; _i++) { |
73 | 0 | if (!argv[_i]->varname) |
74 | 0 | continue; |
75 | 0 | #if 1 /* anything that can fail? */ |
76 | 0 | _fail = 0; |
77 | 0 | #endif |
78 | |
|
79 | 0 | if (!strcmp(argv[_i]->varname, "prefix")) { |
80 | 0 | prefix_str = argv[_i]->arg; |
81 | 0 | _fail = !str2prefix(argv[_i]->arg, &prefix); |
82 | 0 | } |
83 | 0 | #if 1 /* anything that can fail? */ |
84 | 0 | if (_fail) |
85 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
86 | 0 | argv[_i]->varname, argv[_i]->arg); |
87 | 0 | _failcnt += _fail; |
88 | 0 | #endif |
89 | 0 | } |
90 | 0 | #if 1 /* anything that can fail? */ |
91 | 0 | if (_failcnt) |
92 | 0 | return CMD_WARNING; |
93 | 0 | #endif |
94 | 0 | #endif |
95 | 0 | if (!prefix_str) { |
96 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "prefix_str"); |
97 | 0 | return CMD_WARNING; |
98 | 0 | } |
99 | | |
100 | 0 | return no_debug_bgp_bestpath_prefix_magic(self, vty, argc, argv, &prefix, prefix_str); |
101 | 0 | } |
102 | | |
103 | | /* debug_bgp_update_prefix_afi_safi => "debug bgp updates prefix l2vpn$afi evpn$safi type <<macip|2> mac <X:X:X:X:X:X|X:X:X:X:X:X/M> [ip <A.B.C.D|X:X::X:X>]|<multicast|3> ip <A.B.C.D|X:X::X:X>|<prefix|5> ip <A.B.C.D/M|X:X::X:X/M>>" */ |
104 | | DEFUN_CMD_FUNC_DECL(debug_bgp_update_prefix_afi_safi) |
105 | | #define funcdecl_debug_bgp_update_prefix_afi_safi static int debug_bgp_update_prefix_afi_safi_magic(\ |
106 | | const struct cmd_element *self __attribute__ ((unused)),\ |
107 | | struct vty *vty __attribute__ ((unused)),\ |
108 | | int argc __attribute__ ((unused)),\ |
109 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
110 | | const char * afi,\ |
111 | | const char * safi,\ |
112 | | struct prefix_eth * mac,\ |
113 | | const char * mac_str __attribute__ ((unused)),\ |
114 | | const char * ip) |
115 | | funcdecl_debug_bgp_update_prefix_afi_safi; |
116 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_update_prefix_afi_safi) |
117 | 0 | { |
118 | 0 | #if 4 /* anything to parse? */ |
119 | 0 | int _i; |
120 | 0 | #if 1 /* anything that can fail? */ |
121 | 0 | unsigned _fail = 0, _failcnt = 0; |
122 | 0 | #endif |
123 | 0 | const char *afi = NULL; |
124 | 0 | const char *safi = NULL; |
125 | 0 | struct prefix_eth mac = { }; |
126 | 0 | const char *mac_str = NULL; |
127 | 0 | const char *ip = NULL; |
128 | |
|
129 | 0 | for (_i = 0; _i < argc; _i++) { |
130 | 0 | if (!argv[_i]->varname) |
131 | 0 | continue; |
132 | 0 | #if 1 /* anything that can fail? */ |
133 | 0 | _fail = 0; |
134 | 0 | #endif |
135 | |
|
136 | 0 | if (!strcmp(argv[_i]->varname, "afi")) { |
137 | 0 | afi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
138 | 0 | } |
139 | 0 | if (!strcmp(argv[_i]->varname, "safi")) { |
140 | 0 | safi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
141 | 0 | } |
142 | 0 | if (!strcmp(argv[_i]->varname, "mac")) { |
143 | 0 | mac_str = argv[_i]->arg; |
144 | 0 | _fail = !str2prefix_eth(argv[_i]->arg, &mac); |
145 | 0 | } |
146 | 0 | if (!strcmp(argv[_i]->varname, "ip")) { |
147 | 0 | ip = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
148 | 0 | } |
149 | 0 | #if 1 /* anything that can fail? */ |
150 | 0 | if (_fail) |
151 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
152 | 0 | argv[_i]->varname, argv[_i]->arg); |
153 | 0 | _failcnt += _fail; |
154 | 0 | #endif |
155 | 0 | } |
156 | 0 | #if 1 /* anything that can fail? */ |
157 | 0 | if (_failcnt) |
158 | 0 | return CMD_WARNING; |
159 | 0 | #endif |
160 | 0 | #endif |
161 | 0 | if (!afi) { |
162 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "afi"); |
163 | 0 | return CMD_WARNING; |
164 | 0 | } |
165 | 0 | if (!safi) { |
166 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "safi"); |
167 | 0 | return CMD_WARNING; |
168 | 0 | } |
169 | | |
170 | 0 | return debug_bgp_update_prefix_afi_safi_magic(self, vty, argc, argv, afi, safi, &mac, mac_str, ip); |
171 | 0 | } |
172 | | |
173 | | /* no_debug_bgp_update_prefix_afi_safi => "no debug bgp updates prefix l2vpn$afi evpn$safi type <<macip|2> mac <X:X:X:X:X:X|X:X:X:X:X:X/M> [ip <A.B.C.D|X:X::X:X>]|<multicast|3> ip <A.B.C.D|X:X::X:X>|<prefix|5> ip <A.B.C.D/M|X:X::X:X/M>>" */ |
174 | | DEFUN_CMD_FUNC_DECL(no_debug_bgp_update_prefix_afi_safi) |
175 | | #define funcdecl_no_debug_bgp_update_prefix_afi_safi static int no_debug_bgp_update_prefix_afi_safi_magic(\ |
176 | | const struct cmd_element *self __attribute__ ((unused)),\ |
177 | | struct vty *vty __attribute__ ((unused)),\ |
178 | | int argc __attribute__ ((unused)),\ |
179 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
180 | | const char * afi,\ |
181 | | const char * safi,\ |
182 | | struct prefix_eth * mac,\ |
183 | | const char * mac_str __attribute__ ((unused)),\ |
184 | | const char * ip) |
185 | | funcdecl_no_debug_bgp_update_prefix_afi_safi; |
186 | | DEFUN_CMD_FUNC_TEXT(no_debug_bgp_update_prefix_afi_safi) |
187 | 0 | { |
188 | 0 | #if 4 /* anything to parse? */ |
189 | 0 | int _i; |
190 | 0 | #if 1 /* anything that can fail? */ |
191 | 0 | unsigned _fail = 0, _failcnt = 0; |
192 | 0 | #endif |
193 | 0 | const char *afi = NULL; |
194 | 0 | const char *safi = NULL; |
195 | 0 | struct prefix_eth mac = { }; |
196 | 0 | const char *mac_str = NULL; |
197 | 0 | const char *ip = NULL; |
198 | |
|
199 | 0 | for (_i = 0; _i < argc; _i++) { |
200 | 0 | if (!argv[_i]->varname) |
201 | 0 | continue; |
202 | 0 | #if 1 /* anything that can fail? */ |
203 | 0 | _fail = 0; |
204 | 0 | #endif |
205 | |
|
206 | 0 | if (!strcmp(argv[_i]->varname, "afi")) { |
207 | 0 | afi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
208 | 0 | } |
209 | 0 | if (!strcmp(argv[_i]->varname, "safi")) { |
210 | 0 | safi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
211 | 0 | } |
212 | 0 | if (!strcmp(argv[_i]->varname, "mac")) { |
213 | 0 | mac_str = argv[_i]->arg; |
214 | 0 | _fail = !str2prefix_eth(argv[_i]->arg, &mac); |
215 | 0 | } |
216 | 0 | if (!strcmp(argv[_i]->varname, "ip")) { |
217 | 0 | ip = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
218 | 0 | } |
219 | 0 | #if 1 /* anything that can fail? */ |
220 | 0 | if (_fail) |
221 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
222 | 0 | argv[_i]->varname, argv[_i]->arg); |
223 | 0 | _failcnt += _fail; |
224 | 0 | #endif |
225 | 0 | } |
226 | 0 | #if 1 /* anything that can fail? */ |
227 | 0 | if (_failcnt) |
228 | 0 | return CMD_WARNING; |
229 | 0 | #endif |
230 | 0 | #endif |
231 | 0 | if (!afi) { |
232 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "afi"); |
233 | 0 | return CMD_WARNING; |
234 | 0 | } |
235 | 0 | if (!safi) { |
236 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "safi"); |
237 | 0 | return CMD_WARNING; |
238 | 0 | } |
239 | | |
240 | 0 | return no_debug_bgp_update_prefix_afi_safi_magic(self, vty, argc, argv, afi, safi, &mac, mac_str, ip); |
241 | 0 | } |
242 | | |
243 | | /* debug_bgp_update_prefix => "debug bgp updates prefix <A.B.C.D/M|X:X::X:X/M>$prefix" */ |
244 | | DEFUN_CMD_FUNC_DECL(debug_bgp_update_prefix) |
245 | | #define funcdecl_debug_bgp_update_prefix static int debug_bgp_update_prefix_magic(\ |
246 | | const struct cmd_element *self __attribute__ ((unused)),\ |
247 | | struct vty *vty __attribute__ ((unused)),\ |
248 | | int argc __attribute__ ((unused)),\ |
249 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
250 | | const struct prefix * prefix,\ |
251 | | const char * prefix_str __attribute__ ((unused))) |
252 | | funcdecl_debug_bgp_update_prefix; |
253 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_update_prefix) |
254 | 0 | { |
255 | 0 | #if 1 /* anything to parse? */ |
256 | 0 | int _i; |
257 | 0 | #if 1 /* anything that can fail? */ |
258 | 0 | unsigned _fail = 0, _failcnt = 0; |
259 | 0 | #endif |
260 | 0 | struct prefix prefix = { }; |
261 | 0 | const char *prefix_str = NULL; |
262 | |
|
263 | 0 | for (_i = 0; _i < argc; _i++) { |
264 | 0 | if (!argv[_i]->varname) |
265 | 0 | continue; |
266 | 0 | #if 1 /* anything that can fail? */ |
267 | 0 | _fail = 0; |
268 | 0 | #endif |
269 | |
|
270 | 0 | if (!strcmp(argv[_i]->varname, "prefix")) { |
271 | 0 | prefix_str = argv[_i]->arg; |
272 | 0 | _fail = !str2prefix(argv[_i]->arg, &prefix); |
273 | 0 | } |
274 | 0 | #if 1 /* anything that can fail? */ |
275 | 0 | if (_fail) |
276 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
277 | 0 | argv[_i]->varname, argv[_i]->arg); |
278 | 0 | _failcnt += _fail; |
279 | 0 | #endif |
280 | 0 | } |
281 | 0 | #if 1 /* anything that can fail? */ |
282 | 0 | if (_failcnt) |
283 | 0 | return CMD_WARNING; |
284 | 0 | #endif |
285 | 0 | #endif |
286 | 0 | if (!prefix_str) { |
287 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "prefix_str"); |
288 | 0 | return CMD_WARNING; |
289 | 0 | } |
290 | | |
291 | 0 | return debug_bgp_update_prefix_magic(self, vty, argc, argv, &prefix, prefix_str); |
292 | 0 | } |
293 | | |
294 | | /* no_debug_bgp_update_prefix => "no debug bgp updates prefix <A.B.C.D/M|X:X::X:X/M>$prefix" */ |
295 | | DEFUN_CMD_FUNC_DECL(no_debug_bgp_update_prefix) |
296 | | #define funcdecl_no_debug_bgp_update_prefix static int no_debug_bgp_update_prefix_magic(\ |
297 | | const struct cmd_element *self __attribute__ ((unused)),\ |
298 | | struct vty *vty __attribute__ ((unused)),\ |
299 | | int argc __attribute__ ((unused)),\ |
300 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
301 | | const struct prefix * prefix,\ |
302 | | const char * prefix_str __attribute__ ((unused))) |
303 | | funcdecl_no_debug_bgp_update_prefix; |
304 | | DEFUN_CMD_FUNC_TEXT(no_debug_bgp_update_prefix) |
305 | 0 | { |
306 | 0 | #if 1 /* anything to parse? */ |
307 | 0 | int _i; |
308 | 0 | #if 1 /* anything that can fail? */ |
309 | 0 | unsigned _fail = 0, _failcnt = 0; |
310 | 0 | #endif |
311 | 0 | struct prefix prefix = { }; |
312 | 0 | const char *prefix_str = NULL; |
313 | |
|
314 | 0 | for (_i = 0; _i < argc; _i++) { |
315 | 0 | if (!argv[_i]->varname) |
316 | 0 | continue; |
317 | 0 | #if 1 /* anything that can fail? */ |
318 | 0 | _fail = 0; |
319 | 0 | #endif |
320 | |
|
321 | 0 | if (!strcmp(argv[_i]->varname, "prefix")) { |
322 | 0 | prefix_str = argv[_i]->arg; |
323 | 0 | _fail = !str2prefix(argv[_i]->arg, &prefix); |
324 | 0 | } |
325 | 0 | #if 1 /* anything that can fail? */ |
326 | 0 | if (_fail) |
327 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
328 | 0 | argv[_i]->varname, argv[_i]->arg); |
329 | 0 | _failcnt += _fail; |
330 | 0 | #endif |
331 | 0 | } |
332 | 0 | #if 1 /* anything that can fail? */ |
333 | 0 | if (_failcnt) |
334 | 0 | return CMD_WARNING; |
335 | 0 | #endif |
336 | 0 | #endif |
337 | 0 | if (!prefix_str) { |
338 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "prefix_str"); |
339 | 0 | return CMD_WARNING; |
340 | 0 | } |
341 | | |
342 | 0 | return no_debug_bgp_update_prefix_magic(self, vty, argc, argv, &prefix, prefix_str); |
343 | 0 | } |
344 | | |
345 | | /* debug_bgp_zebra_prefix => "debug bgp zebra prefix <A.B.C.D/M|X:X::X:X/M>$prefix" */ |
346 | | DEFUN_CMD_FUNC_DECL(debug_bgp_zebra_prefix) |
347 | | #define funcdecl_debug_bgp_zebra_prefix static int debug_bgp_zebra_prefix_magic(\ |
348 | | const struct cmd_element *self __attribute__ ((unused)),\ |
349 | | struct vty *vty __attribute__ ((unused)),\ |
350 | | int argc __attribute__ ((unused)),\ |
351 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
352 | | const struct prefix * prefix,\ |
353 | | const char * prefix_str __attribute__ ((unused))) |
354 | | funcdecl_debug_bgp_zebra_prefix; |
355 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_zebra_prefix) |
356 | 0 | { |
357 | 0 | #if 1 /* anything to parse? */ |
358 | 0 | int _i; |
359 | 0 | #if 1 /* anything that can fail? */ |
360 | 0 | unsigned _fail = 0, _failcnt = 0; |
361 | 0 | #endif |
362 | 0 | struct prefix prefix = { }; |
363 | 0 | const char *prefix_str = NULL; |
364 | |
|
365 | 0 | for (_i = 0; _i < argc; _i++) { |
366 | 0 | if (!argv[_i]->varname) |
367 | 0 | continue; |
368 | 0 | #if 1 /* anything that can fail? */ |
369 | 0 | _fail = 0; |
370 | 0 | #endif |
371 | |
|
372 | 0 | if (!strcmp(argv[_i]->varname, "prefix")) { |
373 | 0 | prefix_str = argv[_i]->arg; |
374 | 0 | _fail = !str2prefix(argv[_i]->arg, &prefix); |
375 | 0 | } |
376 | 0 | #if 1 /* anything that can fail? */ |
377 | 0 | if (_fail) |
378 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
379 | 0 | argv[_i]->varname, argv[_i]->arg); |
380 | 0 | _failcnt += _fail; |
381 | 0 | #endif |
382 | 0 | } |
383 | 0 | #if 1 /* anything that can fail? */ |
384 | 0 | if (_failcnt) |
385 | 0 | return CMD_WARNING; |
386 | 0 | #endif |
387 | 0 | #endif |
388 | 0 | if (!prefix_str) { |
389 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "prefix_str"); |
390 | 0 | return CMD_WARNING; |
391 | 0 | } |
392 | | |
393 | 0 | return debug_bgp_zebra_prefix_magic(self, vty, argc, argv, &prefix, prefix_str); |
394 | 0 | } |
395 | | |
396 | | /* no_debug_bgp_zebra_prefix => "no debug bgp zebra prefix <A.B.C.D/M|X:X::X:X/M>$prefix" */ |
397 | | DEFUN_CMD_FUNC_DECL(no_debug_bgp_zebra_prefix) |
398 | | #define funcdecl_no_debug_bgp_zebra_prefix static int no_debug_bgp_zebra_prefix_magic(\ |
399 | | const struct cmd_element *self __attribute__ ((unused)),\ |
400 | | struct vty *vty __attribute__ ((unused)),\ |
401 | | int argc __attribute__ ((unused)),\ |
402 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
403 | | const struct prefix * prefix,\ |
404 | | const char * prefix_str __attribute__ ((unused))) |
405 | | funcdecl_no_debug_bgp_zebra_prefix; |
406 | | DEFUN_CMD_FUNC_TEXT(no_debug_bgp_zebra_prefix) |
407 | 0 | { |
408 | 0 | #if 1 /* anything to parse? */ |
409 | 0 | int _i; |
410 | 0 | #if 1 /* anything that can fail? */ |
411 | 0 | unsigned _fail = 0, _failcnt = 0; |
412 | 0 | #endif |
413 | 0 | struct prefix prefix = { }; |
414 | 0 | const char *prefix_str = NULL; |
415 | |
|
416 | 0 | for (_i = 0; _i < argc; _i++) { |
417 | 0 | if (!argv[_i]->varname) |
418 | 0 | continue; |
419 | 0 | #if 1 /* anything that can fail? */ |
420 | 0 | _fail = 0; |
421 | 0 | #endif |
422 | |
|
423 | 0 | if (!strcmp(argv[_i]->varname, "prefix")) { |
424 | 0 | prefix_str = argv[_i]->arg; |
425 | 0 | _fail = !str2prefix(argv[_i]->arg, &prefix); |
426 | 0 | } |
427 | 0 | #if 1 /* anything that can fail? */ |
428 | 0 | if (_fail) |
429 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
430 | 0 | argv[_i]->varname, argv[_i]->arg); |
431 | 0 | _failcnt += _fail; |
432 | 0 | #endif |
433 | 0 | } |
434 | 0 | #if 1 /* anything that can fail? */ |
435 | 0 | if (_failcnt) |
436 | 0 | return CMD_WARNING; |
437 | 0 | #endif |
438 | 0 | #endif |
439 | 0 | if (!prefix_str) { |
440 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "prefix_str"); |
441 | 0 | return CMD_WARNING; |
442 | 0 | } |
443 | | |
444 | 0 | return no_debug_bgp_zebra_prefix_magic(self, vty, argc, argv, &prefix, prefix_str); |
445 | 0 | } |
446 | | |
447 | | /* debug_bgp_evpn_mh => "[no$no] debug bgp evpn mh <es$es|route$rt>" */ |
448 | | DEFUN_CMD_FUNC_DECL(debug_bgp_evpn_mh) |
449 | | #define funcdecl_debug_bgp_evpn_mh static int debug_bgp_evpn_mh_magic(\ |
450 | | const struct cmd_element *self __attribute__ ((unused)),\ |
451 | | struct vty *vty __attribute__ ((unused)),\ |
452 | | int argc __attribute__ ((unused)),\ |
453 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
454 | | const char * no,\ |
455 | | const char * es,\ |
456 | | const char * rt) |
457 | | funcdecl_debug_bgp_evpn_mh; |
458 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_evpn_mh) |
459 | 0 | { |
460 | 0 | #if 3 /* anything to parse? */ |
461 | 0 | int _i; |
462 | | #if 0 /* anything that can fail? */ |
463 | | unsigned _fail = 0, _failcnt = 0; |
464 | | #endif |
465 | 0 | const char *no = NULL; |
466 | 0 | const char *es = NULL; |
467 | 0 | const char *rt = NULL; |
468 | |
|
469 | 0 | for (_i = 0; _i < argc; _i++) { |
470 | 0 | if (!argv[_i]->varname) |
471 | 0 | continue; |
472 | | #if 0 /* anything that can fail? */ |
473 | | _fail = 0; |
474 | | #endif |
475 | | |
476 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
477 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
478 | 0 | } |
479 | 0 | if (!strcmp(argv[_i]->varname, "es")) { |
480 | 0 | es = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
481 | 0 | } |
482 | 0 | if (!strcmp(argv[_i]->varname, "rt")) { |
483 | 0 | rt = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
484 | 0 | } |
485 | | #if 0 /* anything that can fail? */ |
486 | | if (_fail) |
487 | | vty_out (vty, "%% invalid input for %s: %s\n", |
488 | | argv[_i]->varname, argv[_i]->arg); |
489 | | _failcnt += _fail; |
490 | | #endif |
491 | 0 | } |
492 | | #if 0 /* anything that can fail? */ |
493 | | if (_failcnt) |
494 | | return CMD_WARNING; |
495 | | #endif |
496 | 0 | #endif |
497 | |
|
498 | 0 | return debug_bgp_evpn_mh_magic(self, vty, argc, argv, no, es, rt); |
499 | 0 | } |
500 | | |
501 | | /* debug_bgp_bfd => "[no] debug bgp bfd" */ |
502 | | DEFUN_CMD_FUNC_DECL(debug_bgp_bfd) |
503 | | #define funcdecl_debug_bgp_bfd static int debug_bgp_bfd_magic(\ |
504 | | const struct cmd_element *self __attribute__ ((unused)),\ |
505 | | struct vty *vty __attribute__ ((unused)),\ |
506 | | int argc __attribute__ ((unused)),\ |
507 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
508 | | const char * no) |
509 | | funcdecl_debug_bgp_bfd; |
510 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_bfd) |
511 | 0 | { |
512 | 0 | #if 1 /* anything to parse? */ |
513 | 0 | int _i; |
514 | | #if 0 /* anything that can fail? */ |
515 | | unsigned _fail = 0, _failcnt = 0; |
516 | | #endif |
517 | 0 | const char *no = NULL; |
518 | |
|
519 | 0 | for (_i = 0; _i < argc; _i++) { |
520 | 0 | if (!argv[_i]->varname) |
521 | 0 | continue; |
522 | | #if 0 /* anything that can fail? */ |
523 | | _fail = 0; |
524 | | #endif |
525 | | |
526 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
527 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
528 | 0 | } |
529 | | #if 0 /* anything that can fail? */ |
530 | | if (_fail) |
531 | | vty_out (vty, "%% invalid input for %s: %s\n", |
532 | | argv[_i]->varname, argv[_i]->arg); |
533 | | _failcnt += _fail; |
534 | | #endif |
535 | 0 | } |
536 | | #if 0 /* anything that can fail? */ |
537 | | if (_failcnt) |
538 | | return CMD_WARNING; |
539 | | #endif |
540 | 0 | #endif |
541 | |
|
542 | 0 | return debug_bgp_bfd_magic(self, vty, argc, argv, no); |
543 | 0 | } |
544 | | |
545 | | /* debug_bgp_cond_adv => "[no$no] debug bgp conditional-advertisement" */ |
546 | | DEFUN_CMD_FUNC_DECL(debug_bgp_cond_adv) |
547 | | #define funcdecl_debug_bgp_cond_adv static int debug_bgp_cond_adv_magic(\ |
548 | | const struct cmd_element *self __attribute__ ((unused)),\ |
549 | | struct vty *vty __attribute__ ((unused)),\ |
550 | | int argc __attribute__ ((unused)),\ |
551 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
552 | | const char * no) |
553 | | funcdecl_debug_bgp_cond_adv; |
554 | | DEFUN_CMD_FUNC_TEXT(debug_bgp_cond_adv) |
555 | 0 | { |
556 | 0 | #if 1 /* anything to parse? */ |
557 | 0 | int _i; |
558 | | #if 0 /* anything that can fail? */ |
559 | | unsigned _fail = 0, _failcnt = 0; |
560 | | #endif |
561 | 0 | const char *no = NULL; |
562 | |
|
563 | 0 | for (_i = 0; _i < argc; _i++) { |
564 | 0 | if (!argv[_i]->varname) |
565 | 0 | continue; |
566 | | #if 0 /* anything that can fail? */ |
567 | | _fail = 0; |
568 | | #endif |
569 | | |
570 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
571 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
572 | 0 | } |
573 | | #if 0 /* anything that can fail? */ |
574 | | if (_fail) |
575 | | vty_out (vty, "%% invalid input for %s: %s\n", |
576 | | argv[_i]->varname, argv[_i]->arg); |
577 | | _failcnt += _fail; |
578 | | #endif |
579 | 0 | } |
580 | | #if 0 /* anything that can fail? */ |
581 | | if (_failcnt) |
582 | | return CMD_WARNING; |
583 | | #endif |
584 | 0 | #endif |
585 | |
|
586 | 0 | return debug_bgp_cond_adv_magic(self, vty, argc, argv, no); |
587 | 0 | } |
588 | | |