/src/frr/pimd/pim_cmd_clippy.c
Line | Count | Source |
1 | | /* clear_ip_pim_statistics => "clear ip pim statistics [vrf NAME]$name" */ |
2 | | DEFUN_CMD_FUNC_DECL(clear_ip_pim_statistics) |
3 | | #define funcdecl_clear_ip_pim_statistics static int clear_ip_pim_statistics_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 * name) |
9 | | funcdecl_clear_ip_pim_statistics; |
10 | | DEFUN_CMD_FUNC_TEXT(clear_ip_pim_statistics) |
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 *name = 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, "name")) { |
27 | 0 | name = (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 clear_ip_pim_statistics_magic(self, vty, argc, argv, name); |
43 | 0 | } |
44 | | |
45 | | /* clear_ip_mroute => "clear ip mroute [vrf NAME]$name" */ |
46 | | DEFUN_CMD_FUNC_DECL(clear_ip_mroute) |
47 | | #define funcdecl_clear_ip_mroute static int clear_ip_mroute_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 | | const char * name) |
53 | | funcdecl_clear_ip_mroute; |
54 | | DEFUN_CMD_FUNC_TEXT(clear_ip_mroute) |
55 | 0 | { |
56 | 0 | #if 1 /* anything to parse? */ |
57 | 0 | int _i; |
58 | | #if 0 /* anything that can fail? */ |
59 | | unsigned _fail = 0, _failcnt = 0; |
60 | | #endif |
61 | 0 | const char *name = NULL; |
62 | |
|
63 | 0 | for (_i = 0; _i < argc; _i++) { |
64 | 0 | if (!argv[_i]->varname) |
65 | 0 | continue; |
66 | | #if 0 /* anything that can fail? */ |
67 | | _fail = 0; |
68 | | #endif |
69 | | |
70 | 0 | if (!strcmp(argv[_i]->varname, "name")) { |
71 | 0 | name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
72 | 0 | } |
73 | | #if 0 /* anything that can fail? */ |
74 | | if (_fail) |
75 | | vty_out (vty, "%% invalid input for %s: %s\n", |
76 | | argv[_i]->varname, argv[_i]->arg); |
77 | | _failcnt += _fail; |
78 | | #endif |
79 | 0 | } |
80 | | #if 0 /* anything that can fail? */ |
81 | | if (_failcnt) |
82 | | return CMD_WARNING; |
83 | | #endif |
84 | 0 | #endif |
85 | |
|
86 | 0 | return clear_ip_mroute_magic(self, vty, argc, argv, name); |
87 | 0 | } |
88 | | |
89 | | /* clear_ip_pim_interfaces => "clear ip pim [vrf NAME] interfaces" */ |
90 | | DEFUN_CMD_FUNC_DECL(clear_ip_pim_interfaces) |
91 | | #define funcdecl_clear_ip_pim_interfaces static int clear_ip_pim_interfaces_magic(\ |
92 | | const struct cmd_element *self __attribute__ ((unused)),\ |
93 | | struct vty *vty __attribute__ ((unused)),\ |
94 | | int argc __attribute__ ((unused)),\ |
95 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
96 | | const char * vrf) |
97 | | funcdecl_clear_ip_pim_interfaces; |
98 | | DEFUN_CMD_FUNC_TEXT(clear_ip_pim_interfaces) |
99 | 0 | { |
100 | 0 | #if 1 /* anything to parse? */ |
101 | 0 | int _i; |
102 | | #if 0 /* anything that can fail? */ |
103 | | unsigned _fail = 0, _failcnt = 0; |
104 | | #endif |
105 | 0 | const char *vrf = NULL; |
106 | |
|
107 | 0 | for (_i = 0; _i < argc; _i++) { |
108 | 0 | if (!argv[_i]->varname) |
109 | 0 | continue; |
110 | | #if 0 /* anything that can fail? */ |
111 | | _fail = 0; |
112 | | #endif |
113 | | |
114 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
115 | 0 | vrf = (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 clear_ip_pim_interfaces_magic(self, vty, argc, argv, vrf); |
131 | 0 | } |
132 | | |
133 | | /* clear_ip_pim_interface_traffic => "clear ip pim [vrf NAME] interface traffic" */ |
134 | | DEFUN_CMD_FUNC_DECL(clear_ip_pim_interface_traffic) |
135 | | #define funcdecl_clear_ip_pim_interface_traffic static int clear_ip_pim_interface_traffic_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 * vrf) |
141 | | funcdecl_clear_ip_pim_interface_traffic; |
142 | | DEFUN_CMD_FUNC_TEXT(clear_ip_pim_interface_traffic) |
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 *vrf = 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, "vrf")) { |
159 | 0 | vrf = (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 clear_ip_pim_interface_traffic_magic(self, vty, argc, argv, vrf); |
175 | 0 | } |
176 | | |
177 | | /* clear_ip_pim_oil => "clear ip pim [vrf NAME]$name oil" */ |
178 | | DEFUN_CMD_FUNC_DECL(clear_ip_pim_oil) |
179 | | #define funcdecl_clear_ip_pim_oil static int clear_ip_pim_oil_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 * name) |
185 | | funcdecl_clear_ip_pim_oil; |
186 | | DEFUN_CMD_FUNC_TEXT(clear_ip_pim_oil) |
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 *name = 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, "name")) { |
203 | 0 | name = (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 clear_ip_pim_oil_magic(self, vty, argc, argv, name); |
219 | 0 | } |
220 | | |
221 | | /* show_ip_igmp_groups => "show ip igmp [vrf NAME$vrf_name] groups [INTERFACE$ifname [GROUP$grp_str]] [detail$detail] [json$json]" */ |
222 | | DEFUN_CMD_FUNC_DECL(show_ip_igmp_groups) |
223 | | #define funcdecl_show_ip_igmp_groups static int show_ip_igmp_groups_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 * vrf_name,\ |
229 | | const char * ifname,\ |
230 | | const char * grp_str,\ |
231 | | const char * detail,\ |
232 | | const char * json) |
233 | | funcdecl_show_ip_igmp_groups; |
234 | | DEFUN_CMD_FUNC_TEXT(show_ip_igmp_groups) |
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 *vrf_name = NULL; |
242 | 0 | const char *ifname = NULL; |
243 | 0 | const char *grp_str = NULL; |
244 | 0 | const char *detail = NULL; |
245 | 0 | const char *json = 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, "vrf_name")) { |
255 | 0 | vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
256 | 0 | } |
257 | 0 | if (!strcmp(argv[_i]->varname, "ifname")) { |
258 | 0 | ifname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
259 | 0 | } |
260 | 0 | if (!strcmp(argv[_i]->varname, "grp_str")) { |
261 | 0 | grp_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
262 | 0 | } |
263 | 0 | if (!strcmp(argv[_i]->varname, "detail")) { |
264 | 0 | detail = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
265 | 0 | } |
266 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
267 | 0 | json = (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 show_ip_igmp_groups_magic(self, vty, argc, argv, vrf_name, ifname, grp_str, detail, json); |
283 | 0 | } |
284 | | |
285 | | /* show_ip_igmp_groups_vrf_all => "show ip igmp vrf all groups [GROUP$grp_str] [detail$detail] [json$json]" */ |
286 | | DEFUN_CMD_FUNC_DECL(show_ip_igmp_groups_vrf_all) |
287 | | #define funcdecl_show_ip_igmp_groups_vrf_all static int show_ip_igmp_groups_vrf_all_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 * grp_str,\ |
293 | | const char * detail,\ |
294 | | const char * json) |
295 | | funcdecl_show_ip_igmp_groups_vrf_all; |
296 | | DEFUN_CMD_FUNC_TEXT(show_ip_igmp_groups_vrf_all) |
297 | 0 | { |
298 | 0 | #if 3 /* anything to parse? */ |
299 | 0 | int _i; |
300 | | #if 0 /* anything that can fail? */ |
301 | | unsigned _fail = 0, _failcnt = 0; |
302 | | #endif |
303 | 0 | const char *grp_str = NULL; |
304 | 0 | const char *detail = NULL; |
305 | 0 | const char *json = NULL; |
306 | |
|
307 | 0 | for (_i = 0; _i < argc; _i++) { |
308 | 0 | if (!argv[_i]->varname) |
309 | 0 | continue; |
310 | | #if 0 /* anything that can fail? */ |
311 | | _fail = 0; |
312 | | #endif |
313 | | |
314 | 0 | if (!strcmp(argv[_i]->varname, "grp_str")) { |
315 | 0 | grp_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
316 | 0 | } |
317 | 0 | if (!strcmp(argv[_i]->varname, "detail")) { |
318 | 0 | detail = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
319 | 0 | } |
320 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
321 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
322 | 0 | } |
323 | | #if 0 /* anything that can fail? */ |
324 | | if (_fail) |
325 | | vty_out (vty, "%% invalid input for %s: %s\n", |
326 | | argv[_i]->varname, argv[_i]->arg); |
327 | | _failcnt += _fail; |
328 | | #endif |
329 | 0 | } |
330 | | #if 0 /* anything that can fail? */ |
331 | | if (_failcnt) |
332 | | return CMD_WARNING; |
333 | | #endif |
334 | 0 | #endif |
335 | |
|
336 | 0 | return show_ip_igmp_groups_vrf_all_magic(self, vty, argc, argv, grp_str, detail, json); |
337 | 0 | } |
338 | | |
339 | | /* show_ip_igmp_sources => "show ip igmp [vrf NAME$vrf_name] sources [INTERFACE$ifname [GROUP$grp_str]] [json$json]" */ |
340 | | DEFUN_CMD_FUNC_DECL(show_ip_igmp_sources) |
341 | | #define funcdecl_show_ip_igmp_sources static int show_ip_igmp_sources_magic(\ |
342 | | const struct cmd_element *self __attribute__ ((unused)),\ |
343 | | struct vty *vty __attribute__ ((unused)),\ |
344 | | int argc __attribute__ ((unused)),\ |
345 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
346 | | const char * vrf_name,\ |
347 | | const char * ifname,\ |
348 | | const char * grp_str,\ |
349 | | const char * json) |
350 | | funcdecl_show_ip_igmp_sources; |
351 | | DEFUN_CMD_FUNC_TEXT(show_ip_igmp_sources) |
352 | 0 | { |
353 | 0 | #if 4 /* anything to parse? */ |
354 | 0 | int _i; |
355 | | #if 0 /* anything that can fail? */ |
356 | | unsigned _fail = 0, _failcnt = 0; |
357 | | #endif |
358 | 0 | const char *vrf_name = NULL; |
359 | 0 | const char *ifname = NULL; |
360 | 0 | const char *grp_str = NULL; |
361 | 0 | const char *json = NULL; |
362 | |
|
363 | 0 | for (_i = 0; _i < argc; _i++) { |
364 | 0 | if (!argv[_i]->varname) |
365 | 0 | continue; |
366 | | #if 0 /* anything that can fail? */ |
367 | | _fail = 0; |
368 | | #endif |
369 | | |
370 | 0 | if (!strcmp(argv[_i]->varname, "vrf_name")) { |
371 | 0 | vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
372 | 0 | } |
373 | 0 | if (!strcmp(argv[_i]->varname, "ifname")) { |
374 | 0 | ifname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
375 | 0 | } |
376 | 0 | if (!strcmp(argv[_i]->varname, "grp_str")) { |
377 | 0 | grp_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
378 | 0 | } |
379 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
380 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
381 | 0 | } |
382 | | #if 0 /* anything that can fail? */ |
383 | | if (_fail) |
384 | | vty_out (vty, "%% invalid input for %s: %s\n", |
385 | | argv[_i]->varname, argv[_i]->arg); |
386 | | _failcnt += _fail; |
387 | | #endif |
388 | 0 | } |
389 | | #if 0 /* anything that can fail? */ |
390 | | if (_failcnt) |
391 | | return CMD_WARNING; |
392 | | #endif |
393 | 0 | #endif |
394 | |
|
395 | 0 | return show_ip_igmp_sources_magic(self, vty, argc, argv, vrf_name, ifname, grp_str, json); |
396 | 0 | } |
397 | | |
398 | | /* show_ip_pim_interface => "show ip pim [mlag$mlag] [vrf NAME] interface [detail|WORD]$interface [json$json]" */ |
399 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_interface) |
400 | | #define funcdecl_show_ip_pim_interface static int show_ip_pim_interface_magic(\ |
401 | | const struct cmd_element *self __attribute__ ((unused)),\ |
402 | | struct vty *vty __attribute__ ((unused)),\ |
403 | | int argc __attribute__ ((unused)),\ |
404 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
405 | | const char * mlag,\ |
406 | | const char * vrf,\ |
407 | | const char * interface,\ |
408 | | const char * json) |
409 | | funcdecl_show_ip_pim_interface; |
410 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_interface) |
411 | 0 | { |
412 | 0 | #if 4 /* anything to parse? */ |
413 | 0 | int _i; |
414 | | #if 0 /* anything that can fail? */ |
415 | | unsigned _fail = 0, _failcnt = 0; |
416 | | #endif |
417 | 0 | const char *mlag = NULL; |
418 | 0 | const char *vrf = NULL; |
419 | 0 | const char *interface = NULL; |
420 | 0 | const char *json = NULL; |
421 | |
|
422 | 0 | for (_i = 0; _i < argc; _i++) { |
423 | 0 | if (!argv[_i]->varname) |
424 | 0 | continue; |
425 | | #if 0 /* anything that can fail? */ |
426 | | _fail = 0; |
427 | | #endif |
428 | | |
429 | 0 | if (!strcmp(argv[_i]->varname, "mlag")) { |
430 | 0 | mlag = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
431 | 0 | } |
432 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
433 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
434 | 0 | } |
435 | 0 | if (!strcmp(argv[_i]->varname, "interface")) { |
436 | 0 | interface = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
437 | 0 | } |
438 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
439 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
440 | 0 | } |
441 | | #if 0 /* anything that can fail? */ |
442 | | if (_fail) |
443 | | vty_out (vty, "%% invalid input for %s: %s\n", |
444 | | argv[_i]->varname, argv[_i]->arg); |
445 | | _failcnt += _fail; |
446 | | #endif |
447 | 0 | } |
448 | | #if 0 /* anything that can fail? */ |
449 | | if (_failcnt) |
450 | | return CMD_WARNING; |
451 | | #endif |
452 | 0 | #endif |
453 | |
|
454 | 0 | return show_ip_pim_interface_magic(self, vty, argc, argv, mlag, vrf, interface, json); |
455 | 0 | } |
456 | | |
457 | | /* show_ip_pim_interface_vrf_all => "show ip pim [mlag$mlag] vrf all interface [detail|WORD]$interface [json$json]" */ |
458 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_interface_vrf_all) |
459 | | #define funcdecl_show_ip_pim_interface_vrf_all static int show_ip_pim_interface_vrf_all_magic(\ |
460 | | const struct cmd_element *self __attribute__ ((unused)),\ |
461 | | struct vty *vty __attribute__ ((unused)),\ |
462 | | int argc __attribute__ ((unused)),\ |
463 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
464 | | const char * mlag,\ |
465 | | const char * interface,\ |
466 | | const char * json) |
467 | | funcdecl_show_ip_pim_interface_vrf_all; |
468 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_interface_vrf_all) |
469 | 0 | { |
470 | 0 | #if 3 /* anything to parse? */ |
471 | 0 | int _i; |
472 | | #if 0 /* anything that can fail? */ |
473 | | unsigned _fail = 0, _failcnt = 0; |
474 | | #endif |
475 | 0 | const char *mlag = NULL; |
476 | 0 | const char *interface = NULL; |
477 | 0 | const char *json = NULL; |
478 | |
|
479 | 0 | for (_i = 0; _i < argc; _i++) { |
480 | 0 | if (!argv[_i]->varname) |
481 | 0 | continue; |
482 | | #if 0 /* anything that can fail? */ |
483 | | _fail = 0; |
484 | | #endif |
485 | | |
486 | 0 | if (!strcmp(argv[_i]->varname, "mlag")) { |
487 | 0 | mlag = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
488 | 0 | } |
489 | 0 | if (!strcmp(argv[_i]->varname, "interface")) { |
490 | 0 | interface = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
491 | 0 | } |
492 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
493 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
494 | 0 | } |
495 | | #if 0 /* anything that can fail? */ |
496 | | if (_fail) |
497 | | vty_out (vty, "%% invalid input for %s: %s\n", |
498 | | argv[_i]->varname, argv[_i]->arg); |
499 | | _failcnt += _fail; |
500 | | #endif |
501 | 0 | } |
502 | | #if 0 /* anything that can fail? */ |
503 | | if (_failcnt) |
504 | | return CMD_WARNING; |
505 | | #endif |
506 | 0 | #endif |
507 | |
|
508 | 0 | return show_ip_pim_interface_vrf_all_magic(self, vty, argc, argv, mlag, interface, json); |
509 | 0 | } |
510 | | |
511 | | /* show_ip_pim_join => "show ip pim [vrf NAME] join [A.B.C.D$s_or_g [A.B.C.D$g]] [json$json]" */ |
512 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_join) |
513 | | #define funcdecl_show_ip_pim_join static int show_ip_pim_join_magic(\ |
514 | | const struct cmd_element *self __attribute__ ((unused)),\ |
515 | | struct vty *vty __attribute__ ((unused)),\ |
516 | | int argc __attribute__ ((unused)),\ |
517 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
518 | | const char * vrf,\ |
519 | | struct in_addr s_or_g,\ |
520 | | const char * s_or_g_str __attribute__ ((unused)),\ |
521 | | struct in_addr g,\ |
522 | | const char * g_str __attribute__ ((unused)),\ |
523 | | const char * json) |
524 | | funcdecl_show_ip_pim_join; |
525 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_join) |
526 | 0 | { |
527 | 0 | #if 4 /* anything to parse? */ |
528 | 0 | int _i; |
529 | 0 | #if 1 /* anything that can fail? */ |
530 | 0 | unsigned _fail = 0, _failcnt = 0; |
531 | 0 | #endif |
532 | 0 | const char *vrf = NULL; |
533 | 0 | struct in_addr s_or_g = { INADDR_ANY }; |
534 | 0 | const char *s_or_g_str = NULL; |
535 | 0 | struct in_addr g = { INADDR_ANY }; |
536 | 0 | const char *g_str = NULL; |
537 | 0 | const char *json = NULL; |
538 | |
|
539 | 0 | for (_i = 0; _i < argc; _i++) { |
540 | 0 | if (!argv[_i]->varname) |
541 | 0 | continue; |
542 | 0 | #if 1 /* anything that can fail? */ |
543 | 0 | _fail = 0; |
544 | 0 | #endif |
545 | |
|
546 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
547 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
548 | 0 | } |
549 | 0 | if (!strcmp(argv[_i]->varname, "s_or_g")) { |
550 | 0 | s_or_g_str = argv[_i]->arg; |
551 | 0 | _fail = !inet_aton(argv[_i]->arg, &s_or_g); |
552 | 0 | } |
553 | 0 | if (!strcmp(argv[_i]->varname, "g")) { |
554 | 0 | g_str = argv[_i]->arg; |
555 | 0 | _fail = !inet_aton(argv[_i]->arg, &g); |
556 | 0 | } |
557 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
558 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
559 | 0 | } |
560 | 0 | #if 1 /* anything that can fail? */ |
561 | 0 | if (_fail) |
562 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
563 | 0 | argv[_i]->varname, argv[_i]->arg); |
564 | 0 | _failcnt += _fail; |
565 | 0 | #endif |
566 | 0 | } |
567 | 0 | #if 1 /* anything that can fail? */ |
568 | 0 | if (_failcnt) |
569 | 0 | return CMD_WARNING; |
570 | 0 | #endif |
571 | 0 | #endif |
572 | | |
573 | 0 | return show_ip_pim_join_magic(self, vty, argc, argv, vrf, s_or_g, s_or_g_str, g, g_str, json); |
574 | 0 | } |
575 | | |
576 | | /* show_ip_pim_join_vrf_all => "show ip pim vrf all join [json$json]" */ |
577 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_join_vrf_all) |
578 | | #define funcdecl_show_ip_pim_join_vrf_all static int show_ip_pim_join_vrf_all_magic(\ |
579 | | const struct cmd_element *self __attribute__ ((unused)),\ |
580 | | struct vty *vty __attribute__ ((unused)),\ |
581 | | int argc __attribute__ ((unused)),\ |
582 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
583 | | const char * json) |
584 | | funcdecl_show_ip_pim_join_vrf_all; |
585 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_join_vrf_all) |
586 | 0 | { |
587 | 0 | #if 1 /* anything to parse? */ |
588 | 0 | int _i; |
589 | | #if 0 /* anything that can fail? */ |
590 | | unsigned _fail = 0, _failcnt = 0; |
591 | | #endif |
592 | 0 | const char *json = NULL; |
593 | |
|
594 | 0 | for (_i = 0; _i < argc; _i++) { |
595 | 0 | if (!argv[_i]->varname) |
596 | 0 | continue; |
597 | | #if 0 /* anything that can fail? */ |
598 | | _fail = 0; |
599 | | #endif |
600 | | |
601 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
602 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
603 | 0 | } |
604 | | #if 0 /* anything that can fail? */ |
605 | | if (_fail) |
606 | | vty_out (vty, "%% invalid input for %s: %s\n", |
607 | | argv[_i]->varname, argv[_i]->arg); |
608 | | _failcnt += _fail; |
609 | | #endif |
610 | 0 | } |
611 | | #if 0 /* anything that can fail? */ |
612 | | if (_failcnt) |
613 | | return CMD_WARNING; |
614 | | #endif |
615 | 0 | #endif |
616 | |
|
617 | 0 | return show_ip_pim_join_vrf_all_magic(self, vty, argc, argv, json); |
618 | 0 | } |
619 | | |
620 | | /* show_ip_pim_jp_agg => "show ip pim [vrf NAME] jp-agg" */ |
621 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_jp_agg) |
622 | | #define funcdecl_show_ip_pim_jp_agg static int show_ip_pim_jp_agg_magic(\ |
623 | | const struct cmd_element *self __attribute__ ((unused)),\ |
624 | | struct vty *vty __attribute__ ((unused)),\ |
625 | | int argc __attribute__ ((unused)),\ |
626 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
627 | | const char * vrf) |
628 | | funcdecl_show_ip_pim_jp_agg; |
629 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_jp_agg) |
630 | 0 | { |
631 | 0 | #if 1 /* anything to parse? */ |
632 | 0 | int _i; |
633 | | #if 0 /* anything that can fail? */ |
634 | | unsigned _fail = 0, _failcnt = 0; |
635 | | #endif |
636 | 0 | const char *vrf = NULL; |
637 | |
|
638 | 0 | for (_i = 0; _i < argc; _i++) { |
639 | 0 | if (!argv[_i]->varname) |
640 | 0 | continue; |
641 | | #if 0 /* anything that can fail? */ |
642 | | _fail = 0; |
643 | | #endif |
644 | | |
645 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
646 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
647 | 0 | } |
648 | | #if 0 /* anything that can fail? */ |
649 | | if (_fail) |
650 | | vty_out (vty, "%% invalid input for %s: %s\n", |
651 | | argv[_i]->varname, argv[_i]->arg); |
652 | | _failcnt += _fail; |
653 | | #endif |
654 | 0 | } |
655 | | #if 0 /* anything that can fail? */ |
656 | | if (_failcnt) |
657 | | return CMD_WARNING; |
658 | | #endif |
659 | 0 | #endif |
660 | |
|
661 | 0 | return show_ip_pim_jp_agg_magic(self, vty, argc, argv, vrf); |
662 | 0 | } |
663 | | |
664 | | /* show_ip_pim_local_membership => "show ip pim [vrf NAME] local-membership [json$json]" */ |
665 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_local_membership) |
666 | | #define funcdecl_show_ip_pim_local_membership static int show_ip_pim_local_membership_magic(\ |
667 | | const struct cmd_element *self __attribute__ ((unused)),\ |
668 | | struct vty *vty __attribute__ ((unused)),\ |
669 | | int argc __attribute__ ((unused)),\ |
670 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
671 | | const char * vrf,\ |
672 | | const char * json) |
673 | | funcdecl_show_ip_pim_local_membership; |
674 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_local_membership) |
675 | 0 | { |
676 | 0 | #if 2 /* anything to parse? */ |
677 | 0 | int _i; |
678 | | #if 0 /* anything that can fail? */ |
679 | | unsigned _fail = 0, _failcnt = 0; |
680 | | #endif |
681 | 0 | const char *vrf = NULL; |
682 | 0 | const char *json = NULL; |
683 | |
|
684 | 0 | for (_i = 0; _i < argc; _i++) { |
685 | 0 | if (!argv[_i]->varname) |
686 | 0 | continue; |
687 | | #if 0 /* anything that can fail? */ |
688 | | _fail = 0; |
689 | | #endif |
690 | | |
691 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
692 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
693 | 0 | } |
694 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
695 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
696 | 0 | } |
697 | | #if 0 /* anything that can fail? */ |
698 | | if (_fail) |
699 | | vty_out (vty, "%% invalid input for %s: %s\n", |
700 | | argv[_i]->varname, argv[_i]->arg); |
701 | | _failcnt += _fail; |
702 | | #endif |
703 | 0 | } |
704 | | #if 0 /* anything that can fail? */ |
705 | | if (_failcnt) |
706 | | return CMD_WARNING; |
707 | | #endif |
708 | 0 | #endif |
709 | |
|
710 | 0 | return show_ip_pim_local_membership_magic(self, vty, argc, argv, vrf, json); |
711 | 0 | } |
712 | | |
713 | | /* show_ip_pim_neighbor => "show ip pim [vrf NAME] neighbor [detail|WORD]$interface [json$json]" */ |
714 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_neighbor) |
715 | | #define funcdecl_show_ip_pim_neighbor static int show_ip_pim_neighbor_magic(\ |
716 | | const struct cmd_element *self __attribute__ ((unused)),\ |
717 | | struct vty *vty __attribute__ ((unused)),\ |
718 | | int argc __attribute__ ((unused)),\ |
719 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
720 | | const char * vrf,\ |
721 | | const char * interface,\ |
722 | | const char * json) |
723 | | funcdecl_show_ip_pim_neighbor; |
724 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_neighbor) |
725 | 0 | { |
726 | 0 | #if 3 /* anything to parse? */ |
727 | 0 | int _i; |
728 | | #if 0 /* anything that can fail? */ |
729 | | unsigned _fail = 0, _failcnt = 0; |
730 | | #endif |
731 | 0 | const char *vrf = NULL; |
732 | 0 | const char *interface = NULL; |
733 | 0 | const char *json = NULL; |
734 | |
|
735 | 0 | for (_i = 0; _i < argc; _i++) { |
736 | 0 | if (!argv[_i]->varname) |
737 | 0 | continue; |
738 | | #if 0 /* anything that can fail? */ |
739 | | _fail = 0; |
740 | | #endif |
741 | | |
742 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
743 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
744 | 0 | } |
745 | 0 | if (!strcmp(argv[_i]->varname, "interface")) { |
746 | 0 | interface = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
747 | 0 | } |
748 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
749 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
750 | 0 | } |
751 | | #if 0 /* anything that can fail? */ |
752 | | if (_fail) |
753 | | vty_out (vty, "%% invalid input for %s: %s\n", |
754 | | argv[_i]->varname, argv[_i]->arg); |
755 | | _failcnt += _fail; |
756 | | #endif |
757 | 0 | } |
758 | | #if 0 /* anything that can fail? */ |
759 | | if (_failcnt) |
760 | | return CMD_WARNING; |
761 | | #endif |
762 | 0 | #endif |
763 | |
|
764 | 0 | return show_ip_pim_neighbor_magic(self, vty, argc, argv, vrf, interface, json); |
765 | 0 | } |
766 | | |
767 | | /* show_ip_pim_neighbor_vrf_all => "show ip pim vrf all neighbor [detail|WORD]$interface [json$json]" */ |
768 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_neighbor_vrf_all) |
769 | | #define funcdecl_show_ip_pim_neighbor_vrf_all static int show_ip_pim_neighbor_vrf_all_magic(\ |
770 | | const struct cmd_element *self __attribute__ ((unused)),\ |
771 | | struct vty *vty __attribute__ ((unused)),\ |
772 | | int argc __attribute__ ((unused)),\ |
773 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
774 | | const char * interface,\ |
775 | | const char * json) |
776 | | funcdecl_show_ip_pim_neighbor_vrf_all; |
777 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_neighbor_vrf_all) |
778 | 0 | { |
779 | 0 | #if 2 /* anything to parse? */ |
780 | 0 | int _i; |
781 | | #if 0 /* anything that can fail? */ |
782 | | unsigned _fail = 0, _failcnt = 0; |
783 | | #endif |
784 | 0 | const char *interface = NULL; |
785 | 0 | const char *json = NULL; |
786 | |
|
787 | 0 | for (_i = 0; _i < argc; _i++) { |
788 | 0 | if (!argv[_i]->varname) |
789 | 0 | continue; |
790 | | #if 0 /* anything that can fail? */ |
791 | | _fail = 0; |
792 | | #endif |
793 | | |
794 | 0 | if (!strcmp(argv[_i]->varname, "interface")) { |
795 | 0 | interface = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
796 | 0 | } |
797 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
798 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
799 | 0 | } |
800 | | #if 0 /* anything that can fail? */ |
801 | | if (_fail) |
802 | | vty_out (vty, "%% invalid input for %s: %s\n", |
803 | | argv[_i]->varname, argv[_i]->arg); |
804 | | _failcnt += _fail; |
805 | | #endif |
806 | 0 | } |
807 | | #if 0 /* anything that can fail? */ |
808 | | if (_failcnt) |
809 | | return CMD_WARNING; |
810 | | #endif |
811 | 0 | #endif |
812 | |
|
813 | 0 | return show_ip_pim_neighbor_vrf_all_magic(self, vty, argc, argv, interface, json); |
814 | 0 | } |
815 | | |
816 | | /* show_ip_pim_secondary => "show ip pim [vrf NAME] secondary" */ |
817 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_secondary) |
818 | | #define funcdecl_show_ip_pim_secondary static int show_ip_pim_secondary_magic(\ |
819 | | const struct cmd_element *self __attribute__ ((unused)),\ |
820 | | struct vty *vty __attribute__ ((unused)),\ |
821 | | int argc __attribute__ ((unused)),\ |
822 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
823 | | const char * vrf) |
824 | | funcdecl_show_ip_pim_secondary; |
825 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_secondary) |
826 | 0 | { |
827 | 0 | #if 1 /* anything to parse? */ |
828 | 0 | int _i; |
829 | | #if 0 /* anything that can fail? */ |
830 | | unsigned _fail = 0, _failcnt = 0; |
831 | | #endif |
832 | 0 | const char *vrf = NULL; |
833 | |
|
834 | 0 | for (_i = 0; _i < argc; _i++) { |
835 | 0 | if (!argv[_i]->varname) |
836 | 0 | continue; |
837 | | #if 0 /* anything that can fail? */ |
838 | | _fail = 0; |
839 | | #endif |
840 | | |
841 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
842 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
843 | 0 | } |
844 | | #if 0 /* anything that can fail? */ |
845 | | if (_fail) |
846 | | vty_out (vty, "%% invalid input for %s: %s\n", |
847 | | argv[_i]->varname, argv[_i]->arg); |
848 | | _failcnt += _fail; |
849 | | #endif |
850 | 0 | } |
851 | | #if 0 /* anything that can fail? */ |
852 | | if (_failcnt) |
853 | | return CMD_WARNING; |
854 | | #endif |
855 | 0 | #endif |
856 | |
|
857 | 0 | return show_ip_pim_secondary_magic(self, vty, argc, argv, vrf); |
858 | 0 | } |
859 | | |
860 | | /* show_ip_pim_state => "show ip pim [vrf NAME] state [A.B.C.D$s_or_g [A.B.C.D$g]] [json$json]" */ |
861 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_state) |
862 | | #define funcdecl_show_ip_pim_state static int show_ip_pim_state_magic(\ |
863 | | const struct cmd_element *self __attribute__ ((unused)),\ |
864 | | struct vty *vty __attribute__ ((unused)),\ |
865 | | int argc __attribute__ ((unused)),\ |
866 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
867 | | const char * vrf,\ |
868 | | struct in_addr s_or_g,\ |
869 | | const char * s_or_g_str __attribute__ ((unused)),\ |
870 | | struct in_addr g,\ |
871 | | const char * g_str __attribute__ ((unused)),\ |
872 | | const char * json) |
873 | | funcdecl_show_ip_pim_state; |
874 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_state) |
875 | 0 | { |
876 | 0 | #if 4 /* anything to parse? */ |
877 | 0 | int _i; |
878 | 0 | #if 1 /* anything that can fail? */ |
879 | 0 | unsigned _fail = 0, _failcnt = 0; |
880 | 0 | #endif |
881 | 0 | const char *vrf = NULL; |
882 | 0 | struct in_addr s_or_g = { INADDR_ANY }; |
883 | 0 | const char *s_or_g_str = NULL; |
884 | 0 | struct in_addr g = { INADDR_ANY }; |
885 | 0 | const char *g_str = NULL; |
886 | 0 | const char *json = NULL; |
887 | |
|
888 | 0 | for (_i = 0; _i < argc; _i++) { |
889 | 0 | if (!argv[_i]->varname) |
890 | 0 | continue; |
891 | 0 | #if 1 /* anything that can fail? */ |
892 | 0 | _fail = 0; |
893 | 0 | #endif |
894 | |
|
895 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
896 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
897 | 0 | } |
898 | 0 | if (!strcmp(argv[_i]->varname, "s_or_g")) { |
899 | 0 | s_or_g_str = argv[_i]->arg; |
900 | 0 | _fail = !inet_aton(argv[_i]->arg, &s_or_g); |
901 | 0 | } |
902 | 0 | if (!strcmp(argv[_i]->varname, "g")) { |
903 | 0 | g_str = argv[_i]->arg; |
904 | 0 | _fail = !inet_aton(argv[_i]->arg, &g); |
905 | 0 | } |
906 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
907 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
908 | 0 | } |
909 | 0 | #if 1 /* anything that can fail? */ |
910 | 0 | if (_fail) |
911 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
912 | 0 | argv[_i]->varname, argv[_i]->arg); |
913 | 0 | _failcnt += _fail; |
914 | 0 | #endif |
915 | 0 | } |
916 | 0 | #if 1 /* anything that can fail? */ |
917 | 0 | if (_failcnt) |
918 | 0 | return CMD_WARNING; |
919 | 0 | #endif |
920 | 0 | #endif |
921 | | |
922 | 0 | return show_ip_pim_state_magic(self, vty, argc, argv, vrf, s_or_g, s_or_g_str, g, g_str, json); |
923 | 0 | } |
924 | | |
925 | | /* show_ip_pim_state_vrf_all => "show ip pim vrf all state [A.B.C.D$s_or_g [A.B.C.D$g]] [json$json]" */ |
926 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_state_vrf_all) |
927 | | #define funcdecl_show_ip_pim_state_vrf_all static int show_ip_pim_state_vrf_all_magic(\ |
928 | | const struct cmd_element *self __attribute__ ((unused)),\ |
929 | | struct vty *vty __attribute__ ((unused)),\ |
930 | | int argc __attribute__ ((unused)),\ |
931 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
932 | | struct in_addr s_or_g,\ |
933 | | const char * s_or_g_str __attribute__ ((unused)),\ |
934 | | struct in_addr g,\ |
935 | | const char * g_str __attribute__ ((unused)),\ |
936 | | const char * json) |
937 | | funcdecl_show_ip_pim_state_vrf_all; |
938 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_state_vrf_all) |
939 | 0 | { |
940 | 0 | #if 3 /* anything to parse? */ |
941 | 0 | int _i; |
942 | 0 | #if 1 /* anything that can fail? */ |
943 | 0 | unsigned _fail = 0, _failcnt = 0; |
944 | 0 | #endif |
945 | 0 | struct in_addr s_or_g = { INADDR_ANY }; |
946 | 0 | const char *s_or_g_str = NULL; |
947 | 0 | struct in_addr g = { INADDR_ANY }; |
948 | 0 | const char *g_str = NULL; |
949 | 0 | const char *json = NULL; |
950 | |
|
951 | 0 | for (_i = 0; _i < argc; _i++) { |
952 | 0 | if (!argv[_i]->varname) |
953 | 0 | continue; |
954 | 0 | #if 1 /* anything that can fail? */ |
955 | 0 | _fail = 0; |
956 | 0 | #endif |
957 | |
|
958 | 0 | if (!strcmp(argv[_i]->varname, "s_or_g")) { |
959 | 0 | s_or_g_str = argv[_i]->arg; |
960 | 0 | _fail = !inet_aton(argv[_i]->arg, &s_or_g); |
961 | 0 | } |
962 | 0 | if (!strcmp(argv[_i]->varname, "g")) { |
963 | 0 | g_str = argv[_i]->arg; |
964 | 0 | _fail = !inet_aton(argv[_i]->arg, &g); |
965 | 0 | } |
966 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
967 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
968 | 0 | } |
969 | 0 | #if 1 /* anything that can fail? */ |
970 | 0 | if (_fail) |
971 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
972 | 0 | argv[_i]->varname, argv[_i]->arg); |
973 | 0 | _failcnt += _fail; |
974 | 0 | #endif |
975 | 0 | } |
976 | 0 | #if 1 /* anything that can fail? */ |
977 | 0 | if (_failcnt) |
978 | 0 | return CMD_WARNING; |
979 | 0 | #endif |
980 | 0 | #endif |
981 | | |
982 | 0 | return show_ip_pim_state_vrf_all_magic(self, vty, argc, argv, s_or_g, s_or_g_str, g, g_str, json); |
983 | 0 | } |
984 | | |
985 | | /* show_ip_pim_upstream => "show ip pim [vrf NAME] upstream [A.B.C.D$s_or_g [A.B.C.D$g]] [json$json]" */ |
986 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_upstream) |
987 | | #define funcdecl_show_ip_pim_upstream static int show_ip_pim_upstream_magic(\ |
988 | | const struct cmd_element *self __attribute__ ((unused)),\ |
989 | | struct vty *vty __attribute__ ((unused)),\ |
990 | | int argc __attribute__ ((unused)),\ |
991 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
992 | | const char * vrf,\ |
993 | | struct in_addr s_or_g,\ |
994 | | const char * s_or_g_str __attribute__ ((unused)),\ |
995 | | struct in_addr g,\ |
996 | | const char * g_str __attribute__ ((unused)),\ |
997 | | const char * json) |
998 | | funcdecl_show_ip_pim_upstream; |
999 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_upstream) |
1000 | 0 | { |
1001 | 0 | #if 4 /* anything to parse? */ |
1002 | 0 | int _i; |
1003 | 0 | #if 1 /* anything that can fail? */ |
1004 | 0 | unsigned _fail = 0, _failcnt = 0; |
1005 | 0 | #endif |
1006 | 0 | const char *vrf = NULL; |
1007 | 0 | struct in_addr s_or_g = { INADDR_ANY }; |
1008 | 0 | const char *s_or_g_str = NULL; |
1009 | 0 | struct in_addr g = { INADDR_ANY }; |
1010 | 0 | const char *g_str = NULL; |
1011 | 0 | const char *json = NULL; |
1012 | |
|
1013 | 0 | for (_i = 0; _i < argc; _i++) { |
1014 | 0 | if (!argv[_i]->varname) |
1015 | 0 | continue; |
1016 | 0 | #if 1 /* anything that can fail? */ |
1017 | 0 | _fail = 0; |
1018 | 0 | #endif |
1019 | |
|
1020 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1021 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1022 | 0 | } |
1023 | 0 | if (!strcmp(argv[_i]->varname, "s_or_g")) { |
1024 | 0 | s_or_g_str = argv[_i]->arg; |
1025 | 0 | _fail = !inet_aton(argv[_i]->arg, &s_or_g); |
1026 | 0 | } |
1027 | 0 | if (!strcmp(argv[_i]->varname, "g")) { |
1028 | 0 | g_str = argv[_i]->arg; |
1029 | 0 | _fail = !inet_aton(argv[_i]->arg, &g); |
1030 | 0 | } |
1031 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1032 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1033 | 0 | } |
1034 | 0 | #if 1 /* anything that can fail? */ |
1035 | 0 | if (_fail) |
1036 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
1037 | 0 | argv[_i]->varname, argv[_i]->arg); |
1038 | 0 | _failcnt += _fail; |
1039 | 0 | #endif |
1040 | 0 | } |
1041 | 0 | #if 1 /* anything that can fail? */ |
1042 | 0 | if (_failcnt) |
1043 | 0 | return CMD_WARNING; |
1044 | 0 | #endif |
1045 | 0 | #endif |
1046 | | |
1047 | 0 | return show_ip_pim_upstream_magic(self, vty, argc, argv, vrf, s_or_g, s_or_g_str, g, g_str, json); |
1048 | 0 | } |
1049 | | |
1050 | | /* show_ip_pim_upstream_vrf_all => "show ip pim vrf all upstream [json$json]" */ |
1051 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_upstream_vrf_all) |
1052 | | #define funcdecl_show_ip_pim_upstream_vrf_all static int show_ip_pim_upstream_vrf_all_magic(\ |
1053 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1054 | | struct vty *vty __attribute__ ((unused)),\ |
1055 | | int argc __attribute__ ((unused)),\ |
1056 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1057 | | const char * json) |
1058 | | funcdecl_show_ip_pim_upstream_vrf_all; |
1059 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_upstream_vrf_all) |
1060 | 0 | { |
1061 | 0 | #if 1 /* anything to parse? */ |
1062 | 0 | int _i; |
1063 | | #if 0 /* anything that can fail? */ |
1064 | | unsigned _fail = 0, _failcnt = 0; |
1065 | | #endif |
1066 | 0 | const char *json = NULL; |
1067 | |
|
1068 | 0 | for (_i = 0; _i < argc; _i++) { |
1069 | 0 | if (!argv[_i]->varname) |
1070 | 0 | continue; |
1071 | | #if 0 /* anything that can fail? */ |
1072 | | _fail = 0; |
1073 | | #endif |
1074 | | |
1075 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1076 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1077 | 0 | } |
1078 | | #if 0 /* anything that can fail? */ |
1079 | | if (_fail) |
1080 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1081 | | argv[_i]->varname, argv[_i]->arg); |
1082 | | _failcnt += _fail; |
1083 | | #endif |
1084 | 0 | } |
1085 | | #if 0 /* anything that can fail? */ |
1086 | | if (_failcnt) |
1087 | | return CMD_WARNING; |
1088 | | #endif |
1089 | 0 | #endif |
1090 | |
|
1091 | 0 | return show_ip_pim_upstream_vrf_all_magic(self, vty, argc, argv, json); |
1092 | 0 | } |
1093 | | |
1094 | | /* show_ip_pim_channel => "show ip pim [vrf NAME] channel [json$json]" */ |
1095 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_channel) |
1096 | | #define funcdecl_show_ip_pim_channel static int show_ip_pim_channel_magic(\ |
1097 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1098 | | struct vty *vty __attribute__ ((unused)),\ |
1099 | | int argc __attribute__ ((unused)),\ |
1100 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1101 | | const char * vrf,\ |
1102 | | const char * json) |
1103 | | funcdecl_show_ip_pim_channel; |
1104 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_channel) |
1105 | 0 | { |
1106 | 0 | #if 2 /* anything to parse? */ |
1107 | 0 | int _i; |
1108 | | #if 0 /* anything that can fail? */ |
1109 | | unsigned _fail = 0, _failcnt = 0; |
1110 | | #endif |
1111 | 0 | const char *vrf = NULL; |
1112 | 0 | const char *json = NULL; |
1113 | |
|
1114 | 0 | for (_i = 0; _i < argc; _i++) { |
1115 | 0 | if (!argv[_i]->varname) |
1116 | 0 | continue; |
1117 | | #if 0 /* anything that can fail? */ |
1118 | | _fail = 0; |
1119 | | #endif |
1120 | | |
1121 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1122 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1123 | 0 | } |
1124 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1125 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1126 | 0 | } |
1127 | | #if 0 /* anything that can fail? */ |
1128 | | if (_fail) |
1129 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1130 | | argv[_i]->varname, argv[_i]->arg); |
1131 | | _failcnt += _fail; |
1132 | | #endif |
1133 | 0 | } |
1134 | | #if 0 /* anything that can fail? */ |
1135 | | if (_failcnt) |
1136 | | return CMD_WARNING; |
1137 | | #endif |
1138 | 0 | #endif |
1139 | |
|
1140 | 0 | return show_ip_pim_channel_magic(self, vty, argc, argv, vrf, json); |
1141 | 0 | } |
1142 | | |
1143 | | /* show_ip_pim_upstream_join_desired => "show ip pim [vrf NAME] upstream-join-desired [json$json]" */ |
1144 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_upstream_join_desired) |
1145 | | #define funcdecl_show_ip_pim_upstream_join_desired static int show_ip_pim_upstream_join_desired_magic(\ |
1146 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1147 | | struct vty *vty __attribute__ ((unused)),\ |
1148 | | int argc __attribute__ ((unused)),\ |
1149 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1150 | | const char * vrf,\ |
1151 | | const char * json) |
1152 | | funcdecl_show_ip_pim_upstream_join_desired; |
1153 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_upstream_join_desired) |
1154 | 0 | { |
1155 | 0 | #if 2 /* anything to parse? */ |
1156 | 0 | int _i; |
1157 | | #if 0 /* anything that can fail? */ |
1158 | | unsigned _fail = 0, _failcnt = 0; |
1159 | | #endif |
1160 | 0 | const char *vrf = NULL; |
1161 | 0 | const char *json = NULL; |
1162 | |
|
1163 | 0 | for (_i = 0; _i < argc; _i++) { |
1164 | 0 | if (!argv[_i]->varname) |
1165 | 0 | continue; |
1166 | | #if 0 /* anything that can fail? */ |
1167 | | _fail = 0; |
1168 | | #endif |
1169 | | |
1170 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1171 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1172 | 0 | } |
1173 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1174 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1175 | 0 | } |
1176 | | #if 0 /* anything that can fail? */ |
1177 | | if (_fail) |
1178 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1179 | | argv[_i]->varname, argv[_i]->arg); |
1180 | | _failcnt += _fail; |
1181 | | #endif |
1182 | 0 | } |
1183 | | #if 0 /* anything that can fail? */ |
1184 | | if (_failcnt) |
1185 | | return CMD_WARNING; |
1186 | | #endif |
1187 | 0 | #endif |
1188 | |
|
1189 | 0 | return show_ip_pim_upstream_join_desired_magic(self, vty, argc, argv, vrf, json); |
1190 | 0 | } |
1191 | | |
1192 | | /* show_ip_pim_upstream_rpf => "show ip pim [vrf NAME] upstream-rpf [json$json]" */ |
1193 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_upstream_rpf) |
1194 | | #define funcdecl_show_ip_pim_upstream_rpf static int show_ip_pim_upstream_rpf_magic(\ |
1195 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1196 | | struct vty *vty __attribute__ ((unused)),\ |
1197 | | int argc __attribute__ ((unused)),\ |
1198 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1199 | | const char * vrf,\ |
1200 | | const char * json) |
1201 | | funcdecl_show_ip_pim_upstream_rpf; |
1202 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_upstream_rpf) |
1203 | 0 | { |
1204 | 0 | #if 2 /* anything to parse? */ |
1205 | 0 | int _i; |
1206 | | #if 0 /* anything that can fail? */ |
1207 | | unsigned _fail = 0, _failcnt = 0; |
1208 | | #endif |
1209 | 0 | const char *vrf = NULL; |
1210 | 0 | const char *json = NULL; |
1211 | |
|
1212 | 0 | for (_i = 0; _i < argc; _i++) { |
1213 | 0 | if (!argv[_i]->varname) |
1214 | 0 | continue; |
1215 | | #if 0 /* anything that can fail? */ |
1216 | | _fail = 0; |
1217 | | #endif |
1218 | | |
1219 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1220 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1221 | 0 | } |
1222 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1223 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1224 | 0 | } |
1225 | | #if 0 /* anything that can fail? */ |
1226 | | if (_fail) |
1227 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1228 | | argv[_i]->varname, argv[_i]->arg); |
1229 | | _failcnt += _fail; |
1230 | | #endif |
1231 | 0 | } |
1232 | | #if 0 /* anything that can fail? */ |
1233 | | if (_failcnt) |
1234 | | return CMD_WARNING; |
1235 | | #endif |
1236 | 0 | #endif |
1237 | |
|
1238 | 0 | return show_ip_pim_upstream_rpf_magic(self, vty, argc, argv, vrf, json); |
1239 | 0 | } |
1240 | | |
1241 | | /* show_ip_pim_rp => "show ip pim [vrf NAME] rp-info [A.B.C.D/M$group] [json$json]" */ |
1242 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_rp) |
1243 | | #define funcdecl_show_ip_pim_rp static int show_ip_pim_rp_magic(\ |
1244 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1245 | | struct vty *vty __attribute__ ((unused)),\ |
1246 | | int argc __attribute__ ((unused)),\ |
1247 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1248 | | const char * vrf,\ |
1249 | | const struct prefix_ipv4 * group,\ |
1250 | | const char * group_str __attribute__ ((unused)),\ |
1251 | | const char * json) |
1252 | | funcdecl_show_ip_pim_rp; |
1253 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_rp) |
1254 | 0 | { |
1255 | 0 | #if 3 /* anything to parse? */ |
1256 | 0 | int _i; |
1257 | 0 | #if 1 /* anything that can fail? */ |
1258 | 0 | unsigned _fail = 0, _failcnt = 0; |
1259 | 0 | #endif |
1260 | 0 | const char *vrf = NULL; |
1261 | 0 | struct prefix_ipv4 group = { }; |
1262 | 0 | const char *group_str = NULL; |
1263 | 0 | const char *json = NULL; |
1264 | |
|
1265 | 0 | for (_i = 0; _i < argc; _i++) { |
1266 | 0 | if (!argv[_i]->varname) |
1267 | 0 | continue; |
1268 | 0 | #if 1 /* anything that can fail? */ |
1269 | 0 | _fail = 0; |
1270 | 0 | #endif |
1271 | |
|
1272 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1273 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1274 | 0 | } |
1275 | 0 | if (!strcmp(argv[_i]->varname, "group")) { |
1276 | 0 | group_str = argv[_i]->arg; |
1277 | 0 | _fail = !str2prefix_ipv4(argv[_i]->arg, &group); |
1278 | 0 | } |
1279 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1280 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1281 | 0 | } |
1282 | 0 | #if 1 /* anything that can fail? */ |
1283 | 0 | if (_fail) |
1284 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
1285 | 0 | argv[_i]->varname, argv[_i]->arg); |
1286 | 0 | _failcnt += _fail; |
1287 | 0 | #endif |
1288 | 0 | } |
1289 | 0 | #if 1 /* anything that can fail? */ |
1290 | 0 | if (_failcnt) |
1291 | 0 | return CMD_WARNING; |
1292 | 0 | #endif |
1293 | 0 | #endif |
1294 | | |
1295 | 0 | return show_ip_pim_rp_magic(self, vty, argc, argv, vrf, &group, group_str, json); |
1296 | 0 | } |
1297 | | |
1298 | | /* show_ip_pim_rp_vrf_all => "show ip pim vrf all rp-info [A.B.C.D/M$group] [json$json]" */ |
1299 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_rp_vrf_all) |
1300 | | #define funcdecl_show_ip_pim_rp_vrf_all static int show_ip_pim_rp_vrf_all_magic(\ |
1301 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1302 | | struct vty *vty __attribute__ ((unused)),\ |
1303 | | int argc __attribute__ ((unused)),\ |
1304 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1305 | | const struct prefix_ipv4 * group,\ |
1306 | | const char * group_str __attribute__ ((unused)),\ |
1307 | | const char * json) |
1308 | | funcdecl_show_ip_pim_rp_vrf_all; |
1309 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_rp_vrf_all) |
1310 | 0 | { |
1311 | 0 | #if 2 /* anything to parse? */ |
1312 | 0 | int _i; |
1313 | 0 | #if 1 /* anything that can fail? */ |
1314 | 0 | unsigned _fail = 0, _failcnt = 0; |
1315 | 0 | #endif |
1316 | 0 | struct prefix_ipv4 group = { }; |
1317 | 0 | const char *group_str = NULL; |
1318 | 0 | const char *json = NULL; |
1319 | |
|
1320 | 0 | for (_i = 0; _i < argc; _i++) { |
1321 | 0 | if (!argv[_i]->varname) |
1322 | 0 | continue; |
1323 | 0 | #if 1 /* anything that can fail? */ |
1324 | 0 | _fail = 0; |
1325 | 0 | #endif |
1326 | |
|
1327 | 0 | if (!strcmp(argv[_i]->varname, "group")) { |
1328 | 0 | group_str = argv[_i]->arg; |
1329 | 0 | _fail = !str2prefix_ipv4(argv[_i]->arg, &group); |
1330 | 0 | } |
1331 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1332 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1333 | 0 | } |
1334 | 0 | #if 1 /* anything that can fail? */ |
1335 | 0 | if (_fail) |
1336 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
1337 | 0 | argv[_i]->varname, argv[_i]->arg); |
1338 | 0 | _failcnt += _fail; |
1339 | 0 | #endif |
1340 | 0 | } |
1341 | 0 | #if 1 /* anything that can fail? */ |
1342 | 0 | if (_failcnt) |
1343 | 0 | return CMD_WARNING; |
1344 | 0 | #endif |
1345 | 0 | #endif |
1346 | | |
1347 | 0 | return show_ip_pim_rp_vrf_all_magic(self, vty, argc, argv, &group, group_str, json); |
1348 | 0 | } |
1349 | | |
1350 | | /* show_ip_pim_rpf => "show ip pim [vrf NAME] rpf [json$json]" */ |
1351 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_rpf) |
1352 | | #define funcdecl_show_ip_pim_rpf static int show_ip_pim_rpf_magic(\ |
1353 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1354 | | struct vty *vty __attribute__ ((unused)),\ |
1355 | | int argc __attribute__ ((unused)),\ |
1356 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1357 | | const char * vrf,\ |
1358 | | const char * json) |
1359 | | funcdecl_show_ip_pim_rpf; |
1360 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_rpf) |
1361 | 0 | { |
1362 | 0 | #if 2 /* anything to parse? */ |
1363 | 0 | int _i; |
1364 | | #if 0 /* anything that can fail? */ |
1365 | | unsigned _fail = 0, _failcnt = 0; |
1366 | | #endif |
1367 | 0 | const char *vrf = NULL; |
1368 | 0 | const char *json = NULL; |
1369 | |
|
1370 | 0 | for (_i = 0; _i < argc; _i++) { |
1371 | 0 | if (!argv[_i]->varname) |
1372 | 0 | continue; |
1373 | | #if 0 /* anything that can fail? */ |
1374 | | _fail = 0; |
1375 | | #endif |
1376 | | |
1377 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1378 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1379 | 0 | } |
1380 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1381 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1382 | 0 | } |
1383 | | #if 0 /* anything that can fail? */ |
1384 | | if (_fail) |
1385 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1386 | | argv[_i]->varname, argv[_i]->arg); |
1387 | | _failcnt += _fail; |
1388 | | #endif |
1389 | 0 | } |
1390 | | #if 0 /* anything that can fail? */ |
1391 | | if (_failcnt) |
1392 | | return CMD_WARNING; |
1393 | | #endif |
1394 | 0 | #endif |
1395 | |
|
1396 | 0 | return show_ip_pim_rpf_magic(self, vty, argc, argv, vrf, json); |
1397 | 0 | } |
1398 | | |
1399 | | /* show_ip_pim_rpf_vrf_all => "show ip pim vrf all rpf [json$json]" */ |
1400 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_rpf_vrf_all) |
1401 | | #define funcdecl_show_ip_pim_rpf_vrf_all static int show_ip_pim_rpf_vrf_all_magic(\ |
1402 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1403 | | struct vty *vty __attribute__ ((unused)),\ |
1404 | | int argc __attribute__ ((unused)),\ |
1405 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1406 | | const char * json) |
1407 | | funcdecl_show_ip_pim_rpf_vrf_all; |
1408 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_rpf_vrf_all) |
1409 | 0 | { |
1410 | 0 | #if 1 /* anything to parse? */ |
1411 | 0 | int _i; |
1412 | | #if 0 /* anything that can fail? */ |
1413 | | unsigned _fail = 0, _failcnt = 0; |
1414 | | #endif |
1415 | 0 | const char *json = NULL; |
1416 | |
|
1417 | 0 | for (_i = 0; _i < argc; _i++) { |
1418 | 0 | if (!argv[_i]->varname) |
1419 | 0 | continue; |
1420 | | #if 0 /* anything that can fail? */ |
1421 | | _fail = 0; |
1422 | | #endif |
1423 | | |
1424 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1425 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1426 | 0 | } |
1427 | | #if 0 /* anything that can fail? */ |
1428 | | if (_fail) |
1429 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1430 | | argv[_i]->varname, argv[_i]->arg); |
1431 | | _failcnt += _fail; |
1432 | | #endif |
1433 | 0 | } |
1434 | | #if 0 /* anything that can fail? */ |
1435 | | if (_failcnt) |
1436 | | return CMD_WARNING; |
1437 | | #endif |
1438 | 0 | #endif |
1439 | |
|
1440 | 0 | return show_ip_pim_rpf_vrf_all_magic(self, vty, argc, argv, json); |
1441 | 0 | } |
1442 | | |
1443 | | /* show_ip_pim_nexthop => "show ip pim [vrf NAME] nexthop [json$json]" */ |
1444 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_nexthop) |
1445 | | #define funcdecl_show_ip_pim_nexthop static int show_ip_pim_nexthop_magic(\ |
1446 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1447 | | struct vty *vty __attribute__ ((unused)),\ |
1448 | | int argc __attribute__ ((unused)),\ |
1449 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1450 | | const char * vrf,\ |
1451 | | const char * json) |
1452 | | funcdecl_show_ip_pim_nexthop; |
1453 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_nexthop) |
1454 | 0 | { |
1455 | 0 | #if 2 /* anything to parse? */ |
1456 | 0 | int _i; |
1457 | | #if 0 /* anything that can fail? */ |
1458 | | unsigned _fail = 0, _failcnt = 0; |
1459 | | #endif |
1460 | 0 | const char *vrf = NULL; |
1461 | 0 | const char *json = NULL; |
1462 | |
|
1463 | 0 | for (_i = 0; _i < argc; _i++) { |
1464 | 0 | if (!argv[_i]->varname) |
1465 | 0 | continue; |
1466 | | #if 0 /* anything that can fail? */ |
1467 | | _fail = 0; |
1468 | | #endif |
1469 | | |
1470 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1471 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1472 | 0 | } |
1473 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1474 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1475 | 0 | } |
1476 | | #if 0 /* anything that can fail? */ |
1477 | | if (_fail) |
1478 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1479 | | argv[_i]->varname, argv[_i]->arg); |
1480 | | _failcnt += _fail; |
1481 | | #endif |
1482 | 0 | } |
1483 | | #if 0 /* anything that can fail? */ |
1484 | | if (_failcnt) |
1485 | | return CMD_WARNING; |
1486 | | #endif |
1487 | 0 | #endif |
1488 | |
|
1489 | 0 | return show_ip_pim_nexthop_magic(self, vty, argc, argv, vrf, json); |
1490 | 0 | } |
1491 | | |
1492 | | /* show_ip_pim_nexthop_lookup => "show ip pim [vrf NAME] nexthop-lookup A.B.C.D$source A.B.C.D$group" */ |
1493 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_nexthop_lookup) |
1494 | | #define funcdecl_show_ip_pim_nexthop_lookup static int show_ip_pim_nexthop_lookup_magic(\ |
1495 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1496 | | struct vty *vty __attribute__ ((unused)),\ |
1497 | | int argc __attribute__ ((unused)),\ |
1498 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1499 | | const char * vrf,\ |
1500 | | struct in_addr source,\ |
1501 | | const char * source_str __attribute__ ((unused)),\ |
1502 | | struct in_addr group,\ |
1503 | | const char * group_str __attribute__ ((unused))) |
1504 | | funcdecl_show_ip_pim_nexthop_lookup; |
1505 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_nexthop_lookup) |
1506 | 0 | { |
1507 | 0 | #if 3 /* anything to parse? */ |
1508 | 0 | int _i; |
1509 | 0 | #if 1 /* anything that can fail? */ |
1510 | 0 | unsigned _fail = 0, _failcnt = 0; |
1511 | 0 | #endif |
1512 | 0 | const char *vrf = NULL; |
1513 | 0 | struct in_addr source = { INADDR_ANY }; |
1514 | 0 | const char *source_str = NULL; |
1515 | 0 | struct in_addr group = { INADDR_ANY }; |
1516 | 0 | const char *group_str = NULL; |
1517 | |
|
1518 | 0 | for (_i = 0; _i < argc; _i++) { |
1519 | 0 | if (!argv[_i]->varname) |
1520 | 0 | continue; |
1521 | 0 | #if 1 /* anything that can fail? */ |
1522 | 0 | _fail = 0; |
1523 | 0 | #endif |
1524 | |
|
1525 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1526 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1527 | 0 | } |
1528 | 0 | if (!strcmp(argv[_i]->varname, "source")) { |
1529 | 0 | source_str = argv[_i]->arg; |
1530 | 0 | _fail = !inet_aton(argv[_i]->arg, &source); |
1531 | 0 | } |
1532 | 0 | if (!strcmp(argv[_i]->varname, "group")) { |
1533 | 0 | group_str = argv[_i]->arg; |
1534 | 0 | _fail = !inet_aton(argv[_i]->arg, &group); |
1535 | 0 | } |
1536 | 0 | #if 1 /* anything that can fail? */ |
1537 | 0 | if (_fail) |
1538 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
1539 | 0 | argv[_i]->varname, argv[_i]->arg); |
1540 | 0 | _failcnt += _fail; |
1541 | 0 | #endif |
1542 | 0 | } |
1543 | 0 | #if 1 /* anything that can fail? */ |
1544 | 0 | if (_failcnt) |
1545 | 0 | return CMD_WARNING; |
1546 | 0 | #endif |
1547 | 0 | #endif |
1548 | 0 | if (!source_str) { |
1549 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "source_str"); |
1550 | 0 | return CMD_WARNING; |
1551 | 0 | } |
1552 | 0 | if (!group_str) { |
1553 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "group_str"); |
1554 | 0 | return CMD_WARNING; |
1555 | 0 | } |
1556 | | |
1557 | 0 | return show_ip_pim_nexthop_lookup_magic(self, vty, argc, argv, vrf, source, source_str, group, group_str); |
1558 | 0 | } |
1559 | | |
1560 | | /* show_ip_pim_interface_traffic => "show ip pim [vrf NAME] interface traffic [WORD$if_name] [json$json]" */ |
1561 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_interface_traffic) |
1562 | | #define funcdecl_show_ip_pim_interface_traffic static int show_ip_pim_interface_traffic_magic(\ |
1563 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1564 | | struct vty *vty __attribute__ ((unused)),\ |
1565 | | int argc __attribute__ ((unused)),\ |
1566 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1567 | | const char * vrf,\ |
1568 | | const char * if_name,\ |
1569 | | const char * json) |
1570 | | funcdecl_show_ip_pim_interface_traffic; |
1571 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_interface_traffic) |
1572 | 0 | { |
1573 | 0 | #if 3 /* anything to parse? */ |
1574 | 0 | int _i; |
1575 | | #if 0 /* anything that can fail? */ |
1576 | | unsigned _fail = 0, _failcnt = 0; |
1577 | | #endif |
1578 | 0 | const char *vrf = NULL; |
1579 | 0 | const char *if_name = NULL; |
1580 | 0 | const char *json = NULL; |
1581 | |
|
1582 | 0 | for (_i = 0; _i < argc; _i++) { |
1583 | 0 | if (!argv[_i]->varname) |
1584 | 0 | continue; |
1585 | | #if 0 /* anything that can fail? */ |
1586 | | _fail = 0; |
1587 | | #endif |
1588 | | |
1589 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1590 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1591 | 0 | } |
1592 | 0 | if (!strcmp(argv[_i]->varname, "if_name")) { |
1593 | 0 | if_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1594 | 0 | } |
1595 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1596 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1597 | 0 | } |
1598 | | #if 0 /* anything that can fail? */ |
1599 | | if (_fail) |
1600 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1601 | | argv[_i]->varname, argv[_i]->arg); |
1602 | | _failcnt += _fail; |
1603 | | #endif |
1604 | 0 | } |
1605 | | #if 0 /* anything that can fail? */ |
1606 | | if (_failcnt) |
1607 | | return CMD_WARNING; |
1608 | | #endif |
1609 | 0 | #endif |
1610 | |
|
1611 | 0 | return show_ip_pim_interface_traffic_magic(self, vty, argc, argv, vrf, if_name, json); |
1612 | 0 | } |
1613 | | |
1614 | | /* show_ip_pim_bsm_db => "show ip pim bsm-database [vrf NAME] [json$json]" */ |
1615 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_bsm_db) |
1616 | | #define funcdecl_show_ip_pim_bsm_db static int show_ip_pim_bsm_db_magic(\ |
1617 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1618 | | struct vty *vty __attribute__ ((unused)),\ |
1619 | | int argc __attribute__ ((unused)),\ |
1620 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1621 | | const char * vrf,\ |
1622 | | const char * json) |
1623 | | funcdecl_show_ip_pim_bsm_db; |
1624 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_bsm_db) |
1625 | 0 | { |
1626 | 0 | #if 2 /* anything to parse? */ |
1627 | 0 | int _i; |
1628 | | #if 0 /* anything that can fail? */ |
1629 | | unsigned _fail = 0, _failcnt = 0; |
1630 | | #endif |
1631 | 0 | const char *vrf = NULL; |
1632 | 0 | const char *json = NULL; |
1633 | |
|
1634 | 0 | for (_i = 0; _i < argc; _i++) { |
1635 | 0 | if (!argv[_i]->varname) |
1636 | 0 | continue; |
1637 | | #if 0 /* anything that can fail? */ |
1638 | | _fail = 0; |
1639 | | #endif |
1640 | | |
1641 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1642 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1643 | 0 | } |
1644 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1645 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1646 | 0 | } |
1647 | | #if 0 /* anything that can fail? */ |
1648 | | if (_fail) |
1649 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1650 | | argv[_i]->varname, argv[_i]->arg); |
1651 | | _failcnt += _fail; |
1652 | | #endif |
1653 | 0 | } |
1654 | | #if 0 /* anything that can fail? */ |
1655 | | if (_failcnt) |
1656 | | return CMD_WARNING; |
1657 | | #endif |
1658 | 0 | #endif |
1659 | |
|
1660 | 0 | return show_ip_pim_bsm_db_magic(self, vty, argc, argv, vrf, json); |
1661 | 0 | } |
1662 | | |
1663 | | /* show_ip_pim_bsrp => "show ip pim bsrp-info [vrf NAME] [json$json]" */ |
1664 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_bsrp) |
1665 | | #define funcdecl_show_ip_pim_bsrp static int show_ip_pim_bsrp_magic(\ |
1666 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1667 | | struct vty *vty __attribute__ ((unused)),\ |
1668 | | int argc __attribute__ ((unused)),\ |
1669 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1670 | | const char * vrf,\ |
1671 | | const char * json) |
1672 | | funcdecl_show_ip_pim_bsrp; |
1673 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_bsrp) |
1674 | 0 | { |
1675 | 0 | #if 2 /* anything to parse? */ |
1676 | 0 | int _i; |
1677 | | #if 0 /* anything that can fail? */ |
1678 | | unsigned _fail = 0, _failcnt = 0; |
1679 | | #endif |
1680 | 0 | const char *vrf = NULL; |
1681 | 0 | const char *json = NULL; |
1682 | |
|
1683 | 0 | for (_i = 0; _i < argc; _i++) { |
1684 | 0 | if (!argv[_i]->varname) |
1685 | 0 | continue; |
1686 | | #if 0 /* anything that can fail? */ |
1687 | | _fail = 0; |
1688 | | #endif |
1689 | | |
1690 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1691 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1692 | 0 | } |
1693 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1694 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1695 | 0 | } |
1696 | | #if 0 /* anything that can fail? */ |
1697 | | if (_fail) |
1698 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1699 | | argv[_i]->varname, argv[_i]->arg); |
1700 | | _failcnt += _fail; |
1701 | | #endif |
1702 | 0 | } |
1703 | | #if 0 /* anything that can fail? */ |
1704 | | if (_failcnt) |
1705 | | return CMD_WARNING; |
1706 | | #endif |
1707 | 0 | #endif |
1708 | |
|
1709 | 0 | return show_ip_pim_bsrp_magic(self, vty, argc, argv, vrf, json); |
1710 | 0 | } |
1711 | | |
1712 | | /* show_ip_pim_statistics => "show ip pim [vrf NAME] statistics [interface WORD$word] [json$json]" */ |
1713 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_statistics) |
1714 | | #define funcdecl_show_ip_pim_statistics static int show_ip_pim_statistics_magic(\ |
1715 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1716 | | struct vty *vty __attribute__ ((unused)),\ |
1717 | | int argc __attribute__ ((unused)),\ |
1718 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1719 | | const char * vrf,\ |
1720 | | const char * word,\ |
1721 | | const char * json) |
1722 | | funcdecl_show_ip_pim_statistics; |
1723 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_statistics) |
1724 | 0 | { |
1725 | 0 | #if 3 /* anything to parse? */ |
1726 | 0 | int _i; |
1727 | | #if 0 /* anything that can fail? */ |
1728 | | unsigned _fail = 0, _failcnt = 0; |
1729 | | #endif |
1730 | 0 | const char *vrf = NULL; |
1731 | 0 | const char *word = NULL; |
1732 | 0 | const char *json = NULL; |
1733 | |
|
1734 | 0 | for (_i = 0; _i < argc; _i++) { |
1735 | 0 | if (!argv[_i]->varname) |
1736 | 0 | continue; |
1737 | | #if 0 /* anything that can fail? */ |
1738 | | _fail = 0; |
1739 | | #endif |
1740 | | |
1741 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1742 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1743 | 0 | } |
1744 | 0 | if (!strcmp(argv[_i]->varname, "word")) { |
1745 | 0 | word = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1746 | 0 | } |
1747 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1748 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1749 | 0 | } |
1750 | | #if 0 /* anything that can fail? */ |
1751 | | if (_fail) |
1752 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1753 | | argv[_i]->varname, argv[_i]->arg); |
1754 | | _failcnt += _fail; |
1755 | | #endif |
1756 | 0 | } |
1757 | | #if 0 /* anything that can fail? */ |
1758 | | if (_failcnt) |
1759 | | return CMD_WARNING; |
1760 | | #endif |
1761 | 0 | #endif |
1762 | |
|
1763 | 0 | return show_ip_pim_statistics_magic(self, vty, argc, argv, vrf, word, json); |
1764 | 0 | } |
1765 | | |
1766 | | /* show_ip_multicast => "show ip multicast [vrf NAME]" */ |
1767 | | DEFUN_CMD_FUNC_DECL(show_ip_multicast) |
1768 | | #define funcdecl_show_ip_multicast static int show_ip_multicast_magic(\ |
1769 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1770 | | struct vty *vty __attribute__ ((unused)),\ |
1771 | | int argc __attribute__ ((unused)),\ |
1772 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1773 | | const char * vrf) |
1774 | | funcdecl_show_ip_multicast; |
1775 | | DEFUN_CMD_FUNC_TEXT(show_ip_multicast) |
1776 | 0 | { |
1777 | 0 | #if 1 /* anything to parse? */ |
1778 | 0 | int _i; |
1779 | | #if 0 /* anything that can fail? */ |
1780 | | unsigned _fail = 0, _failcnt = 0; |
1781 | | #endif |
1782 | 0 | const char *vrf = NULL; |
1783 | |
|
1784 | 0 | for (_i = 0; _i < argc; _i++) { |
1785 | 0 | if (!argv[_i]->varname) |
1786 | 0 | continue; |
1787 | | #if 0 /* anything that can fail? */ |
1788 | | _fail = 0; |
1789 | | #endif |
1790 | | |
1791 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1792 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1793 | 0 | } |
1794 | | #if 0 /* anything that can fail? */ |
1795 | | if (_fail) |
1796 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1797 | | argv[_i]->varname, argv[_i]->arg); |
1798 | | _failcnt += _fail; |
1799 | | #endif |
1800 | 0 | } |
1801 | | #if 0 /* anything that can fail? */ |
1802 | | if (_failcnt) |
1803 | | return CMD_WARNING; |
1804 | | #endif |
1805 | 0 | #endif |
1806 | |
|
1807 | 0 | return show_ip_multicast_magic(self, vty, argc, argv, vrf); |
1808 | 0 | } |
1809 | | |
1810 | | /* show_ip_multicast_vrf_all => "show ip multicast vrf all" */ |
1811 | | DEFUN_CMD_FUNC_DECL(show_ip_multicast_vrf_all) |
1812 | | #define funcdecl_show_ip_multicast_vrf_all static int show_ip_multicast_vrf_all_magic(\ |
1813 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1814 | | struct vty *vty __attribute__ ((unused)),\ |
1815 | | int argc __attribute__ ((unused)),\ |
1816 | | struct cmd_token *argv[] __attribute__ ((unused))) |
1817 | | funcdecl_show_ip_multicast_vrf_all; |
1818 | | DEFUN_CMD_FUNC_TEXT(show_ip_multicast_vrf_all) |
1819 | 0 | { |
1820 | | #if 0 /* anything to parse? */ |
1821 | | int _i; |
1822 | | #if 0 /* anything that can fail? */ |
1823 | | unsigned _fail = 0, _failcnt = 0; |
1824 | | #endif |
1825 | | |
1826 | | for (_i = 0; _i < argc; _i++) { |
1827 | | if (!argv[_i]->varname) |
1828 | | continue; |
1829 | | #if 0 /* anything that can fail? */ |
1830 | | _fail = 0; |
1831 | | #endif |
1832 | | |
1833 | | #if 0 /* anything that can fail? */ |
1834 | | if (_fail) |
1835 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1836 | | argv[_i]->varname, argv[_i]->arg); |
1837 | | _failcnt += _fail; |
1838 | | #endif |
1839 | | } |
1840 | | #if 0 /* anything that can fail? */ |
1841 | | if (_failcnt) |
1842 | | return CMD_WARNING; |
1843 | | #endif |
1844 | | #endif |
1845 | |
|
1846 | 0 | return show_ip_multicast_vrf_all_magic(self, vty, argc, argv); |
1847 | 0 | } |
1848 | | |
1849 | | /* show_ip_multicast_count => "show ip multicast count [vrf NAME] [json$json]" */ |
1850 | | DEFUN_CMD_FUNC_DECL(show_ip_multicast_count) |
1851 | | #define funcdecl_show_ip_multicast_count static int show_ip_multicast_count_magic(\ |
1852 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1853 | | struct vty *vty __attribute__ ((unused)),\ |
1854 | | int argc __attribute__ ((unused)),\ |
1855 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1856 | | const char * vrf,\ |
1857 | | const char * json) |
1858 | | funcdecl_show_ip_multicast_count; |
1859 | | DEFUN_CMD_FUNC_TEXT(show_ip_multicast_count) |
1860 | 0 | { |
1861 | 0 | #if 2 /* anything to parse? */ |
1862 | 0 | int _i; |
1863 | | #if 0 /* anything that can fail? */ |
1864 | | unsigned _fail = 0, _failcnt = 0; |
1865 | | #endif |
1866 | 0 | const char *vrf = NULL; |
1867 | 0 | const char *json = NULL; |
1868 | |
|
1869 | 0 | for (_i = 0; _i < argc; _i++) { |
1870 | 0 | if (!argv[_i]->varname) |
1871 | 0 | continue; |
1872 | | #if 0 /* anything that can fail? */ |
1873 | | _fail = 0; |
1874 | | #endif |
1875 | | |
1876 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1877 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1878 | 0 | } |
1879 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1880 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1881 | 0 | } |
1882 | | #if 0 /* anything that can fail? */ |
1883 | | if (_fail) |
1884 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1885 | | argv[_i]->varname, argv[_i]->arg); |
1886 | | _failcnt += _fail; |
1887 | | #endif |
1888 | 0 | } |
1889 | | #if 0 /* anything that can fail? */ |
1890 | | if (_failcnt) |
1891 | | return CMD_WARNING; |
1892 | | #endif |
1893 | 0 | #endif |
1894 | |
|
1895 | 0 | return show_ip_multicast_count_magic(self, vty, argc, argv, vrf, json); |
1896 | 0 | } |
1897 | | |
1898 | | /* show_ip_multicast_count_vrf_all => "show ip multicast count vrf all [json$json]" */ |
1899 | | DEFUN_CMD_FUNC_DECL(show_ip_multicast_count_vrf_all) |
1900 | | #define funcdecl_show_ip_multicast_count_vrf_all static int show_ip_multicast_count_vrf_all_magic(\ |
1901 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1902 | | struct vty *vty __attribute__ ((unused)),\ |
1903 | | int argc __attribute__ ((unused)),\ |
1904 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1905 | | const char * json) |
1906 | | funcdecl_show_ip_multicast_count_vrf_all; |
1907 | | DEFUN_CMD_FUNC_TEXT(show_ip_multicast_count_vrf_all) |
1908 | 0 | { |
1909 | 0 | #if 1 /* anything to parse? */ |
1910 | 0 | int _i; |
1911 | | #if 0 /* anything that can fail? */ |
1912 | | unsigned _fail = 0, _failcnt = 0; |
1913 | | #endif |
1914 | 0 | const char *json = NULL; |
1915 | |
|
1916 | 0 | for (_i = 0; _i < argc; _i++) { |
1917 | 0 | if (!argv[_i]->varname) |
1918 | 0 | continue; |
1919 | | #if 0 /* anything that can fail? */ |
1920 | | _fail = 0; |
1921 | | #endif |
1922 | | |
1923 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1924 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1925 | 0 | } |
1926 | | #if 0 /* anything that can fail? */ |
1927 | | if (_fail) |
1928 | | vty_out (vty, "%% invalid input for %s: %s\n", |
1929 | | argv[_i]->varname, argv[_i]->arg); |
1930 | | _failcnt += _fail; |
1931 | | #endif |
1932 | 0 | } |
1933 | | #if 0 /* anything that can fail? */ |
1934 | | if (_failcnt) |
1935 | | return CMD_WARNING; |
1936 | | #endif |
1937 | 0 | #endif |
1938 | |
|
1939 | 0 | return show_ip_multicast_count_vrf_all_magic(self, vty, argc, argv, json); |
1940 | 0 | } |
1941 | | |
1942 | | /* show_ip_mroute => "show ip mroute [vrf NAME] [A.B.C.D$s_or_g [A.B.C.D$g]] [fill$fill] [json$json]" */ |
1943 | | DEFUN_CMD_FUNC_DECL(show_ip_mroute) |
1944 | | #define funcdecl_show_ip_mroute static int show_ip_mroute_magic(\ |
1945 | | const struct cmd_element *self __attribute__ ((unused)),\ |
1946 | | struct vty *vty __attribute__ ((unused)),\ |
1947 | | int argc __attribute__ ((unused)),\ |
1948 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
1949 | | const char * vrf,\ |
1950 | | struct in_addr s_or_g,\ |
1951 | | const char * s_or_g_str __attribute__ ((unused)),\ |
1952 | | struct in_addr g,\ |
1953 | | const char * g_str __attribute__ ((unused)),\ |
1954 | | const char * fill,\ |
1955 | | const char * json) |
1956 | | funcdecl_show_ip_mroute; |
1957 | | DEFUN_CMD_FUNC_TEXT(show_ip_mroute) |
1958 | 0 | { |
1959 | 0 | #if 5 /* anything to parse? */ |
1960 | 0 | int _i; |
1961 | 0 | #if 1 /* anything that can fail? */ |
1962 | 0 | unsigned _fail = 0, _failcnt = 0; |
1963 | 0 | #endif |
1964 | 0 | const char *vrf = NULL; |
1965 | 0 | struct in_addr s_or_g = { INADDR_ANY }; |
1966 | 0 | const char *s_or_g_str = NULL; |
1967 | 0 | struct in_addr g = { INADDR_ANY }; |
1968 | 0 | const char *g_str = NULL; |
1969 | 0 | const char *fill = NULL; |
1970 | 0 | const char *json = NULL; |
1971 | |
|
1972 | 0 | for (_i = 0; _i < argc; _i++) { |
1973 | 0 | if (!argv[_i]->varname) |
1974 | 0 | continue; |
1975 | 0 | #if 1 /* anything that can fail? */ |
1976 | 0 | _fail = 0; |
1977 | 0 | #endif |
1978 | |
|
1979 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
1980 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1981 | 0 | } |
1982 | 0 | if (!strcmp(argv[_i]->varname, "s_or_g")) { |
1983 | 0 | s_or_g_str = argv[_i]->arg; |
1984 | 0 | _fail = !inet_aton(argv[_i]->arg, &s_or_g); |
1985 | 0 | } |
1986 | 0 | if (!strcmp(argv[_i]->varname, "g")) { |
1987 | 0 | g_str = argv[_i]->arg; |
1988 | 0 | _fail = !inet_aton(argv[_i]->arg, &g); |
1989 | 0 | } |
1990 | 0 | if (!strcmp(argv[_i]->varname, "fill")) { |
1991 | 0 | fill = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1992 | 0 | } |
1993 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
1994 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
1995 | 0 | } |
1996 | 0 | #if 1 /* anything that can fail? */ |
1997 | 0 | if (_fail) |
1998 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
1999 | 0 | argv[_i]->varname, argv[_i]->arg); |
2000 | 0 | _failcnt += _fail; |
2001 | 0 | #endif |
2002 | 0 | } |
2003 | 0 | #if 1 /* anything that can fail? */ |
2004 | 0 | if (_failcnt) |
2005 | 0 | return CMD_WARNING; |
2006 | 0 | #endif |
2007 | 0 | #endif |
2008 | | |
2009 | 0 | return show_ip_mroute_magic(self, vty, argc, argv, vrf, s_or_g, s_or_g_str, g, g_str, fill, json); |
2010 | 0 | } |
2011 | | |
2012 | | /* show_ip_mroute_vrf_all => "show ip mroute vrf all [fill$fill] [json$json]" */ |
2013 | | DEFUN_CMD_FUNC_DECL(show_ip_mroute_vrf_all) |
2014 | | #define funcdecl_show_ip_mroute_vrf_all static int show_ip_mroute_vrf_all_magic(\ |
2015 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2016 | | struct vty *vty __attribute__ ((unused)),\ |
2017 | | int argc __attribute__ ((unused)),\ |
2018 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2019 | | const char * fill,\ |
2020 | | const char * json) |
2021 | | funcdecl_show_ip_mroute_vrf_all; |
2022 | | DEFUN_CMD_FUNC_TEXT(show_ip_mroute_vrf_all) |
2023 | 0 | { |
2024 | 0 | #if 2 /* anything to parse? */ |
2025 | 0 | int _i; |
2026 | | #if 0 /* anything that can fail? */ |
2027 | | unsigned _fail = 0, _failcnt = 0; |
2028 | | #endif |
2029 | 0 | const char *fill = NULL; |
2030 | 0 | const char *json = NULL; |
2031 | |
|
2032 | 0 | for (_i = 0; _i < argc; _i++) { |
2033 | 0 | if (!argv[_i]->varname) |
2034 | 0 | continue; |
2035 | | #if 0 /* anything that can fail? */ |
2036 | | _fail = 0; |
2037 | | #endif |
2038 | | |
2039 | 0 | if (!strcmp(argv[_i]->varname, "fill")) { |
2040 | 0 | fill = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2041 | 0 | } |
2042 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
2043 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2044 | 0 | } |
2045 | | #if 0 /* anything that can fail? */ |
2046 | | if (_fail) |
2047 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2048 | | argv[_i]->varname, argv[_i]->arg); |
2049 | | _failcnt += _fail; |
2050 | | #endif |
2051 | 0 | } |
2052 | | #if 0 /* anything that can fail? */ |
2053 | | if (_failcnt) |
2054 | | return CMD_WARNING; |
2055 | | #endif |
2056 | 0 | #endif |
2057 | |
|
2058 | 0 | return show_ip_mroute_vrf_all_magic(self, vty, argc, argv, fill, json); |
2059 | 0 | } |
2060 | | |
2061 | | /* clear_ip_mroute_count => "clear ip mroute [vrf NAME]$name count" */ |
2062 | | DEFUN_CMD_FUNC_DECL(clear_ip_mroute_count) |
2063 | | #define funcdecl_clear_ip_mroute_count static int clear_ip_mroute_count_magic(\ |
2064 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2065 | | struct vty *vty __attribute__ ((unused)),\ |
2066 | | int argc __attribute__ ((unused)),\ |
2067 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2068 | | const char * name) |
2069 | | funcdecl_clear_ip_mroute_count; |
2070 | | DEFUN_CMD_FUNC_TEXT(clear_ip_mroute_count) |
2071 | 0 | { |
2072 | 0 | #if 1 /* anything to parse? */ |
2073 | 0 | int _i; |
2074 | | #if 0 /* anything that can fail? */ |
2075 | | unsigned _fail = 0, _failcnt = 0; |
2076 | | #endif |
2077 | 0 | const char *name = NULL; |
2078 | |
|
2079 | 0 | for (_i = 0; _i < argc; _i++) { |
2080 | 0 | if (!argv[_i]->varname) |
2081 | 0 | continue; |
2082 | | #if 0 /* anything that can fail? */ |
2083 | | _fail = 0; |
2084 | | #endif |
2085 | | |
2086 | 0 | if (!strcmp(argv[_i]->varname, "name")) { |
2087 | 0 | name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2088 | 0 | } |
2089 | | #if 0 /* anything that can fail? */ |
2090 | | if (_fail) |
2091 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2092 | | argv[_i]->varname, argv[_i]->arg); |
2093 | | _failcnt += _fail; |
2094 | | #endif |
2095 | 0 | } |
2096 | | #if 0 /* anything that can fail? */ |
2097 | | if (_failcnt) |
2098 | | return CMD_WARNING; |
2099 | | #endif |
2100 | 0 | #endif |
2101 | |
|
2102 | 0 | return clear_ip_mroute_count_magic(self, vty, argc, argv, name); |
2103 | 0 | } |
2104 | | |
2105 | | /* show_ip_mroute_count => "show ip mroute [vrf NAME] count [json$json]" */ |
2106 | | DEFUN_CMD_FUNC_DECL(show_ip_mroute_count) |
2107 | | #define funcdecl_show_ip_mroute_count static int show_ip_mroute_count_magic(\ |
2108 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2109 | | struct vty *vty __attribute__ ((unused)),\ |
2110 | | int argc __attribute__ ((unused)),\ |
2111 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2112 | | const char * vrf,\ |
2113 | | const char * json) |
2114 | | funcdecl_show_ip_mroute_count; |
2115 | | DEFUN_CMD_FUNC_TEXT(show_ip_mroute_count) |
2116 | 0 | { |
2117 | 0 | #if 2 /* anything to parse? */ |
2118 | 0 | int _i; |
2119 | | #if 0 /* anything that can fail? */ |
2120 | | unsigned _fail = 0, _failcnt = 0; |
2121 | | #endif |
2122 | 0 | const char *vrf = NULL; |
2123 | 0 | const char *json = NULL; |
2124 | |
|
2125 | 0 | for (_i = 0; _i < argc; _i++) { |
2126 | 0 | if (!argv[_i]->varname) |
2127 | 0 | continue; |
2128 | | #if 0 /* anything that can fail? */ |
2129 | | _fail = 0; |
2130 | | #endif |
2131 | | |
2132 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
2133 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2134 | 0 | } |
2135 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
2136 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2137 | 0 | } |
2138 | | #if 0 /* anything that can fail? */ |
2139 | | if (_fail) |
2140 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2141 | | argv[_i]->varname, argv[_i]->arg); |
2142 | | _failcnt += _fail; |
2143 | | #endif |
2144 | 0 | } |
2145 | | #if 0 /* anything that can fail? */ |
2146 | | if (_failcnt) |
2147 | | return CMD_WARNING; |
2148 | | #endif |
2149 | 0 | #endif |
2150 | |
|
2151 | 0 | return show_ip_mroute_count_magic(self, vty, argc, argv, vrf, json); |
2152 | 0 | } |
2153 | | |
2154 | | /* show_ip_mroute_count_vrf_all => "show ip mroute vrf all count [json$json]" */ |
2155 | | DEFUN_CMD_FUNC_DECL(show_ip_mroute_count_vrf_all) |
2156 | | #define funcdecl_show_ip_mroute_count_vrf_all static int show_ip_mroute_count_vrf_all_magic(\ |
2157 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2158 | | struct vty *vty __attribute__ ((unused)),\ |
2159 | | int argc __attribute__ ((unused)),\ |
2160 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2161 | | const char * json) |
2162 | | funcdecl_show_ip_mroute_count_vrf_all; |
2163 | | DEFUN_CMD_FUNC_TEXT(show_ip_mroute_count_vrf_all) |
2164 | 0 | { |
2165 | 0 | #if 1 /* anything to parse? */ |
2166 | 0 | int _i; |
2167 | | #if 0 /* anything that can fail? */ |
2168 | | unsigned _fail = 0, _failcnt = 0; |
2169 | | #endif |
2170 | 0 | const char *json = NULL; |
2171 | |
|
2172 | 0 | for (_i = 0; _i < argc; _i++) { |
2173 | 0 | if (!argv[_i]->varname) |
2174 | 0 | continue; |
2175 | | #if 0 /* anything that can fail? */ |
2176 | | _fail = 0; |
2177 | | #endif |
2178 | | |
2179 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
2180 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2181 | 0 | } |
2182 | | #if 0 /* anything that can fail? */ |
2183 | | if (_fail) |
2184 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2185 | | argv[_i]->varname, argv[_i]->arg); |
2186 | | _failcnt += _fail; |
2187 | | #endif |
2188 | 0 | } |
2189 | | #if 0 /* anything that can fail? */ |
2190 | | if (_failcnt) |
2191 | | return CMD_WARNING; |
2192 | | #endif |
2193 | 0 | #endif |
2194 | |
|
2195 | 0 | return show_ip_mroute_count_vrf_all_magic(self, vty, argc, argv, json); |
2196 | 0 | } |
2197 | | |
2198 | | /* show_ip_mroute_summary => "show ip mroute [vrf NAME] summary [json$json]" */ |
2199 | | DEFUN_CMD_FUNC_DECL(show_ip_mroute_summary) |
2200 | | #define funcdecl_show_ip_mroute_summary static int show_ip_mroute_summary_magic(\ |
2201 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2202 | | struct vty *vty __attribute__ ((unused)),\ |
2203 | | int argc __attribute__ ((unused)),\ |
2204 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2205 | | const char * vrf,\ |
2206 | | const char * json) |
2207 | | funcdecl_show_ip_mroute_summary; |
2208 | | DEFUN_CMD_FUNC_TEXT(show_ip_mroute_summary) |
2209 | 0 | { |
2210 | 0 | #if 2 /* anything to parse? */ |
2211 | 0 | int _i; |
2212 | | #if 0 /* anything that can fail? */ |
2213 | | unsigned _fail = 0, _failcnt = 0; |
2214 | | #endif |
2215 | 0 | const char *vrf = NULL; |
2216 | 0 | const char *json = NULL; |
2217 | |
|
2218 | 0 | for (_i = 0; _i < argc; _i++) { |
2219 | 0 | if (!argv[_i]->varname) |
2220 | 0 | continue; |
2221 | | #if 0 /* anything that can fail? */ |
2222 | | _fail = 0; |
2223 | | #endif |
2224 | | |
2225 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
2226 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2227 | 0 | } |
2228 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
2229 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2230 | 0 | } |
2231 | | #if 0 /* anything that can fail? */ |
2232 | | if (_fail) |
2233 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2234 | | argv[_i]->varname, argv[_i]->arg); |
2235 | | _failcnt += _fail; |
2236 | | #endif |
2237 | 0 | } |
2238 | | #if 0 /* anything that can fail? */ |
2239 | | if (_failcnt) |
2240 | | return CMD_WARNING; |
2241 | | #endif |
2242 | 0 | #endif |
2243 | |
|
2244 | 0 | return show_ip_mroute_summary_magic(self, vty, argc, argv, vrf, json); |
2245 | 0 | } |
2246 | | |
2247 | | /* show_ip_mroute_summary_vrf_all => "show ip mroute vrf all summary [json$json]" */ |
2248 | | DEFUN_CMD_FUNC_DECL(show_ip_mroute_summary_vrf_all) |
2249 | | #define funcdecl_show_ip_mroute_summary_vrf_all static int show_ip_mroute_summary_vrf_all_magic(\ |
2250 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2251 | | struct vty *vty __attribute__ ((unused)),\ |
2252 | | int argc __attribute__ ((unused)),\ |
2253 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2254 | | const char * json) |
2255 | | funcdecl_show_ip_mroute_summary_vrf_all; |
2256 | | DEFUN_CMD_FUNC_TEXT(show_ip_mroute_summary_vrf_all) |
2257 | 0 | { |
2258 | 0 | #if 1 /* anything to parse? */ |
2259 | 0 | int _i; |
2260 | | #if 0 /* anything that can fail? */ |
2261 | | unsigned _fail = 0, _failcnt = 0; |
2262 | | #endif |
2263 | 0 | const char *json = NULL; |
2264 | |
|
2265 | 0 | for (_i = 0; _i < argc; _i++) { |
2266 | 0 | if (!argv[_i]->varname) |
2267 | 0 | continue; |
2268 | | #if 0 /* anything that can fail? */ |
2269 | | _fail = 0; |
2270 | | #endif |
2271 | | |
2272 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
2273 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2274 | 0 | } |
2275 | | #if 0 /* anything that can fail? */ |
2276 | | if (_fail) |
2277 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2278 | | argv[_i]->varname, argv[_i]->arg); |
2279 | | _failcnt += _fail; |
2280 | | #endif |
2281 | 0 | } |
2282 | | #if 0 /* anything that can fail? */ |
2283 | | if (_failcnt) |
2284 | | return CMD_WARNING; |
2285 | | #endif |
2286 | 0 | #endif |
2287 | |
|
2288 | 0 | return show_ip_mroute_summary_vrf_all_magic(self, vty, argc, argv, json); |
2289 | 0 | } |
2290 | | |
2291 | | /* ip_pim_spt_switchover_infinity_plist => "ip pim spt-switchover infinity-and-beyond prefix-list WORD$plist" */ |
2292 | | DEFUN_CMD_FUNC_DECL(ip_pim_spt_switchover_infinity_plist) |
2293 | | #define funcdecl_ip_pim_spt_switchover_infinity_plist static int ip_pim_spt_switchover_infinity_plist_magic(\ |
2294 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2295 | | struct vty *vty __attribute__ ((unused)),\ |
2296 | | int argc __attribute__ ((unused)),\ |
2297 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2298 | | const char * plist) |
2299 | | funcdecl_ip_pim_spt_switchover_infinity_plist; |
2300 | | DEFUN_CMD_FUNC_TEXT(ip_pim_spt_switchover_infinity_plist) |
2301 | 0 | { |
2302 | 0 | #if 1 /* anything to parse? */ |
2303 | 0 | int _i; |
2304 | | #if 0 /* anything that can fail? */ |
2305 | | unsigned _fail = 0, _failcnt = 0; |
2306 | | #endif |
2307 | 0 | const char *plist = NULL; |
2308 | |
|
2309 | 0 | for (_i = 0; _i < argc; _i++) { |
2310 | 0 | if (!argv[_i]->varname) |
2311 | 0 | continue; |
2312 | | #if 0 /* anything that can fail? */ |
2313 | | _fail = 0; |
2314 | | #endif |
2315 | | |
2316 | 0 | if (!strcmp(argv[_i]->varname, "plist")) { |
2317 | 0 | plist = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2318 | 0 | } |
2319 | | #if 0 /* anything that can fail? */ |
2320 | | if (_fail) |
2321 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2322 | | argv[_i]->varname, argv[_i]->arg); |
2323 | | _failcnt += _fail; |
2324 | | #endif |
2325 | 0 | } |
2326 | | #if 0 /* anything that can fail? */ |
2327 | | if (_failcnt) |
2328 | | return CMD_WARNING; |
2329 | | #endif |
2330 | 0 | #endif |
2331 | 0 | if (!plist) { |
2332 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "plist"); |
2333 | 0 | return CMD_WARNING; |
2334 | 0 | } |
2335 | | |
2336 | 0 | return ip_pim_spt_switchover_infinity_plist_magic(self, vty, argc, argv, plist); |
2337 | 0 | } |
2338 | | |
2339 | | /* pim_register_accept_list => "[no] ip pim register-accept-list WORD$word" */ |
2340 | | DEFUN_CMD_FUNC_DECL(pim_register_accept_list) |
2341 | | #define funcdecl_pim_register_accept_list static int pim_register_accept_list_magic(\ |
2342 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2343 | | struct vty *vty __attribute__ ((unused)),\ |
2344 | | int argc __attribute__ ((unused)),\ |
2345 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2346 | | const char * no,\ |
2347 | | const char * word) |
2348 | | funcdecl_pim_register_accept_list; |
2349 | | DEFUN_CMD_FUNC_TEXT(pim_register_accept_list) |
2350 | 0 | { |
2351 | 0 | #if 2 /* anything to parse? */ |
2352 | 0 | int _i; |
2353 | | #if 0 /* anything that can fail? */ |
2354 | | unsigned _fail = 0, _failcnt = 0; |
2355 | | #endif |
2356 | 0 | const char *no = NULL; |
2357 | 0 | const char *word = NULL; |
2358 | |
|
2359 | 0 | for (_i = 0; _i < argc; _i++) { |
2360 | 0 | if (!argv[_i]->varname) |
2361 | 0 | continue; |
2362 | | #if 0 /* anything that can fail? */ |
2363 | | _fail = 0; |
2364 | | #endif |
2365 | | |
2366 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
2367 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2368 | 0 | } |
2369 | 0 | if (!strcmp(argv[_i]->varname, "word")) { |
2370 | 0 | word = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2371 | 0 | } |
2372 | | #if 0 /* anything that can fail? */ |
2373 | | if (_fail) |
2374 | | vty_out (vty, "%% invalid input for %s: %s\n", |
2375 | | argv[_i]->varname, argv[_i]->arg); |
2376 | | _failcnt += _fail; |
2377 | | #endif |
2378 | 0 | } |
2379 | | #if 0 /* anything that can fail? */ |
2380 | | if (_failcnt) |
2381 | | return CMD_WARNING; |
2382 | | #endif |
2383 | 0 | #endif |
2384 | 0 | if (!word) { |
2385 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "word"); |
2386 | 0 | return CMD_WARNING; |
2387 | 0 | } |
2388 | | |
2389 | 0 | return pim_register_accept_list_magic(self, vty, argc, argv, no, word); |
2390 | 0 | } |
2391 | | |
2392 | | /* ip_pim_joinprune_time => "ip pim join-prune-interval (1-65535)$jpi" */ |
2393 | | DEFUN_CMD_FUNC_DECL(ip_pim_joinprune_time) |
2394 | | #define funcdecl_ip_pim_joinprune_time static int ip_pim_joinprune_time_magic(\ |
2395 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2396 | | struct vty *vty __attribute__ ((unused)),\ |
2397 | | int argc __attribute__ ((unused)),\ |
2398 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2399 | | long jpi,\ |
2400 | | const char * jpi_str __attribute__ ((unused))) |
2401 | | funcdecl_ip_pim_joinprune_time; |
2402 | | DEFUN_CMD_FUNC_TEXT(ip_pim_joinprune_time) |
2403 | 0 | { |
2404 | 0 | #if 1 /* anything to parse? */ |
2405 | 0 | int _i; |
2406 | 0 | #if 1 /* anything that can fail? */ |
2407 | 0 | unsigned _fail = 0, _failcnt = 0; |
2408 | 0 | #endif |
2409 | 0 | long jpi = 0; |
2410 | 0 | const char *jpi_str = NULL; |
2411 | |
|
2412 | 0 | for (_i = 0; _i < argc; _i++) { |
2413 | 0 | if (!argv[_i]->varname) |
2414 | 0 | continue; |
2415 | 0 | #if 1 /* anything that can fail? */ |
2416 | 0 | _fail = 0; |
2417 | 0 | #endif |
2418 | |
|
2419 | 0 | if (!strcmp(argv[_i]->varname, "jpi")) { |
2420 | 0 | jpi_str = argv[_i]->arg; |
2421 | 0 | char *_end; |
2422 | 0 | jpi = strtol(argv[_i]->arg, &_end, 10); |
2423 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2424 | 0 | } |
2425 | 0 | #if 1 /* anything that can fail? */ |
2426 | 0 | if (_fail) |
2427 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2428 | 0 | argv[_i]->varname, argv[_i]->arg); |
2429 | 0 | _failcnt += _fail; |
2430 | 0 | #endif |
2431 | 0 | } |
2432 | 0 | #if 1 /* anything that can fail? */ |
2433 | 0 | if (_failcnt) |
2434 | 0 | return CMD_WARNING; |
2435 | 0 | #endif |
2436 | 0 | #endif |
2437 | 0 | if (!jpi_str) { |
2438 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "jpi_str"); |
2439 | 0 | return CMD_WARNING; |
2440 | 0 | } |
2441 | | |
2442 | 0 | return ip_pim_joinprune_time_magic(self, vty, argc, argv, jpi, jpi_str); |
2443 | 0 | } |
2444 | | |
2445 | | /* ip_pim_register_suppress => "ip pim register-suppress-time (1-65535)$rst" */ |
2446 | | DEFUN_CMD_FUNC_DECL(ip_pim_register_suppress) |
2447 | | #define funcdecl_ip_pim_register_suppress static int ip_pim_register_suppress_magic(\ |
2448 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2449 | | struct vty *vty __attribute__ ((unused)),\ |
2450 | | int argc __attribute__ ((unused)),\ |
2451 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2452 | | long rst,\ |
2453 | | const char * rst_str __attribute__ ((unused))) |
2454 | | funcdecl_ip_pim_register_suppress; |
2455 | | DEFUN_CMD_FUNC_TEXT(ip_pim_register_suppress) |
2456 | 0 | { |
2457 | 0 | #if 1 /* anything to parse? */ |
2458 | 0 | int _i; |
2459 | 0 | #if 1 /* anything that can fail? */ |
2460 | 0 | unsigned _fail = 0, _failcnt = 0; |
2461 | 0 | #endif |
2462 | 0 | long rst = 0; |
2463 | 0 | const char *rst_str = NULL; |
2464 | |
|
2465 | 0 | for (_i = 0; _i < argc; _i++) { |
2466 | 0 | if (!argv[_i]->varname) |
2467 | 0 | continue; |
2468 | 0 | #if 1 /* anything that can fail? */ |
2469 | 0 | _fail = 0; |
2470 | 0 | #endif |
2471 | |
|
2472 | 0 | if (!strcmp(argv[_i]->varname, "rst")) { |
2473 | 0 | rst_str = argv[_i]->arg; |
2474 | 0 | char *_end; |
2475 | 0 | rst = strtol(argv[_i]->arg, &_end, 10); |
2476 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2477 | 0 | } |
2478 | 0 | #if 1 /* anything that can fail? */ |
2479 | 0 | if (_fail) |
2480 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2481 | 0 | argv[_i]->varname, argv[_i]->arg); |
2482 | 0 | _failcnt += _fail; |
2483 | 0 | #endif |
2484 | 0 | } |
2485 | 0 | #if 1 /* anything that can fail? */ |
2486 | 0 | if (_failcnt) |
2487 | 0 | return CMD_WARNING; |
2488 | 0 | #endif |
2489 | 0 | #endif |
2490 | 0 | if (!rst_str) { |
2491 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "rst_str"); |
2492 | 0 | return CMD_WARNING; |
2493 | 0 | } |
2494 | | |
2495 | 0 | return ip_pim_register_suppress_magic(self, vty, argc, argv, rst, rst_str); |
2496 | 0 | } |
2497 | | |
2498 | | /* ip_pim_rp_keep_alive => "ip pim rp keep-alive-timer (1-65535)$kat" */ |
2499 | | DEFUN_CMD_FUNC_DECL(ip_pim_rp_keep_alive) |
2500 | | #define funcdecl_ip_pim_rp_keep_alive static int ip_pim_rp_keep_alive_magic(\ |
2501 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2502 | | struct vty *vty __attribute__ ((unused)),\ |
2503 | | int argc __attribute__ ((unused)),\ |
2504 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2505 | | long kat,\ |
2506 | | const char * kat_str __attribute__ ((unused))) |
2507 | | funcdecl_ip_pim_rp_keep_alive; |
2508 | | DEFUN_CMD_FUNC_TEXT(ip_pim_rp_keep_alive) |
2509 | 0 | { |
2510 | 0 | #if 1 /* anything to parse? */ |
2511 | 0 | int _i; |
2512 | 0 | #if 1 /* anything that can fail? */ |
2513 | 0 | unsigned _fail = 0, _failcnt = 0; |
2514 | 0 | #endif |
2515 | 0 | long kat = 0; |
2516 | 0 | const char *kat_str = NULL; |
2517 | |
|
2518 | 0 | for (_i = 0; _i < argc; _i++) { |
2519 | 0 | if (!argv[_i]->varname) |
2520 | 0 | continue; |
2521 | 0 | #if 1 /* anything that can fail? */ |
2522 | 0 | _fail = 0; |
2523 | 0 | #endif |
2524 | |
|
2525 | 0 | if (!strcmp(argv[_i]->varname, "kat")) { |
2526 | 0 | kat_str = argv[_i]->arg; |
2527 | 0 | char *_end; |
2528 | 0 | kat = strtol(argv[_i]->arg, &_end, 10); |
2529 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2530 | 0 | } |
2531 | 0 | #if 1 /* anything that can fail? */ |
2532 | 0 | if (_fail) |
2533 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2534 | 0 | argv[_i]->varname, argv[_i]->arg); |
2535 | 0 | _failcnt += _fail; |
2536 | 0 | #endif |
2537 | 0 | } |
2538 | 0 | #if 1 /* anything that can fail? */ |
2539 | 0 | if (_failcnt) |
2540 | 0 | return CMD_WARNING; |
2541 | 0 | #endif |
2542 | 0 | #endif |
2543 | 0 | if (!kat_str) { |
2544 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "kat_str"); |
2545 | 0 | return CMD_WARNING; |
2546 | 0 | } |
2547 | | |
2548 | 0 | return ip_pim_rp_keep_alive_magic(self, vty, argc, argv, kat, kat_str); |
2549 | 0 | } |
2550 | | |
2551 | | /* ip_pim_keep_alive => "ip pim keep-alive-timer (1-65535)$kat" */ |
2552 | | DEFUN_CMD_FUNC_DECL(ip_pim_keep_alive) |
2553 | | #define funcdecl_ip_pim_keep_alive static int ip_pim_keep_alive_magic(\ |
2554 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2555 | | struct vty *vty __attribute__ ((unused)),\ |
2556 | | int argc __attribute__ ((unused)),\ |
2557 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2558 | | long kat,\ |
2559 | | const char * kat_str __attribute__ ((unused))) |
2560 | | funcdecl_ip_pim_keep_alive; |
2561 | | DEFUN_CMD_FUNC_TEXT(ip_pim_keep_alive) |
2562 | 0 | { |
2563 | 0 | #if 1 /* anything to parse? */ |
2564 | 0 | int _i; |
2565 | 0 | #if 1 /* anything that can fail? */ |
2566 | 0 | unsigned _fail = 0, _failcnt = 0; |
2567 | 0 | #endif |
2568 | 0 | long kat = 0; |
2569 | 0 | const char *kat_str = NULL; |
2570 | |
|
2571 | 0 | for (_i = 0; _i < argc; _i++) { |
2572 | 0 | if (!argv[_i]->varname) |
2573 | 0 | continue; |
2574 | 0 | #if 1 /* anything that can fail? */ |
2575 | 0 | _fail = 0; |
2576 | 0 | #endif |
2577 | |
|
2578 | 0 | if (!strcmp(argv[_i]->varname, "kat")) { |
2579 | 0 | kat_str = argv[_i]->arg; |
2580 | 0 | char *_end; |
2581 | 0 | kat = strtol(argv[_i]->arg, &_end, 10); |
2582 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2583 | 0 | } |
2584 | 0 | #if 1 /* anything that can fail? */ |
2585 | 0 | if (_fail) |
2586 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2587 | 0 | argv[_i]->varname, argv[_i]->arg); |
2588 | 0 | _failcnt += _fail; |
2589 | 0 | #endif |
2590 | 0 | } |
2591 | 0 | #if 1 /* anything that can fail? */ |
2592 | 0 | if (_failcnt) |
2593 | 0 | return CMD_WARNING; |
2594 | 0 | #endif |
2595 | 0 | #endif |
2596 | 0 | if (!kat_str) { |
2597 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "kat_str"); |
2598 | 0 | return CMD_WARNING; |
2599 | 0 | } |
2600 | | |
2601 | 0 | return ip_pim_keep_alive_magic(self, vty, argc, argv, kat, kat_str); |
2602 | 0 | } |
2603 | | |
2604 | | /* ip_pim_packets => "ip pim packets (1-255)" */ |
2605 | | DEFUN_CMD_FUNC_DECL(ip_pim_packets) |
2606 | | #define funcdecl_ip_pim_packets static int ip_pim_packets_magic(\ |
2607 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2608 | | struct vty *vty __attribute__ ((unused)),\ |
2609 | | int argc __attribute__ ((unused)),\ |
2610 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2611 | | long packets,\ |
2612 | | const char * packets_str __attribute__ ((unused))) |
2613 | | funcdecl_ip_pim_packets; |
2614 | | DEFUN_CMD_FUNC_TEXT(ip_pim_packets) |
2615 | 0 | { |
2616 | 0 | #if 1 /* anything to parse? */ |
2617 | 0 | int _i; |
2618 | 0 | #if 1 /* anything that can fail? */ |
2619 | 0 | unsigned _fail = 0, _failcnt = 0; |
2620 | 0 | #endif |
2621 | 0 | long packets = 0; |
2622 | 0 | const char *packets_str = NULL; |
2623 | |
|
2624 | 0 | for (_i = 0; _i < argc; _i++) { |
2625 | 0 | if (!argv[_i]->varname) |
2626 | 0 | continue; |
2627 | 0 | #if 1 /* anything that can fail? */ |
2628 | 0 | _fail = 0; |
2629 | 0 | #endif |
2630 | |
|
2631 | 0 | if (!strcmp(argv[_i]->varname, "packets")) { |
2632 | 0 | packets_str = argv[_i]->arg; |
2633 | 0 | char *_end; |
2634 | 0 | packets = strtol(argv[_i]->arg, &_end, 10); |
2635 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2636 | 0 | } |
2637 | 0 | #if 1 /* anything that can fail? */ |
2638 | 0 | if (_fail) |
2639 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2640 | 0 | argv[_i]->varname, argv[_i]->arg); |
2641 | 0 | _failcnt += _fail; |
2642 | 0 | #endif |
2643 | 0 | } |
2644 | 0 | #if 1 /* anything that can fail? */ |
2645 | 0 | if (_failcnt) |
2646 | 0 | return CMD_WARNING; |
2647 | 0 | #endif |
2648 | 0 | #endif |
2649 | 0 | if (!packets_str) { |
2650 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "packets_str"); |
2651 | 0 | return CMD_WARNING; |
2652 | 0 | } |
2653 | | |
2654 | 0 | return ip_pim_packets_magic(self, vty, argc, argv, packets, packets_str); |
2655 | 0 | } |
2656 | | |
2657 | | /* ip_igmp_group_watermark => "ip igmp watermark-warn (1-65535)$limit" */ |
2658 | | DEFUN_CMD_FUNC_DECL(ip_igmp_group_watermark) |
2659 | | #define funcdecl_ip_igmp_group_watermark static int ip_igmp_group_watermark_magic(\ |
2660 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2661 | | struct vty *vty __attribute__ ((unused)),\ |
2662 | | int argc __attribute__ ((unused)),\ |
2663 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2664 | | long limit,\ |
2665 | | const char * limit_str __attribute__ ((unused))) |
2666 | | funcdecl_ip_igmp_group_watermark; |
2667 | | DEFUN_CMD_FUNC_TEXT(ip_igmp_group_watermark) |
2668 | 0 | { |
2669 | 0 | #if 1 /* anything to parse? */ |
2670 | 0 | int _i; |
2671 | 0 | #if 1 /* anything that can fail? */ |
2672 | 0 | unsigned _fail = 0, _failcnt = 0; |
2673 | 0 | #endif |
2674 | 0 | long limit = 0; |
2675 | 0 | const char *limit_str = NULL; |
2676 | |
|
2677 | 0 | for (_i = 0; _i < argc; _i++) { |
2678 | 0 | if (!argv[_i]->varname) |
2679 | 0 | continue; |
2680 | 0 | #if 1 /* anything that can fail? */ |
2681 | 0 | _fail = 0; |
2682 | 0 | #endif |
2683 | |
|
2684 | 0 | if (!strcmp(argv[_i]->varname, "limit")) { |
2685 | 0 | limit_str = argv[_i]->arg; |
2686 | 0 | char *_end; |
2687 | 0 | limit = strtol(argv[_i]->arg, &_end, 10); |
2688 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2689 | 0 | } |
2690 | 0 | #if 1 /* anything that can fail? */ |
2691 | 0 | if (_fail) |
2692 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2693 | 0 | argv[_i]->varname, argv[_i]->arg); |
2694 | 0 | _failcnt += _fail; |
2695 | 0 | #endif |
2696 | 0 | } |
2697 | 0 | #if 1 /* anything that can fail? */ |
2698 | 0 | if (_failcnt) |
2699 | 0 | return CMD_WARNING; |
2700 | 0 | #endif |
2701 | 0 | #endif |
2702 | 0 | if (!limit_str) { |
2703 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "limit_str"); |
2704 | 0 | return CMD_WARNING; |
2705 | 0 | } |
2706 | | |
2707 | 0 | return ip_igmp_group_watermark_magic(self, vty, argc, argv, limit, limit_str); |
2708 | 0 | } |
2709 | | |
2710 | | /* no_ip_igmp_group_watermark => "no ip igmp watermark-warn [(1-65535)$limit]" */ |
2711 | | DEFUN_CMD_FUNC_DECL(no_ip_igmp_group_watermark) |
2712 | | #define funcdecl_no_ip_igmp_group_watermark static int no_ip_igmp_group_watermark_magic(\ |
2713 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2714 | | struct vty *vty __attribute__ ((unused)),\ |
2715 | | int argc __attribute__ ((unused)),\ |
2716 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2717 | | long limit,\ |
2718 | | const char * limit_str __attribute__ ((unused))) |
2719 | | funcdecl_no_ip_igmp_group_watermark; |
2720 | | DEFUN_CMD_FUNC_TEXT(no_ip_igmp_group_watermark) |
2721 | 0 | { |
2722 | 0 | #if 1 /* anything to parse? */ |
2723 | 0 | int _i; |
2724 | 0 | #if 1 /* anything that can fail? */ |
2725 | 0 | unsigned _fail = 0, _failcnt = 0; |
2726 | 0 | #endif |
2727 | 0 | long limit = 0; |
2728 | 0 | const char *limit_str = NULL; |
2729 | |
|
2730 | 0 | for (_i = 0; _i < argc; _i++) { |
2731 | 0 | if (!argv[_i]->varname) |
2732 | 0 | continue; |
2733 | 0 | #if 1 /* anything that can fail? */ |
2734 | 0 | _fail = 0; |
2735 | 0 | #endif |
2736 | |
|
2737 | 0 | if (!strcmp(argv[_i]->varname, "limit")) { |
2738 | 0 | limit_str = argv[_i]->arg; |
2739 | 0 | char *_end; |
2740 | 0 | limit = strtol(argv[_i]->arg, &_end, 10); |
2741 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
2742 | 0 | } |
2743 | 0 | #if 1 /* anything that can fail? */ |
2744 | 0 | if (_fail) |
2745 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2746 | 0 | argv[_i]->varname, argv[_i]->arg); |
2747 | 0 | _failcnt += _fail; |
2748 | 0 | #endif |
2749 | 0 | } |
2750 | 0 | #if 1 /* anything that can fail? */ |
2751 | 0 | if (_failcnt) |
2752 | 0 | return CMD_WARNING; |
2753 | 0 | #endif |
2754 | 0 | #endif |
2755 | | |
2756 | 0 | return no_ip_igmp_group_watermark_magic(self, vty, argc, argv, limit, limit_str); |
2757 | 0 | } |
2758 | | |
2759 | | /* ip_pim_rp => "ip pim rp A.B.C.D$rp [A.B.C.D/M]$gp" */ |
2760 | | DEFUN_CMD_FUNC_DECL(ip_pim_rp) |
2761 | | #define funcdecl_ip_pim_rp static int ip_pim_rp_magic(\ |
2762 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2763 | | struct vty *vty __attribute__ ((unused)),\ |
2764 | | int argc __attribute__ ((unused)),\ |
2765 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2766 | | struct in_addr rp,\ |
2767 | | const char * rp_str __attribute__ ((unused)),\ |
2768 | | const struct prefix_ipv4 * gp,\ |
2769 | | const char * gp_str __attribute__ ((unused))) |
2770 | | funcdecl_ip_pim_rp; |
2771 | | DEFUN_CMD_FUNC_TEXT(ip_pim_rp) |
2772 | 0 | { |
2773 | 0 | #if 2 /* anything to parse? */ |
2774 | 0 | int _i; |
2775 | 0 | #if 1 /* anything that can fail? */ |
2776 | 0 | unsigned _fail = 0, _failcnt = 0; |
2777 | 0 | #endif |
2778 | 0 | struct in_addr rp = { INADDR_ANY }; |
2779 | 0 | const char *rp_str = NULL; |
2780 | 0 | struct prefix_ipv4 gp = { }; |
2781 | 0 | const char *gp_str = NULL; |
2782 | |
|
2783 | 0 | for (_i = 0; _i < argc; _i++) { |
2784 | 0 | if (!argv[_i]->varname) |
2785 | 0 | continue; |
2786 | 0 | #if 1 /* anything that can fail? */ |
2787 | 0 | _fail = 0; |
2788 | 0 | #endif |
2789 | |
|
2790 | 0 | if (!strcmp(argv[_i]->varname, "rp")) { |
2791 | 0 | rp_str = argv[_i]->arg; |
2792 | 0 | _fail = !inet_aton(argv[_i]->arg, &rp); |
2793 | 0 | } |
2794 | 0 | if (!strcmp(argv[_i]->varname, "gp")) { |
2795 | 0 | gp_str = argv[_i]->arg; |
2796 | 0 | _fail = !str2prefix_ipv4(argv[_i]->arg, &gp); |
2797 | 0 | } |
2798 | 0 | #if 1 /* anything that can fail? */ |
2799 | 0 | if (_fail) |
2800 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2801 | 0 | argv[_i]->varname, argv[_i]->arg); |
2802 | 0 | _failcnt += _fail; |
2803 | 0 | #endif |
2804 | 0 | } |
2805 | 0 | #if 1 /* anything that can fail? */ |
2806 | 0 | if (_failcnt) |
2807 | 0 | return CMD_WARNING; |
2808 | 0 | #endif |
2809 | 0 | #endif |
2810 | 0 | if (!rp_str) { |
2811 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "rp_str"); |
2812 | 0 | return CMD_WARNING; |
2813 | 0 | } |
2814 | | |
2815 | 0 | return ip_pim_rp_magic(self, vty, argc, argv, rp, rp_str, &gp, gp_str); |
2816 | 0 | } |
2817 | | |
2818 | | /* ip_pim_rp_prefix_list => "ip pim rp A.B.C.D$rp prefix-list WORD$plist" */ |
2819 | | DEFUN_CMD_FUNC_DECL(ip_pim_rp_prefix_list) |
2820 | | #define funcdecl_ip_pim_rp_prefix_list static int ip_pim_rp_prefix_list_magic(\ |
2821 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2822 | | struct vty *vty __attribute__ ((unused)),\ |
2823 | | int argc __attribute__ ((unused)),\ |
2824 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2825 | | struct in_addr rp,\ |
2826 | | const char * rp_str __attribute__ ((unused)),\ |
2827 | | const char * plist) |
2828 | | funcdecl_ip_pim_rp_prefix_list; |
2829 | | DEFUN_CMD_FUNC_TEXT(ip_pim_rp_prefix_list) |
2830 | 0 | { |
2831 | 0 | #if 2 /* anything to parse? */ |
2832 | 0 | int _i; |
2833 | 0 | #if 1 /* anything that can fail? */ |
2834 | 0 | unsigned _fail = 0, _failcnt = 0; |
2835 | 0 | #endif |
2836 | 0 | struct in_addr rp = { INADDR_ANY }; |
2837 | 0 | const char *rp_str = NULL; |
2838 | 0 | const char *plist = NULL; |
2839 | |
|
2840 | 0 | for (_i = 0; _i < argc; _i++) { |
2841 | 0 | if (!argv[_i]->varname) |
2842 | 0 | continue; |
2843 | 0 | #if 1 /* anything that can fail? */ |
2844 | 0 | _fail = 0; |
2845 | 0 | #endif |
2846 | |
|
2847 | 0 | if (!strcmp(argv[_i]->varname, "rp")) { |
2848 | 0 | rp_str = argv[_i]->arg; |
2849 | 0 | _fail = !inet_aton(argv[_i]->arg, &rp); |
2850 | 0 | } |
2851 | 0 | if (!strcmp(argv[_i]->varname, "plist")) { |
2852 | 0 | plist = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2853 | 0 | } |
2854 | 0 | #if 1 /* anything that can fail? */ |
2855 | 0 | if (_fail) |
2856 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2857 | 0 | argv[_i]->varname, argv[_i]->arg); |
2858 | 0 | _failcnt += _fail; |
2859 | 0 | #endif |
2860 | 0 | } |
2861 | 0 | #if 1 /* anything that can fail? */ |
2862 | 0 | if (_failcnt) |
2863 | 0 | return CMD_WARNING; |
2864 | 0 | #endif |
2865 | 0 | #endif |
2866 | 0 | if (!rp_str) { |
2867 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "rp_str"); |
2868 | 0 | return CMD_WARNING; |
2869 | 0 | } |
2870 | 0 | if (!plist) { |
2871 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "plist"); |
2872 | 0 | return CMD_WARNING; |
2873 | 0 | } |
2874 | | |
2875 | 0 | return ip_pim_rp_prefix_list_magic(self, vty, argc, argv, rp, rp_str, plist); |
2876 | 0 | } |
2877 | | |
2878 | | /* no_ip_pim_rp => "no ip pim rp A.B.C.D$rp [A.B.C.D/M]$gp" */ |
2879 | | DEFUN_CMD_FUNC_DECL(no_ip_pim_rp) |
2880 | | #define funcdecl_no_ip_pim_rp static int no_ip_pim_rp_magic(\ |
2881 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2882 | | struct vty *vty __attribute__ ((unused)),\ |
2883 | | int argc __attribute__ ((unused)),\ |
2884 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2885 | | struct in_addr rp,\ |
2886 | | const char * rp_str __attribute__ ((unused)),\ |
2887 | | const struct prefix_ipv4 * gp,\ |
2888 | | const char * gp_str __attribute__ ((unused))) |
2889 | | funcdecl_no_ip_pim_rp; |
2890 | | DEFUN_CMD_FUNC_TEXT(no_ip_pim_rp) |
2891 | 0 | { |
2892 | 0 | #if 2 /* anything to parse? */ |
2893 | 0 | int _i; |
2894 | 0 | #if 1 /* anything that can fail? */ |
2895 | 0 | unsigned _fail = 0, _failcnt = 0; |
2896 | 0 | #endif |
2897 | 0 | struct in_addr rp = { INADDR_ANY }; |
2898 | 0 | const char *rp_str = NULL; |
2899 | 0 | struct prefix_ipv4 gp = { }; |
2900 | 0 | const char *gp_str = NULL; |
2901 | |
|
2902 | 0 | for (_i = 0; _i < argc; _i++) { |
2903 | 0 | if (!argv[_i]->varname) |
2904 | 0 | continue; |
2905 | 0 | #if 1 /* anything that can fail? */ |
2906 | 0 | _fail = 0; |
2907 | 0 | #endif |
2908 | |
|
2909 | 0 | if (!strcmp(argv[_i]->varname, "rp")) { |
2910 | 0 | rp_str = argv[_i]->arg; |
2911 | 0 | _fail = !inet_aton(argv[_i]->arg, &rp); |
2912 | 0 | } |
2913 | 0 | if (!strcmp(argv[_i]->varname, "gp")) { |
2914 | 0 | gp_str = argv[_i]->arg; |
2915 | 0 | _fail = !str2prefix_ipv4(argv[_i]->arg, &gp); |
2916 | 0 | } |
2917 | 0 | #if 1 /* anything that can fail? */ |
2918 | 0 | if (_fail) |
2919 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2920 | 0 | argv[_i]->varname, argv[_i]->arg); |
2921 | 0 | _failcnt += _fail; |
2922 | 0 | #endif |
2923 | 0 | } |
2924 | 0 | #if 1 /* anything that can fail? */ |
2925 | 0 | if (_failcnt) |
2926 | 0 | return CMD_WARNING; |
2927 | 0 | #endif |
2928 | 0 | #endif |
2929 | 0 | if (!rp_str) { |
2930 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "rp_str"); |
2931 | 0 | return CMD_WARNING; |
2932 | 0 | } |
2933 | | |
2934 | 0 | return no_ip_pim_rp_magic(self, vty, argc, argv, rp, rp_str, &gp, gp_str); |
2935 | 0 | } |
2936 | | |
2937 | | /* no_ip_pim_rp_prefix_list => "no ip pim rp A.B.C.D$rp prefix-list WORD$plist" */ |
2938 | | DEFUN_CMD_FUNC_DECL(no_ip_pim_rp_prefix_list) |
2939 | | #define funcdecl_no_ip_pim_rp_prefix_list static int no_ip_pim_rp_prefix_list_magic(\ |
2940 | | const struct cmd_element *self __attribute__ ((unused)),\ |
2941 | | struct vty *vty __attribute__ ((unused)),\ |
2942 | | int argc __attribute__ ((unused)),\ |
2943 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
2944 | | struct in_addr rp,\ |
2945 | | const char * rp_str __attribute__ ((unused)),\ |
2946 | | const char * plist) |
2947 | | funcdecl_no_ip_pim_rp_prefix_list; |
2948 | | DEFUN_CMD_FUNC_TEXT(no_ip_pim_rp_prefix_list) |
2949 | 0 | { |
2950 | 0 | #if 2 /* anything to parse? */ |
2951 | 0 | int _i; |
2952 | 0 | #if 1 /* anything that can fail? */ |
2953 | 0 | unsigned _fail = 0, _failcnt = 0; |
2954 | 0 | #endif |
2955 | 0 | struct in_addr rp = { INADDR_ANY }; |
2956 | 0 | const char *rp_str = NULL; |
2957 | 0 | const char *plist = NULL; |
2958 | |
|
2959 | 0 | for (_i = 0; _i < argc; _i++) { |
2960 | 0 | if (!argv[_i]->varname) |
2961 | 0 | continue; |
2962 | 0 | #if 1 /* anything that can fail? */ |
2963 | 0 | _fail = 0; |
2964 | 0 | #endif |
2965 | |
|
2966 | 0 | if (!strcmp(argv[_i]->varname, "rp")) { |
2967 | 0 | rp_str = argv[_i]->arg; |
2968 | 0 | _fail = !inet_aton(argv[_i]->arg, &rp); |
2969 | 0 | } |
2970 | 0 | if (!strcmp(argv[_i]->varname, "plist")) { |
2971 | 0 | plist = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
2972 | 0 | } |
2973 | 0 | #if 1 /* anything that can fail? */ |
2974 | 0 | if (_fail) |
2975 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
2976 | 0 | argv[_i]->varname, argv[_i]->arg); |
2977 | 0 | _failcnt += _fail; |
2978 | 0 | #endif |
2979 | 0 | } |
2980 | 0 | #if 1 /* anything that can fail? */ |
2981 | 0 | if (_failcnt) |
2982 | 0 | return CMD_WARNING; |
2983 | 0 | #endif |
2984 | 0 | #endif |
2985 | 0 | if (!rp_str) { |
2986 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "rp_str"); |
2987 | 0 | return CMD_WARNING; |
2988 | 0 | } |
2989 | 0 | if (!plist) { |
2990 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "plist"); |
2991 | 0 | return CMD_WARNING; |
2992 | 0 | } |
2993 | | |
2994 | 0 | return no_ip_pim_rp_prefix_list_magic(self, vty, argc, argv, rp, rp_str, plist); |
2995 | 0 | } |
2996 | | |
2997 | | /* show_ip_pim_bsr => "show ip pim bsr [vrf NAME] [json$json]" */ |
2998 | | DEFUN_CMD_FUNC_DECL(show_ip_pim_bsr) |
2999 | | #define funcdecl_show_ip_pim_bsr static int show_ip_pim_bsr_magic(\ |
3000 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3001 | | struct vty *vty __attribute__ ((unused)),\ |
3002 | | int argc __attribute__ ((unused)),\ |
3003 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3004 | | const char * vrf,\ |
3005 | | const char * json) |
3006 | | funcdecl_show_ip_pim_bsr; |
3007 | | DEFUN_CMD_FUNC_TEXT(show_ip_pim_bsr) |
3008 | 0 | { |
3009 | 0 | #if 2 /* anything to parse? */ |
3010 | 0 | int _i; |
3011 | | #if 0 /* anything that can fail? */ |
3012 | | unsigned _fail = 0, _failcnt = 0; |
3013 | | #endif |
3014 | 0 | const char *vrf = NULL; |
3015 | 0 | const char *json = NULL; |
3016 | |
|
3017 | 0 | for (_i = 0; _i < argc; _i++) { |
3018 | 0 | if (!argv[_i]->varname) |
3019 | 0 | continue; |
3020 | | #if 0 /* anything that can fail? */ |
3021 | | _fail = 0; |
3022 | | #endif |
3023 | | |
3024 | 0 | if (!strcmp(argv[_i]->varname, "vrf")) { |
3025 | 0 | vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3026 | 0 | } |
3027 | 0 | if (!strcmp(argv[_i]->varname, "json")) { |
3028 | 0 | json = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3029 | 0 | } |
3030 | | #if 0 /* anything that can fail? */ |
3031 | | if (_fail) |
3032 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3033 | | argv[_i]->varname, argv[_i]->arg); |
3034 | | _failcnt += _fail; |
3035 | | #endif |
3036 | 0 | } |
3037 | | #if 0 /* anything that can fail? */ |
3038 | | if (_failcnt) |
3039 | | return CMD_WARNING; |
3040 | | #endif |
3041 | 0 | #endif |
3042 | |
|
3043 | 0 | return show_ip_pim_bsr_magic(self, vty, argc, argv, vrf, json); |
3044 | 0 | } |
3045 | | |
3046 | | /* interface_ip_igmp_query_max_response_time => "ip igmp query-max-response-time (1-65535)$qmrt" */ |
3047 | | DEFUN_CMD_FUNC_DECL(interface_ip_igmp_query_max_response_time) |
3048 | | #define funcdecl_interface_ip_igmp_query_max_response_time static int interface_ip_igmp_query_max_response_time_magic(\ |
3049 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3050 | | struct vty *vty __attribute__ ((unused)),\ |
3051 | | int argc __attribute__ ((unused)),\ |
3052 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3053 | | long qmrt,\ |
3054 | | const char * qmrt_str __attribute__ ((unused))) |
3055 | | funcdecl_interface_ip_igmp_query_max_response_time; |
3056 | | DEFUN_CMD_FUNC_TEXT(interface_ip_igmp_query_max_response_time) |
3057 | 0 | { |
3058 | 0 | #if 1 /* anything to parse? */ |
3059 | 0 | int _i; |
3060 | 0 | #if 1 /* anything that can fail? */ |
3061 | 0 | unsigned _fail = 0, _failcnt = 0; |
3062 | 0 | #endif |
3063 | 0 | long qmrt = 0; |
3064 | 0 | const char *qmrt_str = NULL; |
3065 | |
|
3066 | 0 | for (_i = 0; _i < argc; _i++) { |
3067 | 0 | if (!argv[_i]->varname) |
3068 | 0 | continue; |
3069 | 0 | #if 1 /* anything that can fail? */ |
3070 | 0 | _fail = 0; |
3071 | 0 | #endif |
3072 | |
|
3073 | 0 | if (!strcmp(argv[_i]->varname, "qmrt")) { |
3074 | 0 | qmrt_str = argv[_i]->arg; |
3075 | 0 | char *_end; |
3076 | 0 | qmrt = strtol(argv[_i]->arg, &_end, 10); |
3077 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
3078 | 0 | } |
3079 | 0 | #if 1 /* anything that can fail? */ |
3080 | 0 | if (_fail) |
3081 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
3082 | 0 | argv[_i]->varname, argv[_i]->arg); |
3083 | 0 | _failcnt += _fail; |
3084 | 0 | #endif |
3085 | 0 | } |
3086 | 0 | #if 1 /* anything that can fail? */ |
3087 | 0 | if (_failcnt) |
3088 | 0 | return CMD_WARNING; |
3089 | 0 | #endif |
3090 | 0 | #endif |
3091 | 0 | if (!qmrt_str) { |
3092 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "qmrt_str"); |
3093 | 0 | return CMD_WARNING; |
3094 | 0 | } |
3095 | | |
3096 | 0 | return interface_ip_igmp_query_max_response_time_magic(self, vty, argc, argv, qmrt, qmrt_str); |
3097 | 0 | } |
3098 | | |
3099 | | /* interface_ip_igmp_last_member_query_count => "ip igmp last-member-query-count (1-255)$lmqc" */ |
3100 | | DEFUN_CMD_FUNC_DECL(interface_ip_igmp_last_member_query_count) |
3101 | | #define funcdecl_interface_ip_igmp_last_member_query_count static int interface_ip_igmp_last_member_query_count_magic(\ |
3102 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3103 | | struct vty *vty __attribute__ ((unused)),\ |
3104 | | int argc __attribute__ ((unused)),\ |
3105 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3106 | | long lmqc,\ |
3107 | | const char * lmqc_str __attribute__ ((unused))) |
3108 | | funcdecl_interface_ip_igmp_last_member_query_count; |
3109 | | DEFUN_CMD_FUNC_TEXT(interface_ip_igmp_last_member_query_count) |
3110 | 0 | { |
3111 | 0 | #if 1 /* anything to parse? */ |
3112 | 0 | int _i; |
3113 | 0 | #if 1 /* anything that can fail? */ |
3114 | 0 | unsigned _fail = 0, _failcnt = 0; |
3115 | 0 | #endif |
3116 | 0 | long lmqc = 0; |
3117 | 0 | const char *lmqc_str = NULL; |
3118 | |
|
3119 | 0 | for (_i = 0; _i < argc; _i++) { |
3120 | 0 | if (!argv[_i]->varname) |
3121 | 0 | continue; |
3122 | 0 | #if 1 /* anything that can fail? */ |
3123 | 0 | _fail = 0; |
3124 | 0 | #endif |
3125 | |
|
3126 | 0 | if (!strcmp(argv[_i]->varname, "lmqc")) { |
3127 | 0 | lmqc_str = argv[_i]->arg; |
3128 | 0 | char *_end; |
3129 | 0 | lmqc = strtol(argv[_i]->arg, &_end, 10); |
3130 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
3131 | 0 | } |
3132 | 0 | #if 1 /* anything that can fail? */ |
3133 | 0 | if (_fail) |
3134 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
3135 | 0 | argv[_i]->varname, argv[_i]->arg); |
3136 | 0 | _failcnt += _fail; |
3137 | 0 | #endif |
3138 | 0 | } |
3139 | 0 | #if 1 /* anything that can fail? */ |
3140 | 0 | if (_failcnt) |
3141 | 0 | return CMD_WARNING; |
3142 | 0 | #endif |
3143 | 0 | #endif |
3144 | 0 | if (!lmqc_str) { |
3145 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "lmqc_str"); |
3146 | 0 | return CMD_WARNING; |
3147 | 0 | } |
3148 | | |
3149 | 0 | return interface_ip_igmp_last_member_query_count_magic(self, vty, argc, argv, lmqc, lmqc_str); |
3150 | 0 | } |
3151 | | |
3152 | | /* interface_ip_igmp_last_member_query_interval => "ip igmp last-member-query-interval (1-65535)$lmqi" */ |
3153 | | DEFUN_CMD_FUNC_DECL(interface_ip_igmp_last_member_query_interval) |
3154 | | #define funcdecl_interface_ip_igmp_last_member_query_interval static int interface_ip_igmp_last_member_query_interval_magic(\ |
3155 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3156 | | struct vty *vty __attribute__ ((unused)),\ |
3157 | | int argc __attribute__ ((unused)),\ |
3158 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3159 | | long lmqi,\ |
3160 | | const char * lmqi_str __attribute__ ((unused))) |
3161 | | funcdecl_interface_ip_igmp_last_member_query_interval; |
3162 | | DEFUN_CMD_FUNC_TEXT(interface_ip_igmp_last_member_query_interval) |
3163 | 0 | { |
3164 | 0 | #if 1 /* anything to parse? */ |
3165 | 0 | int _i; |
3166 | 0 | #if 1 /* anything that can fail? */ |
3167 | 0 | unsigned _fail = 0, _failcnt = 0; |
3168 | 0 | #endif |
3169 | 0 | long lmqi = 0; |
3170 | 0 | const char *lmqi_str = NULL; |
3171 | |
|
3172 | 0 | for (_i = 0; _i < argc; _i++) { |
3173 | 0 | if (!argv[_i]->varname) |
3174 | 0 | continue; |
3175 | 0 | #if 1 /* anything that can fail? */ |
3176 | 0 | _fail = 0; |
3177 | 0 | #endif |
3178 | |
|
3179 | 0 | if (!strcmp(argv[_i]->varname, "lmqi")) { |
3180 | 0 | lmqi_str = argv[_i]->arg; |
3181 | 0 | char *_end; |
3182 | 0 | lmqi = strtol(argv[_i]->arg, &_end, 10); |
3183 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
3184 | 0 | } |
3185 | 0 | #if 1 /* anything that can fail? */ |
3186 | 0 | if (_fail) |
3187 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
3188 | 0 | argv[_i]->varname, argv[_i]->arg); |
3189 | 0 | _failcnt += _fail; |
3190 | 0 | #endif |
3191 | 0 | } |
3192 | 0 | #if 1 /* anything that can fail? */ |
3193 | 0 | if (_failcnt) |
3194 | 0 | return CMD_WARNING; |
3195 | 0 | #endif |
3196 | 0 | #endif |
3197 | 0 | if (!lmqi_str) { |
3198 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "lmqi_str"); |
3199 | 0 | return CMD_WARNING; |
3200 | 0 | } |
3201 | | |
3202 | 0 | return interface_ip_igmp_last_member_query_interval_magic(self, vty, argc, argv, lmqi, lmqi_str); |
3203 | 0 | } |
3204 | | |
3205 | | /* interface_ip_igmp_query_generate => "ip igmp generate-query-once [version (2-3)]" */ |
3206 | | DEFUN_CMD_FUNC_DECL(interface_ip_igmp_query_generate) |
3207 | | #define funcdecl_interface_ip_igmp_query_generate static int interface_ip_igmp_query_generate_magic(\ |
3208 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3209 | | struct vty *vty __attribute__ ((unused)),\ |
3210 | | int argc __attribute__ ((unused)),\ |
3211 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3212 | | long version,\ |
3213 | | const char * version_str __attribute__ ((unused))) |
3214 | | funcdecl_interface_ip_igmp_query_generate; |
3215 | | DEFUN_CMD_FUNC_TEXT(interface_ip_igmp_query_generate) |
3216 | 0 | { |
3217 | 0 | #if 1 /* anything to parse? */ |
3218 | 0 | int _i; |
3219 | 0 | #if 1 /* anything that can fail? */ |
3220 | 0 | unsigned _fail = 0, _failcnt = 0; |
3221 | 0 | #endif |
3222 | 0 | long version = 0; |
3223 | 0 | const char *version_str = NULL; |
3224 | |
|
3225 | 0 | for (_i = 0; _i < argc; _i++) { |
3226 | 0 | if (!argv[_i]->varname) |
3227 | 0 | continue; |
3228 | 0 | #if 1 /* anything that can fail? */ |
3229 | 0 | _fail = 0; |
3230 | 0 | #endif |
3231 | |
|
3232 | 0 | if (!strcmp(argv[_i]->varname, "version")) { |
3233 | 0 | version_str = argv[_i]->arg; |
3234 | 0 | char *_end; |
3235 | 0 | version = strtol(argv[_i]->arg, &_end, 10); |
3236 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
3237 | 0 | } |
3238 | 0 | #if 1 /* anything that can fail? */ |
3239 | 0 | if (_fail) |
3240 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
3241 | 0 | argv[_i]->varname, argv[_i]->arg); |
3242 | 0 | _failcnt += _fail; |
3243 | 0 | #endif |
3244 | 0 | } |
3245 | 0 | #if 1 /* anything that can fail? */ |
3246 | 0 | if (_failcnt) |
3247 | 0 | return CMD_WARNING; |
3248 | 0 | #endif |
3249 | 0 | #endif |
3250 | | |
3251 | 0 | return interface_ip_igmp_query_generate_magic(self, vty, argc, argv, version, version_str); |
3252 | 0 | } |
3253 | | |
3254 | | /* pim_test_sg_keepalive => "test pim [vrf NAME$name] keepalive-reset A.B.C.D$source A.B.C.D$group" */ |
3255 | | DEFUN_CMD_FUNC_DECL(pim_test_sg_keepalive) |
3256 | | #define funcdecl_pim_test_sg_keepalive static int pim_test_sg_keepalive_magic(\ |
3257 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3258 | | struct vty *vty __attribute__ ((unused)),\ |
3259 | | int argc __attribute__ ((unused)),\ |
3260 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3261 | | const char * name,\ |
3262 | | struct in_addr source,\ |
3263 | | const char * source_str __attribute__ ((unused)),\ |
3264 | | struct in_addr group,\ |
3265 | | const char * group_str __attribute__ ((unused))) |
3266 | | funcdecl_pim_test_sg_keepalive; |
3267 | | DEFUN_CMD_FUNC_TEXT(pim_test_sg_keepalive) |
3268 | 0 | { |
3269 | 0 | #if 3 /* anything to parse? */ |
3270 | 0 | int _i; |
3271 | 0 | #if 1 /* anything that can fail? */ |
3272 | 0 | unsigned _fail = 0, _failcnt = 0; |
3273 | 0 | #endif |
3274 | 0 | const char *name = NULL; |
3275 | 0 | struct in_addr source = { INADDR_ANY }; |
3276 | 0 | const char *source_str = NULL; |
3277 | 0 | struct in_addr group = { INADDR_ANY }; |
3278 | 0 | const char *group_str = NULL; |
3279 | |
|
3280 | 0 | for (_i = 0; _i < argc; _i++) { |
3281 | 0 | if (!argv[_i]->varname) |
3282 | 0 | continue; |
3283 | 0 | #if 1 /* anything that can fail? */ |
3284 | 0 | _fail = 0; |
3285 | 0 | #endif |
3286 | |
|
3287 | 0 | if (!strcmp(argv[_i]->varname, "name")) { |
3288 | 0 | name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3289 | 0 | } |
3290 | 0 | if (!strcmp(argv[_i]->varname, "source")) { |
3291 | 0 | source_str = argv[_i]->arg; |
3292 | 0 | _fail = !inet_aton(argv[_i]->arg, &source); |
3293 | 0 | } |
3294 | 0 | if (!strcmp(argv[_i]->varname, "group")) { |
3295 | 0 | group_str = argv[_i]->arg; |
3296 | 0 | _fail = !inet_aton(argv[_i]->arg, &group); |
3297 | 0 | } |
3298 | 0 | #if 1 /* anything that can fail? */ |
3299 | 0 | if (_fail) |
3300 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
3301 | 0 | argv[_i]->varname, argv[_i]->arg); |
3302 | 0 | _failcnt += _fail; |
3303 | 0 | #endif |
3304 | 0 | } |
3305 | 0 | #if 1 /* anything that can fail? */ |
3306 | 0 | if (_failcnt) |
3307 | 0 | return CMD_WARNING; |
3308 | 0 | #endif |
3309 | 0 | #endif |
3310 | 0 | if (!source_str) { |
3311 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "source_str"); |
3312 | 0 | return CMD_WARNING; |
3313 | 0 | } |
3314 | 0 | if (!group_str) { |
3315 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "group_str"); |
3316 | 0 | return CMD_WARNING; |
3317 | 0 | } |
3318 | | |
3319 | 0 | return pim_test_sg_keepalive_magic(self, vty, argc, argv, name, source, source_str, group, group_str); |
3320 | 0 | } |
3321 | | |
3322 | | /* interface_ip_pim_activeactive => "[no$no] ip pim active-active" */ |
3323 | | DEFUN_CMD_FUNC_DECL(interface_ip_pim_activeactive) |
3324 | | #define funcdecl_interface_ip_pim_activeactive static int interface_ip_pim_activeactive_magic(\ |
3325 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3326 | | struct vty *vty __attribute__ ((unused)),\ |
3327 | | int argc __attribute__ ((unused)),\ |
3328 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3329 | | const char * no) |
3330 | | funcdecl_interface_ip_pim_activeactive; |
3331 | | DEFUN_CMD_FUNC_TEXT(interface_ip_pim_activeactive) |
3332 | 0 | { |
3333 | 0 | #if 1 /* anything to parse? */ |
3334 | 0 | int _i; |
3335 | | #if 0 /* anything that can fail? */ |
3336 | | unsigned _fail = 0, _failcnt = 0; |
3337 | | #endif |
3338 | 0 | const char *no = NULL; |
3339 | |
|
3340 | 0 | for (_i = 0; _i < argc; _i++) { |
3341 | 0 | if (!argv[_i]->varname) |
3342 | 0 | continue; |
3343 | | #if 0 /* anything that can fail? */ |
3344 | | _fail = 0; |
3345 | | #endif |
3346 | | |
3347 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3348 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3349 | 0 | } |
3350 | | #if 0 /* anything that can fail? */ |
3351 | | if (_fail) |
3352 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3353 | | argv[_i]->varname, argv[_i]->arg); |
3354 | | _failcnt += _fail; |
3355 | | #endif |
3356 | 0 | } |
3357 | | #if 0 /* anything that can fail? */ |
3358 | | if (_failcnt) |
3359 | | return CMD_WARNING; |
3360 | | #endif |
3361 | 0 | #endif |
3362 | |
|
3363 | 0 | return interface_ip_pim_activeactive_magic(self, vty, argc, argv, no); |
3364 | 0 | } |
3365 | | |
3366 | | /* interface_ip_pim => "ip pim [passive$passive]" */ |
3367 | | DEFUN_CMD_FUNC_DECL(interface_ip_pim) |
3368 | | #define funcdecl_interface_ip_pim static int interface_ip_pim_magic(\ |
3369 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3370 | | struct vty *vty __attribute__ ((unused)),\ |
3371 | | int argc __attribute__ ((unused)),\ |
3372 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3373 | | const char * passive) |
3374 | | funcdecl_interface_ip_pim; |
3375 | | DEFUN_CMD_FUNC_TEXT(interface_ip_pim) |
3376 | 0 | { |
3377 | 0 | #if 1 /* anything to parse? */ |
3378 | 0 | int _i; |
3379 | | #if 0 /* anything that can fail? */ |
3380 | | unsigned _fail = 0, _failcnt = 0; |
3381 | | #endif |
3382 | 0 | const char *passive = NULL; |
3383 | |
|
3384 | 0 | for (_i = 0; _i < argc; _i++) { |
3385 | 0 | if (!argv[_i]->varname) |
3386 | 0 | continue; |
3387 | | #if 0 /* anything that can fail? */ |
3388 | | _fail = 0; |
3389 | | #endif |
3390 | | |
3391 | 0 | if (!strcmp(argv[_i]->varname, "passive")) { |
3392 | 0 | passive = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3393 | 0 | } |
3394 | | #if 0 /* anything that can fail? */ |
3395 | | if (_fail) |
3396 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3397 | | argv[_i]->varname, argv[_i]->arg); |
3398 | | _failcnt += _fail; |
3399 | | #endif |
3400 | 0 | } |
3401 | | #if 0 /* anything that can fail? */ |
3402 | | if (_failcnt) |
3403 | | return CMD_WARNING; |
3404 | | #endif |
3405 | 0 | #endif |
3406 | |
|
3407 | 0 | return interface_ip_pim_magic(self, vty, argc, argv, passive); |
3408 | 0 | } |
3409 | | |
3410 | | /* interface_no_ip_pim => "no ip pim [passive$passive]" */ |
3411 | | DEFUN_CMD_FUNC_DECL(interface_no_ip_pim) |
3412 | | #define funcdecl_interface_no_ip_pim static int interface_no_ip_pim_magic(\ |
3413 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3414 | | struct vty *vty __attribute__ ((unused)),\ |
3415 | | int argc __attribute__ ((unused)),\ |
3416 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3417 | | const char * passive) |
3418 | | funcdecl_interface_no_ip_pim; |
3419 | | DEFUN_CMD_FUNC_TEXT(interface_no_ip_pim) |
3420 | 0 | { |
3421 | 0 | #if 1 /* anything to parse? */ |
3422 | 0 | int _i; |
3423 | | #if 0 /* anything that can fail? */ |
3424 | | unsigned _fail = 0, _failcnt = 0; |
3425 | | #endif |
3426 | 0 | const char *passive = NULL; |
3427 | |
|
3428 | 0 | for (_i = 0; _i < argc; _i++) { |
3429 | 0 | if (!argv[_i]->varname) |
3430 | 0 | continue; |
3431 | | #if 0 /* anything that can fail? */ |
3432 | | _fail = 0; |
3433 | | #endif |
3434 | | |
3435 | 0 | if (!strcmp(argv[_i]->varname, "passive")) { |
3436 | 0 | passive = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3437 | 0 | } |
3438 | | #if 0 /* anything that can fail? */ |
3439 | | if (_fail) |
3440 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3441 | | argv[_i]->varname, argv[_i]->arg); |
3442 | | _failcnt += _fail; |
3443 | | #endif |
3444 | 0 | } |
3445 | | #if 0 /* anything that can fail? */ |
3446 | | if (_failcnt) |
3447 | | return CMD_WARNING; |
3448 | | #endif |
3449 | 0 | #endif |
3450 | |
|
3451 | 0 | return interface_no_ip_pim_magic(self, vty, argc, argv, passive); |
3452 | 0 | } |
3453 | | |
3454 | | /* debug_pim => "[no] debug pim" */ |
3455 | | DEFUN_CMD_FUNC_DECL(debug_pim) |
3456 | | #define funcdecl_debug_pim static int debug_pim_magic(\ |
3457 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3458 | | struct vty *vty __attribute__ ((unused)),\ |
3459 | | int argc __attribute__ ((unused)),\ |
3460 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3461 | | const char * no) |
3462 | | funcdecl_debug_pim; |
3463 | | DEFUN_CMD_FUNC_TEXT(debug_pim) |
3464 | 0 | { |
3465 | 0 | #if 1 /* anything to parse? */ |
3466 | 0 | int _i; |
3467 | | #if 0 /* anything that can fail? */ |
3468 | | unsigned _fail = 0, _failcnt = 0; |
3469 | | #endif |
3470 | 0 | const char *no = NULL; |
3471 | |
|
3472 | 0 | for (_i = 0; _i < argc; _i++) { |
3473 | 0 | if (!argv[_i]->varname) |
3474 | 0 | continue; |
3475 | | #if 0 /* anything that can fail? */ |
3476 | | _fail = 0; |
3477 | | #endif |
3478 | | |
3479 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3480 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3481 | 0 | } |
3482 | | #if 0 /* anything that can fail? */ |
3483 | | if (_fail) |
3484 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3485 | | argv[_i]->varname, argv[_i]->arg); |
3486 | | _failcnt += _fail; |
3487 | | #endif |
3488 | 0 | } |
3489 | | #if 0 /* anything that can fail? */ |
3490 | | if (_failcnt) |
3491 | | return CMD_WARNING; |
3492 | | #endif |
3493 | 0 | #endif |
3494 | |
|
3495 | 0 | return debug_pim_magic(self, vty, argc, argv, no); |
3496 | 0 | } |
3497 | | |
3498 | | /* debug_pim_nht => "[no] debug pim nht" */ |
3499 | | DEFUN_CMD_FUNC_DECL(debug_pim_nht) |
3500 | | #define funcdecl_debug_pim_nht static int debug_pim_nht_magic(\ |
3501 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3502 | | struct vty *vty __attribute__ ((unused)),\ |
3503 | | int argc __attribute__ ((unused)),\ |
3504 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3505 | | const char * no) |
3506 | | funcdecl_debug_pim_nht; |
3507 | | DEFUN_CMD_FUNC_TEXT(debug_pim_nht) |
3508 | 0 | { |
3509 | 0 | #if 1 /* anything to parse? */ |
3510 | 0 | int _i; |
3511 | | #if 0 /* anything that can fail? */ |
3512 | | unsigned _fail = 0, _failcnt = 0; |
3513 | | #endif |
3514 | 0 | const char *no = NULL; |
3515 | |
|
3516 | 0 | for (_i = 0; _i < argc; _i++) { |
3517 | 0 | if (!argv[_i]->varname) |
3518 | 0 | continue; |
3519 | | #if 0 /* anything that can fail? */ |
3520 | | _fail = 0; |
3521 | | #endif |
3522 | | |
3523 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3524 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3525 | 0 | } |
3526 | | #if 0 /* anything that can fail? */ |
3527 | | if (_fail) |
3528 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3529 | | argv[_i]->varname, argv[_i]->arg); |
3530 | | _failcnt += _fail; |
3531 | | #endif |
3532 | 0 | } |
3533 | | #if 0 /* anything that can fail? */ |
3534 | | if (_failcnt) |
3535 | | return CMD_WARNING; |
3536 | | #endif |
3537 | 0 | #endif |
3538 | |
|
3539 | 0 | return debug_pim_nht_magic(self, vty, argc, argv, no); |
3540 | 0 | } |
3541 | | |
3542 | | /* debug_pim_nht_det => "[no] debug pim nht detail" */ |
3543 | | DEFUN_CMD_FUNC_DECL(debug_pim_nht_det) |
3544 | | #define funcdecl_debug_pim_nht_det static int debug_pim_nht_det_magic(\ |
3545 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3546 | | struct vty *vty __attribute__ ((unused)),\ |
3547 | | int argc __attribute__ ((unused)),\ |
3548 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3549 | | const char * no) |
3550 | | funcdecl_debug_pim_nht_det; |
3551 | | DEFUN_CMD_FUNC_TEXT(debug_pim_nht_det) |
3552 | 0 | { |
3553 | 0 | #if 1 /* anything to parse? */ |
3554 | 0 | int _i; |
3555 | | #if 0 /* anything that can fail? */ |
3556 | | unsigned _fail = 0, _failcnt = 0; |
3557 | | #endif |
3558 | 0 | const char *no = NULL; |
3559 | |
|
3560 | 0 | for (_i = 0; _i < argc; _i++) { |
3561 | 0 | if (!argv[_i]->varname) |
3562 | 0 | continue; |
3563 | | #if 0 /* anything that can fail? */ |
3564 | | _fail = 0; |
3565 | | #endif |
3566 | | |
3567 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3568 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3569 | 0 | } |
3570 | | #if 0 /* anything that can fail? */ |
3571 | | if (_fail) |
3572 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3573 | | argv[_i]->varname, argv[_i]->arg); |
3574 | | _failcnt += _fail; |
3575 | | #endif |
3576 | 0 | } |
3577 | | #if 0 /* anything that can fail? */ |
3578 | | if (_failcnt) |
3579 | | return CMD_WARNING; |
3580 | | #endif |
3581 | 0 | #endif |
3582 | |
|
3583 | 0 | return debug_pim_nht_det_magic(self, vty, argc, argv, no); |
3584 | 0 | } |
3585 | | |
3586 | | /* debug_pim_events => "[no] debug pim events" */ |
3587 | | DEFUN_CMD_FUNC_DECL(debug_pim_events) |
3588 | | #define funcdecl_debug_pim_events static int debug_pim_events_magic(\ |
3589 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3590 | | struct vty *vty __attribute__ ((unused)),\ |
3591 | | int argc __attribute__ ((unused)),\ |
3592 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3593 | | const char * no) |
3594 | | funcdecl_debug_pim_events; |
3595 | | DEFUN_CMD_FUNC_TEXT(debug_pim_events) |
3596 | 0 | { |
3597 | 0 | #if 1 /* anything to parse? */ |
3598 | 0 | int _i; |
3599 | | #if 0 /* anything that can fail? */ |
3600 | | unsigned _fail = 0, _failcnt = 0; |
3601 | | #endif |
3602 | 0 | const char *no = NULL; |
3603 | |
|
3604 | 0 | for (_i = 0; _i < argc; _i++) { |
3605 | 0 | if (!argv[_i]->varname) |
3606 | 0 | continue; |
3607 | | #if 0 /* anything that can fail? */ |
3608 | | _fail = 0; |
3609 | | #endif |
3610 | | |
3611 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3612 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3613 | 0 | } |
3614 | | #if 0 /* anything that can fail? */ |
3615 | | if (_fail) |
3616 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3617 | | argv[_i]->varname, argv[_i]->arg); |
3618 | | _failcnt += _fail; |
3619 | | #endif |
3620 | 0 | } |
3621 | | #if 0 /* anything that can fail? */ |
3622 | | if (_failcnt) |
3623 | | return CMD_WARNING; |
3624 | | #endif |
3625 | 0 | #endif |
3626 | |
|
3627 | 0 | return debug_pim_events_magic(self, vty, argc, argv, no); |
3628 | 0 | } |
3629 | | |
3630 | | /* debug_pim_packets => "[no] debug pim packets [<hello$hello|joins$joins|register$registers>]" */ |
3631 | | DEFUN_CMD_FUNC_DECL(debug_pim_packets) |
3632 | | #define funcdecl_debug_pim_packets static int debug_pim_packets_magic(\ |
3633 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3634 | | struct vty *vty __attribute__ ((unused)),\ |
3635 | | int argc __attribute__ ((unused)),\ |
3636 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3637 | | const char * no,\ |
3638 | | const char * hello,\ |
3639 | | const char * joins,\ |
3640 | | const char * registers) |
3641 | | funcdecl_debug_pim_packets; |
3642 | | DEFUN_CMD_FUNC_TEXT(debug_pim_packets) |
3643 | 0 | { |
3644 | 0 | #if 4 /* anything to parse? */ |
3645 | 0 | int _i; |
3646 | | #if 0 /* anything that can fail? */ |
3647 | | unsigned _fail = 0, _failcnt = 0; |
3648 | | #endif |
3649 | 0 | const char *no = NULL; |
3650 | 0 | const char *hello = NULL; |
3651 | 0 | const char *joins = NULL; |
3652 | 0 | const char *registers = NULL; |
3653 | |
|
3654 | 0 | for (_i = 0; _i < argc; _i++) { |
3655 | 0 | if (!argv[_i]->varname) |
3656 | 0 | continue; |
3657 | | #if 0 /* anything that can fail? */ |
3658 | | _fail = 0; |
3659 | | #endif |
3660 | | |
3661 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3662 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3663 | 0 | } |
3664 | 0 | if (!strcmp(argv[_i]->varname, "hello")) { |
3665 | 0 | hello = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3666 | 0 | } |
3667 | 0 | if (!strcmp(argv[_i]->varname, "joins")) { |
3668 | 0 | joins = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3669 | 0 | } |
3670 | 0 | if (!strcmp(argv[_i]->varname, "registers")) { |
3671 | 0 | registers = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3672 | 0 | } |
3673 | | #if 0 /* anything that can fail? */ |
3674 | | if (_fail) |
3675 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3676 | | argv[_i]->varname, argv[_i]->arg); |
3677 | | _failcnt += _fail; |
3678 | | #endif |
3679 | 0 | } |
3680 | | #if 0 /* anything that can fail? */ |
3681 | | if (_failcnt) |
3682 | | return CMD_WARNING; |
3683 | | #endif |
3684 | 0 | #endif |
3685 | |
|
3686 | 0 | return debug_pim_packets_magic(self, vty, argc, argv, no, hello, joins, registers); |
3687 | 0 | } |
3688 | | |
3689 | | /* debug_pim_packetdump_send => "[no] debug pim packet-dump send" */ |
3690 | | DEFUN_CMD_FUNC_DECL(debug_pim_packetdump_send) |
3691 | | #define funcdecl_debug_pim_packetdump_send static int debug_pim_packetdump_send_magic(\ |
3692 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3693 | | struct vty *vty __attribute__ ((unused)),\ |
3694 | | int argc __attribute__ ((unused)),\ |
3695 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3696 | | const char * no) |
3697 | | funcdecl_debug_pim_packetdump_send; |
3698 | | DEFUN_CMD_FUNC_TEXT(debug_pim_packetdump_send) |
3699 | 0 | { |
3700 | 0 | #if 1 /* anything to parse? */ |
3701 | 0 | int _i; |
3702 | | #if 0 /* anything that can fail? */ |
3703 | | unsigned _fail = 0, _failcnt = 0; |
3704 | | #endif |
3705 | 0 | const char *no = NULL; |
3706 | |
|
3707 | 0 | for (_i = 0; _i < argc; _i++) { |
3708 | 0 | if (!argv[_i]->varname) |
3709 | 0 | continue; |
3710 | | #if 0 /* anything that can fail? */ |
3711 | | _fail = 0; |
3712 | | #endif |
3713 | | |
3714 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3715 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3716 | 0 | } |
3717 | | #if 0 /* anything that can fail? */ |
3718 | | if (_fail) |
3719 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3720 | | argv[_i]->varname, argv[_i]->arg); |
3721 | | _failcnt += _fail; |
3722 | | #endif |
3723 | 0 | } |
3724 | | #if 0 /* anything that can fail? */ |
3725 | | if (_failcnt) |
3726 | | return CMD_WARNING; |
3727 | | #endif |
3728 | 0 | #endif |
3729 | |
|
3730 | 0 | return debug_pim_packetdump_send_magic(self, vty, argc, argv, no); |
3731 | 0 | } |
3732 | | |
3733 | | /* debug_pim_packetdump_recv => "[no] debug pim packet-dump receive" */ |
3734 | | DEFUN_CMD_FUNC_DECL(debug_pim_packetdump_recv) |
3735 | | #define funcdecl_debug_pim_packetdump_recv static int debug_pim_packetdump_recv_magic(\ |
3736 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3737 | | struct vty *vty __attribute__ ((unused)),\ |
3738 | | int argc __attribute__ ((unused)),\ |
3739 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3740 | | const char * no) |
3741 | | funcdecl_debug_pim_packetdump_recv; |
3742 | | DEFUN_CMD_FUNC_TEXT(debug_pim_packetdump_recv) |
3743 | 0 | { |
3744 | 0 | #if 1 /* anything to parse? */ |
3745 | 0 | int _i; |
3746 | | #if 0 /* anything that can fail? */ |
3747 | | unsigned _fail = 0, _failcnt = 0; |
3748 | | #endif |
3749 | 0 | const char *no = NULL; |
3750 | |
|
3751 | 0 | for (_i = 0; _i < argc; _i++) { |
3752 | 0 | if (!argv[_i]->varname) |
3753 | 0 | continue; |
3754 | | #if 0 /* anything that can fail? */ |
3755 | | _fail = 0; |
3756 | | #endif |
3757 | | |
3758 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3759 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3760 | 0 | } |
3761 | | #if 0 /* anything that can fail? */ |
3762 | | if (_fail) |
3763 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3764 | | argv[_i]->varname, argv[_i]->arg); |
3765 | | _failcnt += _fail; |
3766 | | #endif |
3767 | 0 | } |
3768 | | #if 0 /* anything that can fail? */ |
3769 | | if (_failcnt) |
3770 | | return CMD_WARNING; |
3771 | | #endif |
3772 | 0 | #endif |
3773 | |
|
3774 | 0 | return debug_pim_packetdump_recv_magic(self, vty, argc, argv, no); |
3775 | 0 | } |
3776 | | |
3777 | | /* debug_pim_trace => "[no] debug pim trace" */ |
3778 | | DEFUN_CMD_FUNC_DECL(debug_pim_trace) |
3779 | | #define funcdecl_debug_pim_trace static int debug_pim_trace_magic(\ |
3780 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3781 | | struct vty *vty __attribute__ ((unused)),\ |
3782 | | int argc __attribute__ ((unused)),\ |
3783 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3784 | | const char * no) |
3785 | | funcdecl_debug_pim_trace; |
3786 | | DEFUN_CMD_FUNC_TEXT(debug_pim_trace) |
3787 | 0 | { |
3788 | 0 | #if 1 /* anything to parse? */ |
3789 | 0 | int _i; |
3790 | | #if 0 /* anything that can fail? */ |
3791 | | unsigned _fail = 0, _failcnt = 0; |
3792 | | #endif |
3793 | 0 | const char *no = NULL; |
3794 | |
|
3795 | 0 | for (_i = 0; _i < argc; _i++) { |
3796 | 0 | if (!argv[_i]->varname) |
3797 | 0 | continue; |
3798 | | #if 0 /* anything that can fail? */ |
3799 | | _fail = 0; |
3800 | | #endif |
3801 | | |
3802 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3803 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3804 | 0 | } |
3805 | | #if 0 /* anything that can fail? */ |
3806 | | if (_fail) |
3807 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3808 | | argv[_i]->varname, argv[_i]->arg); |
3809 | | _failcnt += _fail; |
3810 | | #endif |
3811 | 0 | } |
3812 | | #if 0 /* anything that can fail? */ |
3813 | | if (_failcnt) |
3814 | | return CMD_WARNING; |
3815 | | #endif |
3816 | 0 | #endif |
3817 | |
|
3818 | 0 | return debug_pim_trace_magic(self, vty, argc, argv, no); |
3819 | 0 | } |
3820 | | |
3821 | | /* debug_pim_trace_detail => "[no] debug pim trace detail" */ |
3822 | | DEFUN_CMD_FUNC_DECL(debug_pim_trace_detail) |
3823 | | #define funcdecl_debug_pim_trace_detail static int debug_pim_trace_detail_magic(\ |
3824 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3825 | | struct vty *vty __attribute__ ((unused)),\ |
3826 | | int argc __attribute__ ((unused)),\ |
3827 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3828 | | const char * no) |
3829 | | funcdecl_debug_pim_trace_detail; |
3830 | | DEFUN_CMD_FUNC_TEXT(debug_pim_trace_detail) |
3831 | 0 | { |
3832 | 0 | #if 1 /* anything to parse? */ |
3833 | 0 | int _i; |
3834 | | #if 0 /* anything that can fail? */ |
3835 | | unsigned _fail = 0, _failcnt = 0; |
3836 | | #endif |
3837 | 0 | const char *no = NULL; |
3838 | |
|
3839 | 0 | for (_i = 0; _i < argc; _i++) { |
3840 | 0 | if (!argv[_i]->varname) |
3841 | 0 | continue; |
3842 | | #if 0 /* anything that can fail? */ |
3843 | | _fail = 0; |
3844 | | #endif |
3845 | | |
3846 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3847 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3848 | 0 | } |
3849 | | #if 0 /* anything that can fail? */ |
3850 | | if (_fail) |
3851 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3852 | | argv[_i]->varname, argv[_i]->arg); |
3853 | | _failcnt += _fail; |
3854 | | #endif |
3855 | 0 | } |
3856 | | #if 0 /* anything that can fail? */ |
3857 | | if (_failcnt) |
3858 | | return CMD_WARNING; |
3859 | | #endif |
3860 | 0 | #endif |
3861 | |
|
3862 | 0 | return debug_pim_trace_detail_magic(self, vty, argc, argv, no); |
3863 | 0 | } |
3864 | | |
3865 | | /* debug_pim_zebra => "[no] debug pim zebra" */ |
3866 | | DEFUN_CMD_FUNC_DECL(debug_pim_zebra) |
3867 | | #define funcdecl_debug_pim_zebra static int debug_pim_zebra_magic(\ |
3868 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3869 | | struct vty *vty __attribute__ ((unused)),\ |
3870 | | int argc __attribute__ ((unused)),\ |
3871 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3872 | | const char * no) |
3873 | | funcdecl_debug_pim_zebra; |
3874 | | DEFUN_CMD_FUNC_TEXT(debug_pim_zebra) |
3875 | 0 | { |
3876 | 0 | #if 1 /* anything to parse? */ |
3877 | 0 | int _i; |
3878 | | #if 0 /* anything that can fail? */ |
3879 | | unsigned _fail = 0, _failcnt = 0; |
3880 | | #endif |
3881 | 0 | const char *no = NULL; |
3882 | |
|
3883 | 0 | for (_i = 0; _i < argc; _i++) { |
3884 | 0 | if (!argv[_i]->varname) |
3885 | 0 | continue; |
3886 | | #if 0 /* anything that can fail? */ |
3887 | | _fail = 0; |
3888 | | #endif |
3889 | | |
3890 | 0 | if (!strcmp(argv[_i]->varname, "no")) { |
3891 | 0 | no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3892 | 0 | } |
3893 | | #if 0 /* anything that can fail? */ |
3894 | | if (_fail) |
3895 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3896 | | argv[_i]->varname, argv[_i]->arg); |
3897 | | _failcnt += _fail; |
3898 | | #endif |
3899 | 0 | } |
3900 | | #if 0 /* anything that can fail? */ |
3901 | | if (_failcnt) |
3902 | | return CMD_WARNING; |
3903 | | #endif |
3904 | 0 | #endif |
3905 | |
|
3906 | 0 | return debug_pim_zebra_magic(self, vty, argc, argv, no); |
3907 | 0 | } |
3908 | | |
3909 | | /* ip_pim_bfd => "ip pim bfd [profile BFDPROF$prof]" */ |
3910 | | DEFUN_CMD_FUNC_DECL(ip_pim_bfd) |
3911 | | #define funcdecl_ip_pim_bfd static int ip_pim_bfd_magic(\ |
3912 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3913 | | struct vty *vty __attribute__ ((unused)),\ |
3914 | | int argc __attribute__ ((unused)),\ |
3915 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3916 | | const char * prof) |
3917 | | funcdecl_ip_pim_bfd; |
3918 | | DEFUN_CMD_FUNC_TEXT(ip_pim_bfd) |
3919 | 0 | { |
3920 | 0 | #if 1 /* anything to parse? */ |
3921 | 0 | int _i; |
3922 | | #if 0 /* anything that can fail? */ |
3923 | | unsigned _fail = 0, _failcnt = 0; |
3924 | | #endif |
3925 | 0 | const char *prof = NULL; |
3926 | |
|
3927 | 0 | for (_i = 0; _i < argc; _i++) { |
3928 | 0 | if (!argv[_i]->varname) |
3929 | 0 | continue; |
3930 | | #if 0 /* anything that can fail? */ |
3931 | | _fail = 0; |
3932 | | #endif |
3933 | | |
3934 | 0 | if (!strcmp(argv[_i]->varname, "prof")) { |
3935 | 0 | prof = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3936 | 0 | } |
3937 | | #if 0 /* anything that can fail? */ |
3938 | | if (_fail) |
3939 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3940 | | argv[_i]->varname, argv[_i]->arg); |
3941 | | _failcnt += _fail; |
3942 | | #endif |
3943 | 0 | } |
3944 | | #if 0 /* anything that can fail? */ |
3945 | | if (_failcnt) |
3946 | | return CMD_WARNING; |
3947 | | #endif |
3948 | 0 | #endif |
3949 | |
|
3950 | 0 | return ip_pim_bfd_magic(self, vty, argc, argv, prof); |
3951 | 0 | } |
3952 | | |
3953 | | /* no_ip_pim_bfd_profile => "no ip pim bfd profile [BFDPROF]" */ |
3954 | | DEFUN_CMD_FUNC_DECL(no_ip_pim_bfd_profile) |
3955 | | #define funcdecl_no_ip_pim_bfd_profile static int no_ip_pim_bfd_profile_magic(\ |
3956 | | const struct cmd_element *self __attribute__ ((unused)),\ |
3957 | | struct vty *vty __attribute__ ((unused)),\ |
3958 | | int argc __attribute__ ((unused)),\ |
3959 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
3960 | | const char * bfdprof) |
3961 | | funcdecl_no_ip_pim_bfd_profile; |
3962 | | DEFUN_CMD_FUNC_TEXT(no_ip_pim_bfd_profile) |
3963 | 0 | { |
3964 | 0 | #if 1 /* anything to parse? */ |
3965 | 0 | int _i; |
3966 | | #if 0 /* anything that can fail? */ |
3967 | | unsigned _fail = 0, _failcnt = 0; |
3968 | | #endif |
3969 | 0 | const char *bfdprof = NULL; |
3970 | |
|
3971 | 0 | for (_i = 0; _i < argc; _i++) { |
3972 | 0 | if (!argv[_i]->varname) |
3973 | 0 | continue; |
3974 | | #if 0 /* anything that can fail? */ |
3975 | | _fail = 0; |
3976 | | #endif |
3977 | | |
3978 | 0 | if (!strcmp(argv[_i]->varname, "bfdprof")) { |
3979 | 0 | bfdprof = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
3980 | 0 | } |
3981 | | #if 0 /* anything that can fail? */ |
3982 | | if (_fail) |
3983 | | vty_out (vty, "%% invalid input for %s: %s\n", |
3984 | | argv[_i]->varname, argv[_i]->arg); |
3985 | | _failcnt += _fail; |
3986 | | #endif |
3987 | 0 | } |
3988 | | #if 0 /* anything that can fail? */ |
3989 | | if (_failcnt) |
3990 | | return CMD_WARNING; |
3991 | | #endif |
3992 | 0 | #endif |
3993 | |
|
3994 | 0 | return no_ip_pim_bfd_profile_magic(self, vty, argc, argv, bfdprof); |
3995 | 0 | } |
3996 | | |
3997 | | /* ip_msdp_peer => "ip msdp peer A.B.C.D$peer source A.B.C.D$source" */ |
3998 | | DEFUN_CMD_FUNC_DECL(ip_msdp_peer) |
3999 | | #define funcdecl_ip_msdp_peer static int ip_msdp_peer_magic(\ |
4000 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4001 | | struct vty *vty __attribute__ ((unused)),\ |
4002 | | int argc __attribute__ ((unused)),\ |
4003 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4004 | | struct in_addr peer,\ |
4005 | | const char * peer_str __attribute__ ((unused)),\ |
4006 | | struct in_addr source,\ |
4007 | | const char * source_str __attribute__ ((unused))) |
4008 | | funcdecl_ip_msdp_peer; |
4009 | | DEFUN_CMD_FUNC_TEXT(ip_msdp_peer) |
4010 | 0 | { |
4011 | 0 | #if 2 /* anything to parse? */ |
4012 | 0 | int _i; |
4013 | 0 | #if 1 /* anything that can fail? */ |
4014 | 0 | unsigned _fail = 0, _failcnt = 0; |
4015 | 0 | #endif |
4016 | 0 | struct in_addr peer = { INADDR_ANY }; |
4017 | 0 | const char *peer_str = NULL; |
4018 | 0 | struct in_addr source = { INADDR_ANY }; |
4019 | 0 | const char *source_str = NULL; |
4020 | |
|
4021 | 0 | for (_i = 0; _i < argc; _i++) { |
4022 | 0 | if (!argv[_i]->varname) |
4023 | 0 | continue; |
4024 | 0 | #if 1 /* anything that can fail? */ |
4025 | 0 | _fail = 0; |
4026 | 0 | #endif |
4027 | |
|
4028 | 0 | if (!strcmp(argv[_i]->varname, "peer")) { |
4029 | 0 | peer_str = argv[_i]->arg; |
4030 | 0 | _fail = !inet_aton(argv[_i]->arg, &peer); |
4031 | 0 | } |
4032 | 0 | if (!strcmp(argv[_i]->varname, "source")) { |
4033 | 0 | source_str = argv[_i]->arg; |
4034 | 0 | _fail = !inet_aton(argv[_i]->arg, &source); |
4035 | 0 | } |
4036 | 0 | #if 1 /* anything that can fail? */ |
4037 | 0 | if (_fail) |
4038 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4039 | 0 | argv[_i]->varname, argv[_i]->arg); |
4040 | 0 | _failcnt += _fail; |
4041 | 0 | #endif |
4042 | 0 | } |
4043 | 0 | #if 1 /* anything that can fail? */ |
4044 | 0 | if (_failcnt) |
4045 | 0 | return CMD_WARNING; |
4046 | 0 | #endif |
4047 | 0 | #endif |
4048 | 0 | if (!peer_str) { |
4049 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "peer_str"); |
4050 | 0 | return CMD_WARNING; |
4051 | 0 | } |
4052 | 0 | if (!source_str) { |
4053 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "source_str"); |
4054 | 0 | return CMD_WARNING; |
4055 | 0 | } |
4056 | | |
4057 | 0 | return ip_msdp_peer_magic(self, vty, argc, argv, peer, peer_str, source, source_str); |
4058 | 0 | } |
4059 | | |
4060 | | /* ip_msdp_timers => "ip msdp timers (1-65535)$keepalive (1-65535)$holdtime [(1-65535)$connretry]" */ |
4061 | | DEFUN_CMD_FUNC_DECL(ip_msdp_timers) |
4062 | | #define funcdecl_ip_msdp_timers static int ip_msdp_timers_magic(\ |
4063 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4064 | | struct vty *vty __attribute__ ((unused)),\ |
4065 | | int argc __attribute__ ((unused)),\ |
4066 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4067 | | long keepalive,\ |
4068 | | const char * keepalive_str __attribute__ ((unused)),\ |
4069 | | long holdtime,\ |
4070 | | const char * holdtime_str __attribute__ ((unused)),\ |
4071 | | long connretry,\ |
4072 | | const char * connretry_str __attribute__ ((unused))) |
4073 | | funcdecl_ip_msdp_timers; |
4074 | | DEFUN_CMD_FUNC_TEXT(ip_msdp_timers) |
4075 | 0 | { |
4076 | 0 | #if 3 /* anything to parse? */ |
4077 | 0 | int _i; |
4078 | 0 | #if 1 /* anything that can fail? */ |
4079 | 0 | unsigned _fail = 0, _failcnt = 0; |
4080 | 0 | #endif |
4081 | 0 | long keepalive = 0; |
4082 | 0 | const char *keepalive_str = NULL; |
4083 | 0 | long holdtime = 0; |
4084 | 0 | const char *holdtime_str = NULL; |
4085 | 0 | long connretry = 0; |
4086 | 0 | const char *connretry_str = NULL; |
4087 | |
|
4088 | 0 | for (_i = 0; _i < argc; _i++) { |
4089 | 0 | if (!argv[_i]->varname) |
4090 | 0 | continue; |
4091 | 0 | #if 1 /* anything that can fail? */ |
4092 | 0 | _fail = 0; |
4093 | 0 | #endif |
4094 | |
|
4095 | 0 | if (!strcmp(argv[_i]->varname, "keepalive")) { |
4096 | 0 | keepalive_str = argv[_i]->arg; |
4097 | 0 | char *_end; |
4098 | 0 | keepalive = strtol(argv[_i]->arg, &_end, 10); |
4099 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
4100 | 0 | } |
4101 | 0 | if (!strcmp(argv[_i]->varname, "holdtime")) { |
4102 | 0 | holdtime_str = argv[_i]->arg; |
4103 | 0 | char *_end; |
4104 | 0 | holdtime = strtol(argv[_i]->arg, &_end, 10); |
4105 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
4106 | 0 | } |
4107 | 0 | if (!strcmp(argv[_i]->varname, "connretry")) { |
4108 | 0 | connretry_str = argv[_i]->arg; |
4109 | 0 | char *_end; |
4110 | 0 | connretry = strtol(argv[_i]->arg, &_end, 10); |
4111 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
4112 | 0 | } |
4113 | 0 | #if 1 /* anything that can fail? */ |
4114 | 0 | if (_fail) |
4115 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4116 | 0 | argv[_i]->varname, argv[_i]->arg); |
4117 | 0 | _failcnt += _fail; |
4118 | 0 | #endif |
4119 | 0 | } |
4120 | 0 | #if 1 /* anything that can fail? */ |
4121 | 0 | if (_failcnt) |
4122 | 0 | return CMD_WARNING; |
4123 | 0 | #endif |
4124 | 0 | #endif |
4125 | 0 | if (!keepalive_str) { |
4126 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "keepalive_str"); |
4127 | 0 | return CMD_WARNING; |
4128 | 0 | } |
4129 | 0 | if (!holdtime_str) { |
4130 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "holdtime_str"); |
4131 | 0 | return CMD_WARNING; |
4132 | 0 | } |
4133 | | |
4134 | 0 | return ip_msdp_timers_magic(self, vty, argc, argv, keepalive, keepalive_str, holdtime, holdtime_str, connretry, connretry_str); |
4135 | 0 | } |
4136 | | |
4137 | | /* no_ip_msdp_timers => "no ip msdp timers [(1-65535) (1-65535) [(1-65535)]]" */ |
4138 | | DEFUN_CMD_FUNC_DECL(no_ip_msdp_timers) |
4139 | | #define funcdecl_no_ip_msdp_timers static int no_ip_msdp_timers_magic(\ |
4140 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4141 | | struct vty *vty __attribute__ ((unused)),\ |
4142 | | int argc __attribute__ ((unused)),\ |
4143 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4144 | | long timers,\ |
4145 | | const char * timers_str __attribute__ ((unused))) |
4146 | | funcdecl_no_ip_msdp_timers; |
4147 | | DEFUN_CMD_FUNC_TEXT(no_ip_msdp_timers) |
4148 | 0 | { |
4149 | 0 | #if 1 /* anything to parse? */ |
4150 | 0 | int _i; |
4151 | 0 | #if 1 /* anything that can fail? */ |
4152 | 0 | unsigned _fail = 0, _failcnt = 0; |
4153 | 0 | #endif |
4154 | 0 | long timers = 0; |
4155 | 0 | const char *timers_str = NULL; |
4156 | |
|
4157 | 0 | for (_i = 0; _i < argc; _i++) { |
4158 | 0 | if (!argv[_i]->varname) |
4159 | 0 | continue; |
4160 | 0 | #if 1 /* anything that can fail? */ |
4161 | 0 | _fail = 0; |
4162 | 0 | #endif |
4163 | |
|
4164 | 0 | if (!strcmp(argv[_i]->varname, "timers")) { |
4165 | 0 | timers_str = argv[_i]->arg; |
4166 | 0 | char *_end; |
4167 | 0 | timers = strtol(argv[_i]->arg, &_end, 10); |
4168 | 0 | _fail = (_end == argv[_i]->arg) || (*_end != '\0'); |
4169 | 0 | } |
4170 | 0 | #if 1 /* anything that can fail? */ |
4171 | 0 | if (_fail) |
4172 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4173 | 0 | argv[_i]->varname, argv[_i]->arg); |
4174 | 0 | _failcnt += _fail; |
4175 | 0 | #endif |
4176 | 0 | } |
4177 | 0 | #if 1 /* anything that can fail? */ |
4178 | 0 | if (_failcnt) |
4179 | 0 | return CMD_WARNING; |
4180 | 0 | #endif |
4181 | 0 | #endif |
4182 | | |
4183 | 0 | return no_ip_msdp_timers_magic(self, vty, argc, argv, timers, timers_str); |
4184 | 0 | } |
4185 | | |
4186 | | /* ip_msdp_mesh_group_member => "ip msdp mesh-group WORD$gname member A.B.C.D$maddr" */ |
4187 | | DEFUN_CMD_FUNC_DECL(ip_msdp_mesh_group_member) |
4188 | | #define funcdecl_ip_msdp_mesh_group_member static int ip_msdp_mesh_group_member_magic(\ |
4189 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4190 | | struct vty *vty __attribute__ ((unused)),\ |
4191 | | int argc __attribute__ ((unused)),\ |
4192 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4193 | | const char * gname,\ |
4194 | | struct in_addr maddr,\ |
4195 | | const char * maddr_str __attribute__ ((unused))) |
4196 | | funcdecl_ip_msdp_mesh_group_member; |
4197 | | DEFUN_CMD_FUNC_TEXT(ip_msdp_mesh_group_member) |
4198 | 0 | { |
4199 | 0 | #if 2 /* anything to parse? */ |
4200 | 0 | int _i; |
4201 | 0 | #if 1 /* anything that can fail? */ |
4202 | 0 | unsigned _fail = 0, _failcnt = 0; |
4203 | 0 | #endif |
4204 | 0 | const char *gname = NULL; |
4205 | 0 | struct in_addr maddr = { INADDR_ANY }; |
4206 | 0 | const char *maddr_str = NULL; |
4207 | |
|
4208 | 0 | for (_i = 0; _i < argc; _i++) { |
4209 | 0 | if (!argv[_i]->varname) |
4210 | 0 | continue; |
4211 | 0 | #if 1 /* anything that can fail? */ |
4212 | 0 | _fail = 0; |
4213 | 0 | #endif |
4214 | |
|
4215 | 0 | if (!strcmp(argv[_i]->varname, "gname")) { |
4216 | 0 | gname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
4217 | 0 | } |
4218 | 0 | if (!strcmp(argv[_i]->varname, "maddr")) { |
4219 | 0 | maddr_str = argv[_i]->arg; |
4220 | 0 | _fail = !inet_aton(argv[_i]->arg, &maddr); |
4221 | 0 | } |
4222 | 0 | #if 1 /* anything that can fail? */ |
4223 | 0 | if (_fail) |
4224 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4225 | 0 | argv[_i]->varname, argv[_i]->arg); |
4226 | 0 | _failcnt += _fail; |
4227 | 0 | #endif |
4228 | 0 | } |
4229 | 0 | #if 1 /* anything that can fail? */ |
4230 | 0 | if (_failcnt) |
4231 | 0 | return CMD_WARNING; |
4232 | 0 | #endif |
4233 | 0 | #endif |
4234 | 0 | if (!gname) { |
4235 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "gname"); |
4236 | 0 | return CMD_WARNING; |
4237 | 0 | } |
4238 | 0 | if (!maddr_str) { |
4239 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "maddr_str"); |
4240 | 0 | return CMD_WARNING; |
4241 | 0 | } |
4242 | | |
4243 | 0 | return ip_msdp_mesh_group_member_magic(self, vty, argc, argv, gname, maddr, maddr_str); |
4244 | 0 | } |
4245 | | |
4246 | | /* no_ip_msdp_mesh_group_member => "no ip msdp mesh-group WORD$gname member A.B.C.D$maddr" */ |
4247 | | DEFUN_CMD_FUNC_DECL(no_ip_msdp_mesh_group_member) |
4248 | | #define funcdecl_no_ip_msdp_mesh_group_member static int no_ip_msdp_mesh_group_member_magic(\ |
4249 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4250 | | struct vty *vty __attribute__ ((unused)),\ |
4251 | | int argc __attribute__ ((unused)),\ |
4252 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4253 | | const char * gname,\ |
4254 | | struct in_addr maddr,\ |
4255 | | const char * maddr_str __attribute__ ((unused))) |
4256 | | funcdecl_no_ip_msdp_mesh_group_member; |
4257 | | DEFUN_CMD_FUNC_TEXT(no_ip_msdp_mesh_group_member) |
4258 | 0 | { |
4259 | 0 | #if 2 /* anything to parse? */ |
4260 | 0 | int _i; |
4261 | 0 | #if 1 /* anything that can fail? */ |
4262 | 0 | unsigned _fail = 0, _failcnt = 0; |
4263 | 0 | #endif |
4264 | 0 | const char *gname = NULL; |
4265 | 0 | struct in_addr maddr = { INADDR_ANY }; |
4266 | 0 | const char *maddr_str = NULL; |
4267 | |
|
4268 | 0 | for (_i = 0; _i < argc; _i++) { |
4269 | 0 | if (!argv[_i]->varname) |
4270 | 0 | continue; |
4271 | 0 | #if 1 /* anything that can fail? */ |
4272 | 0 | _fail = 0; |
4273 | 0 | #endif |
4274 | |
|
4275 | 0 | if (!strcmp(argv[_i]->varname, "gname")) { |
4276 | 0 | gname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
4277 | 0 | } |
4278 | 0 | if (!strcmp(argv[_i]->varname, "maddr")) { |
4279 | 0 | maddr_str = argv[_i]->arg; |
4280 | 0 | _fail = !inet_aton(argv[_i]->arg, &maddr); |
4281 | 0 | } |
4282 | 0 | #if 1 /* anything that can fail? */ |
4283 | 0 | if (_fail) |
4284 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4285 | 0 | argv[_i]->varname, argv[_i]->arg); |
4286 | 0 | _failcnt += _fail; |
4287 | 0 | #endif |
4288 | 0 | } |
4289 | 0 | #if 1 /* anything that can fail? */ |
4290 | 0 | if (_failcnt) |
4291 | 0 | return CMD_WARNING; |
4292 | 0 | #endif |
4293 | 0 | #endif |
4294 | 0 | if (!gname) { |
4295 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "gname"); |
4296 | 0 | return CMD_WARNING; |
4297 | 0 | } |
4298 | 0 | if (!maddr_str) { |
4299 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "maddr_str"); |
4300 | 0 | return CMD_WARNING; |
4301 | 0 | } |
4302 | | |
4303 | 0 | return no_ip_msdp_mesh_group_member_magic(self, vty, argc, argv, gname, maddr, maddr_str); |
4304 | 0 | } |
4305 | | |
4306 | | /* ip_msdp_mesh_group_source => "ip msdp mesh-group WORD$gname source A.B.C.D$saddr" */ |
4307 | | DEFUN_CMD_FUNC_DECL(ip_msdp_mesh_group_source) |
4308 | | #define funcdecl_ip_msdp_mesh_group_source static int ip_msdp_mesh_group_source_magic(\ |
4309 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4310 | | struct vty *vty __attribute__ ((unused)),\ |
4311 | | int argc __attribute__ ((unused)),\ |
4312 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4313 | | const char * gname,\ |
4314 | | struct in_addr saddr,\ |
4315 | | const char * saddr_str __attribute__ ((unused))) |
4316 | | funcdecl_ip_msdp_mesh_group_source; |
4317 | | DEFUN_CMD_FUNC_TEXT(ip_msdp_mesh_group_source) |
4318 | 0 | { |
4319 | 0 | #if 2 /* anything to parse? */ |
4320 | 0 | int _i; |
4321 | 0 | #if 1 /* anything that can fail? */ |
4322 | 0 | unsigned _fail = 0, _failcnt = 0; |
4323 | 0 | #endif |
4324 | 0 | const char *gname = NULL; |
4325 | 0 | struct in_addr saddr = { INADDR_ANY }; |
4326 | 0 | const char *saddr_str = NULL; |
4327 | |
|
4328 | 0 | for (_i = 0; _i < argc; _i++) { |
4329 | 0 | if (!argv[_i]->varname) |
4330 | 0 | continue; |
4331 | 0 | #if 1 /* anything that can fail? */ |
4332 | 0 | _fail = 0; |
4333 | 0 | #endif |
4334 | |
|
4335 | 0 | if (!strcmp(argv[_i]->varname, "gname")) { |
4336 | 0 | gname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
4337 | 0 | } |
4338 | 0 | if (!strcmp(argv[_i]->varname, "saddr")) { |
4339 | 0 | saddr_str = argv[_i]->arg; |
4340 | 0 | _fail = !inet_aton(argv[_i]->arg, &saddr); |
4341 | 0 | } |
4342 | 0 | #if 1 /* anything that can fail? */ |
4343 | 0 | if (_fail) |
4344 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4345 | 0 | argv[_i]->varname, argv[_i]->arg); |
4346 | 0 | _failcnt += _fail; |
4347 | 0 | #endif |
4348 | 0 | } |
4349 | 0 | #if 1 /* anything that can fail? */ |
4350 | 0 | if (_failcnt) |
4351 | 0 | return CMD_WARNING; |
4352 | 0 | #endif |
4353 | 0 | #endif |
4354 | 0 | if (!gname) { |
4355 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "gname"); |
4356 | 0 | return CMD_WARNING; |
4357 | 0 | } |
4358 | 0 | if (!saddr_str) { |
4359 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "saddr_str"); |
4360 | 0 | return CMD_WARNING; |
4361 | 0 | } |
4362 | | |
4363 | 0 | return ip_msdp_mesh_group_source_magic(self, vty, argc, argv, gname, saddr, saddr_str); |
4364 | 0 | } |
4365 | | |
4366 | | /* no_ip_msdp_mesh_group_source => "no ip msdp mesh-group WORD$gname source [A.B.C.D]" */ |
4367 | | DEFUN_CMD_FUNC_DECL(no_ip_msdp_mesh_group_source) |
4368 | | #define funcdecl_no_ip_msdp_mesh_group_source static int no_ip_msdp_mesh_group_source_magic(\ |
4369 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4370 | | struct vty *vty __attribute__ ((unused)),\ |
4371 | | int argc __attribute__ ((unused)),\ |
4372 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4373 | | const char * gname,\ |
4374 | | struct in_addr source,\ |
4375 | | const char * source_str __attribute__ ((unused))) |
4376 | | funcdecl_no_ip_msdp_mesh_group_source; |
4377 | | DEFUN_CMD_FUNC_TEXT(no_ip_msdp_mesh_group_source) |
4378 | 0 | { |
4379 | 0 | #if 2 /* anything to parse? */ |
4380 | 0 | int _i; |
4381 | 0 | #if 1 /* anything that can fail? */ |
4382 | 0 | unsigned _fail = 0, _failcnt = 0; |
4383 | 0 | #endif |
4384 | 0 | const char *gname = NULL; |
4385 | 0 | struct in_addr source = { INADDR_ANY }; |
4386 | 0 | const char *source_str = NULL; |
4387 | |
|
4388 | 0 | for (_i = 0; _i < argc; _i++) { |
4389 | 0 | if (!argv[_i]->varname) |
4390 | 0 | continue; |
4391 | 0 | #if 1 /* anything that can fail? */ |
4392 | 0 | _fail = 0; |
4393 | 0 | #endif |
4394 | |
|
4395 | 0 | if (!strcmp(argv[_i]->varname, "gname")) { |
4396 | 0 | gname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
4397 | 0 | } |
4398 | 0 | if (!strcmp(argv[_i]->varname, "source")) { |
4399 | 0 | source_str = argv[_i]->arg; |
4400 | 0 | _fail = !inet_aton(argv[_i]->arg, &source); |
4401 | 0 | } |
4402 | 0 | #if 1 /* anything that can fail? */ |
4403 | 0 | if (_fail) |
4404 | 0 | vty_out (vty, "%% invalid input for %s: %s\n", |
4405 | 0 | argv[_i]->varname, argv[_i]->arg); |
4406 | 0 | _failcnt += _fail; |
4407 | 0 | #endif |
4408 | 0 | } |
4409 | 0 | #if 1 /* anything that can fail? */ |
4410 | 0 | if (_failcnt) |
4411 | 0 | return CMD_WARNING; |
4412 | 0 | #endif |
4413 | 0 | #endif |
4414 | 0 | if (!gname) { |
4415 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "gname"); |
4416 | 0 | return CMD_WARNING; |
4417 | 0 | } |
4418 | | |
4419 | 0 | return no_ip_msdp_mesh_group_source_magic(self, vty, argc, argv, gname, source, source_str); |
4420 | 0 | } |
4421 | | |
4422 | | /* no_ip_msdp_mesh_group => "no ip msdp mesh-group WORD$gname" */ |
4423 | | DEFUN_CMD_FUNC_DECL(no_ip_msdp_mesh_group) |
4424 | | #define funcdecl_no_ip_msdp_mesh_group static int no_ip_msdp_mesh_group_magic(\ |
4425 | | const struct cmd_element *self __attribute__ ((unused)),\ |
4426 | | struct vty *vty __attribute__ ((unused)),\ |
4427 | | int argc __attribute__ ((unused)),\ |
4428 | | struct cmd_token *argv[] __attribute__ ((unused)),\ |
4429 | | const char * gname) |
4430 | | funcdecl_no_ip_msdp_mesh_group; |
4431 | | DEFUN_CMD_FUNC_TEXT(no_ip_msdp_mesh_group) |
4432 | 0 | { |
4433 | 0 | #if 1 /* anything to parse? */ |
4434 | 0 | int _i; |
4435 | | #if 0 /* anything that can fail? */ |
4436 | | unsigned _fail = 0, _failcnt = 0; |
4437 | | #endif |
4438 | 0 | const char *gname = NULL; |
4439 | |
|
4440 | 0 | for (_i = 0; _i < argc; _i++) { |
4441 | 0 | if (!argv[_i]->varname) |
4442 | 0 | continue; |
4443 | | #if 0 /* anything that can fail? */ |
4444 | | _fail = 0; |
4445 | | #endif |
4446 | | |
4447 | 0 | if (!strcmp(argv[_i]->varname, "gname")) { |
4448 | 0 | gname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg; |
4449 | 0 | } |
4450 | | #if 0 /* anything that can fail? */ |
4451 | | if (_fail) |
4452 | | vty_out (vty, "%% invalid input for %s: %s\n", |
4453 | | argv[_i]->varname, argv[_i]->arg); |
4454 | | _failcnt += _fail; |
4455 | | #endif |
4456 | 0 | } |
4457 | | #if 0 /* anything that can fail? */ |
4458 | | if (_failcnt) |
4459 | | return CMD_WARNING; |
4460 | | #endif |
4461 | 0 | #endif |
4462 | 0 | if (!gname) { |
4463 | 0 | vty_out(vty, "Internal CLI error [%s]\n", "gname"); |
4464 | 0 | return CMD_WARNING; |
4465 | 0 | } |
4466 | | |
4467 | 0 | return no_ip_msdp_mesh_group_magic(self, vty, argc, argv, gname); |
4468 | 0 | } |
4469 | | |