Coverage Report

Created: 2026-03-12 06:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/frr/bgpd/bgp_vty_clippy.c
Line
Count
Source
1
/* bgp_session_dscp => "bgp session-dscp (0-63)$dscp" */
2
DEFUN_CMD_FUNC_DECL(bgp_session_dscp)
3
#define funcdecl_bgp_session_dscp static int bgp_session_dscp_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
  long dscp,\
9
  const char * dscp_str __attribute__ ((unused)))
10
funcdecl_bgp_session_dscp;
11
DEFUN_CMD_FUNC_TEXT(bgp_session_dscp)
12
0
{
13
0
#if 1 /* anything to parse? */
14
0
  int _i;
15
0
#if 1 /* anything that can fail? */
16
0
  unsigned _fail = 0, _failcnt = 0;
17
0
#endif
18
0
  long dscp = 0;
19
0
  const char *dscp_str = NULL;
20
21
0
  for (_i = 0; _i < argc; _i++) {
22
0
    if (!argv[_i]->varname)
23
0
      continue;
24
0
#if 1 /* anything that can fail? */
25
0
    _fail = 0;
26
0
#endif
27
28
0
    if (!strcmp(argv[_i]->varname, "dscp")) {
29
0
      dscp_str = argv[_i]->arg;
30
0
      char *_end;
31
0
      dscp = strtol(argv[_i]->arg, &_end, 10);
32
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
33
0
    }
34
0
#if 1 /* anything that can fail? */
35
0
    if (_fail)
36
0
      vty_out (vty, "%% invalid input for %s: %s\n",
37
0
           argv[_i]->varname, argv[_i]->arg);
38
0
    _failcnt += _fail;
39
0
#endif
40
0
  }
41
0
#if 1 /* anything that can fail? */
42
0
  if (_failcnt)
43
0
    return CMD_WARNING;
44
0
#endif
45
0
#endif
46
0
  if (!dscp_str) {
47
0
    vty_out(vty, "Internal CLI error [%s]\n", "dscp_str");
48
0
    return CMD_WARNING;
49
0
  }
50
51
0
  return bgp_session_dscp_magic(self, vty, argc, argv, dscp, dscp_str);
52
0
}
53
54
/* no_bgp_session_dscp => "no bgp session-dscp [(0-63)]" */
55
DEFUN_CMD_FUNC_DECL(no_bgp_session_dscp)
56
#define funcdecl_no_bgp_session_dscp static int no_bgp_session_dscp_magic(\
57
  const struct cmd_element *self __attribute__ ((unused)),\
58
  struct vty *vty __attribute__ ((unused)),\
59
  int argc __attribute__ ((unused)),\
60
  struct cmd_token *argv[] __attribute__ ((unused)),\
61
  long session_dscp,\
62
  const char * session_dscp_str __attribute__ ((unused)))
63
funcdecl_no_bgp_session_dscp;
64
DEFUN_CMD_FUNC_TEXT(no_bgp_session_dscp)
65
0
{
66
0
#if 1 /* anything to parse? */
67
0
  int _i;
68
0
#if 1 /* anything that can fail? */
69
0
  unsigned _fail = 0, _failcnt = 0;
70
0
#endif
71
0
  long session_dscp = 0;
72
0
  const char *session_dscp_str = NULL;
73
74
0
  for (_i = 0; _i < argc; _i++) {
75
0
    if (!argv[_i]->varname)
76
0
      continue;
77
0
#if 1 /* anything that can fail? */
78
0
    _fail = 0;
79
0
#endif
80
81
0
    if (!strcmp(argv[_i]->varname, "session_dscp")) {
82
0
      session_dscp_str = argv[_i]->arg;
83
0
      char *_end;
84
0
      session_dscp = strtol(argv[_i]->arg, &_end, 10);
85
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
86
0
    }
87
0
#if 1 /* anything that can fail? */
88
0
    if (_fail)
89
0
      vty_out (vty, "%% invalid input for %s: %s\n",
90
0
           argv[_i]->varname, argv[_i]->arg);
91
0
    _failcnt += _fail;
92
0
#endif
93
0
  }
94
0
#if 1 /* anything that can fail? */
95
0
  if (_failcnt)
96
0
    return CMD_WARNING;
97
0
#endif
98
0
#endif
99
100
0
  return no_bgp_session_dscp_magic(self, vty, argc, argv, session_dscp, session_dscp_str);
101
0
}
102
103
/* bgp_router_id => "bgp router-id A.B.C.D" */
104
DEFUN_CMD_FUNC_DECL(bgp_router_id)
105
#define funcdecl_bgp_router_id static int bgp_router_id_magic(\
106
  const struct cmd_element *self __attribute__ ((unused)),\
107
  struct vty *vty __attribute__ ((unused)),\
108
  int argc __attribute__ ((unused)),\
109
  struct cmd_token *argv[] __attribute__ ((unused)),\
110
  struct in_addr router_id,\
111
  const char * router_id_str __attribute__ ((unused)))
112
funcdecl_bgp_router_id;
113
DEFUN_CMD_FUNC_TEXT(bgp_router_id)
114
0
{
115
0
#if 1 /* anything to parse? */
116
0
  int _i;
117
0
#if 1 /* anything that can fail? */
118
0
  unsigned _fail = 0, _failcnt = 0;
119
0
#endif
120
0
  struct in_addr router_id = { INADDR_ANY };
121
0
  const char *router_id_str = NULL;
122
123
0
  for (_i = 0; _i < argc; _i++) {
124
0
    if (!argv[_i]->varname)
125
0
      continue;
126
0
#if 1 /* anything that can fail? */
127
0
    _fail = 0;
128
0
#endif
129
130
0
    if (!strcmp(argv[_i]->varname, "router_id")) {
131
0
      router_id_str = argv[_i]->arg;
132
0
      _fail = !inet_aton(argv[_i]->arg, &router_id);
133
0
    }
134
0
#if 1 /* anything that can fail? */
135
0
    if (_fail)
136
0
      vty_out (vty, "%% invalid input for %s: %s\n",
137
0
           argv[_i]->varname, argv[_i]->arg);
138
0
    _failcnt += _fail;
139
0
#endif
140
0
  }
141
0
#if 1 /* anything that can fail? */
142
0
  if (_failcnt)
143
0
    return CMD_WARNING;
144
0
#endif
145
0
#endif
146
0
  if (!router_id_str) {
147
0
    vty_out(vty, "Internal CLI error [%s]\n", "router_id_str");
148
0
    return CMD_WARNING;
149
0
  }
150
151
0
  return bgp_router_id_magic(self, vty, argc, argv, router_id, router_id_str);
152
0
}
153
154
/* no_bgp_router_id => "no bgp router-id [A.B.C.D]" */
155
DEFUN_CMD_FUNC_DECL(no_bgp_router_id)
156
#define funcdecl_no_bgp_router_id static int no_bgp_router_id_magic(\
157
  const struct cmd_element *self __attribute__ ((unused)),\
158
  struct vty *vty __attribute__ ((unused)),\
159
  int argc __attribute__ ((unused)),\
160
  struct cmd_token *argv[] __attribute__ ((unused)),\
161
  struct in_addr router_id,\
162
  const char * router_id_str __attribute__ ((unused)))
163
funcdecl_no_bgp_router_id;
164
DEFUN_CMD_FUNC_TEXT(no_bgp_router_id)
165
0
{
166
0
#if 1 /* anything to parse? */
167
0
  int _i;
168
0
#if 1 /* anything that can fail? */
169
0
  unsigned _fail = 0, _failcnt = 0;
170
0
#endif
171
0
  struct in_addr router_id = { INADDR_ANY };
172
0
  const char *router_id_str = NULL;
173
174
0
  for (_i = 0; _i < argc; _i++) {
175
0
    if (!argv[_i]->varname)
176
0
      continue;
177
0
#if 1 /* anything that can fail? */
178
0
    _fail = 0;
179
0
#endif
180
181
0
    if (!strcmp(argv[_i]->varname, "router_id")) {
182
0
      router_id_str = argv[_i]->arg;
183
0
      _fail = !inet_aton(argv[_i]->arg, &router_id);
184
0
    }
185
0
#if 1 /* anything that can fail? */
186
0
    if (_fail)
187
0
      vty_out (vty, "%% invalid input for %s: %s\n",
188
0
           argv[_i]->varname, argv[_i]->arg);
189
0
    _failcnt += _fail;
190
0
#endif
191
0
  }
192
0
#if 1 /* anything that can fail? */
193
0
  if (_failcnt)
194
0
    return CMD_WARNING;
195
0
#endif
196
0
#endif
197
198
0
  return no_bgp_router_id_magic(self, vty, argc, argv, router_id, router_id_str);
199
0
}
200
201
/* bgp_community_alias => "[no$no] bgp community alias WORD$community ALIAS_NAME$alias_name" */
202
DEFUN_CMD_FUNC_DECL(bgp_community_alias)
203
#define funcdecl_bgp_community_alias static int bgp_community_alias_magic(\
204
  const struct cmd_element *self __attribute__ ((unused)),\
205
  struct vty *vty __attribute__ ((unused)),\
206
  int argc __attribute__ ((unused)),\
207
  struct cmd_token *argv[] __attribute__ ((unused)),\
208
  const char * no,\
209
  const char * community,\
210
  const char * alias_name)
211
funcdecl_bgp_community_alias;
212
DEFUN_CMD_FUNC_TEXT(bgp_community_alias)
213
0
{
214
0
#if 3 /* anything to parse? */
215
0
  int _i;
216
#if 0 /* anything that can fail? */
217
  unsigned _fail = 0, _failcnt = 0;
218
#endif
219
0
  const char *no = NULL;
220
0
  const char *community = NULL;
221
0
  const char *alias_name = NULL;
222
223
0
  for (_i = 0; _i < argc; _i++) {
224
0
    if (!argv[_i]->varname)
225
0
      continue;
226
#if 0 /* anything that can fail? */
227
    _fail = 0;
228
#endif
229
230
0
    if (!strcmp(argv[_i]->varname, "no")) {
231
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
232
0
    }
233
0
    if (!strcmp(argv[_i]->varname, "community")) {
234
0
      community = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
235
0
    }
236
0
    if (!strcmp(argv[_i]->varname, "alias_name")) {
237
0
      alias_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
238
0
    }
239
#if 0 /* anything that can fail? */
240
    if (_fail)
241
      vty_out (vty, "%% invalid input for %s: %s\n",
242
           argv[_i]->varname, argv[_i]->arg);
243
    _failcnt += _fail;
244
#endif
245
0
  }
246
#if 0 /* anything that can fail? */
247
  if (_failcnt)
248
    return CMD_WARNING;
249
#endif
250
0
#endif
251
0
  if (!community) {
252
0
    vty_out(vty, "Internal CLI error [%s]\n", "community");
253
0
    return CMD_WARNING;
254
0
  }
255
0
  if (!alias_name) {
256
0
    vty_out(vty, "Internal CLI error [%s]\n", "alias_name");
257
0
    return CMD_WARNING;
258
0
  }
259
260
0
  return bgp_community_alias_magic(self, vty, argc, argv, no, community, alias_name);
261
0
}
262
263
/* bgp_global_suppress_fib_pending => "[no] bgp suppress-fib-pending" */
264
DEFUN_CMD_FUNC_DECL(bgp_global_suppress_fib_pending)
265
#define funcdecl_bgp_global_suppress_fib_pending static int bgp_global_suppress_fib_pending_magic(\
266
  const struct cmd_element *self __attribute__ ((unused)),\
267
  struct vty *vty __attribute__ ((unused)),\
268
  int argc __attribute__ ((unused)),\
269
  struct cmd_token *argv[] __attribute__ ((unused)),\
270
  const char * no)
271
funcdecl_bgp_global_suppress_fib_pending;
272
DEFUN_CMD_FUNC_TEXT(bgp_global_suppress_fib_pending)
273
0
{
274
0
#if 1 /* anything to parse? */
275
0
  int _i;
276
#if 0 /* anything that can fail? */
277
  unsigned _fail = 0, _failcnt = 0;
278
#endif
279
0
  const char *no = NULL;
280
281
0
  for (_i = 0; _i < argc; _i++) {
282
0
    if (!argv[_i]->varname)
283
0
      continue;
284
#if 0 /* anything that can fail? */
285
    _fail = 0;
286
#endif
287
288
0
    if (!strcmp(argv[_i]->varname, "no")) {
289
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
290
0
    }
291
#if 0 /* anything that can fail? */
292
    if (_fail)
293
      vty_out (vty, "%% invalid input for %s: %s\n",
294
           argv[_i]->varname, argv[_i]->arg);
295
    _failcnt += _fail;
296
#endif
297
0
  }
298
#if 0 /* anything that can fail? */
299
  if (_failcnt)
300
    return CMD_WARNING;
301
#endif
302
0
#endif
303
304
0
  return bgp_global_suppress_fib_pending_magic(self, vty, argc, argv, no);
305
0
}
306
307
/* bgp_suppress_fib_pending => "[no] bgp suppress-fib-pending" */
308
DEFUN_CMD_FUNC_DECL(bgp_suppress_fib_pending)
309
#define funcdecl_bgp_suppress_fib_pending static int bgp_suppress_fib_pending_magic(\
310
  const struct cmd_element *self __attribute__ ((unused)),\
311
  struct vty *vty __attribute__ ((unused)),\
312
  int argc __attribute__ ((unused)),\
313
  struct cmd_token *argv[] __attribute__ ((unused)),\
314
  const char * no)
315
funcdecl_bgp_suppress_fib_pending;
316
DEFUN_CMD_FUNC_TEXT(bgp_suppress_fib_pending)
317
0
{
318
0
#if 1 /* anything to parse? */
319
0
  int _i;
320
#if 0 /* anything that can fail? */
321
  unsigned _fail = 0, _failcnt = 0;
322
#endif
323
0
  const char *no = NULL;
324
325
0
  for (_i = 0; _i < argc; _i++) {
326
0
    if (!argv[_i]->varname)
327
0
      continue;
328
#if 0 /* anything that can fail? */
329
    _fail = 0;
330
#endif
331
332
0
    if (!strcmp(argv[_i]->varname, "no")) {
333
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
334
0
    }
335
#if 0 /* anything that can fail? */
336
    if (_fail)
337
      vty_out (vty, "%% invalid input for %s: %s\n",
338
           argv[_i]->varname, argv[_i]->arg);
339
    _failcnt += _fail;
340
#endif
341
0
  }
342
#if 0 /* anything that can fail? */
343
  if (_failcnt)
344
    return CMD_WARNING;
345
#endif
346
0
#endif
347
348
0
  return bgp_suppress_fib_pending_magic(self, vty, argc, argv, no);
349
0
}
350
351
/* bgp_norib => "bgp no-rib" */
352
DEFUN_CMD_FUNC_DECL(bgp_norib)
353
#define funcdecl_bgp_norib static int bgp_norib_magic(\
354
  const struct cmd_element *self __attribute__ ((unused)),\
355
  struct vty *vty __attribute__ ((unused)),\
356
  int argc __attribute__ ((unused)),\
357
  struct cmd_token *argv[] __attribute__ ((unused)))
358
funcdecl_bgp_norib;
359
DEFUN_CMD_FUNC_TEXT(bgp_norib)
360
0
{
361
#if 0 /* anything to parse? */
362
  int _i;
363
#if 0 /* anything that can fail? */
364
  unsigned _fail = 0, _failcnt = 0;
365
#endif
366
367
  for (_i = 0; _i < argc; _i++) {
368
    if (!argv[_i]->varname)
369
      continue;
370
#if 0 /* anything that can fail? */
371
    _fail = 0;
372
#endif
373
374
#if 0 /* anything that can fail? */
375
    if (_fail)
376
      vty_out (vty, "%% invalid input for %s: %s\n",
377
           argv[_i]->varname, argv[_i]->arg);
378
    _failcnt += _fail;
379
#endif
380
  }
381
#if 0 /* anything that can fail? */
382
  if (_failcnt)
383
    return CMD_WARNING;
384
#endif
385
#endif
386
387
0
  return bgp_norib_magic(self, vty, argc, argv);
388
0
}
389
390
/* no_bgp_norib => "no bgp no-rib" */
391
DEFUN_CMD_FUNC_DECL(no_bgp_norib)
392
#define funcdecl_no_bgp_norib static int no_bgp_norib_magic(\
393
  const struct cmd_element *self __attribute__ ((unused)),\
394
  struct vty *vty __attribute__ ((unused)),\
395
  int argc __attribute__ ((unused)),\
396
  struct cmd_token *argv[] __attribute__ ((unused)))
397
funcdecl_no_bgp_norib;
398
DEFUN_CMD_FUNC_TEXT(no_bgp_norib)
399
0
{
400
#if 0 /* anything to parse? */
401
  int _i;
402
#if 0 /* anything that can fail? */
403
  unsigned _fail = 0, _failcnt = 0;
404
#endif
405
406
  for (_i = 0; _i < argc; _i++) {
407
    if (!argv[_i]->varname)
408
      continue;
409
#if 0 /* anything that can fail? */
410
    _fail = 0;
411
#endif
412
413
#if 0 /* anything that can fail? */
414
    if (_fail)
415
      vty_out (vty, "%% invalid input for %s: %s\n",
416
           argv[_i]->varname, argv[_i]->arg);
417
    _failcnt += _fail;
418
#endif
419
  }
420
#if 0 /* anything that can fail? */
421
  if (_failcnt)
422
    return CMD_WARNING;
423
#endif
424
#endif
425
426
0
  return no_bgp_norib_magic(self, vty, argc, argv);
427
0
}
428
429
/* no_bgp_send_extra_data => "[no] bgp send-extra-data zebra" */
430
DEFUN_CMD_FUNC_DECL(no_bgp_send_extra_data)
431
#define funcdecl_no_bgp_send_extra_data static int no_bgp_send_extra_data_magic(\
432
  const struct cmd_element *self __attribute__ ((unused)),\
433
  struct vty *vty __attribute__ ((unused)),\
434
  int argc __attribute__ ((unused)),\
435
  struct cmd_token *argv[] __attribute__ ((unused)),\
436
  const char * no)
437
funcdecl_no_bgp_send_extra_data;
438
DEFUN_CMD_FUNC_TEXT(no_bgp_send_extra_data)
439
0
{
440
0
#if 1 /* anything to parse? */
441
0
  int _i;
442
#if 0 /* anything that can fail? */
443
  unsigned _fail = 0, _failcnt = 0;
444
#endif
445
0
  const char *no = NULL;
446
447
0
  for (_i = 0; _i < argc; _i++) {
448
0
    if (!argv[_i]->varname)
449
0
      continue;
450
#if 0 /* anything that can fail? */
451
    _fail = 0;
452
#endif
453
454
0
    if (!strcmp(argv[_i]->varname, "no")) {
455
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
456
0
    }
457
#if 0 /* anything that can fail? */
458
    if (_fail)
459
      vty_out (vty, "%% invalid input for %s: %s\n",
460
           argv[_i]->varname, argv[_i]->arg);
461
    _failcnt += _fail;
462
#endif
463
0
  }
464
#if 0 /* anything that can fail? */
465
  if (_failcnt)
466
    return CMD_WARNING;
467
#endif
468
0
#endif
469
470
0
  return no_bgp_send_extra_data_magic(self, vty, argc, argv, no);
471
0
}
472
473
/* bgp_global_update_delay => "bgp update-delay (0-3600)$delay [(1-3600)$wait]" */
474
DEFUN_CMD_FUNC_DECL(bgp_global_update_delay)
475
#define funcdecl_bgp_global_update_delay static int bgp_global_update_delay_magic(\
476
  const struct cmd_element *self __attribute__ ((unused)),\
477
  struct vty *vty __attribute__ ((unused)),\
478
  int argc __attribute__ ((unused)),\
479
  struct cmd_token *argv[] __attribute__ ((unused)),\
480
  long delay,\
481
  const char * delay_str __attribute__ ((unused)),\
482
  long wait,\
483
  const char * wait_str __attribute__ ((unused)))
484
funcdecl_bgp_global_update_delay;
485
DEFUN_CMD_FUNC_TEXT(bgp_global_update_delay)
486
0
{
487
0
#if 2 /* anything to parse? */
488
0
  int _i;
489
0
#if 1 /* anything that can fail? */
490
0
  unsigned _fail = 0, _failcnt = 0;
491
0
#endif
492
0
  long delay = 0;
493
0
  const char *delay_str = NULL;
494
0
  long wait = 0;
495
0
  const char *wait_str = NULL;
496
497
0
  for (_i = 0; _i < argc; _i++) {
498
0
    if (!argv[_i]->varname)
499
0
      continue;
500
0
#if 1 /* anything that can fail? */
501
0
    _fail = 0;
502
0
#endif
503
504
0
    if (!strcmp(argv[_i]->varname, "delay")) {
505
0
      delay_str = argv[_i]->arg;
506
0
      char *_end;
507
0
      delay = strtol(argv[_i]->arg, &_end, 10);
508
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
509
0
    }
510
0
    if (!strcmp(argv[_i]->varname, "wait")) {
511
0
      wait_str = argv[_i]->arg;
512
0
      char *_end;
513
0
      wait = strtol(argv[_i]->arg, &_end, 10);
514
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
515
0
    }
516
0
#if 1 /* anything that can fail? */
517
0
    if (_fail)
518
0
      vty_out (vty, "%% invalid input for %s: %s\n",
519
0
           argv[_i]->varname, argv[_i]->arg);
520
0
    _failcnt += _fail;
521
0
#endif
522
0
  }
523
0
#if 1 /* anything that can fail? */
524
0
  if (_failcnt)
525
0
    return CMD_WARNING;
526
0
#endif
527
0
#endif
528
0
  if (!delay_str) {
529
0
    vty_out(vty, "Internal CLI error [%s]\n", "delay_str");
530
0
    return CMD_WARNING;
531
0
  }
532
533
0
  return bgp_global_update_delay_magic(self, vty, argc, argv, delay, delay_str, wait, wait_str);
534
0
}
535
536
/* no_bgp_global_update_delay => "no bgp update-delay [(0-3600) [(1-3600)]]" */
537
DEFUN_CMD_FUNC_DECL(no_bgp_global_update_delay)
538
#define funcdecl_no_bgp_global_update_delay static int no_bgp_global_update_delay_magic(\
539
  const struct cmd_element *self __attribute__ ((unused)),\
540
  struct vty *vty __attribute__ ((unused)),\
541
  int argc __attribute__ ((unused)),\
542
  struct cmd_token *argv[] __attribute__ ((unused)),\
543
  long update_delay,\
544
  const char * update_delay_str __attribute__ ((unused)))
545
funcdecl_no_bgp_global_update_delay;
546
DEFUN_CMD_FUNC_TEXT(no_bgp_global_update_delay)
547
0
{
548
0
#if 1 /* anything to parse? */
549
0
  int _i;
550
0
#if 1 /* anything that can fail? */
551
0
  unsigned _fail = 0, _failcnt = 0;
552
0
#endif
553
0
  long update_delay = 0;
554
0
  const char *update_delay_str = NULL;
555
556
0
  for (_i = 0; _i < argc; _i++) {
557
0
    if (!argv[_i]->varname)
558
0
      continue;
559
0
#if 1 /* anything that can fail? */
560
0
    _fail = 0;
561
0
#endif
562
563
0
    if (!strcmp(argv[_i]->varname, "update_delay")) {
564
0
      update_delay_str = argv[_i]->arg;
565
0
      char *_end;
566
0
      update_delay = strtol(argv[_i]->arg, &_end, 10);
567
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
568
0
    }
569
0
#if 1 /* anything that can fail? */
570
0
    if (_fail)
571
0
      vty_out (vty, "%% invalid input for %s: %s\n",
572
0
           argv[_i]->varname, argv[_i]->arg);
573
0
    _failcnt += _fail;
574
0
#endif
575
0
  }
576
0
#if 1 /* anything that can fail? */
577
0
  if (_failcnt)
578
0
    return CMD_WARNING;
579
0
#endif
580
0
#endif
581
582
0
  return no_bgp_global_update_delay_magic(self, vty, argc, argv, update_delay, update_delay_str);
583
0
}
584
585
/* bgp_update_delay => "update-delay (0-3600)$delay [(1-3600)$wait]" */
586
DEFUN_CMD_FUNC_DECL(bgp_update_delay)
587
#define funcdecl_bgp_update_delay static int bgp_update_delay_magic(\
588
  const struct cmd_element *self __attribute__ ((unused)),\
589
  struct vty *vty __attribute__ ((unused)),\
590
  int argc __attribute__ ((unused)),\
591
  struct cmd_token *argv[] __attribute__ ((unused)),\
592
  long delay,\
593
  const char * delay_str __attribute__ ((unused)),\
594
  long wait,\
595
  const char * wait_str __attribute__ ((unused)))
596
funcdecl_bgp_update_delay;
597
DEFUN_CMD_FUNC_TEXT(bgp_update_delay)
598
0
{
599
0
#if 2 /* anything to parse? */
600
0
  int _i;
601
0
#if 1 /* anything that can fail? */
602
0
  unsigned _fail = 0, _failcnt = 0;
603
0
#endif
604
0
  long delay = 0;
605
0
  const char *delay_str = NULL;
606
0
  long wait = 0;
607
0
  const char *wait_str = NULL;
608
609
0
  for (_i = 0; _i < argc; _i++) {
610
0
    if (!argv[_i]->varname)
611
0
      continue;
612
0
#if 1 /* anything that can fail? */
613
0
    _fail = 0;
614
0
#endif
615
616
0
    if (!strcmp(argv[_i]->varname, "delay")) {
617
0
      delay_str = argv[_i]->arg;
618
0
      char *_end;
619
0
      delay = strtol(argv[_i]->arg, &_end, 10);
620
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
621
0
    }
622
0
    if (!strcmp(argv[_i]->varname, "wait")) {
623
0
      wait_str = argv[_i]->arg;
624
0
      char *_end;
625
0
      wait = strtol(argv[_i]->arg, &_end, 10);
626
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
627
0
    }
628
0
#if 1 /* anything that can fail? */
629
0
    if (_fail)
630
0
      vty_out (vty, "%% invalid input for %s: %s\n",
631
0
           argv[_i]->varname, argv[_i]->arg);
632
0
    _failcnt += _fail;
633
0
#endif
634
0
  }
635
0
#if 1 /* anything that can fail? */
636
0
  if (_failcnt)
637
0
    return CMD_WARNING;
638
0
#endif
639
0
#endif
640
0
  if (!delay_str) {
641
0
    vty_out(vty, "Internal CLI error [%s]\n", "delay_str");
642
0
    return CMD_WARNING;
643
0
  }
644
645
0
  return bgp_update_delay_magic(self, vty, argc, argv, delay, delay_str, wait, wait_str);
646
0
}
647
648
/* no_bgp_update_delay => "no update-delay [(0-3600) [(1-3600)]]" */
649
DEFUN_CMD_FUNC_DECL(no_bgp_update_delay)
650
#define funcdecl_no_bgp_update_delay static int no_bgp_update_delay_magic(\
651
  const struct cmd_element *self __attribute__ ((unused)),\
652
  struct vty *vty __attribute__ ((unused)),\
653
  int argc __attribute__ ((unused)),\
654
  struct cmd_token *argv[] __attribute__ ((unused)),\
655
  long update_delay,\
656
  const char * update_delay_str __attribute__ ((unused)))
657
funcdecl_no_bgp_update_delay;
658
DEFUN_CMD_FUNC_TEXT(no_bgp_update_delay)
659
0
{
660
0
#if 1 /* anything to parse? */
661
0
  int _i;
662
0
#if 1 /* anything that can fail? */
663
0
  unsigned _fail = 0, _failcnt = 0;
664
0
#endif
665
0
  long update_delay = 0;
666
0
  const char *update_delay_str = NULL;
667
668
0
  for (_i = 0; _i < argc; _i++) {
669
0
    if (!argv[_i]->varname)
670
0
      continue;
671
0
#if 1 /* anything that can fail? */
672
0
    _fail = 0;
673
0
#endif
674
675
0
    if (!strcmp(argv[_i]->varname, "update_delay")) {
676
0
      update_delay_str = argv[_i]->arg;
677
0
      char *_end;
678
0
      update_delay = strtol(argv[_i]->arg, &_end, 10);
679
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
680
0
    }
681
0
#if 1 /* anything that can fail? */
682
0
    if (_fail)
683
0
      vty_out (vty, "%% invalid input for %s: %s\n",
684
0
           argv[_i]->varname, argv[_i]->arg);
685
0
    _failcnt += _fail;
686
0
#endif
687
0
  }
688
0
#if 1 /* anything that can fail? */
689
0
  if (_failcnt)
690
0
    return CMD_WARNING;
691
0
#endif
692
0
#endif
693
694
0
  return no_bgp_update_delay_magic(self, vty, argc, argv, update_delay, update_delay_str);
695
0
}
696
697
/* bgp_wpkt_quanta => "[no] write-quanta (1-64)$quanta" */
698
DEFUN_CMD_FUNC_DECL(bgp_wpkt_quanta)
699
#define funcdecl_bgp_wpkt_quanta static int bgp_wpkt_quanta_magic(\
700
  const struct cmd_element *self __attribute__ ((unused)),\
701
  struct vty *vty __attribute__ ((unused)),\
702
  int argc __attribute__ ((unused)),\
703
  struct cmd_token *argv[] __attribute__ ((unused)),\
704
  const char * no,\
705
  long quanta,\
706
  const char * quanta_str __attribute__ ((unused)))
707
funcdecl_bgp_wpkt_quanta;
708
DEFUN_CMD_FUNC_TEXT(bgp_wpkt_quanta)
709
0
{
710
0
#if 2 /* anything to parse? */
711
0
  int _i;
712
0
#if 1 /* anything that can fail? */
713
0
  unsigned _fail = 0, _failcnt = 0;
714
0
#endif
715
0
  const char *no = NULL;
716
0
  long quanta = 0;
717
0
  const char *quanta_str = NULL;
718
719
0
  for (_i = 0; _i < argc; _i++) {
720
0
    if (!argv[_i]->varname)
721
0
      continue;
722
0
#if 1 /* anything that can fail? */
723
0
    _fail = 0;
724
0
#endif
725
726
0
    if (!strcmp(argv[_i]->varname, "no")) {
727
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
728
0
    }
729
0
    if (!strcmp(argv[_i]->varname, "quanta")) {
730
0
      quanta_str = argv[_i]->arg;
731
0
      char *_end;
732
0
      quanta = strtol(argv[_i]->arg, &_end, 10);
733
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
734
0
    }
735
0
#if 1 /* anything that can fail? */
736
0
    if (_fail)
737
0
      vty_out (vty, "%% invalid input for %s: %s\n",
738
0
           argv[_i]->varname, argv[_i]->arg);
739
0
    _failcnt += _fail;
740
0
#endif
741
0
  }
742
0
#if 1 /* anything that can fail? */
743
0
  if (_failcnt)
744
0
    return CMD_WARNING;
745
0
#endif
746
0
#endif
747
0
  if (!quanta_str) {
748
0
    vty_out(vty, "Internal CLI error [%s]\n", "quanta_str");
749
0
    return CMD_WARNING;
750
0
  }
751
752
0
  return bgp_wpkt_quanta_magic(self, vty, argc, argv, no, quanta, quanta_str);
753
0
}
754
755
/* bgp_rpkt_quanta => "[no] read-quanta (1-10)$quanta" */
756
DEFUN_CMD_FUNC_DECL(bgp_rpkt_quanta)
757
#define funcdecl_bgp_rpkt_quanta static int bgp_rpkt_quanta_magic(\
758
  const struct cmd_element *self __attribute__ ((unused)),\
759
  struct vty *vty __attribute__ ((unused)),\
760
  int argc __attribute__ ((unused)),\
761
  struct cmd_token *argv[] __attribute__ ((unused)),\
762
  const char * no,\
763
  long quanta,\
764
  const char * quanta_str __attribute__ ((unused)))
765
funcdecl_bgp_rpkt_quanta;
766
DEFUN_CMD_FUNC_TEXT(bgp_rpkt_quanta)
767
0
{
768
0
#if 2 /* anything to parse? */
769
0
  int _i;
770
0
#if 1 /* anything that can fail? */
771
0
  unsigned _fail = 0, _failcnt = 0;
772
0
#endif
773
0
  const char *no = NULL;
774
0
  long quanta = 0;
775
0
  const char *quanta_str = NULL;
776
777
0
  for (_i = 0; _i < argc; _i++) {
778
0
    if (!argv[_i]->varname)
779
0
      continue;
780
0
#if 1 /* anything that can fail? */
781
0
    _fail = 0;
782
0
#endif
783
784
0
    if (!strcmp(argv[_i]->varname, "no")) {
785
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
786
0
    }
787
0
    if (!strcmp(argv[_i]->varname, "quanta")) {
788
0
      quanta_str = argv[_i]->arg;
789
0
      char *_end;
790
0
      quanta = strtol(argv[_i]->arg, &_end, 10);
791
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
792
0
    }
793
0
#if 1 /* anything that can fail? */
794
0
    if (_fail)
795
0
      vty_out (vty, "%% invalid input for %s: %s\n",
796
0
           argv[_i]->varname, argv[_i]->arg);
797
0
    _failcnt += _fail;
798
0
#endif
799
0
  }
800
0
#if 1 /* anything that can fail? */
801
0
  if (_failcnt)
802
0
    return CMD_WARNING;
803
0
#endif
804
0
#endif
805
0
  if (!quanta_str) {
806
0
    vty_out(vty, "Internal CLI error [%s]\n", "quanta_str");
807
0
    return CMD_WARNING;
808
0
  }
809
810
0
  return bgp_rpkt_quanta_magic(self, vty, argc, argv, no, quanta, quanta_str);
811
0
}
812
813
/* bgp_tcp_keepalive => "bgp tcp-keepalive (1-65535)$idle (1-65535)$intvl (1-30)$probes" */
814
DEFUN_CMD_FUNC_DECL(bgp_tcp_keepalive)
815
#define funcdecl_bgp_tcp_keepalive static int bgp_tcp_keepalive_magic(\
816
  const struct cmd_element *self __attribute__ ((unused)),\
817
  struct vty *vty __attribute__ ((unused)),\
818
  int argc __attribute__ ((unused)),\
819
  struct cmd_token *argv[] __attribute__ ((unused)),\
820
  long idle,\
821
  const char * idle_str __attribute__ ((unused)),\
822
  long intvl,\
823
  const char * intvl_str __attribute__ ((unused)),\
824
  long probes,\
825
  const char * probes_str __attribute__ ((unused)))
826
funcdecl_bgp_tcp_keepalive;
827
DEFUN_CMD_FUNC_TEXT(bgp_tcp_keepalive)
828
0
{
829
0
#if 3 /* anything to parse? */
830
0
  int _i;
831
0
#if 1 /* anything that can fail? */
832
0
  unsigned _fail = 0, _failcnt = 0;
833
0
#endif
834
0
  long idle = 0;
835
0
  const char *idle_str = NULL;
836
0
  long intvl = 0;
837
0
  const char *intvl_str = NULL;
838
0
  long probes = 0;
839
0
  const char *probes_str = NULL;
840
841
0
  for (_i = 0; _i < argc; _i++) {
842
0
    if (!argv[_i]->varname)
843
0
      continue;
844
0
#if 1 /* anything that can fail? */
845
0
    _fail = 0;
846
0
#endif
847
848
0
    if (!strcmp(argv[_i]->varname, "idle")) {
849
0
      idle_str = argv[_i]->arg;
850
0
      char *_end;
851
0
      idle = strtol(argv[_i]->arg, &_end, 10);
852
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
853
0
    }
854
0
    if (!strcmp(argv[_i]->varname, "intvl")) {
855
0
      intvl_str = argv[_i]->arg;
856
0
      char *_end;
857
0
      intvl = strtol(argv[_i]->arg, &_end, 10);
858
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
859
0
    }
860
0
    if (!strcmp(argv[_i]->varname, "probes")) {
861
0
      probes_str = argv[_i]->arg;
862
0
      char *_end;
863
0
      probes = strtol(argv[_i]->arg, &_end, 10);
864
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
865
0
    }
866
0
#if 1 /* anything that can fail? */
867
0
    if (_fail)
868
0
      vty_out (vty, "%% invalid input for %s: %s\n",
869
0
           argv[_i]->varname, argv[_i]->arg);
870
0
    _failcnt += _fail;
871
0
#endif
872
0
  }
873
0
#if 1 /* anything that can fail? */
874
0
  if (_failcnt)
875
0
    return CMD_WARNING;
876
0
#endif
877
0
#endif
878
0
  if (!idle_str) {
879
0
    vty_out(vty, "Internal CLI error [%s]\n", "idle_str");
880
0
    return CMD_WARNING;
881
0
  }
882
0
  if (!intvl_str) {
883
0
    vty_out(vty, "Internal CLI error [%s]\n", "intvl_str");
884
0
    return CMD_WARNING;
885
0
  }
886
0
  if (!probes_str) {
887
0
    vty_out(vty, "Internal CLI error [%s]\n", "probes_str");
888
0
    return CMD_WARNING;
889
0
  }
890
891
0
  return bgp_tcp_keepalive_magic(self, vty, argc, argv, idle, idle_str, intvl, intvl_str, probes, probes_str);
892
0
}
893
894
/* no_bgp_tcp_keepalive => "no bgp tcp-keepalive [(1-65535) (1-65535) (1-30)]" */
895
DEFUN_CMD_FUNC_DECL(no_bgp_tcp_keepalive)
896
#define funcdecl_no_bgp_tcp_keepalive static int no_bgp_tcp_keepalive_magic(\
897
  const struct cmd_element *self __attribute__ ((unused)),\
898
  struct vty *vty __attribute__ ((unused)),\
899
  int argc __attribute__ ((unused)),\
900
  struct cmd_token *argv[] __attribute__ ((unused)),\
901
  long tcp_keepalive,\
902
  const char * tcp_keepalive_str __attribute__ ((unused)))
903
funcdecl_no_bgp_tcp_keepalive;
904
DEFUN_CMD_FUNC_TEXT(no_bgp_tcp_keepalive)
905
0
{
906
0
#if 1 /* anything to parse? */
907
0
  int _i;
908
0
#if 1 /* anything that can fail? */
909
0
  unsigned _fail = 0, _failcnt = 0;
910
0
#endif
911
0
  long tcp_keepalive = 0;
912
0
  const char *tcp_keepalive_str = NULL;
913
914
0
  for (_i = 0; _i < argc; _i++) {
915
0
    if (!argv[_i]->varname)
916
0
      continue;
917
0
#if 1 /* anything that can fail? */
918
0
    _fail = 0;
919
0
#endif
920
921
0
    if (!strcmp(argv[_i]->varname, "tcp_keepalive")) {
922
0
      tcp_keepalive_str = argv[_i]->arg;
923
0
      char *_end;
924
0
      tcp_keepalive = strtol(argv[_i]->arg, &_end, 10);
925
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
926
0
    }
927
0
#if 1 /* anything that can fail? */
928
0
    if (_fail)
929
0
      vty_out (vty, "%% invalid input for %s: %s\n",
930
0
           argv[_i]->varname, argv[_i]->arg);
931
0
    _failcnt += _fail;
932
0
#endif
933
0
  }
934
0
#if 1 /* anything that can fail? */
935
0
  if (_failcnt)
936
0
    return CMD_WARNING;
937
0
#endif
938
0
#endif
939
940
0
  return no_bgp_tcp_keepalive_magic(self, vty, argc, argv, tcp_keepalive, tcp_keepalive_str);
941
0
}
942
943
/* bgp_lu_uses_explicit_null => "[no] bgp labeled-unicast <explicit-null|ipv4-explicit-null|ipv6-explicit-null>$value" */
944
DEFUN_CMD_FUNC_DECL(bgp_lu_uses_explicit_null)
945
#define funcdecl_bgp_lu_uses_explicit_null static int bgp_lu_uses_explicit_null_magic(\
946
  const struct cmd_element *self __attribute__ ((unused)),\
947
  struct vty *vty __attribute__ ((unused)),\
948
  int argc __attribute__ ((unused)),\
949
  struct cmd_token *argv[] __attribute__ ((unused)),\
950
  const char * no,\
951
  const char * value)
952
funcdecl_bgp_lu_uses_explicit_null;
953
DEFUN_CMD_FUNC_TEXT(bgp_lu_uses_explicit_null)
954
0
{
955
0
#if 2 /* anything to parse? */
956
0
  int _i;
957
#if 0 /* anything that can fail? */
958
  unsigned _fail = 0, _failcnt = 0;
959
#endif
960
0
  const char *no = NULL;
961
0
  const char *value = NULL;
962
963
0
  for (_i = 0; _i < argc; _i++) {
964
0
    if (!argv[_i]->varname)
965
0
      continue;
966
#if 0 /* anything that can fail? */
967
    _fail = 0;
968
#endif
969
970
0
    if (!strcmp(argv[_i]->varname, "no")) {
971
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
972
0
    }
973
0
    if (!strcmp(argv[_i]->varname, "value")) {
974
0
      value = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
975
0
    }
976
#if 0 /* anything that can fail? */
977
    if (_fail)
978
      vty_out (vty, "%% invalid input for %s: %s\n",
979
           argv[_i]->varname, argv[_i]->arg);
980
    _failcnt += _fail;
981
#endif
982
0
  }
983
#if 0 /* anything that can fail? */
984
  if (_failcnt)
985
    return CMD_WARNING;
986
#endif
987
0
#endif
988
0
  if (!value) {
989
0
    vty_out(vty, "Internal CLI error [%s]\n", "value");
990
0
    return CMD_WARNING;
991
0
  }
992
993
0
  return bgp_lu_uses_explicit_null_magic(self, vty, argc, argv, no, value);
994
0
}
995
996
/* bgp_graceful_restart_notification => "[no$no] bgp graceful-restart notification" */
997
DEFUN_CMD_FUNC_DECL(bgp_graceful_restart_notification)
998
#define funcdecl_bgp_graceful_restart_notification static int bgp_graceful_restart_notification_magic(\
999
  const struct cmd_element *self __attribute__ ((unused)),\
1000
  struct vty *vty __attribute__ ((unused)),\
1001
  int argc __attribute__ ((unused)),\
1002
  struct cmd_token *argv[] __attribute__ ((unused)),\
1003
  const char * no)
1004
funcdecl_bgp_graceful_restart_notification;
1005
DEFUN_CMD_FUNC_TEXT(bgp_graceful_restart_notification)
1006
0
{
1007
0
#if 1 /* anything to parse? */
1008
0
  int _i;
1009
#if 0 /* anything that can fail? */
1010
  unsigned _fail = 0, _failcnt = 0;
1011
#endif
1012
0
  const char *no = NULL;
1013
1014
0
  for (_i = 0; _i < argc; _i++) {
1015
0
    if (!argv[_i]->varname)
1016
0
      continue;
1017
#if 0 /* anything that can fail? */
1018
    _fail = 0;
1019
#endif
1020
1021
0
    if (!strcmp(argv[_i]->varname, "no")) {
1022
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1023
0
    }
1024
#if 0 /* anything that can fail? */
1025
    if (_fail)
1026
      vty_out (vty, "%% invalid input for %s: %s\n",
1027
           argv[_i]->varname, argv[_i]->arg);
1028
    _failcnt += _fail;
1029
#endif
1030
0
  }
1031
#if 0 /* anything that can fail? */
1032
  if (_failcnt)
1033
    return CMD_WARNING;
1034
#endif
1035
0
#endif
1036
1037
0
  return bgp_graceful_restart_notification_magic(self, vty, argc, argv, no);
1038
0
}
1039
1040
/* bgp_administrative_reset => "[no$no] bgp hard-administrative-reset" */
1041
DEFUN_CMD_FUNC_DECL(bgp_administrative_reset)
1042
#define funcdecl_bgp_administrative_reset static int bgp_administrative_reset_magic(\
1043
  const struct cmd_element *self __attribute__ ((unused)),\
1044
  struct vty *vty __attribute__ ((unused)),\
1045
  int argc __attribute__ ((unused)),\
1046
  struct cmd_token *argv[] __attribute__ ((unused)),\
1047
  const char * no)
1048
funcdecl_bgp_administrative_reset;
1049
DEFUN_CMD_FUNC_TEXT(bgp_administrative_reset)
1050
0
{
1051
0
#if 1 /* anything to parse? */
1052
0
  int _i;
1053
#if 0 /* anything that can fail? */
1054
  unsigned _fail = 0, _failcnt = 0;
1055
#endif
1056
0
  const char *no = NULL;
1057
1058
0
  for (_i = 0; _i < argc; _i++) {
1059
0
    if (!argv[_i]->varname)
1060
0
      continue;
1061
#if 0 /* anything that can fail? */
1062
    _fail = 0;
1063
#endif
1064
1065
0
    if (!strcmp(argv[_i]->varname, "no")) {
1066
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1067
0
    }
1068
#if 0 /* anything that can fail? */
1069
    if (_fail)
1070
      vty_out (vty, "%% invalid input for %s: %s\n",
1071
           argv[_i]->varname, argv[_i]->arg);
1072
    _failcnt += _fail;
1073
#endif
1074
0
  }
1075
#if 0 /* anything that can fail? */
1076
  if (_failcnt)
1077
    return CMD_WARNING;
1078
#endif
1079
0
#endif
1080
1081
0
  return bgp_administrative_reset_magic(self, vty, argc, argv, no);
1082
0
}
1083
1084
/* neighbor_graceful_shutdown => "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor graceful-shutdown" */
1085
DEFUN_CMD_FUNC_DECL(neighbor_graceful_shutdown)
1086
#define funcdecl_neighbor_graceful_shutdown static int neighbor_graceful_shutdown_magic(\
1087
  const struct cmd_element *self __attribute__ ((unused)),\
1088
  struct vty *vty __attribute__ ((unused)),\
1089
  int argc __attribute__ ((unused)),\
1090
  struct cmd_token *argv[] __attribute__ ((unused)),\
1091
  const char * no,\
1092
  const char * neighbor)
1093
funcdecl_neighbor_graceful_shutdown;
1094
DEFUN_CMD_FUNC_TEXT(neighbor_graceful_shutdown)
1095
0
{
1096
0
#if 2 /* anything to parse? */
1097
0
  int _i;
1098
#if 0 /* anything that can fail? */
1099
  unsigned _fail = 0, _failcnt = 0;
1100
#endif
1101
0
  const char *no = NULL;
1102
0
  const char *neighbor = NULL;
1103
1104
0
  for (_i = 0; _i < argc; _i++) {
1105
0
    if (!argv[_i]->varname)
1106
0
      continue;
1107
#if 0 /* anything that can fail? */
1108
    _fail = 0;
1109
#endif
1110
1111
0
    if (!strcmp(argv[_i]->varname, "no")) {
1112
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1113
0
    }
1114
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1115
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1116
0
    }
1117
#if 0 /* anything that can fail? */
1118
    if (_fail)
1119
      vty_out (vty, "%% invalid input for %s: %s\n",
1120
           argv[_i]->varname, argv[_i]->arg);
1121
    _failcnt += _fail;
1122
#endif
1123
0
  }
1124
#if 0 /* anything that can fail? */
1125
  if (_failcnt)
1126
    return CMD_WARNING;
1127
#endif
1128
0
#endif
1129
0
  if (!neighbor) {
1130
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1131
0
    return CMD_WARNING;
1132
0
  }
1133
1134
0
  return neighbor_graceful_shutdown_magic(self, vty, argc, argv, no, neighbor);
1135
0
}
1136
1137
/* bgp_bestpath_aigp => "[no$no] bgp bestpath aigp" */
1138
DEFUN_CMD_FUNC_DECL(bgp_bestpath_aigp)
1139
#define funcdecl_bgp_bestpath_aigp static int bgp_bestpath_aigp_magic(\
1140
  const struct cmd_element *self __attribute__ ((unused)),\
1141
  struct vty *vty __attribute__ ((unused)),\
1142
  int argc __attribute__ ((unused)),\
1143
  struct cmd_token *argv[] __attribute__ ((unused)),\
1144
  const char * no)
1145
funcdecl_bgp_bestpath_aigp;
1146
DEFUN_CMD_FUNC_TEXT(bgp_bestpath_aigp)
1147
0
{
1148
0
#if 1 /* anything to parse? */
1149
0
  int _i;
1150
#if 0 /* anything that can fail? */
1151
  unsigned _fail = 0, _failcnt = 0;
1152
#endif
1153
0
  const char *no = NULL;
1154
1155
0
  for (_i = 0; _i < argc; _i++) {
1156
0
    if (!argv[_i]->varname)
1157
0
      continue;
1158
#if 0 /* anything that can fail? */
1159
    _fail = 0;
1160
#endif
1161
1162
0
    if (!strcmp(argv[_i]->varname, "no")) {
1163
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1164
0
    }
1165
#if 0 /* anything that can fail? */
1166
    if (_fail)
1167
      vty_out (vty, "%% invalid input for %s: %s\n",
1168
           argv[_i]->varname, argv[_i]->arg);
1169
    _failcnt += _fail;
1170
#endif
1171
0
  }
1172
#if 0 /* anything that can fail? */
1173
  if (_failcnt)
1174
    return CMD_WARNING;
1175
#endif
1176
0
#endif
1177
1178
0
  return bgp_bestpath_aigp_magic(self, vty, argc, argv, no);
1179
0
}
1180
1181
/* bgp_bestpath_bw => "bgp bestpath bandwidth <ignore|skip-missing|default-weight-for-missing>$bw_cfg" */
1182
DEFUN_CMD_FUNC_DECL(bgp_bestpath_bw)
1183
#define funcdecl_bgp_bestpath_bw static int bgp_bestpath_bw_magic(\
1184
  const struct cmd_element *self __attribute__ ((unused)),\
1185
  struct vty *vty __attribute__ ((unused)),\
1186
  int argc __attribute__ ((unused)),\
1187
  struct cmd_token *argv[] __attribute__ ((unused)),\
1188
  const char * bw_cfg)
1189
funcdecl_bgp_bestpath_bw;
1190
DEFUN_CMD_FUNC_TEXT(bgp_bestpath_bw)
1191
0
{
1192
0
#if 1 /* anything to parse? */
1193
0
  int _i;
1194
#if 0 /* anything that can fail? */
1195
  unsigned _fail = 0, _failcnt = 0;
1196
#endif
1197
0
  const char *bw_cfg = NULL;
1198
1199
0
  for (_i = 0; _i < argc; _i++) {
1200
0
    if (!argv[_i]->varname)
1201
0
      continue;
1202
#if 0 /* anything that can fail? */
1203
    _fail = 0;
1204
#endif
1205
1206
0
    if (!strcmp(argv[_i]->varname, "bw_cfg")) {
1207
0
      bw_cfg = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1208
0
    }
1209
#if 0 /* anything that can fail? */
1210
    if (_fail)
1211
      vty_out (vty, "%% invalid input for %s: %s\n",
1212
           argv[_i]->varname, argv[_i]->arg);
1213
    _failcnt += _fail;
1214
#endif
1215
0
  }
1216
#if 0 /* anything that can fail? */
1217
  if (_failcnt)
1218
    return CMD_WARNING;
1219
#endif
1220
0
#endif
1221
0
  if (!bw_cfg) {
1222
0
    vty_out(vty, "Internal CLI error [%s]\n", "bw_cfg");
1223
0
    return CMD_WARNING;
1224
0
  }
1225
1226
0
  return bgp_bestpath_bw_magic(self, vty, argc, argv, bw_cfg);
1227
0
}
1228
1229
/* no_bgp_bestpath_bw => "no bgp bestpath bandwidth [<ignore|skip-missing|default-weight-for-missing>$bw_cfg]" */
1230
DEFUN_CMD_FUNC_DECL(no_bgp_bestpath_bw)
1231
#define funcdecl_no_bgp_bestpath_bw static int no_bgp_bestpath_bw_magic(\
1232
  const struct cmd_element *self __attribute__ ((unused)),\
1233
  struct vty *vty __attribute__ ((unused)),\
1234
  int argc __attribute__ ((unused)),\
1235
  struct cmd_token *argv[] __attribute__ ((unused)),\
1236
  const char * bw_cfg)
1237
funcdecl_no_bgp_bestpath_bw;
1238
DEFUN_CMD_FUNC_TEXT(no_bgp_bestpath_bw)
1239
0
{
1240
0
#if 1 /* anything to parse? */
1241
0
  int _i;
1242
#if 0 /* anything that can fail? */
1243
  unsigned _fail = 0, _failcnt = 0;
1244
#endif
1245
0
  const char *bw_cfg = NULL;
1246
1247
0
  for (_i = 0; _i < argc; _i++) {
1248
0
    if (!argv[_i]->varname)
1249
0
      continue;
1250
#if 0 /* anything that can fail? */
1251
    _fail = 0;
1252
#endif
1253
1254
0
    if (!strcmp(argv[_i]->varname, "bw_cfg")) {
1255
0
      bw_cfg = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1256
0
    }
1257
#if 0 /* anything that can fail? */
1258
    if (_fail)
1259
      vty_out (vty, "%% invalid input for %s: %s\n",
1260
           argv[_i]->varname, argv[_i]->arg);
1261
    _failcnt += _fail;
1262
#endif
1263
0
  }
1264
#if 0 /* anything that can fail? */
1265
  if (_failcnt)
1266
    return CMD_WARNING;
1267
#endif
1268
0
#endif
1269
1270
0
  return no_bgp_bestpath_bw_magic(self, vty, argc, argv, bw_cfg);
1271
0
}
1272
1273
/* bgp_default_afi_safi => "[no] bgp default <ipv4-unicast|ipv4-multicast|ipv4-vpn|ipv4-labeled-unicast|ipv4-flowspec|ipv6-unicast|ipv6-multicast|ipv6-vpn|ipv6-labeled-unicast|ipv6-flowspec|l2vpn-evpn>$afi_safi" */
1274
DEFUN_CMD_FUNC_DECL(bgp_default_afi_safi)
1275
#define funcdecl_bgp_default_afi_safi static int bgp_default_afi_safi_magic(\
1276
  const struct cmd_element *self __attribute__ ((unused)),\
1277
  struct vty *vty __attribute__ ((unused)),\
1278
  int argc __attribute__ ((unused)),\
1279
  struct cmd_token *argv[] __attribute__ ((unused)),\
1280
  const char * no,\
1281
  const char * afi_safi)
1282
funcdecl_bgp_default_afi_safi;
1283
DEFUN_CMD_FUNC_TEXT(bgp_default_afi_safi)
1284
0
{
1285
0
#if 2 /* anything to parse? */
1286
0
  int _i;
1287
#if 0 /* anything that can fail? */
1288
  unsigned _fail = 0, _failcnt = 0;
1289
#endif
1290
0
  const char *no = NULL;
1291
0
  const char *afi_safi = NULL;
1292
1293
0
  for (_i = 0; _i < argc; _i++) {
1294
0
    if (!argv[_i]->varname)
1295
0
      continue;
1296
#if 0 /* anything that can fail? */
1297
    _fail = 0;
1298
#endif
1299
1300
0
    if (!strcmp(argv[_i]->varname, "no")) {
1301
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1302
0
    }
1303
0
    if (!strcmp(argv[_i]->varname, "afi_safi")) {
1304
0
      afi_safi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1305
0
    }
1306
#if 0 /* anything that can fail? */
1307
    if (_fail)
1308
      vty_out (vty, "%% invalid input for %s: %s\n",
1309
           argv[_i]->varname, argv[_i]->arg);
1310
    _failcnt += _fail;
1311
#endif
1312
0
  }
1313
#if 0 /* anything that can fail? */
1314
  if (_failcnt)
1315
    return CMD_WARNING;
1316
#endif
1317
0
#endif
1318
0
  if (!afi_safi) {
1319
0
    vty_out(vty, "Internal CLI error [%s]\n", "afi_safi");
1320
0
    return CMD_WARNING;
1321
0
  }
1322
1323
0
  return bgp_default_afi_safi_magic(self, vty, argc, argv, no, afi_safi);
1324
0
}
1325
1326
/* bgp_shutdown_msg => "bgp shutdown message MSG..." */
1327
DEFUN_CMD_FUNC_DECL(bgp_shutdown_msg)
1328
#define funcdecl_bgp_shutdown_msg static int bgp_shutdown_msg_magic(\
1329
  const struct cmd_element *self __attribute__ ((unused)),\
1330
  struct vty *vty __attribute__ ((unused)),\
1331
  int argc __attribute__ ((unused)),\
1332
  struct cmd_token *argv[] __attribute__ ((unused)),\
1333
  const char * msg)
1334
funcdecl_bgp_shutdown_msg;
1335
DEFUN_CMD_FUNC_TEXT(bgp_shutdown_msg)
1336
0
{
1337
0
#if 1 /* anything to parse? */
1338
0
  int _i;
1339
#if 0 /* anything that can fail? */
1340
  unsigned _fail = 0, _failcnt = 0;
1341
#endif
1342
0
  const char *msg = NULL;
1343
1344
0
  for (_i = 0; _i < argc; _i++) {
1345
0
    if (!argv[_i]->varname)
1346
0
      continue;
1347
#if 0 /* anything that can fail? */
1348
    _fail = 0;
1349
#endif
1350
1351
0
    if (!strcmp(argv[_i]->varname, "msg")) {
1352
0
      msg = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1353
0
    }
1354
#if 0 /* anything that can fail? */
1355
    if (_fail)
1356
      vty_out (vty, "%% invalid input for %s: %s\n",
1357
           argv[_i]->varname, argv[_i]->arg);
1358
    _failcnt += _fail;
1359
#endif
1360
0
  }
1361
#if 0 /* anything that can fail? */
1362
  if (_failcnt)
1363
    return CMD_WARNING;
1364
#endif
1365
0
#endif
1366
0
  if (!msg) {
1367
0
    vty_out(vty, "Internal CLI error [%s]\n", "msg");
1368
0
    return CMD_WARNING;
1369
0
  }
1370
1371
0
  return bgp_shutdown_msg_magic(self, vty, argc, argv, msg);
1372
0
}
1373
1374
/* bgp_shutdown => "bgp shutdown" */
1375
DEFUN_CMD_FUNC_DECL(bgp_shutdown)
1376
#define funcdecl_bgp_shutdown static int bgp_shutdown_magic(\
1377
  const struct cmd_element *self __attribute__ ((unused)),\
1378
  struct vty *vty __attribute__ ((unused)),\
1379
  int argc __attribute__ ((unused)),\
1380
  struct cmd_token *argv[] __attribute__ ((unused)))
1381
funcdecl_bgp_shutdown;
1382
DEFUN_CMD_FUNC_TEXT(bgp_shutdown)
1383
0
{
1384
#if 0 /* anything to parse? */
1385
  int _i;
1386
#if 0 /* anything that can fail? */
1387
  unsigned _fail = 0, _failcnt = 0;
1388
#endif
1389
1390
  for (_i = 0; _i < argc; _i++) {
1391
    if (!argv[_i]->varname)
1392
      continue;
1393
#if 0 /* anything that can fail? */
1394
    _fail = 0;
1395
#endif
1396
1397
#if 0 /* anything that can fail? */
1398
    if (_fail)
1399
      vty_out (vty, "%% invalid input for %s: %s\n",
1400
           argv[_i]->varname, argv[_i]->arg);
1401
    _failcnt += _fail;
1402
#endif
1403
  }
1404
#if 0 /* anything that can fail? */
1405
  if (_failcnt)
1406
    return CMD_WARNING;
1407
#endif
1408
#endif
1409
1410
0
  return bgp_shutdown_magic(self, vty, argc, argv);
1411
0
}
1412
1413
/* no_bgp_shutdown => "no bgp shutdown" */
1414
DEFUN_CMD_FUNC_DECL(no_bgp_shutdown)
1415
#define funcdecl_no_bgp_shutdown static int no_bgp_shutdown_magic(\
1416
  const struct cmd_element *self __attribute__ ((unused)),\
1417
  struct vty *vty __attribute__ ((unused)),\
1418
  int argc __attribute__ ((unused)),\
1419
  struct cmd_token *argv[] __attribute__ ((unused)))
1420
funcdecl_no_bgp_shutdown;
1421
DEFUN_CMD_FUNC_TEXT(no_bgp_shutdown)
1422
0
{
1423
#if 0 /* anything to parse? */
1424
  int _i;
1425
#if 0 /* anything that can fail? */
1426
  unsigned _fail = 0, _failcnt = 0;
1427
#endif
1428
1429
  for (_i = 0; _i < argc; _i++) {
1430
    if (!argv[_i]->varname)
1431
      continue;
1432
#if 0 /* anything that can fail? */
1433
    _fail = 0;
1434
#endif
1435
1436
#if 0 /* anything that can fail? */
1437
    if (_fail)
1438
      vty_out (vty, "%% invalid input for %s: %s\n",
1439
           argv[_i]->varname, argv[_i]->arg);
1440
    _failcnt += _fail;
1441
#endif
1442
  }
1443
#if 0 /* anything that can fail? */
1444
  if (_failcnt)
1445
    return CMD_WARNING;
1446
#endif
1447
#endif
1448
1449
0
  return no_bgp_shutdown_magic(self, vty, argc, argv);
1450
0
}
1451
1452
/* bgp_allow_martian => "[no]$no bgp allow-martian-nexthop" */
1453
DEFUN_CMD_FUNC_DECL(bgp_allow_martian)
1454
#define funcdecl_bgp_allow_martian static int bgp_allow_martian_magic(\
1455
  const struct cmd_element *self __attribute__ ((unused)),\
1456
  struct vty *vty __attribute__ ((unused)),\
1457
  int argc __attribute__ ((unused)),\
1458
  struct cmd_token *argv[] __attribute__ ((unused)),\
1459
  const char * no)
1460
funcdecl_bgp_allow_martian;
1461
DEFUN_CMD_FUNC_TEXT(bgp_allow_martian)
1462
0
{
1463
0
#if 1 /* anything to parse? */
1464
0
  int _i;
1465
#if 0 /* anything that can fail? */
1466
  unsigned _fail = 0, _failcnt = 0;
1467
#endif
1468
0
  const char *no = NULL;
1469
1470
0
  for (_i = 0; _i < argc; _i++) {
1471
0
    if (!argv[_i]->varname)
1472
0
      continue;
1473
#if 0 /* anything that can fail? */
1474
    _fail = 0;
1475
#endif
1476
1477
0
    if (!strcmp(argv[_i]->varname, "no")) {
1478
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1479
0
    }
1480
#if 0 /* anything that can fail? */
1481
    if (_fail)
1482
      vty_out (vty, "%% invalid input for %s: %s\n",
1483
           argv[_i]->varname, argv[_i]->arg);
1484
    _failcnt += _fail;
1485
#endif
1486
0
  }
1487
#if 0 /* anything that can fail? */
1488
  if (_failcnt)
1489
    return CMD_WARNING;
1490
#endif
1491
0
#endif
1492
1493
0
  return bgp_allow_martian_magic(self, vty, argc, argv, no);
1494
0
}
1495
1496
/* neighbor_capability_software_version => "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor capability software-version" */
1497
DEFUN_CMD_FUNC_DECL(neighbor_capability_software_version)
1498
#define funcdecl_neighbor_capability_software_version static int neighbor_capability_software_version_magic(\
1499
  const struct cmd_element *self __attribute__ ((unused)),\
1500
  struct vty *vty __attribute__ ((unused)),\
1501
  int argc __attribute__ ((unused)),\
1502
  struct cmd_token *argv[] __attribute__ ((unused)),\
1503
  const char * no,\
1504
  const char * neighbor)
1505
funcdecl_neighbor_capability_software_version;
1506
DEFUN_CMD_FUNC_TEXT(neighbor_capability_software_version)
1507
0
{
1508
0
#if 2 /* anything to parse? */
1509
0
  int _i;
1510
#if 0 /* anything that can fail? */
1511
  unsigned _fail = 0, _failcnt = 0;
1512
#endif
1513
0
  const char *no = NULL;
1514
0
  const char *neighbor = NULL;
1515
1516
0
  for (_i = 0; _i < argc; _i++) {
1517
0
    if (!argv[_i]->varname)
1518
0
      continue;
1519
#if 0 /* anything that can fail? */
1520
    _fail = 0;
1521
#endif
1522
1523
0
    if (!strcmp(argv[_i]->varname, "no")) {
1524
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1525
0
    }
1526
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1527
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1528
0
    }
1529
#if 0 /* anything that can fail? */
1530
    if (_fail)
1531
      vty_out (vty, "%% invalid input for %s: %s\n",
1532
           argv[_i]->varname, argv[_i]->arg);
1533
    _failcnt += _fail;
1534
#endif
1535
0
  }
1536
#if 0 /* anything that can fail? */
1537
  if (_failcnt)
1538
    return CMD_WARNING;
1539
#endif
1540
0
#endif
1541
0
  if (!neighbor) {
1542
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1543
0
    return CMD_WARNING;
1544
0
  }
1545
1546
0
  return neighbor_capability_software_version_magic(self, vty, argc, argv, no, neighbor);
1547
0
}
1548
1549
/* neighbor_aigp => "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor aigp" */
1550
DEFUN_CMD_FUNC_DECL(neighbor_aigp)
1551
#define funcdecl_neighbor_aigp static int neighbor_aigp_magic(\
1552
  const struct cmd_element *self __attribute__ ((unused)),\
1553
  struct vty *vty __attribute__ ((unused)),\
1554
  int argc __attribute__ ((unused)),\
1555
  struct cmd_token *argv[] __attribute__ ((unused)),\
1556
  const char * no,\
1557
  const char * neighbor)
1558
funcdecl_neighbor_aigp;
1559
DEFUN_CMD_FUNC_TEXT(neighbor_aigp)
1560
0
{
1561
0
#if 2 /* anything to parse? */
1562
0
  int _i;
1563
#if 0 /* anything that can fail? */
1564
  unsigned _fail = 0, _failcnt = 0;
1565
#endif
1566
0
  const char *no = NULL;
1567
0
  const char *neighbor = NULL;
1568
1569
0
  for (_i = 0; _i < argc; _i++) {
1570
0
    if (!argv[_i]->varname)
1571
0
      continue;
1572
#if 0 /* anything that can fail? */
1573
    _fail = 0;
1574
#endif
1575
1576
0
    if (!strcmp(argv[_i]->varname, "no")) {
1577
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1578
0
    }
1579
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1580
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1581
0
    }
1582
#if 0 /* anything that can fail? */
1583
    if (_fail)
1584
      vty_out (vty, "%% invalid input for %s: %s\n",
1585
           argv[_i]->varname, argv[_i]->arg);
1586
    _failcnt += _fail;
1587
#endif
1588
0
  }
1589
#if 0 /* anything that can fail? */
1590
  if (_failcnt)
1591
    return CMD_WARNING;
1592
#endif
1593
0
#endif
1594
0
  if (!neighbor) {
1595
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1596
0
    return CMD_WARNING;
1597
0
  }
1598
1599
0
  return neighbor_aigp_magic(self, vty, argc, argv, no, neighbor);
1600
0
}
1601
1602
/* neighbor_role => "neighbor <A.B.C.D|X:X::X:X|WORD> local-role <provider|rs-server|rs-client|customer|peer>" */
1603
DEFUN_CMD_FUNC_DECL(neighbor_role)
1604
#define funcdecl_neighbor_role static int neighbor_role_magic(\
1605
  const struct cmd_element *self __attribute__ ((unused)),\
1606
  struct vty *vty __attribute__ ((unused)),\
1607
  int argc __attribute__ ((unused)),\
1608
  struct cmd_token *argv[] __attribute__ ((unused)),\
1609
  const char * neighbor)
1610
funcdecl_neighbor_role;
1611
DEFUN_CMD_FUNC_TEXT(neighbor_role)
1612
0
{
1613
0
#if 1 /* anything to parse? */
1614
0
  int _i;
1615
#if 0 /* anything that can fail? */
1616
  unsigned _fail = 0, _failcnt = 0;
1617
#endif
1618
0
  const char *neighbor = NULL;
1619
1620
0
  for (_i = 0; _i < argc; _i++) {
1621
0
    if (!argv[_i]->varname)
1622
0
      continue;
1623
#if 0 /* anything that can fail? */
1624
    _fail = 0;
1625
#endif
1626
1627
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1628
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1629
0
    }
1630
#if 0 /* anything that can fail? */
1631
    if (_fail)
1632
      vty_out (vty, "%% invalid input for %s: %s\n",
1633
           argv[_i]->varname, argv[_i]->arg);
1634
    _failcnt += _fail;
1635
#endif
1636
0
  }
1637
#if 0 /* anything that can fail? */
1638
  if (_failcnt)
1639
    return CMD_WARNING;
1640
#endif
1641
0
#endif
1642
0
  if (!neighbor) {
1643
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1644
0
    return CMD_WARNING;
1645
0
  }
1646
1647
0
  return neighbor_role_magic(self, vty, argc, argv, neighbor);
1648
0
}
1649
1650
/* neighbor_role_strict => "neighbor <A.B.C.D|X:X::X:X|WORD> local-role <provider|rs-server|rs-client|customer|peer> strict-mode" */
1651
DEFUN_CMD_FUNC_DECL(neighbor_role_strict)
1652
#define funcdecl_neighbor_role_strict static int neighbor_role_strict_magic(\
1653
  const struct cmd_element *self __attribute__ ((unused)),\
1654
  struct vty *vty __attribute__ ((unused)),\
1655
  int argc __attribute__ ((unused)),\
1656
  struct cmd_token *argv[] __attribute__ ((unused)),\
1657
  const char * neighbor)
1658
funcdecl_neighbor_role_strict;
1659
DEFUN_CMD_FUNC_TEXT(neighbor_role_strict)
1660
0
{
1661
0
#if 1 /* anything to parse? */
1662
0
  int _i;
1663
#if 0 /* anything that can fail? */
1664
  unsigned _fail = 0, _failcnt = 0;
1665
#endif
1666
0
  const char *neighbor = NULL;
1667
1668
0
  for (_i = 0; _i < argc; _i++) {
1669
0
    if (!argv[_i]->varname)
1670
0
      continue;
1671
#if 0 /* anything that can fail? */
1672
    _fail = 0;
1673
#endif
1674
1675
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1676
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1677
0
    }
1678
#if 0 /* anything that can fail? */
1679
    if (_fail)
1680
      vty_out (vty, "%% invalid input for %s: %s\n",
1681
           argv[_i]->varname, argv[_i]->arg);
1682
    _failcnt += _fail;
1683
#endif
1684
0
  }
1685
#if 0 /* anything that can fail? */
1686
  if (_failcnt)
1687
    return CMD_WARNING;
1688
#endif
1689
0
#endif
1690
0
  if (!neighbor) {
1691
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1692
0
    return CMD_WARNING;
1693
0
  }
1694
1695
0
  return neighbor_role_strict_magic(self, vty, argc, argv, neighbor);
1696
0
}
1697
1698
/* no_neighbor_role => "no neighbor <A.B.C.D|X:X::X:X|WORD> local-role <provider|rs-server|rs-client|customer|peer> [strict-mode]" */
1699
DEFUN_CMD_FUNC_DECL(no_neighbor_role)
1700
#define funcdecl_no_neighbor_role static int no_neighbor_role_magic(\
1701
  const struct cmd_element *self __attribute__ ((unused)),\
1702
  struct vty *vty __attribute__ ((unused)),\
1703
  int argc __attribute__ ((unused)),\
1704
  struct cmd_token *argv[] __attribute__ ((unused)),\
1705
  const char * neighbor)
1706
funcdecl_no_neighbor_role;
1707
DEFUN_CMD_FUNC_TEXT(no_neighbor_role)
1708
0
{
1709
0
#if 1 /* anything to parse? */
1710
0
  int _i;
1711
#if 0 /* anything that can fail? */
1712
  unsigned _fail = 0, _failcnt = 0;
1713
#endif
1714
0
  const char *neighbor = NULL;
1715
1716
0
  for (_i = 0; _i < argc; _i++) {
1717
0
    if (!argv[_i]->varname)
1718
0
      continue;
1719
#if 0 /* anything that can fail? */
1720
    _fail = 0;
1721
#endif
1722
1723
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1724
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1725
0
    }
1726
#if 0 /* anything that can fail? */
1727
    if (_fail)
1728
      vty_out (vty, "%% invalid input for %s: %s\n",
1729
           argv[_i]->varname, argv[_i]->arg);
1730
    _failcnt += _fail;
1731
#endif
1732
0
  }
1733
#if 0 /* anything that can fail? */
1734
  if (_failcnt)
1735
    return CMD_WARNING;
1736
#endif
1737
0
#endif
1738
0
  if (!neighbor) {
1739
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1740
0
    return CMD_WARNING;
1741
0
  }
1742
1743
0
  return no_neighbor_role_magic(self, vty, argc, argv, neighbor);
1744
0
}
1745
1746
/* neighbor_timers_delayopen => "neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor timers delayopen (1-240)$interval" */
1747
DEFUN_CMD_FUNC_DECL(neighbor_timers_delayopen)
1748
#define funcdecl_neighbor_timers_delayopen static int neighbor_timers_delayopen_magic(\
1749
  const struct cmd_element *self __attribute__ ((unused)),\
1750
  struct vty *vty __attribute__ ((unused)),\
1751
  int argc __attribute__ ((unused)),\
1752
  struct cmd_token *argv[] __attribute__ ((unused)),\
1753
  const char * neighbor,\
1754
  long interval,\
1755
  const char * interval_str __attribute__ ((unused)))
1756
funcdecl_neighbor_timers_delayopen;
1757
DEFUN_CMD_FUNC_TEXT(neighbor_timers_delayopen)
1758
0
{
1759
0
#if 2 /* anything to parse? */
1760
0
  int _i;
1761
0
#if 1 /* anything that can fail? */
1762
0
  unsigned _fail = 0, _failcnt = 0;
1763
0
#endif
1764
0
  const char *neighbor = NULL;
1765
0
  long interval = 0;
1766
0
  const char *interval_str = NULL;
1767
1768
0
  for (_i = 0; _i < argc; _i++) {
1769
0
    if (!argv[_i]->varname)
1770
0
      continue;
1771
0
#if 1 /* anything that can fail? */
1772
0
    _fail = 0;
1773
0
#endif
1774
1775
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1776
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1777
0
    }
1778
0
    if (!strcmp(argv[_i]->varname, "interval")) {
1779
0
      interval_str = argv[_i]->arg;
1780
0
      char *_end;
1781
0
      interval = strtol(argv[_i]->arg, &_end, 10);
1782
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
1783
0
    }
1784
0
#if 1 /* anything that can fail? */
1785
0
    if (_fail)
1786
0
      vty_out (vty, "%% invalid input for %s: %s\n",
1787
0
           argv[_i]->varname, argv[_i]->arg);
1788
0
    _failcnt += _fail;
1789
0
#endif
1790
0
  }
1791
0
#if 1 /* anything that can fail? */
1792
0
  if (_failcnt)
1793
0
    return CMD_WARNING;
1794
0
#endif
1795
0
#endif
1796
0
  if (!neighbor) {
1797
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1798
0
    return CMD_WARNING;
1799
0
  }
1800
0
  if (!interval_str) {
1801
0
    vty_out(vty, "Internal CLI error [%s]\n", "interval_str");
1802
0
    return CMD_WARNING;
1803
0
  }
1804
1805
0
  return neighbor_timers_delayopen_magic(self, vty, argc, argv, neighbor, interval, interval_str);
1806
0
}
1807
1808
/* no_neighbor_timers_delayopen => "no neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor timers delayopen [(0-65535)]" */
1809
DEFUN_CMD_FUNC_DECL(no_neighbor_timers_delayopen)
1810
#define funcdecl_no_neighbor_timers_delayopen static int no_neighbor_timers_delayopen_magic(\
1811
  const struct cmd_element *self __attribute__ ((unused)),\
1812
  struct vty *vty __attribute__ ((unused)),\
1813
  int argc __attribute__ ((unused)),\
1814
  struct cmd_token *argv[] __attribute__ ((unused)),\
1815
  const char * neighbor,\
1816
  long delayopen,\
1817
  const char * delayopen_str __attribute__ ((unused)))
1818
funcdecl_no_neighbor_timers_delayopen;
1819
DEFUN_CMD_FUNC_TEXT(no_neighbor_timers_delayopen)
1820
0
{
1821
0
#if 2 /* anything to parse? */
1822
0
  int _i;
1823
0
#if 1 /* anything that can fail? */
1824
0
  unsigned _fail = 0, _failcnt = 0;
1825
0
#endif
1826
0
  const char *neighbor = NULL;
1827
0
  long delayopen = 0;
1828
0
  const char *delayopen_str = NULL;
1829
1830
0
  for (_i = 0; _i < argc; _i++) {
1831
0
    if (!argv[_i]->varname)
1832
0
      continue;
1833
0
#if 1 /* anything that can fail? */
1834
0
    _fail = 0;
1835
0
#endif
1836
1837
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1838
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1839
0
    }
1840
0
    if (!strcmp(argv[_i]->varname, "delayopen")) {
1841
0
      delayopen_str = argv[_i]->arg;
1842
0
      char *_end;
1843
0
      delayopen = strtol(argv[_i]->arg, &_end, 10);
1844
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
1845
0
    }
1846
0
#if 1 /* anything that can fail? */
1847
0
    if (_fail)
1848
0
      vty_out (vty, "%% invalid input for %s: %s\n",
1849
0
           argv[_i]->varname, argv[_i]->arg);
1850
0
    _failcnt += _fail;
1851
0
#endif
1852
0
  }
1853
0
#if 1 /* anything that can fail? */
1854
0
  if (_failcnt)
1855
0
    return CMD_WARNING;
1856
0
#endif
1857
0
#endif
1858
0
  if (!neighbor) {
1859
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1860
0
    return CMD_WARNING;
1861
0
  }
1862
1863
0
  return no_neighbor_timers_delayopen_magic(self, vty, argc, argv, neighbor, delayopen, delayopen_str);
1864
0
}
1865
1866
/* bgp_condadv_period => "[no$no] bgp conditional-advertisement timer (5-240)$period" */
1867
DEFUN_CMD_FUNC_DECL(bgp_condadv_period)
1868
#define funcdecl_bgp_condadv_period static int bgp_condadv_period_magic(\
1869
  const struct cmd_element *self __attribute__ ((unused)),\
1870
  struct vty *vty __attribute__ ((unused)),\
1871
  int argc __attribute__ ((unused)),\
1872
  struct cmd_token *argv[] __attribute__ ((unused)),\
1873
  const char * no,\
1874
  long period,\
1875
  const char * period_str __attribute__ ((unused)))
1876
funcdecl_bgp_condadv_period;
1877
DEFUN_CMD_FUNC_TEXT(bgp_condadv_period)
1878
0
{
1879
0
#if 2 /* anything to parse? */
1880
0
  int _i;
1881
0
#if 1 /* anything that can fail? */
1882
0
  unsigned _fail = 0, _failcnt = 0;
1883
0
#endif
1884
0
  const char *no = NULL;
1885
0
  long period = 0;
1886
0
  const char *period_str = NULL;
1887
1888
0
  for (_i = 0; _i < argc; _i++) {
1889
0
    if (!argv[_i]->varname)
1890
0
      continue;
1891
0
#if 1 /* anything that can fail? */
1892
0
    _fail = 0;
1893
0
#endif
1894
1895
0
    if (!strcmp(argv[_i]->varname, "no")) {
1896
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1897
0
    }
1898
0
    if (!strcmp(argv[_i]->varname, "period")) {
1899
0
      period_str = argv[_i]->arg;
1900
0
      char *_end;
1901
0
      period = strtol(argv[_i]->arg, &_end, 10);
1902
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
1903
0
    }
1904
0
#if 1 /* anything that can fail? */
1905
0
    if (_fail)
1906
0
      vty_out (vty, "%% invalid input for %s: %s\n",
1907
0
           argv[_i]->varname, argv[_i]->arg);
1908
0
    _failcnt += _fail;
1909
0
#endif
1910
0
  }
1911
0
#if 1 /* anything that can fail? */
1912
0
  if (_failcnt)
1913
0
    return CMD_WARNING;
1914
0
#endif
1915
0
#endif
1916
0
  if (!period_str) {
1917
0
    vty_out(vty, "Internal CLI error [%s]\n", "period_str");
1918
0
    return CMD_WARNING;
1919
0
  }
1920
1921
0
  return bgp_condadv_period_magic(self, vty, argc, argv, no, period, period_str);
1922
0
}
1923
1924
/* neighbor_advertise_map => "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor advertise-map RMAP_NAME$advertise_str <exist-map|non-exist-map>$exist RMAP_NAME$condition_str" */
1925
DEFUN_CMD_FUNC_DECL(neighbor_advertise_map)
1926
#define funcdecl_neighbor_advertise_map static int neighbor_advertise_map_magic(\
1927
  const struct cmd_element *self __attribute__ ((unused)),\
1928
  struct vty *vty __attribute__ ((unused)),\
1929
  int argc __attribute__ ((unused)),\
1930
  struct cmd_token *argv[] __attribute__ ((unused)),\
1931
  const char * no,\
1932
  const char * neighbor,\
1933
  const char * advertise_str,\
1934
  const char * exist,\
1935
  const char * condition_str)
1936
funcdecl_neighbor_advertise_map;
1937
DEFUN_CMD_FUNC_TEXT(neighbor_advertise_map)
1938
0
{
1939
0
#if 5 /* anything to parse? */
1940
0
  int _i;
1941
#if 0 /* anything that can fail? */
1942
  unsigned _fail = 0, _failcnt = 0;
1943
#endif
1944
0
  const char *no = NULL;
1945
0
  const char *neighbor = NULL;
1946
0
  const char *advertise_str = NULL;
1947
0
  const char *exist = NULL;
1948
0
  const char *condition_str = NULL;
1949
1950
0
  for (_i = 0; _i < argc; _i++) {
1951
0
    if (!argv[_i]->varname)
1952
0
      continue;
1953
#if 0 /* anything that can fail? */
1954
    _fail = 0;
1955
#endif
1956
1957
0
    if (!strcmp(argv[_i]->varname, "no")) {
1958
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1959
0
    }
1960
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
1961
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1962
0
    }
1963
0
    if (!strcmp(argv[_i]->varname, "advertise_str")) {
1964
0
      advertise_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1965
0
    }
1966
0
    if (!strcmp(argv[_i]->varname, "exist")) {
1967
0
      exist = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1968
0
    }
1969
0
    if (!strcmp(argv[_i]->varname, "condition_str")) {
1970
0
      condition_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1971
0
    }
1972
#if 0 /* anything that can fail? */
1973
    if (_fail)
1974
      vty_out (vty, "%% invalid input for %s: %s\n",
1975
           argv[_i]->varname, argv[_i]->arg);
1976
    _failcnt += _fail;
1977
#endif
1978
0
  }
1979
#if 0 /* anything that can fail? */
1980
  if (_failcnt)
1981
    return CMD_WARNING;
1982
#endif
1983
0
#endif
1984
0
  if (!neighbor) {
1985
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
1986
0
    return CMD_WARNING;
1987
0
  }
1988
0
  if (!advertise_str) {
1989
0
    vty_out(vty, "Internal CLI error [%s]\n", "advertise_str");
1990
0
    return CMD_WARNING;
1991
0
  }
1992
0
  if (!exist) {
1993
0
    vty_out(vty, "Internal CLI error [%s]\n", "exist");
1994
0
    return CMD_WARNING;
1995
0
  }
1996
0
  if (!condition_str) {
1997
0
    vty_out(vty, "Internal CLI error [%s]\n", "condition_str");
1998
0
    return CMD_WARNING;
1999
0
  }
2000
2001
0
  return neighbor_advertise_map_magic(self, vty, argc, argv, no, neighbor, advertise_str, exist, condition_str);
2002
0
}
2003
2004
/* neighbor_accept_own => "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor accept-own" */
2005
DEFUN_CMD_FUNC_DECL(neighbor_accept_own)
2006
#define funcdecl_neighbor_accept_own static int neighbor_accept_own_magic(\
2007
  const struct cmd_element *self __attribute__ ((unused)),\
2008
  struct vty *vty __attribute__ ((unused)),\
2009
  int argc __attribute__ ((unused)),\
2010
  struct cmd_token *argv[] __attribute__ ((unused)),\
2011
  const char * no,\
2012
  const char * neighbor)
2013
funcdecl_neighbor_accept_own;
2014
DEFUN_CMD_FUNC_TEXT(neighbor_accept_own)
2015
0
{
2016
0
#if 2 /* anything to parse? */
2017
0
  int _i;
2018
#if 0 /* anything that can fail? */
2019
  unsigned _fail = 0, _failcnt = 0;
2020
#endif
2021
0
  const char *no = NULL;
2022
0
  const char *neighbor = NULL;
2023
2024
0
  for (_i = 0; _i < argc; _i++) {
2025
0
    if (!argv[_i]->varname)
2026
0
      continue;
2027
#if 0 /* anything that can fail? */
2028
    _fail = 0;
2029
#endif
2030
2031
0
    if (!strcmp(argv[_i]->varname, "no")) {
2032
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2033
0
    }
2034
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2035
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2036
0
    }
2037
#if 0 /* anything that can fail? */
2038
    if (_fail)
2039
      vty_out (vty, "%% invalid input for %s: %s\n",
2040
           argv[_i]->varname, argv[_i]->arg);
2041
    _failcnt += _fail;
2042
#endif
2043
0
  }
2044
#if 0 /* anything that can fail? */
2045
  if (_failcnt)
2046
    return CMD_WARNING;
2047
#endif
2048
0
#endif
2049
0
  if (!neighbor) {
2050
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2051
0
    return CMD_WARNING;
2052
0
  }
2053
2054
0
  return neighbor_accept_own_magic(self, vty, argc, argv, no, neighbor);
2055
0
}
2056
2057
/* neighbor_soo => "neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor soo ASN:NN_OR_IP-ADDRESS:NN$soo" */
2058
DEFUN_CMD_FUNC_DECL(neighbor_soo)
2059
#define funcdecl_neighbor_soo static int neighbor_soo_magic(\
2060
  const struct cmd_element *self __attribute__ ((unused)),\
2061
  struct vty *vty __attribute__ ((unused)),\
2062
  int argc __attribute__ ((unused)),\
2063
  struct cmd_token *argv[] __attribute__ ((unused)),\
2064
  const char * neighbor,\
2065
  const char * soo)
2066
funcdecl_neighbor_soo;
2067
DEFUN_CMD_FUNC_TEXT(neighbor_soo)
2068
0
{
2069
0
#if 2 /* anything to parse? */
2070
0
  int _i;
2071
#if 0 /* anything that can fail? */
2072
  unsigned _fail = 0, _failcnt = 0;
2073
#endif
2074
0
  const char *neighbor = NULL;
2075
0
  const char *soo = NULL;
2076
2077
0
  for (_i = 0; _i < argc; _i++) {
2078
0
    if (!argv[_i]->varname)
2079
0
      continue;
2080
#if 0 /* anything that can fail? */
2081
    _fail = 0;
2082
#endif
2083
2084
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2085
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2086
0
    }
2087
0
    if (!strcmp(argv[_i]->varname, "soo")) {
2088
0
      soo = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2089
0
    }
2090
#if 0 /* anything that can fail? */
2091
    if (_fail)
2092
      vty_out (vty, "%% invalid input for %s: %s\n",
2093
           argv[_i]->varname, argv[_i]->arg);
2094
    _failcnt += _fail;
2095
#endif
2096
0
  }
2097
#if 0 /* anything that can fail? */
2098
  if (_failcnt)
2099
    return CMD_WARNING;
2100
#endif
2101
0
#endif
2102
0
  if (!neighbor) {
2103
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2104
0
    return CMD_WARNING;
2105
0
  }
2106
0
  if (!soo) {
2107
0
    vty_out(vty, "Internal CLI error [%s]\n", "soo");
2108
0
    return CMD_WARNING;
2109
0
  }
2110
2111
0
  return neighbor_soo_magic(self, vty, argc, argv, neighbor, soo);
2112
0
}
2113
2114
/* no_neighbor_soo => "no neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor soo [ASN:NN_OR_IP-ADDRESS:NN$soo]" */
2115
DEFUN_CMD_FUNC_DECL(no_neighbor_soo)
2116
#define funcdecl_no_neighbor_soo static int no_neighbor_soo_magic(\
2117
  const struct cmd_element *self __attribute__ ((unused)),\
2118
  struct vty *vty __attribute__ ((unused)),\
2119
  int argc __attribute__ ((unused)),\
2120
  struct cmd_token *argv[] __attribute__ ((unused)),\
2121
  const char * neighbor,\
2122
  const char * soo)
2123
funcdecl_no_neighbor_soo;
2124
DEFUN_CMD_FUNC_TEXT(no_neighbor_soo)
2125
0
{
2126
0
#if 2 /* anything to parse? */
2127
0
  int _i;
2128
#if 0 /* anything that can fail? */
2129
  unsigned _fail = 0, _failcnt = 0;
2130
#endif
2131
0
  const char *neighbor = NULL;
2132
0
  const char *soo = NULL;
2133
2134
0
  for (_i = 0; _i < argc; _i++) {
2135
0
    if (!argv[_i]->varname)
2136
0
      continue;
2137
#if 0 /* anything that can fail? */
2138
    _fail = 0;
2139
#endif
2140
2141
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2142
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2143
0
    }
2144
0
    if (!strcmp(argv[_i]->varname, "soo")) {
2145
0
      soo = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2146
0
    }
2147
#if 0 /* anything that can fail? */
2148
    if (_fail)
2149
      vty_out (vty, "%% invalid input for %s: %s\n",
2150
           argv[_i]->varname, argv[_i]->arg);
2151
    _failcnt += _fail;
2152
#endif
2153
0
  }
2154
#if 0 /* anything that can fail? */
2155
  if (_failcnt)
2156
    return CMD_WARNING;
2157
#endif
2158
0
#endif
2159
0
  if (!neighbor) {
2160
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2161
0
    return CMD_WARNING;
2162
0
  }
2163
2164
0
  return no_neighbor_soo_magic(self, vty, argc, argv, neighbor, soo);
2165
0
}
2166
2167
/* neighbor_aspath_loop_detection => "neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor sender-as-path-loop-detection" */
2168
DEFUN_CMD_FUNC_DECL(neighbor_aspath_loop_detection)
2169
#define funcdecl_neighbor_aspath_loop_detection static int neighbor_aspath_loop_detection_magic(\
2170
  const struct cmd_element *self __attribute__ ((unused)),\
2171
  struct vty *vty __attribute__ ((unused)),\
2172
  int argc __attribute__ ((unused)),\
2173
  struct cmd_token *argv[] __attribute__ ((unused)),\
2174
  const char * neighbor)
2175
funcdecl_neighbor_aspath_loop_detection;
2176
DEFUN_CMD_FUNC_TEXT(neighbor_aspath_loop_detection)
2177
0
{
2178
0
#if 1 /* anything to parse? */
2179
0
  int _i;
2180
#if 0 /* anything that can fail? */
2181
  unsigned _fail = 0, _failcnt = 0;
2182
#endif
2183
0
  const char *neighbor = NULL;
2184
2185
0
  for (_i = 0; _i < argc; _i++) {
2186
0
    if (!argv[_i]->varname)
2187
0
      continue;
2188
#if 0 /* anything that can fail? */
2189
    _fail = 0;
2190
#endif
2191
2192
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2193
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2194
0
    }
2195
#if 0 /* anything that can fail? */
2196
    if (_fail)
2197
      vty_out (vty, "%% invalid input for %s: %s\n",
2198
           argv[_i]->varname, argv[_i]->arg);
2199
    _failcnt += _fail;
2200
#endif
2201
0
  }
2202
#if 0 /* anything that can fail? */
2203
  if (_failcnt)
2204
    return CMD_WARNING;
2205
#endif
2206
0
#endif
2207
0
  if (!neighbor) {
2208
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2209
0
    return CMD_WARNING;
2210
0
  }
2211
2212
0
  return neighbor_aspath_loop_detection_magic(self, vty, argc, argv, neighbor);
2213
0
}
2214
2215
/* no_neighbor_aspath_loop_detection => "no neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor sender-as-path-loop-detection" */
2216
DEFUN_CMD_FUNC_DECL(no_neighbor_aspath_loop_detection)
2217
#define funcdecl_no_neighbor_aspath_loop_detection static int no_neighbor_aspath_loop_detection_magic(\
2218
  const struct cmd_element *self __attribute__ ((unused)),\
2219
  struct vty *vty __attribute__ ((unused)),\
2220
  int argc __attribute__ ((unused)),\
2221
  struct cmd_token *argv[] __attribute__ ((unused)),\
2222
  const char * neighbor)
2223
funcdecl_no_neighbor_aspath_loop_detection;
2224
DEFUN_CMD_FUNC_TEXT(no_neighbor_aspath_loop_detection)
2225
0
{
2226
0
#if 1 /* anything to parse? */
2227
0
  int _i;
2228
#if 0 /* anything that can fail? */
2229
  unsigned _fail = 0, _failcnt = 0;
2230
#endif
2231
0
  const char *neighbor = NULL;
2232
2233
0
  for (_i = 0; _i < argc; _i++) {
2234
0
    if (!argv[_i]->varname)
2235
0
      continue;
2236
#if 0 /* anything that can fail? */
2237
    _fail = 0;
2238
#endif
2239
2240
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2241
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2242
0
    }
2243
#if 0 /* anything that can fail? */
2244
    if (_fail)
2245
      vty_out (vty, "%% invalid input for %s: %s\n",
2246
           argv[_i]->varname, argv[_i]->arg);
2247
    _failcnt += _fail;
2248
#endif
2249
0
  }
2250
#if 0 /* anything that can fail? */
2251
  if (_failcnt)
2252
    return CMD_WARNING;
2253
#endif
2254
0
#endif
2255
0
  if (!neighbor) {
2256
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2257
0
    return CMD_WARNING;
2258
0
  }
2259
2260
0
  return no_neighbor_aspath_loop_detection_magic(self, vty, argc, argv, neighbor);
2261
0
}
2262
2263
/* neighbor_path_attribute_discard => "neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor path-attribute discard (1-255)..." */
2264
DEFUN_CMD_FUNC_DECL(neighbor_path_attribute_discard)
2265
#define funcdecl_neighbor_path_attribute_discard static int neighbor_path_attribute_discard_magic(\
2266
  const struct cmd_element *self __attribute__ ((unused)),\
2267
  struct vty *vty __attribute__ ((unused)),\
2268
  int argc __attribute__ ((unused)),\
2269
  struct cmd_token *argv[] __attribute__ ((unused)),\
2270
  const char * neighbor)
2271
funcdecl_neighbor_path_attribute_discard;
2272
DEFUN_CMD_FUNC_TEXT(neighbor_path_attribute_discard)
2273
0
{
2274
0
#if 1 /* anything to parse? */
2275
0
  int _i;
2276
#if 0 /* anything that can fail? */
2277
  unsigned _fail = 0, _failcnt = 0;
2278
#endif
2279
0
  const char *neighbor = NULL;
2280
2281
0
  for (_i = 0; _i < argc; _i++) {
2282
0
    if (!argv[_i]->varname)
2283
0
      continue;
2284
#if 0 /* anything that can fail? */
2285
    _fail = 0;
2286
#endif
2287
2288
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2289
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2290
0
    }
2291
#if 0 /* anything that can fail? */
2292
    if (_fail)
2293
      vty_out (vty, "%% invalid input for %s: %s\n",
2294
           argv[_i]->varname, argv[_i]->arg);
2295
    _failcnt += _fail;
2296
#endif
2297
0
  }
2298
#if 0 /* anything that can fail? */
2299
  if (_failcnt)
2300
    return CMD_WARNING;
2301
#endif
2302
0
#endif
2303
0
  if (!neighbor) {
2304
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2305
0
    return CMD_WARNING;
2306
0
  }
2307
2308
0
  return neighbor_path_attribute_discard_magic(self, vty, argc, argv, neighbor);
2309
0
}
2310
2311
/* no_neighbor_path_attribute_discard => "no neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor path-attribute discard [(1-255)]" */
2312
DEFUN_CMD_FUNC_DECL(no_neighbor_path_attribute_discard)
2313
#define funcdecl_no_neighbor_path_attribute_discard static int no_neighbor_path_attribute_discard_magic(\
2314
  const struct cmd_element *self __attribute__ ((unused)),\
2315
  struct vty *vty __attribute__ ((unused)),\
2316
  int argc __attribute__ ((unused)),\
2317
  struct cmd_token *argv[] __attribute__ ((unused)),\
2318
  const char * neighbor,\
2319
  long discard,\
2320
  const char * discard_str __attribute__ ((unused)))
2321
funcdecl_no_neighbor_path_attribute_discard;
2322
DEFUN_CMD_FUNC_TEXT(no_neighbor_path_attribute_discard)
2323
0
{
2324
0
#if 2 /* anything to parse? */
2325
0
  int _i;
2326
0
#if 1 /* anything that can fail? */
2327
0
  unsigned _fail = 0, _failcnt = 0;
2328
0
#endif
2329
0
  const char *neighbor = NULL;
2330
0
  long discard = 0;
2331
0
  const char *discard_str = NULL;
2332
2333
0
  for (_i = 0; _i < argc; _i++) {
2334
0
    if (!argv[_i]->varname)
2335
0
      continue;
2336
0
#if 1 /* anything that can fail? */
2337
0
    _fail = 0;
2338
0
#endif
2339
2340
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2341
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2342
0
    }
2343
0
    if (!strcmp(argv[_i]->varname, "discard")) {
2344
0
      discard_str = argv[_i]->arg;
2345
0
      char *_end;
2346
0
      discard = strtol(argv[_i]->arg, &_end, 10);
2347
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
2348
0
    }
2349
0
#if 1 /* anything that can fail? */
2350
0
    if (_fail)
2351
0
      vty_out (vty, "%% invalid input for %s: %s\n",
2352
0
           argv[_i]->varname, argv[_i]->arg);
2353
0
    _failcnt += _fail;
2354
0
#endif
2355
0
  }
2356
0
#if 1 /* anything that can fail? */
2357
0
  if (_failcnt)
2358
0
    return CMD_WARNING;
2359
0
#endif
2360
0
#endif
2361
0
  if (!neighbor) {
2362
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2363
0
    return CMD_WARNING;
2364
0
  }
2365
2366
0
  return no_neighbor_path_attribute_discard_magic(self, vty, argc, argv, neighbor, discard, discard_str);
2367
0
}
2368
2369
/* neighbor_path_attribute_treat_as_withdraw => "neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor path-attribute treat-as-withdraw (1-255)..." */
2370
DEFUN_CMD_FUNC_DECL(neighbor_path_attribute_treat_as_withdraw)
2371
#define funcdecl_neighbor_path_attribute_treat_as_withdraw static int neighbor_path_attribute_treat_as_withdraw_magic(\
2372
  const struct cmd_element *self __attribute__ ((unused)),\
2373
  struct vty *vty __attribute__ ((unused)),\
2374
  int argc __attribute__ ((unused)),\
2375
  struct cmd_token *argv[] __attribute__ ((unused)),\
2376
  const char * neighbor)
2377
funcdecl_neighbor_path_attribute_treat_as_withdraw;
2378
DEFUN_CMD_FUNC_TEXT(neighbor_path_attribute_treat_as_withdraw)
2379
0
{
2380
0
#if 1 /* anything to parse? */
2381
0
  int _i;
2382
#if 0 /* anything that can fail? */
2383
  unsigned _fail = 0, _failcnt = 0;
2384
#endif
2385
0
  const char *neighbor = NULL;
2386
2387
0
  for (_i = 0; _i < argc; _i++) {
2388
0
    if (!argv[_i]->varname)
2389
0
      continue;
2390
#if 0 /* anything that can fail? */
2391
    _fail = 0;
2392
#endif
2393
2394
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2395
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2396
0
    }
2397
#if 0 /* anything that can fail? */
2398
    if (_fail)
2399
      vty_out (vty, "%% invalid input for %s: %s\n",
2400
           argv[_i]->varname, argv[_i]->arg);
2401
    _failcnt += _fail;
2402
#endif
2403
0
  }
2404
#if 0 /* anything that can fail? */
2405
  if (_failcnt)
2406
    return CMD_WARNING;
2407
#endif
2408
0
#endif
2409
0
  if (!neighbor) {
2410
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2411
0
    return CMD_WARNING;
2412
0
  }
2413
2414
0
  return neighbor_path_attribute_treat_as_withdraw_magic(self, vty, argc, argv, neighbor);
2415
0
}
2416
2417
/* no_neighbor_path_attribute_treat_as_withdraw => "no neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor path-attribute treat-as-withdraw (1-255)..." */
2418
DEFUN_CMD_FUNC_DECL(no_neighbor_path_attribute_treat_as_withdraw)
2419
#define funcdecl_no_neighbor_path_attribute_treat_as_withdraw static int no_neighbor_path_attribute_treat_as_withdraw_magic(\
2420
  const struct cmd_element *self __attribute__ ((unused)),\
2421
  struct vty *vty __attribute__ ((unused)),\
2422
  int argc __attribute__ ((unused)),\
2423
  struct cmd_token *argv[] __attribute__ ((unused)),\
2424
  const char * neighbor)
2425
funcdecl_no_neighbor_path_attribute_treat_as_withdraw;
2426
DEFUN_CMD_FUNC_TEXT(no_neighbor_path_attribute_treat_as_withdraw)
2427
0
{
2428
0
#if 1 /* anything to parse? */
2429
0
  int _i;
2430
#if 0 /* anything that can fail? */
2431
  unsigned _fail = 0, _failcnt = 0;
2432
#endif
2433
0
  const char *neighbor = NULL;
2434
2435
0
  for (_i = 0; _i < argc; _i++) {
2436
0
    if (!argv[_i]->varname)
2437
0
      continue;
2438
#if 0 /* anything that can fail? */
2439
    _fail = 0;
2440
#endif
2441
2442
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
2443
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2444
0
    }
2445
#if 0 /* anything that can fail? */
2446
    if (_fail)
2447
      vty_out (vty, "%% invalid input for %s: %s\n",
2448
           argv[_i]->varname, argv[_i]->arg);
2449
    _failcnt += _fail;
2450
#endif
2451
0
  }
2452
#if 0 /* anything that can fail? */
2453
  if (_failcnt)
2454
    return CMD_WARNING;
2455
#endif
2456
0
#endif
2457
0
  if (!neighbor) {
2458
0
    vty_out(vty, "Internal CLI error [%s]\n", "neighbor");
2459
0
    return CMD_WARNING;
2460
0
  }
2461
2462
0
  return no_neighbor_path_attribute_treat_as_withdraw_magic(self, vty, argc, argv, neighbor);
2463
0
}
2464
2465
/* af_rd_vpn_export => "[no] rd vpn export ASN:NN_OR_IP-ADDRESS:NN$rd_str" */
2466
DEFUN_CMD_FUNC_DECL(af_rd_vpn_export)
2467
#define funcdecl_af_rd_vpn_export static int af_rd_vpn_export_magic(\
2468
  const struct cmd_element *self __attribute__ ((unused)),\
2469
  struct vty *vty __attribute__ ((unused)),\
2470
  int argc __attribute__ ((unused)),\
2471
  struct cmd_token *argv[] __attribute__ ((unused)),\
2472
  const char * no,\
2473
  const char * rd_str)
2474
funcdecl_af_rd_vpn_export;
2475
DEFUN_CMD_FUNC_TEXT(af_rd_vpn_export)
2476
0
{
2477
0
#if 2 /* anything to parse? */
2478
0
  int _i;
2479
#if 0 /* anything that can fail? */
2480
  unsigned _fail = 0, _failcnt = 0;
2481
#endif
2482
0
  const char *no = NULL;
2483
0
  const char *rd_str = NULL;
2484
2485
0
  for (_i = 0; _i < argc; _i++) {
2486
0
    if (!argv[_i]->varname)
2487
0
      continue;
2488
#if 0 /* anything that can fail? */
2489
    _fail = 0;
2490
#endif
2491
2492
0
    if (!strcmp(argv[_i]->varname, "no")) {
2493
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2494
0
    }
2495
0
    if (!strcmp(argv[_i]->varname, "rd_str")) {
2496
0
      rd_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2497
0
    }
2498
#if 0 /* anything that can fail? */
2499
    if (_fail)
2500
      vty_out (vty, "%% invalid input for %s: %s\n",
2501
           argv[_i]->varname, argv[_i]->arg);
2502
    _failcnt += _fail;
2503
#endif
2504
0
  }
2505
#if 0 /* anything that can fail? */
2506
  if (_failcnt)
2507
    return CMD_WARNING;
2508
#endif
2509
0
#endif
2510
0
  if (!rd_str) {
2511
0
    vty_out(vty, "Internal CLI error [%s]\n", "rd_str");
2512
0
    return CMD_WARNING;
2513
0
  }
2514
2515
0
  return af_rd_vpn_export_magic(self, vty, argc, argv, no, rd_str);
2516
0
}
2517
2518
/* af_label_vpn_export_allocation_mode => "[no$no] label vpn export allocation-mode <per-vrf$label_per_vrf|per-nexthop$label_per_nh>" */
2519
DEFUN_CMD_FUNC_DECL(af_label_vpn_export_allocation_mode)
2520
#define funcdecl_af_label_vpn_export_allocation_mode static int af_label_vpn_export_allocation_mode_magic(\
2521
  const struct cmd_element *self __attribute__ ((unused)),\
2522
  struct vty *vty __attribute__ ((unused)),\
2523
  int argc __attribute__ ((unused)),\
2524
  struct cmd_token *argv[] __attribute__ ((unused)),\
2525
  const char * no,\
2526
  const char * label_per_vrf,\
2527
  const char * label_per_nh)
2528
funcdecl_af_label_vpn_export_allocation_mode;
2529
DEFUN_CMD_FUNC_TEXT(af_label_vpn_export_allocation_mode)
2530
0
{
2531
0
#if 3 /* anything to parse? */
2532
0
  int _i;
2533
#if 0 /* anything that can fail? */
2534
  unsigned _fail = 0, _failcnt = 0;
2535
#endif
2536
0
  const char *no = NULL;
2537
0
  const char *label_per_vrf = NULL;
2538
0
  const char *label_per_nh = NULL;
2539
2540
0
  for (_i = 0; _i < argc; _i++) {
2541
0
    if (!argv[_i]->varname)
2542
0
      continue;
2543
#if 0 /* anything that can fail? */
2544
    _fail = 0;
2545
#endif
2546
2547
0
    if (!strcmp(argv[_i]->varname, "no")) {
2548
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2549
0
    }
2550
0
    if (!strcmp(argv[_i]->varname, "label_per_vrf")) {
2551
0
      label_per_vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2552
0
    }
2553
0
    if (!strcmp(argv[_i]->varname, "label_per_nh")) {
2554
0
      label_per_nh = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2555
0
    }
2556
#if 0 /* anything that can fail? */
2557
    if (_fail)
2558
      vty_out (vty, "%% invalid input for %s: %s\n",
2559
           argv[_i]->varname, argv[_i]->arg);
2560
    _failcnt += _fail;
2561
#endif
2562
0
  }
2563
#if 0 /* anything that can fail? */
2564
  if (_failcnt)
2565
    return CMD_WARNING;
2566
#endif
2567
0
#endif
2568
2569
0
  return af_label_vpn_export_allocation_mode_magic(self, vty, argc, argv, no, label_per_vrf, label_per_nh);
2570
0
}
2571
2572
/* af_label_vpn_export => "[no] label vpn export <(0-1048575)$label_val|auto$label_auto>" */
2573
DEFUN_CMD_FUNC_DECL(af_label_vpn_export)
2574
#define funcdecl_af_label_vpn_export static int af_label_vpn_export_magic(\
2575
  const struct cmd_element *self __attribute__ ((unused)),\
2576
  struct vty *vty __attribute__ ((unused)),\
2577
  int argc __attribute__ ((unused)),\
2578
  struct cmd_token *argv[] __attribute__ ((unused)),\
2579
  const char * no,\
2580
  long label_val,\
2581
  const char * label_val_str __attribute__ ((unused)),\
2582
  const char * label_auto)
2583
funcdecl_af_label_vpn_export;
2584
DEFUN_CMD_FUNC_TEXT(af_label_vpn_export)
2585
0
{
2586
0
#if 3 /* anything to parse? */
2587
0
  int _i;
2588
0
#if 1 /* anything that can fail? */
2589
0
  unsigned _fail = 0, _failcnt = 0;
2590
0
#endif
2591
0
  const char *no = NULL;
2592
0
  long label_val = 0;
2593
0
  const char *label_val_str = NULL;
2594
0
  const char *label_auto = NULL;
2595
2596
0
  for (_i = 0; _i < argc; _i++) {
2597
0
    if (!argv[_i]->varname)
2598
0
      continue;
2599
0
#if 1 /* anything that can fail? */
2600
0
    _fail = 0;
2601
0
#endif
2602
2603
0
    if (!strcmp(argv[_i]->varname, "no")) {
2604
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2605
0
    }
2606
0
    if (!strcmp(argv[_i]->varname, "label_val")) {
2607
0
      label_val_str = argv[_i]->arg;
2608
0
      char *_end;
2609
0
      label_val = strtol(argv[_i]->arg, &_end, 10);
2610
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
2611
0
    }
2612
0
    if (!strcmp(argv[_i]->varname, "label_auto")) {
2613
0
      label_auto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2614
0
    }
2615
0
#if 1 /* anything that can fail? */
2616
0
    if (_fail)
2617
0
      vty_out (vty, "%% invalid input for %s: %s\n",
2618
0
           argv[_i]->varname, argv[_i]->arg);
2619
0
    _failcnt += _fail;
2620
0
#endif
2621
0
  }
2622
0
#if 1 /* anything that can fail? */
2623
0
  if (_failcnt)
2624
0
    return CMD_WARNING;
2625
0
#endif
2626
0
#endif
2627
2628
0
  return af_label_vpn_export_magic(self, vty, argc, argv, no, label_val, label_val_str, label_auto);
2629
0
}
2630
2631
/* af_sid_vpn_export => "[no] sid vpn export <(1-1048575)$sid_idx|auto$sid_auto>" */
2632
DEFUN_CMD_FUNC_DECL(af_sid_vpn_export)
2633
#define funcdecl_af_sid_vpn_export static int af_sid_vpn_export_magic(\
2634
  const struct cmd_element *self __attribute__ ((unused)),\
2635
  struct vty *vty __attribute__ ((unused)),\
2636
  int argc __attribute__ ((unused)),\
2637
  struct cmd_token *argv[] __attribute__ ((unused)),\
2638
  const char * no,\
2639
  long sid_idx,\
2640
  const char * sid_idx_str __attribute__ ((unused)),\
2641
  const char * sid_auto)
2642
funcdecl_af_sid_vpn_export;
2643
DEFUN_CMD_FUNC_TEXT(af_sid_vpn_export)
2644
0
{
2645
0
#if 3 /* anything to parse? */
2646
0
  int _i;
2647
0
#if 1 /* anything that can fail? */
2648
0
  unsigned _fail = 0, _failcnt = 0;
2649
0
#endif
2650
0
  const char *no = NULL;
2651
0
  long sid_idx = 0;
2652
0
  const char *sid_idx_str = NULL;
2653
0
  const char *sid_auto = NULL;
2654
2655
0
  for (_i = 0; _i < argc; _i++) {
2656
0
    if (!argv[_i]->varname)
2657
0
      continue;
2658
0
#if 1 /* anything that can fail? */
2659
0
    _fail = 0;
2660
0
#endif
2661
2662
0
    if (!strcmp(argv[_i]->varname, "no")) {
2663
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2664
0
    }
2665
0
    if (!strcmp(argv[_i]->varname, "sid_idx")) {
2666
0
      sid_idx_str = argv[_i]->arg;
2667
0
      char *_end;
2668
0
      sid_idx = strtol(argv[_i]->arg, &_end, 10);
2669
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
2670
0
    }
2671
0
    if (!strcmp(argv[_i]->varname, "sid_auto")) {
2672
0
      sid_auto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2673
0
    }
2674
0
#if 1 /* anything that can fail? */
2675
0
    if (_fail)
2676
0
      vty_out (vty, "%% invalid input for %s: %s\n",
2677
0
           argv[_i]->varname, argv[_i]->arg);
2678
0
    _failcnt += _fail;
2679
0
#endif
2680
0
  }
2681
0
#if 1 /* anything that can fail? */
2682
0
  if (_failcnt)
2683
0
    return CMD_WARNING;
2684
0
#endif
2685
0
#endif
2686
2687
0
  return af_sid_vpn_export_magic(self, vty, argc, argv, no, sid_idx, sid_idx_str, sid_auto);
2688
0
}
2689
2690
/* bgp_sid_vpn_export => "[no] sid vpn per-vrf export <(1-1048575)$sid_idx|auto$sid_auto>" */
2691
DEFUN_CMD_FUNC_DECL(bgp_sid_vpn_export)
2692
#define funcdecl_bgp_sid_vpn_export static int bgp_sid_vpn_export_magic(\
2693
  const struct cmd_element *self __attribute__ ((unused)),\
2694
  struct vty *vty __attribute__ ((unused)),\
2695
  int argc __attribute__ ((unused)),\
2696
  struct cmd_token *argv[] __attribute__ ((unused)),\
2697
  const char * no,\
2698
  long sid_idx,\
2699
  const char * sid_idx_str __attribute__ ((unused)),\
2700
  const char * sid_auto)
2701
funcdecl_bgp_sid_vpn_export;
2702
DEFUN_CMD_FUNC_TEXT(bgp_sid_vpn_export)
2703
0
{
2704
0
#if 3 /* anything to parse? */
2705
0
  int _i;
2706
0
#if 1 /* anything that can fail? */
2707
0
  unsigned _fail = 0, _failcnt = 0;
2708
0
#endif
2709
0
  const char *no = NULL;
2710
0
  long sid_idx = 0;
2711
0
  const char *sid_idx_str = NULL;
2712
0
  const char *sid_auto = NULL;
2713
2714
0
  for (_i = 0; _i < argc; _i++) {
2715
0
    if (!argv[_i]->varname)
2716
0
      continue;
2717
0
#if 1 /* anything that can fail? */
2718
0
    _fail = 0;
2719
0
#endif
2720
2721
0
    if (!strcmp(argv[_i]->varname, "no")) {
2722
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2723
0
    }
2724
0
    if (!strcmp(argv[_i]->varname, "sid_idx")) {
2725
0
      sid_idx_str = argv[_i]->arg;
2726
0
      char *_end;
2727
0
      sid_idx = strtol(argv[_i]->arg, &_end, 10);
2728
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
2729
0
    }
2730
0
    if (!strcmp(argv[_i]->varname, "sid_auto")) {
2731
0
      sid_auto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2732
0
    }
2733
0
#if 1 /* anything that can fail? */
2734
0
    if (_fail)
2735
0
      vty_out (vty, "%% invalid input for %s: %s\n",
2736
0
           argv[_i]->varname, argv[_i]->arg);
2737
0
    _failcnt += _fail;
2738
0
#endif
2739
0
  }
2740
0
#if 1 /* anything that can fail? */
2741
0
  if (_failcnt)
2742
0
    return CMD_WARNING;
2743
0
#endif
2744
0
#endif
2745
2746
0
  return bgp_sid_vpn_export_magic(self, vty, argc, argv, no, sid_idx, sid_idx_str, sid_auto);
2747
0
}
2748
2749
/* af_nexthop_vpn_export => "[no] nexthop vpn export [<A.B.C.D|X:X::X:X>$nexthop_su]" */
2750
DEFUN_CMD_FUNC_DECL(af_nexthop_vpn_export)
2751
#define funcdecl_af_nexthop_vpn_export static int af_nexthop_vpn_export_magic(\
2752
  const struct cmd_element *self __attribute__ ((unused)),\
2753
  struct vty *vty __attribute__ ((unused)),\
2754
  int argc __attribute__ ((unused)),\
2755
  struct cmd_token *argv[] __attribute__ ((unused)),\
2756
  const char * no,\
2757
  const union sockunion * nexthop_su,\
2758
  const char * nexthop_su_str __attribute__ ((unused)))
2759
funcdecl_af_nexthop_vpn_export;
2760
DEFUN_CMD_FUNC_TEXT(af_nexthop_vpn_export)
2761
0
{
2762
0
#if 2 /* anything to parse? */
2763
0
  int _i;
2764
0
#if 1 /* anything that can fail? */
2765
0
  unsigned _fail = 0, _failcnt = 0;
2766
0
#endif
2767
0
  const char *no = NULL;
2768
0
  union sockunion s__nexthop_su = { .sa.sa_family = AF_UNSPEC }, *nexthop_su = NULL;
2769
0
  const char *nexthop_su_str = NULL;
2770
2771
0
  for (_i = 0; _i < argc; _i++) {
2772
0
    if (!argv[_i]->varname)
2773
0
      continue;
2774
0
#if 1 /* anything that can fail? */
2775
0
    _fail = 0;
2776
0
#endif
2777
2778
0
    if (!strcmp(argv[_i]->varname, "no")) {
2779
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2780
0
    }
2781
0
    if (!strcmp(argv[_i]->varname, "nexthop_su")) {
2782
0
      nexthop_su_str = argv[_i]->arg;
2783
0
      if (argv[_i]->text[0] == 'X') {
2784
0
        s__nexthop_su.sa.sa_family = AF_INET6;
2785
0
        _fail = !inet_pton(AF_INET6, argv[_i]->arg, &s__nexthop_su.sin6.sin6_addr);
2786
0
        nexthop_su = &s__nexthop_su;
2787
0
      } else {
2788
0
        s__nexthop_su.sa.sa_family = AF_INET;
2789
0
        _fail = !inet_aton(argv[_i]->arg, &s__nexthop_su.sin.sin_addr);
2790
0
        nexthop_su = &s__nexthop_su;
2791
0
      }
2792
0
    }
2793
0
#if 1 /* anything that can fail? */
2794
0
    if (_fail)
2795
0
      vty_out (vty, "%% invalid input for %s: %s\n",
2796
0
           argv[_i]->varname, argv[_i]->arg);
2797
0
    _failcnt += _fail;
2798
0
#endif
2799
0
  }
2800
0
#if 1 /* anything that can fail? */
2801
0
  if (_failcnt)
2802
0
    return CMD_WARNING;
2803
0
#endif
2804
0
#endif
2805
2806
0
  return af_nexthop_vpn_export_magic(self, vty, argc, argv, no, nexthop_su, nexthop_su_str);
2807
0
}
2808
2809
/* af_rt_vpn_imexport => "[no] <rt|route-target> vpn <import|export|both>$direction_str RTLIST..." */
2810
DEFUN_CMD_FUNC_DECL(af_rt_vpn_imexport)
2811
#define funcdecl_af_rt_vpn_imexport static int af_rt_vpn_imexport_magic(\
2812
  const struct cmd_element *self __attribute__ ((unused)),\
2813
  struct vty *vty __attribute__ ((unused)),\
2814
  int argc __attribute__ ((unused)),\
2815
  struct cmd_token *argv[] __attribute__ ((unused)),\
2816
  const char * no,\
2817
  const char * direction_str,\
2818
  const char * rtlist)
2819
funcdecl_af_rt_vpn_imexport;
2820
DEFUN_CMD_FUNC_TEXT(af_rt_vpn_imexport)
2821
0
{
2822
0
#if 3 /* anything to parse? */
2823
0
  int _i;
2824
#if 0 /* anything that can fail? */
2825
  unsigned _fail = 0, _failcnt = 0;
2826
#endif
2827
0
  const char *no = NULL;
2828
0
  const char *direction_str = NULL;
2829
0
  const char *rtlist = NULL;
2830
2831
0
  for (_i = 0; _i < argc; _i++) {
2832
0
    if (!argv[_i]->varname)
2833
0
      continue;
2834
#if 0 /* anything that can fail? */
2835
    _fail = 0;
2836
#endif
2837
2838
0
    if (!strcmp(argv[_i]->varname, "no")) {
2839
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2840
0
    }
2841
0
    if (!strcmp(argv[_i]->varname, "direction_str")) {
2842
0
      direction_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2843
0
    }
2844
0
    if (!strcmp(argv[_i]->varname, "rtlist")) {
2845
0
      rtlist = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2846
0
    }
2847
#if 0 /* anything that can fail? */
2848
    if (_fail)
2849
      vty_out (vty, "%% invalid input for %s: %s\n",
2850
           argv[_i]->varname, argv[_i]->arg);
2851
    _failcnt += _fail;
2852
#endif
2853
0
  }
2854
#if 0 /* anything that can fail? */
2855
  if (_failcnt)
2856
    return CMD_WARNING;
2857
#endif
2858
0
#endif
2859
0
  if (!direction_str) {
2860
0
    vty_out(vty, "Internal CLI error [%s]\n", "direction_str");
2861
0
    return CMD_WARNING;
2862
0
  }
2863
0
  if (!rtlist) {
2864
0
    vty_out(vty, "Internal CLI error [%s]\n", "rtlist");
2865
0
    return CMD_WARNING;
2866
0
  }
2867
2868
0
  return af_rt_vpn_imexport_magic(self, vty, argc, argv, no, direction_str, rtlist);
2869
0
}
2870
2871
/* af_route_map_vpn_imexport => "[no] route-map vpn <import|export>$direction_str RMAP$rmap_str" */
2872
DEFUN_CMD_FUNC_DECL(af_route_map_vpn_imexport)
2873
#define funcdecl_af_route_map_vpn_imexport static int af_route_map_vpn_imexport_magic(\
2874
  const struct cmd_element *self __attribute__ ((unused)),\
2875
  struct vty *vty __attribute__ ((unused)),\
2876
  int argc __attribute__ ((unused)),\
2877
  struct cmd_token *argv[] __attribute__ ((unused)),\
2878
  const char * no,\
2879
  const char * direction_str,\
2880
  const char * rmap_str)
2881
funcdecl_af_route_map_vpn_imexport;
2882
DEFUN_CMD_FUNC_TEXT(af_route_map_vpn_imexport)
2883
0
{
2884
0
#if 3 /* anything to parse? */
2885
0
  int _i;
2886
#if 0 /* anything that can fail? */
2887
  unsigned _fail = 0, _failcnt = 0;
2888
#endif
2889
0
  const char *no = NULL;
2890
0
  const char *direction_str = NULL;
2891
0
  const char *rmap_str = NULL;
2892
2893
0
  for (_i = 0; _i < argc; _i++) {
2894
0
    if (!argv[_i]->varname)
2895
0
      continue;
2896
#if 0 /* anything that can fail? */
2897
    _fail = 0;
2898
#endif
2899
2900
0
    if (!strcmp(argv[_i]->varname, "no")) {
2901
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2902
0
    }
2903
0
    if (!strcmp(argv[_i]->varname, "direction_str")) {
2904
0
      direction_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2905
0
    }
2906
0
    if (!strcmp(argv[_i]->varname, "rmap_str")) {
2907
0
      rmap_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2908
0
    }
2909
#if 0 /* anything that can fail? */
2910
    if (_fail)
2911
      vty_out (vty, "%% invalid input for %s: %s\n",
2912
           argv[_i]->varname, argv[_i]->arg);
2913
    _failcnt += _fail;
2914
#endif
2915
0
  }
2916
#if 0 /* anything that can fail? */
2917
  if (_failcnt)
2918
    return CMD_WARNING;
2919
#endif
2920
0
#endif
2921
0
  if (!direction_str) {
2922
0
    vty_out(vty, "Internal CLI error [%s]\n", "direction_str");
2923
0
    return CMD_WARNING;
2924
0
  }
2925
0
  if (!rmap_str) {
2926
0
    vty_out(vty, "Internal CLI error [%s]\n", "rmap_str");
2927
0
    return CMD_WARNING;
2928
0
  }
2929
2930
0
  return af_route_map_vpn_imexport_magic(self, vty, argc, argv, no, direction_str, rmap_str);
2931
0
}
2932
2933
/* af_import_vrf_route_map => "import vrf route-map RMAP$rmap_str" */
2934
DEFUN_CMD_FUNC_DECL(af_import_vrf_route_map)
2935
#define funcdecl_af_import_vrf_route_map static int af_import_vrf_route_map_magic(\
2936
  const struct cmd_element *self __attribute__ ((unused)),\
2937
  struct vty *vty __attribute__ ((unused)),\
2938
  int argc __attribute__ ((unused)),\
2939
  struct cmd_token *argv[] __attribute__ ((unused)),\
2940
  const char * rmap_str)
2941
funcdecl_af_import_vrf_route_map;
2942
DEFUN_CMD_FUNC_TEXT(af_import_vrf_route_map)
2943
0
{
2944
0
#if 1 /* anything to parse? */
2945
0
  int _i;
2946
#if 0 /* anything that can fail? */
2947
  unsigned _fail = 0, _failcnt = 0;
2948
#endif
2949
0
  const char *rmap_str = NULL;
2950
2951
0
  for (_i = 0; _i < argc; _i++) {
2952
0
    if (!argv[_i]->varname)
2953
0
      continue;
2954
#if 0 /* anything that can fail? */
2955
    _fail = 0;
2956
#endif
2957
2958
0
    if (!strcmp(argv[_i]->varname, "rmap_str")) {
2959
0
      rmap_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
2960
0
    }
2961
#if 0 /* anything that can fail? */
2962
    if (_fail)
2963
      vty_out (vty, "%% invalid input for %s: %s\n",
2964
           argv[_i]->varname, argv[_i]->arg);
2965
    _failcnt += _fail;
2966
#endif
2967
0
  }
2968
#if 0 /* anything that can fail? */
2969
  if (_failcnt)
2970
    return CMD_WARNING;
2971
#endif
2972
0
#endif
2973
0
  if (!rmap_str) {
2974
0
    vty_out(vty, "Internal CLI error [%s]\n", "rmap_str");
2975
0
    return CMD_WARNING;
2976
0
  }
2977
2978
0
  return af_import_vrf_route_map_magic(self, vty, argc, argv, rmap_str);
2979
0
}
2980
2981
/* af_no_import_vrf_route_map => "no import vrf route-map [RMAP$rmap_str]" */
2982
DEFUN_CMD_FUNC_DECL(af_no_import_vrf_route_map)
2983
#define funcdecl_af_no_import_vrf_route_map static int af_no_import_vrf_route_map_magic(\
2984
  const struct cmd_element *self __attribute__ ((unused)),\
2985
  struct vty *vty __attribute__ ((unused)),\
2986
  int argc __attribute__ ((unused)),\
2987
  struct cmd_token *argv[] __attribute__ ((unused)),\
2988
  const char * rmap_str)
2989
funcdecl_af_no_import_vrf_route_map;
2990
DEFUN_CMD_FUNC_TEXT(af_no_import_vrf_route_map)
2991
0
{
2992
0
#if 1 /* anything to parse? */
2993
0
  int _i;
2994
#if 0 /* anything that can fail? */
2995
  unsigned _fail = 0, _failcnt = 0;
2996
#endif
2997
0
  const char *rmap_str = NULL;
2998
2999
0
  for (_i = 0; _i < argc; _i++) {
3000
0
    if (!argv[_i]->varname)
3001
0
      continue;
3002
#if 0 /* anything that can fail? */
3003
    _fail = 0;
3004
#endif
3005
3006
0
    if (!strcmp(argv[_i]->varname, "rmap_str")) {
3007
0
      rmap_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3008
0
    }
3009
#if 0 /* anything that can fail? */
3010
    if (_fail)
3011
      vty_out (vty, "%% invalid input for %s: %s\n",
3012
           argv[_i]->varname, argv[_i]->arg);
3013
    _failcnt += _fail;
3014
#endif
3015
0
  }
3016
#if 0 /* anything that can fail? */
3017
  if (_failcnt)
3018
    return CMD_WARNING;
3019
#endif
3020
0
#endif
3021
3022
0
  return af_no_import_vrf_route_map_magic(self, vty, argc, argv, rmap_str);
3023
0
}
3024
3025
/* bgp_imexport_vrf => "[no] import vrf VIEWVRFNAME$import_name" */
3026
DEFUN_CMD_FUNC_DECL(bgp_imexport_vrf)
3027
#define funcdecl_bgp_imexport_vrf static int bgp_imexport_vrf_magic(\
3028
  const struct cmd_element *self __attribute__ ((unused)),\
3029
  struct vty *vty __attribute__ ((unused)),\
3030
  int argc __attribute__ ((unused)),\
3031
  struct cmd_token *argv[] __attribute__ ((unused)),\
3032
  const char * no,\
3033
  const char * import_name)
3034
funcdecl_bgp_imexport_vrf;
3035
DEFUN_CMD_FUNC_TEXT(bgp_imexport_vrf)
3036
0
{
3037
0
#if 2 /* anything to parse? */
3038
0
  int _i;
3039
#if 0 /* anything that can fail? */
3040
  unsigned _fail = 0, _failcnt = 0;
3041
#endif
3042
0
  const char *no = NULL;
3043
0
  const char *import_name = NULL;
3044
3045
0
  for (_i = 0; _i < argc; _i++) {
3046
0
    if (!argv[_i]->varname)
3047
0
      continue;
3048
#if 0 /* anything that can fail? */
3049
    _fail = 0;
3050
#endif
3051
3052
0
    if (!strcmp(argv[_i]->varname, "no")) {
3053
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3054
0
    }
3055
0
    if (!strcmp(argv[_i]->varname, "import_name")) {
3056
0
      import_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3057
0
    }
3058
#if 0 /* anything that can fail? */
3059
    if (_fail)
3060
      vty_out (vty, "%% invalid input for %s: %s\n",
3061
           argv[_i]->varname, argv[_i]->arg);
3062
    _failcnt += _fail;
3063
#endif
3064
0
  }
3065
#if 0 /* anything that can fail? */
3066
  if (_failcnt)
3067
    return CMD_WARNING;
3068
#endif
3069
0
#endif
3070
0
  if (!import_name) {
3071
0
    vty_out(vty, "Internal CLI error [%s]\n", "import_name");
3072
0
    return CMD_WARNING;
3073
0
  }
3074
3075
0
  return bgp_imexport_vrf_magic(self, vty, argc, argv, no, import_name);
3076
0
}
3077
3078
/* bgp_imexport_vpn => "[no] <import|export>$direction_str vpn" */
3079
DEFUN_CMD_FUNC_DECL(bgp_imexport_vpn)
3080
#define funcdecl_bgp_imexport_vpn static int bgp_imexport_vpn_magic(\
3081
  const struct cmd_element *self __attribute__ ((unused)),\
3082
  struct vty *vty __attribute__ ((unused)),\
3083
  int argc __attribute__ ((unused)),\
3084
  struct cmd_token *argv[] __attribute__ ((unused)),\
3085
  const char * no,\
3086
  const char * direction_str)
3087
funcdecl_bgp_imexport_vpn;
3088
DEFUN_CMD_FUNC_TEXT(bgp_imexport_vpn)
3089
0
{
3090
0
#if 2 /* anything to parse? */
3091
0
  int _i;
3092
#if 0 /* anything that can fail? */
3093
  unsigned _fail = 0, _failcnt = 0;
3094
#endif
3095
0
  const char *no = NULL;
3096
0
  const char *direction_str = NULL;
3097
3098
0
  for (_i = 0; _i < argc; _i++) {
3099
0
    if (!argv[_i]->varname)
3100
0
      continue;
3101
#if 0 /* anything that can fail? */
3102
    _fail = 0;
3103
#endif
3104
3105
0
    if (!strcmp(argv[_i]->varname, "no")) {
3106
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3107
0
    }
3108
0
    if (!strcmp(argv[_i]->varname, "direction_str")) {
3109
0
      direction_str = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3110
0
    }
3111
#if 0 /* anything that can fail? */
3112
    if (_fail)
3113
      vty_out (vty, "%% invalid input for %s: %s\n",
3114
           argv[_i]->varname, argv[_i]->arg);
3115
    _failcnt += _fail;
3116
#endif
3117
0
  }
3118
#if 0 /* anything that can fail? */
3119
  if (_failcnt)
3120
    return CMD_WARNING;
3121
#endif
3122
0
#endif
3123
0
  if (!direction_str) {
3124
0
    vty_out(vty, "Internal CLI error [%s]\n", "direction_str");
3125
0
    return CMD_WARNING;
3126
0
  }
3127
3128
0
  return bgp_imexport_vpn_magic(self, vty, argc, argv, no, direction_str);
3129
0
}
3130
3131
/* af_routetarget_import => "[no] <rt|route-target|route-target6|rt6> redirect import RTLIST..." */
3132
DEFUN_CMD_FUNC_DECL(af_routetarget_import)
3133
#define funcdecl_af_routetarget_import static int af_routetarget_import_magic(\
3134
  const struct cmd_element *self __attribute__ ((unused)),\
3135
  struct vty *vty __attribute__ ((unused)),\
3136
  int argc __attribute__ ((unused)),\
3137
  struct cmd_token *argv[] __attribute__ ((unused)),\
3138
  const char * no,\
3139
  const char * rtlist)
3140
funcdecl_af_routetarget_import;
3141
DEFUN_CMD_FUNC_TEXT(af_routetarget_import)
3142
0
{
3143
0
#if 2 /* anything to parse? */
3144
0
  int _i;
3145
#if 0 /* anything that can fail? */
3146
  unsigned _fail = 0, _failcnt = 0;
3147
#endif
3148
0
  const char *no = NULL;
3149
0
  const char *rtlist = NULL;
3150
3151
0
  for (_i = 0; _i < argc; _i++) {
3152
0
    if (!argv[_i]->varname)
3153
0
      continue;
3154
#if 0 /* anything that can fail? */
3155
    _fail = 0;
3156
#endif
3157
3158
0
    if (!strcmp(argv[_i]->varname, "no")) {
3159
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3160
0
    }
3161
0
    if (!strcmp(argv[_i]->varname, "rtlist")) {
3162
0
      rtlist = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3163
0
    }
3164
#if 0 /* anything that can fail? */
3165
    if (_fail)
3166
      vty_out (vty, "%% invalid input for %s: %s\n",
3167
           argv[_i]->varname, argv[_i]->arg);
3168
    _failcnt += _fail;
3169
#endif
3170
0
  }
3171
#if 0 /* anything that can fail? */
3172
  if (_failcnt)
3173
    return CMD_WARNING;
3174
#endif
3175
0
#endif
3176
0
  if (!rtlist) {
3177
0
    vty_out(vty, "Internal CLI error [%s]\n", "rtlist");
3178
0
    return CMD_WARNING;
3179
0
  }
3180
3181
0
  return af_routetarget_import_magic(self, vty, argc, argv, no, rtlist);
3182
0
}
3183
3184
/* bgp_srv6_locator => "locator NAME$name" */
3185
DEFUN_CMD_FUNC_DECL(bgp_srv6_locator)
3186
#define funcdecl_bgp_srv6_locator static int bgp_srv6_locator_magic(\
3187
  const struct cmd_element *self __attribute__ ((unused)),\
3188
  struct vty *vty __attribute__ ((unused)),\
3189
  int argc __attribute__ ((unused)),\
3190
  struct cmd_token *argv[] __attribute__ ((unused)),\
3191
  const char * name)
3192
funcdecl_bgp_srv6_locator;
3193
DEFUN_CMD_FUNC_TEXT(bgp_srv6_locator)
3194
0
{
3195
0
#if 1 /* anything to parse? */
3196
0
  int _i;
3197
#if 0 /* anything that can fail? */
3198
  unsigned _fail = 0, _failcnt = 0;
3199
#endif
3200
0
  const char *name = NULL;
3201
3202
0
  for (_i = 0; _i < argc; _i++) {
3203
0
    if (!argv[_i]->varname)
3204
0
      continue;
3205
#if 0 /* anything that can fail? */
3206
    _fail = 0;
3207
#endif
3208
3209
0
    if (!strcmp(argv[_i]->varname, "name")) {
3210
0
      name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3211
0
    }
3212
#if 0 /* anything that can fail? */
3213
    if (_fail)
3214
      vty_out (vty, "%% invalid input for %s: %s\n",
3215
           argv[_i]->varname, argv[_i]->arg);
3216
    _failcnt += _fail;
3217
#endif
3218
0
  }
3219
#if 0 /* anything that can fail? */
3220
  if (_failcnt)
3221
    return CMD_WARNING;
3222
#endif
3223
0
#endif
3224
0
  if (!name) {
3225
0
    vty_out(vty, "Internal CLI error [%s]\n", "name");
3226
0
    return CMD_WARNING;
3227
0
  }
3228
3229
0
  return bgp_srv6_locator_magic(self, vty, argc, argv, name);
3230
0
}
3231
3232
/* no_bgp_srv6_locator => "no locator NAME$name" */
3233
DEFUN_CMD_FUNC_DECL(no_bgp_srv6_locator)
3234
#define funcdecl_no_bgp_srv6_locator static int no_bgp_srv6_locator_magic(\
3235
  const struct cmd_element *self __attribute__ ((unused)),\
3236
  struct vty *vty __attribute__ ((unused)),\
3237
  int argc __attribute__ ((unused)),\
3238
  struct cmd_token *argv[] __attribute__ ((unused)),\
3239
  const char * name)
3240
funcdecl_no_bgp_srv6_locator;
3241
DEFUN_CMD_FUNC_TEXT(no_bgp_srv6_locator)
3242
0
{
3243
0
#if 1 /* anything to parse? */
3244
0
  int _i;
3245
#if 0 /* anything that can fail? */
3246
  unsigned _fail = 0, _failcnt = 0;
3247
#endif
3248
0
  const char *name = NULL;
3249
3250
0
  for (_i = 0; _i < argc; _i++) {
3251
0
    if (!argv[_i]->varname)
3252
0
      continue;
3253
#if 0 /* anything that can fail? */
3254
    _fail = 0;
3255
#endif
3256
3257
0
    if (!strcmp(argv[_i]->varname, "name")) {
3258
0
      name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3259
0
    }
3260
#if 0 /* anything that can fail? */
3261
    if (_fail)
3262
      vty_out (vty, "%% invalid input for %s: %s\n",
3263
           argv[_i]->varname, argv[_i]->arg);
3264
    _failcnt += _fail;
3265
#endif
3266
0
  }
3267
#if 0 /* anything that can fail? */
3268
  if (_failcnt)
3269
    return CMD_WARNING;
3270
#endif
3271
0
#endif
3272
0
  if (!name) {
3273
0
    vty_out(vty, "Internal CLI error [%s]\n", "name");
3274
0
    return CMD_WARNING;
3275
0
  }
3276
3277
0
  return no_bgp_srv6_locator_magic(self, vty, argc, argv, name);
3278
0
}
3279
3280
/* show_bgp_srv6 => "show bgp segment-routing srv6" */
3281
DEFUN_CMD_FUNC_DECL(show_bgp_srv6)
3282
#define funcdecl_show_bgp_srv6 static int show_bgp_srv6_magic(\
3283
  const struct cmd_element *self __attribute__ ((unused)),\
3284
  struct vty *vty __attribute__ ((unused)),\
3285
  int argc __attribute__ ((unused)),\
3286
  struct cmd_token *argv[] __attribute__ ((unused)))
3287
funcdecl_show_bgp_srv6;
3288
DEFUN_CMD_FUNC_TEXT(show_bgp_srv6)
3289
0
{
3290
#if 0 /* anything to parse? */
3291
  int _i;
3292
#if 0 /* anything that can fail? */
3293
  unsigned _fail = 0, _failcnt = 0;
3294
#endif
3295
3296
  for (_i = 0; _i < argc; _i++) {
3297
    if (!argv[_i]->varname)
3298
      continue;
3299
#if 0 /* anything that can fail? */
3300
    _fail = 0;
3301
#endif
3302
3303
#if 0 /* anything that can fail? */
3304
    if (_fail)
3305
      vty_out (vty, "%% invalid input for %s: %s\n",
3306
           argv[_i]->varname, argv[_i]->arg);
3307
    _failcnt += _fail;
3308
#endif
3309
  }
3310
#if 0 /* anything that can fail? */
3311
  if (_failcnt)
3312
    return CMD_WARNING;
3313
#endif
3314
#endif
3315
3316
0
  return show_bgp_srv6_magic(self, vty, argc, argv);
3317
0
}
3318
3319
/* show_bgp_vrfs => "show [ip] bgp vrfs [<VRFNAME$vrf_name>] [json]" */
3320
DEFUN_CMD_FUNC_DECL(show_bgp_vrfs)
3321
#define funcdecl_show_bgp_vrfs static int show_bgp_vrfs_magic(\
3322
  const struct cmd_element *self __attribute__ ((unused)),\
3323
  struct vty *vty __attribute__ ((unused)),\
3324
  int argc __attribute__ ((unused)),\
3325
  struct cmd_token *argv[] __attribute__ ((unused)),\
3326
  const char * vrf_name)
3327
funcdecl_show_bgp_vrfs;
3328
DEFUN_CMD_FUNC_TEXT(show_bgp_vrfs)
3329
0
{
3330
0
#if 1 /* anything to parse? */
3331
0
  int _i;
3332
#if 0 /* anything that can fail? */
3333
  unsigned _fail = 0, _failcnt = 0;
3334
#endif
3335
0
  const char *vrf_name = NULL;
3336
3337
0
  for (_i = 0; _i < argc; _i++) {
3338
0
    if (!argv[_i]->varname)
3339
0
      continue;
3340
#if 0 /* anything that can fail? */
3341
    _fail = 0;
3342
#endif
3343
3344
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
3345
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3346
0
    }
3347
#if 0 /* anything that can fail? */
3348
    if (_fail)
3349
      vty_out (vty, "%% invalid input for %s: %s\n",
3350
           argv[_i]->varname, argv[_i]->arg);
3351
    _failcnt += _fail;
3352
#endif
3353
0
  }
3354
#if 0 /* anything that can fail? */
3355
  if (_failcnt)
3356
    return CMD_WARNING;
3357
#endif
3358
0
#endif
3359
3360
0
  return show_bgp_vrfs_magic(self, vty, argc, argv, vrf_name);
3361
0
}
3362
3363
/* show_ip_bgp_summary => "show [ip] bgp [<view|vrf> VIEWVRFNAME] [<ipv4|ipv6> [<unicast|multicast|vpn|labeled-unicast|flowspec>]] [all$all] summary [established|failed] [<neighbor <A.B.C.D|X:X::X:X|WORD>|remote-as <ASNUM|internal|external>>] [terse] [wide] [json$uj]" */
3364
DEFUN_CMD_FUNC_DECL(show_ip_bgp_summary)
3365
#define funcdecl_show_ip_bgp_summary static int show_ip_bgp_summary_magic(\
3366
  const struct cmd_element *self __attribute__ ((unused)),\
3367
  struct vty *vty __attribute__ ((unused)),\
3368
  int argc __attribute__ ((unused)),\
3369
  struct cmd_token *argv[] __attribute__ ((unused)),\
3370
  const char * viewvrfname,\
3371
  const char * all,\
3372
  const char * neighbor,\
3373
  as_t remote_as,\
3374
  const char * remote_as_str __attribute__ ((unused)),\
3375
  const char * uj)
3376
funcdecl_show_ip_bgp_summary;
3377
DEFUN_CMD_FUNC_TEXT(show_ip_bgp_summary)
3378
0
{
3379
0
#if 5 /* anything to parse? */
3380
0
  int _i;
3381
0
#if 1 /* anything that can fail? */
3382
0
  unsigned _fail = 0, _failcnt = 0;
3383
0
#endif
3384
0
  const char *viewvrfname = NULL;
3385
0
  const char *all = NULL;
3386
0
  const char *neighbor = NULL;
3387
0
  as_t remote_as = 0;
3388
0
  const char *remote_as_str = NULL;
3389
0
  const char *uj = NULL;
3390
3391
0
  for (_i = 0; _i < argc; _i++) {
3392
0
    if (!argv[_i]->varname)
3393
0
      continue;
3394
0
#if 1 /* anything that can fail? */
3395
0
    _fail = 0;
3396
0
#endif
3397
3398
0
    if (!strcmp(argv[_i]->varname, "viewvrfname")) {
3399
0
      viewvrfname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3400
0
    }
3401
0
    if (!strcmp(argv[_i]->varname, "all")) {
3402
0
      all = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3403
0
    }
3404
0
    if (!strcmp(argv[_i]->varname, "neighbor")) {
3405
0
      neighbor = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3406
0
    }
3407
0
    if (!strcmp(argv[_i]->varname, "remote_as")) {
3408
0
      remote_as_str = argv[_i]->arg;
3409
0
      _fail = !asn_str2asn(argv[_i]->arg, &remote_as);
3410
0
    }
3411
0
    if (!strcmp(argv[_i]->varname, "uj")) {
3412
0
      uj = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3413
0
    }
3414
0
#if 1 /* anything that can fail? */
3415
0
    if (_fail)
3416
0
      vty_out (vty, "%% invalid input for %s: %s\n",
3417
0
           argv[_i]->varname, argv[_i]->arg);
3418
0
    _failcnt += _fail;
3419
0
#endif
3420
0
  }
3421
0
#if 1 /* anything that can fail? */
3422
0
  if (_failcnt)
3423
0
    return CMD_WARNING;
3424
0
#endif
3425
0
#endif
3426
3427
0
  return show_ip_bgp_summary_magic(self, vty, argc, argv, viewvrfname, all, neighbor, remote_as, remote_as_str, uj);
3428
0
}
3429
3430
/* show_ip_bgp_instance_updgrps_adj_s => "show [ip]$ip bgp [<view|vrf> VIEWVRFNAME$vrf] [<ipv4|ipv6>$afi <unicast|multicast|vpn>$safi] update-groups [SUBGROUP-ID]$sgid <advertise-queue|advertised-routes|packet-queue>$rtq" */
3431
DEFUN_CMD_FUNC_DECL(show_ip_bgp_instance_updgrps_adj_s)
3432
#define funcdecl_show_ip_bgp_instance_updgrps_adj_s static int show_ip_bgp_instance_updgrps_adj_s_magic(\
3433
  const struct cmd_element *self __attribute__ ((unused)),\
3434
  struct vty *vty __attribute__ ((unused)),\
3435
  int argc __attribute__ ((unused)),\
3436
  struct cmd_token *argv[] __attribute__ ((unused)),\
3437
  const char * ip,\
3438
  const char * vrf,\
3439
  const char * afi,\
3440
  const char * safi,\
3441
  const char * sgid,\
3442
  const char * rtq)
3443
funcdecl_show_ip_bgp_instance_updgrps_adj_s;
3444
DEFUN_CMD_FUNC_TEXT(show_ip_bgp_instance_updgrps_adj_s)
3445
0
{
3446
0
#if 6 /* anything to parse? */
3447
0
  int _i;
3448
#if 0 /* anything that can fail? */
3449
  unsigned _fail = 0, _failcnt = 0;
3450
#endif
3451
0
  const char *ip = NULL;
3452
0
  const char *vrf = NULL;
3453
0
  const char *afi = NULL;
3454
0
  const char *safi = NULL;
3455
0
  const char *sgid = NULL;
3456
0
  const char *rtq = NULL;
3457
3458
0
  for (_i = 0; _i < argc; _i++) {
3459
0
    if (!argv[_i]->varname)
3460
0
      continue;
3461
#if 0 /* anything that can fail? */
3462
    _fail = 0;
3463
#endif
3464
3465
0
    if (!strcmp(argv[_i]->varname, "ip")) {
3466
0
      ip = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3467
0
    }
3468
0
    if (!strcmp(argv[_i]->varname, "vrf")) {
3469
0
      vrf = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3470
0
    }
3471
0
    if (!strcmp(argv[_i]->varname, "afi")) {
3472
0
      afi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3473
0
    }
3474
0
    if (!strcmp(argv[_i]->varname, "safi")) {
3475
0
      safi = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3476
0
    }
3477
0
    if (!strcmp(argv[_i]->varname, "sgid")) {
3478
0
      sgid = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3479
0
    }
3480
0
    if (!strcmp(argv[_i]->varname, "rtq")) {
3481
0
      rtq = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3482
0
    }
3483
#if 0 /* anything that can fail? */
3484
    if (_fail)
3485
      vty_out (vty, "%% invalid input for %s: %s\n",
3486
           argv[_i]->varname, argv[_i]->arg);
3487
    _failcnt += _fail;
3488
#endif
3489
0
  }
3490
#if 0 /* anything that can fail? */
3491
  if (_failcnt)
3492
    return CMD_WARNING;
3493
#endif
3494
0
#endif
3495
0
  if (!rtq) {
3496
0
    vty_out(vty, "Internal CLI error [%s]\n", "rtq");
3497
0
    return CMD_WARNING;
3498
0
  }
3499
3500
0
  return show_ip_bgp_instance_updgrps_adj_s_magic(self, vty, argc, argv, ip, vrf, afi, safi, sgid, rtq);
3501
0
}
3502
3503
/* bgp_retain_route_target => "[no$no] bgp retain route-target all" */
3504
DEFUN_CMD_FUNC_DECL(bgp_retain_route_target)
3505
#define funcdecl_bgp_retain_route_target static int bgp_retain_route_target_magic(\
3506
  const struct cmd_element *self __attribute__ ((unused)),\
3507
  struct vty *vty __attribute__ ((unused)),\
3508
  int argc __attribute__ ((unused)),\
3509
  struct cmd_token *argv[] __attribute__ ((unused)),\
3510
  const char * no)
3511
funcdecl_bgp_retain_route_target;
3512
DEFUN_CMD_FUNC_TEXT(bgp_retain_route_target)
3513
0
{
3514
0
#if 1 /* anything to parse? */
3515
0
  int _i;
3516
#if 0 /* anything that can fail? */
3517
  unsigned _fail = 0, _failcnt = 0;
3518
#endif
3519
0
  const char *no = NULL;
3520
3521
0
  for (_i = 0; _i < argc; _i++) {
3522
0
    if (!argv[_i]->varname)
3523
0
      continue;
3524
#if 0 /* anything that can fail? */
3525
    _fail = 0;
3526
#endif
3527
3528
0
    if (!strcmp(argv[_i]->varname, "no")) {
3529
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3530
0
    }
3531
#if 0 /* anything that can fail? */
3532
    if (_fail)
3533
      vty_out (vty, "%% invalid input for %s: %s\n",
3534
           argv[_i]->varname, argv[_i]->arg);
3535
    _failcnt += _fail;
3536
#endif
3537
0
  }
3538
#if 0 /* anything that can fail? */
3539
  if (_failcnt)
3540
    return CMD_WARNING;
3541
#endif
3542
0
#endif
3543
3544
0
  return bgp_retain_route_target_magic(self, vty, argc, argv, no);
3545
0
}
3546
3547
/* mpls_bgp_forwarding => "[no$no] mpls bgp forwarding" */
3548
DEFUN_CMD_FUNC_DECL(mpls_bgp_forwarding)
3549
#define funcdecl_mpls_bgp_forwarding static int mpls_bgp_forwarding_magic(\
3550
  const struct cmd_element *self __attribute__ ((unused)),\
3551
  struct vty *vty __attribute__ ((unused)),\
3552
  int argc __attribute__ ((unused)),\
3553
  struct cmd_token *argv[] __attribute__ ((unused)),\
3554
  const char * no)
3555
funcdecl_mpls_bgp_forwarding;
3556
DEFUN_CMD_FUNC_TEXT(mpls_bgp_forwarding)
3557
0
{
3558
0
#if 1 /* anything to parse? */
3559
0
  int _i;
3560
#if 0 /* anything that can fail? */
3561
  unsigned _fail = 0, _failcnt = 0;
3562
#endif
3563
0
  const char *no = NULL;
3564
3565
0
  for (_i = 0; _i < argc; _i++) {
3566
0
    if (!argv[_i]->varname)
3567
0
      continue;
3568
#if 0 /* anything that can fail? */
3569
    _fail = 0;
3570
#endif
3571
3572
0
    if (!strcmp(argv[_i]->varname, "no")) {
3573
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
3574
0
    }
3575
#if 0 /* anything that can fail? */
3576
    if (_fail)
3577
      vty_out (vty, "%% invalid input for %s: %s\n",
3578
           argv[_i]->varname, argv[_i]->arg);
3579
    _failcnt += _fail;
3580
#endif
3581
0
  }
3582
#if 0 /* anything that can fail? */
3583
  if (_failcnt)
3584
    return CMD_WARNING;
3585
#endif
3586
0
#endif
3587
3588
0
  return mpls_bgp_forwarding_magic(self, vty, argc, argv, no);
3589
0
}
3590
3591
/* bgp_inq_limit => "bgp input-queue-limit (1-4294967295)$limit" */
3592
DEFUN_CMD_FUNC_DECL(bgp_inq_limit)
3593
#define funcdecl_bgp_inq_limit static int bgp_inq_limit_magic(\
3594
  const struct cmd_element *self __attribute__ ((unused)),\
3595
  struct vty *vty __attribute__ ((unused)),\
3596
  int argc __attribute__ ((unused)),\
3597
  struct cmd_token *argv[] __attribute__ ((unused)),\
3598
  long limit,\
3599
  const char * limit_str __attribute__ ((unused)))
3600
funcdecl_bgp_inq_limit;
3601
DEFUN_CMD_FUNC_TEXT(bgp_inq_limit)
3602
0
{
3603
0
#if 1 /* anything to parse? */
3604
0
  int _i;
3605
0
#if 1 /* anything that can fail? */
3606
0
  unsigned _fail = 0, _failcnt = 0;
3607
0
#endif
3608
0
  long limit = 0;
3609
0
  const char *limit_str = NULL;
3610
3611
0
  for (_i = 0; _i < argc; _i++) {
3612
0
    if (!argv[_i]->varname)
3613
0
      continue;
3614
0
#if 1 /* anything that can fail? */
3615
0
    _fail = 0;
3616
0
#endif
3617
3618
0
    if (!strcmp(argv[_i]->varname, "limit")) {
3619
0
      limit_str = argv[_i]->arg;
3620
0
      char *_end;
3621
0
      limit = strtol(argv[_i]->arg, &_end, 10);
3622
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
3623
0
    }
3624
0
#if 1 /* anything that can fail? */
3625
0
    if (_fail)
3626
0
      vty_out (vty, "%% invalid input for %s: %s\n",
3627
0
           argv[_i]->varname, argv[_i]->arg);
3628
0
    _failcnt += _fail;
3629
0
#endif
3630
0
  }
3631
0
#if 1 /* anything that can fail? */
3632
0
  if (_failcnt)
3633
0
    return CMD_WARNING;
3634
0
#endif
3635
0
#endif
3636
0
  if (!limit_str) {
3637
0
    vty_out(vty, "Internal CLI error [%s]\n", "limit_str");
3638
0
    return CMD_WARNING;
3639
0
  }
3640
3641
0
  return bgp_inq_limit_magic(self, vty, argc, argv, limit, limit_str);
3642
0
}
3643
3644
/* no_bgp_inq_limit => "no bgp input-queue-limit [(1-4294967295)$limit]" */
3645
DEFUN_CMD_FUNC_DECL(no_bgp_inq_limit)
3646
#define funcdecl_no_bgp_inq_limit static int no_bgp_inq_limit_magic(\
3647
  const struct cmd_element *self __attribute__ ((unused)),\
3648
  struct vty *vty __attribute__ ((unused)),\
3649
  int argc __attribute__ ((unused)),\
3650
  struct cmd_token *argv[] __attribute__ ((unused)),\
3651
  long limit,\
3652
  const char * limit_str __attribute__ ((unused)))
3653
funcdecl_no_bgp_inq_limit;
3654
DEFUN_CMD_FUNC_TEXT(no_bgp_inq_limit)
3655
0
{
3656
0
#if 1 /* anything to parse? */
3657
0
  int _i;
3658
0
#if 1 /* anything that can fail? */
3659
0
  unsigned _fail = 0, _failcnt = 0;
3660
0
#endif
3661
0
  long limit = 0;
3662
0
  const char *limit_str = NULL;
3663
3664
0
  for (_i = 0; _i < argc; _i++) {
3665
0
    if (!argv[_i]->varname)
3666
0
      continue;
3667
0
#if 1 /* anything that can fail? */
3668
0
    _fail = 0;
3669
0
#endif
3670
3671
0
    if (!strcmp(argv[_i]->varname, "limit")) {
3672
0
      limit_str = argv[_i]->arg;
3673
0
      char *_end;
3674
0
      limit = strtol(argv[_i]->arg, &_end, 10);
3675
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
3676
0
    }
3677
0
#if 1 /* anything that can fail? */
3678
0
    if (_fail)
3679
0
      vty_out (vty, "%% invalid input for %s: %s\n",
3680
0
           argv[_i]->varname, argv[_i]->arg);
3681
0
    _failcnt += _fail;
3682
0
#endif
3683
0
  }
3684
0
#if 1 /* anything that can fail? */
3685
0
  if (_failcnt)
3686
0
    return CMD_WARNING;
3687
0
#endif
3688
0
#endif
3689
3690
0
  return no_bgp_inq_limit_magic(self, vty, argc, argv, limit, limit_str);
3691
0
}
3692
3693
/* bgp_outq_limit => "bgp output-queue-limit (1-4294967295)$limit" */
3694
DEFUN_CMD_FUNC_DECL(bgp_outq_limit)
3695
#define funcdecl_bgp_outq_limit static int bgp_outq_limit_magic(\
3696
  const struct cmd_element *self __attribute__ ((unused)),\
3697
  struct vty *vty __attribute__ ((unused)),\
3698
  int argc __attribute__ ((unused)),\
3699
  struct cmd_token *argv[] __attribute__ ((unused)),\
3700
  long limit,\
3701
  const char * limit_str __attribute__ ((unused)))
3702
funcdecl_bgp_outq_limit;
3703
DEFUN_CMD_FUNC_TEXT(bgp_outq_limit)
3704
0
{
3705
0
#if 1 /* anything to parse? */
3706
0
  int _i;
3707
0
#if 1 /* anything that can fail? */
3708
0
  unsigned _fail = 0, _failcnt = 0;
3709
0
#endif
3710
0
  long limit = 0;
3711
0
  const char *limit_str = NULL;
3712
3713
0
  for (_i = 0; _i < argc; _i++) {
3714
0
    if (!argv[_i]->varname)
3715
0
      continue;
3716
0
#if 1 /* anything that can fail? */
3717
0
    _fail = 0;
3718
0
#endif
3719
3720
0
    if (!strcmp(argv[_i]->varname, "limit")) {
3721
0
      limit_str = argv[_i]->arg;
3722
0
      char *_end;
3723
0
      limit = strtol(argv[_i]->arg, &_end, 10);
3724
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
3725
0
    }
3726
0
#if 1 /* anything that can fail? */
3727
0
    if (_fail)
3728
0
      vty_out (vty, "%% invalid input for %s: %s\n",
3729
0
           argv[_i]->varname, argv[_i]->arg);
3730
0
    _failcnt += _fail;
3731
0
#endif
3732
0
  }
3733
0
#if 1 /* anything that can fail? */
3734
0
  if (_failcnt)
3735
0
    return CMD_WARNING;
3736
0
#endif
3737
0
#endif
3738
0
  if (!limit_str) {
3739
0
    vty_out(vty, "Internal CLI error [%s]\n", "limit_str");
3740
0
    return CMD_WARNING;
3741
0
  }
3742
3743
0
  return bgp_outq_limit_magic(self, vty, argc, argv, limit, limit_str);
3744
0
}
3745
3746
/* no_bgp_outq_limit => "no bgp output-queue-limit [(1-4294967295)$limit]" */
3747
DEFUN_CMD_FUNC_DECL(no_bgp_outq_limit)
3748
#define funcdecl_no_bgp_outq_limit static int no_bgp_outq_limit_magic(\
3749
  const struct cmd_element *self __attribute__ ((unused)),\
3750
  struct vty *vty __attribute__ ((unused)),\
3751
  int argc __attribute__ ((unused)),\
3752
  struct cmd_token *argv[] __attribute__ ((unused)),\
3753
  long limit,\
3754
  const char * limit_str __attribute__ ((unused)))
3755
funcdecl_no_bgp_outq_limit;
3756
DEFUN_CMD_FUNC_TEXT(no_bgp_outq_limit)
3757
0
{
3758
0
#if 1 /* anything to parse? */
3759
0
  int _i;
3760
0
#if 1 /* anything that can fail? */
3761
0
  unsigned _fail = 0, _failcnt = 0;
3762
0
#endif
3763
0
  long limit = 0;
3764
0
  const char *limit_str = NULL;
3765
3766
0
  for (_i = 0; _i < argc; _i++) {
3767
0
    if (!argv[_i]->varname)
3768
0
      continue;
3769
0
#if 1 /* anything that can fail? */
3770
0
    _fail = 0;
3771
0
#endif
3772
3773
0
    if (!strcmp(argv[_i]->varname, "limit")) {
3774
0
      limit_str = argv[_i]->arg;
3775
0
      char *_end;
3776
0
      limit = strtol(argv[_i]->arg, &_end, 10);
3777
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
3778
0
    }
3779
0
#if 1 /* anything that can fail? */
3780
0
    if (_fail)
3781
0
      vty_out (vty, "%% invalid input for %s: %s\n",
3782
0
           argv[_i]->varname, argv[_i]->arg);
3783
0
    _failcnt += _fail;
3784
0
#endif
3785
0
  }
3786
0
#if 1 /* anything that can fail? */
3787
0
  if (_failcnt)
3788
0
    return CMD_WARNING;
3789
0
#endif
3790
0
#endif
3791
3792
0
  return no_bgp_outq_limit_magic(self, vty, argc, argv, limit, limit_str);
3793
0
}
3794