Coverage Report

Created: 2026-02-21 06:33

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/frr/zebra/zebra_routemap_clippy.c
Line
Count
Source
1
/* match_ip_address_prefix_len => "match ip address prefix-len (0-32)$length" */
2
DEFUN_CMD_FUNC_DECL(match_ip_address_prefix_len)
3
#define funcdecl_match_ip_address_prefix_len static int match_ip_address_prefix_len_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 length,\
9
  const char * length_str __attribute__ ((unused)))
10
funcdecl_match_ip_address_prefix_len;
11
DEFUN_CMD_FUNC_TEXT(match_ip_address_prefix_len)
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 length = 0;
19
0
  const char *length_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, "length")) {
29
0
      length_str = argv[_i]->arg;
30
0
      char *_end;
31
0
      length = 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 (!length_str) {
47
0
    vty_out(vty, "Internal CLI error [%s]\n", "length_str");
48
0
    return CMD_WARNING;
49
0
  }
50
51
0
  return match_ip_address_prefix_len_magic(self, vty, argc, argv, length, length_str);
52
0
}
53
54
/* no_match_ip_address_prefix_len => "no match ip address prefix-len [(0-32)]" */
55
DEFUN_CMD_FUNC_DECL(no_match_ip_address_prefix_len)
56
#define funcdecl_no_match_ip_address_prefix_len static int no_match_ip_address_prefix_len_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 prefix_len,\
62
  const char * prefix_len_str __attribute__ ((unused)))
63
funcdecl_no_match_ip_address_prefix_len;
64
DEFUN_CMD_FUNC_TEXT(no_match_ip_address_prefix_len)
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 prefix_len = 0;
72
0
  const char *prefix_len_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, "prefix_len")) {
82
0
      prefix_len_str = argv[_i]->arg;
83
0
      char *_end;
84
0
      prefix_len = 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_match_ip_address_prefix_len_magic(self, vty, argc, argv, prefix_len, prefix_len_str);
101
0
}
102
103
/* match_ipv6_address_prefix_len => "match ipv6 address prefix-len (0-128)$length" */
104
DEFUN_CMD_FUNC_DECL(match_ipv6_address_prefix_len)
105
#define funcdecl_match_ipv6_address_prefix_len static int match_ipv6_address_prefix_len_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
  long length,\
111
  const char * length_str __attribute__ ((unused)))
112
funcdecl_match_ipv6_address_prefix_len;
113
DEFUN_CMD_FUNC_TEXT(match_ipv6_address_prefix_len)
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
  long length = 0;
121
0
  const char *length_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, "length")) {
131
0
      length_str = argv[_i]->arg;
132
0
      char *_end;
133
0
      length = strtol(argv[_i]->arg, &_end, 10);
134
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
135
0
    }
136
0
#if 1 /* anything that can fail? */
137
0
    if (_fail)
138
0
      vty_out (vty, "%% invalid input for %s: %s\n",
139
0
           argv[_i]->varname, argv[_i]->arg);
140
0
    _failcnt += _fail;
141
0
#endif
142
0
  }
143
0
#if 1 /* anything that can fail? */
144
0
  if (_failcnt)
145
0
    return CMD_WARNING;
146
0
#endif
147
0
#endif
148
0
  if (!length_str) {
149
0
    vty_out(vty, "Internal CLI error [%s]\n", "length_str");
150
0
    return CMD_WARNING;
151
0
  }
152
153
0
  return match_ipv6_address_prefix_len_magic(self, vty, argc, argv, length, length_str);
154
0
}
155
156
/* no_match_ipv6_address_prefix_len => "no match ipv6 address prefix-len [(0-128)]" */
157
DEFUN_CMD_FUNC_DECL(no_match_ipv6_address_prefix_len)
158
#define funcdecl_no_match_ipv6_address_prefix_len static int no_match_ipv6_address_prefix_len_magic(\
159
  const struct cmd_element *self __attribute__ ((unused)),\
160
  struct vty *vty __attribute__ ((unused)),\
161
  int argc __attribute__ ((unused)),\
162
  struct cmd_token *argv[] __attribute__ ((unused)),\
163
  long prefix_len,\
164
  const char * prefix_len_str __attribute__ ((unused)))
165
funcdecl_no_match_ipv6_address_prefix_len;
166
DEFUN_CMD_FUNC_TEXT(no_match_ipv6_address_prefix_len)
167
0
{
168
0
#if 1 /* anything to parse? */
169
0
  int _i;
170
0
#if 1 /* anything that can fail? */
171
0
  unsigned _fail = 0, _failcnt = 0;
172
0
#endif
173
0
  long prefix_len = 0;
174
0
  const char *prefix_len_str = NULL;
175
176
0
  for (_i = 0; _i < argc; _i++) {
177
0
    if (!argv[_i]->varname)
178
0
      continue;
179
0
#if 1 /* anything that can fail? */
180
0
    _fail = 0;
181
0
#endif
182
183
0
    if (!strcmp(argv[_i]->varname, "prefix_len")) {
184
0
      prefix_len_str = argv[_i]->arg;
185
0
      char *_end;
186
0
      prefix_len = strtol(argv[_i]->arg, &_end, 10);
187
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
188
0
    }
189
0
#if 1 /* anything that can fail? */
190
0
    if (_fail)
191
0
      vty_out (vty, "%% invalid input for %s: %s\n",
192
0
           argv[_i]->varname, argv[_i]->arg);
193
0
    _failcnt += _fail;
194
0
#endif
195
0
  }
196
0
#if 1 /* anything that can fail? */
197
0
  if (_failcnt)
198
0
    return CMD_WARNING;
199
0
#endif
200
0
#endif
201
202
0
  return no_match_ipv6_address_prefix_len_magic(self, vty, argc, argv, prefix_len, prefix_len_str);
203
0
}
204
205
/* match_ip_nexthop_prefix_len => "match ip next-hop prefix-len (0-32)$length" */
206
DEFUN_CMD_FUNC_DECL(match_ip_nexthop_prefix_len)
207
#define funcdecl_match_ip_nexthop_prefix_len static int match_ip_nexthop_prefix_len_magic(\
208
  const struct cmd_element *self __attribute__ ((unused)),\
209
  struct vty *vty __attribute__ ((unused)),\
210
  int argc __attribute__ ((unused)),\
211
  struct cmd_token *argv[] __attribute__ ((unused)),\
212
  long length,\
213
  const char * length_str __attribute__ ((unused)))
214
funcdecl_match_ip_nexthop_prefix_len;
215
DEFUN_CMD_FUNC_TEXT(match_ip_nexthop_prefix_len)
216
0
{
217
0
#if 1 /* anything to parse? */
218
0
  int _i;
219
0
#if 1 /* anything that can fail? */
220
0
  unsigned _fail = 0, _failcnt = 0;
221
0
#endif
222
0
  long length = 0;
223
0
  const char *length_str = NULL;
224
225
0
  for (_i = 0; _i < argc; _i++) {
226
0
    if (!argv[_i]->varname)
227
0
      continue;
228
0
#if 1 /* anything that can fail? */
229
0
    _fail = 0;
230
0
#endif
231
232
0
    if (!strcmp(argv[_i]->varname, "length")) {
233
0
      length_str = argv[_i]->arg;
234
0
      char *_end;
235
0
      length = strtol(argv[_i]->arg, &_end, 10);
236
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
237
0
    }
238
0
#if 1 /* anything that can fail? */
239
0
    if (_fail)
240
0
      vty_out (vty, "%% invalid input for %s: %s\n",
241
0
           argv[_i]->varname, argv[_i]->arg);
242
0
    _failcnt += _fail;
243
0
#endif
244
0
  }
245
0
#if 1 /* anything that can fail? */
246
0
  if (_failcnt)
247
0
    return CMD_WARNING;
248
0
#endif
249
0
#endif
250
0
  if (!length_str) {
251
0
    vty_out(vty, "Internal CLI error [%s]\n", "length_str");
252
0
    return CMD_WARNING;
253
0
  }
254
255
0
  return match_ip_nexthop_prefix_len_magic(self, vty, argc, argv, length, length_str);
256
0
}
257
258
/* no_match_ip_nexthop_prefix_len => "no match ip next-hop prefix-len [(0-32)]" */
259
DEFUN_CMD_FUNC_DECL(no_match_ip_nexthop_prefix_len)
260
#define funcdecl_no_match_ip_nexthop_prefix_len static int no_match_ip_nexthop_prefix_len_magic(\
261
  const struct cmd_element *self __attribute__ ((unused)),\
262
  struct vty *vty __attribute__ ((unused)),\
263
  int argc __attribute__ ((unused)),\
264
  struct cmd_token *argv[] __attribute__ ((unused)),\
265
  long prefix_len,\
266
  const char * prefix_len_str __attribute__ ((unused)))
267
funcdecl_no_match_ip_nexthop_prefix_len;
268
DEFUN_CMD_FUNC_TEXT(no_match_ip_nexthop_prefix_len)
269
0
{
270
0
#if 1 /* anything to parse? */
271
0
  int _i;
272
0
#if 1 /* anything that can fail? */
273
0
  unsigned _fail = 0, _failcnt = 0;
274
0
#endif
275
0
  long prefix_len = 0;
276
0
  const char *prefix_len_str = NULL;
277
278
0
  for (_i = 0; _i < argc; _i++) {
279
0
    if (!argv[_i]->varname)
280
0
      continue;
281
0
#if 1 /* anything that can fail? */
282
0
    _fail = 0;
283
0
#endif
284
285
0
    if (!strcmp(argv[_i]->varname, "prefix_len")) {
286
0
      prefix_len_str = argv[_i]->arg;
287
0
      char *_end;
288
0
      prefix_len = strtol(argv[_i]->arg, &_end, 10);
289
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
290
0
    }
291
0
#if 1 /* anything that can fail? */
292
0
    if (_fail)
293
0
      vty_out (vty, "%% invalid input for %s: %s\n",
294
0
           argv[_i]->varname, argv[_i]->arg);
295
0
    _failcnt += _fail;
296
0
#endif
297
0
  }
298
0
#if 1 /* anything that can fail? */
299
0
  if (_failcnt)
300
0
    return CMD_WARNING;
301
0
#endif
302
0
#endif
303
304
0
  return no_match_ip_nexthop_prefix_len_magic(self, vty, argc, argv, prefix_len, prefix_len_str);
305
0
}
306
307
/* match_source_protocol => "match source-protocol <kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric>$proto" */
308
DEFUN_CMD_FUNC_DECL(match_source_protocol)
309
#define funcdecl_match_source_protocol static int match_source_protocol_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 * proto)
315
funcdecl_match_source_protocol;
316
DEFUN_CMD_FUNC_TEXT(match_source_protocol)
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 *proto = 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, "proto")) {
333
0
      proto = (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
0
  if (!proto) {
348
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
349
0
    return CMD_WARNING;
350
0
  }
351
352
0
  return match_source_protocol_magic(self, vty, argc, argv, proto);
353
0
}
354
355
/* no_match_source_protocol => "no match source-protocol [<kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric>]" */
356
DEFUN_CMD_FUNC_DECL(no_match_source_protocol)
357
#define funcdecl_no_match_source_protocol static int no_match_source_protocol_magic(\
358
  const struct cmd_element *self __attribute__ ((unused)),\
359
  struct vty *vty __attribute__ ((unused)),\
360
  int argc __attribute__ ((unused)),\
361
  struct cmd_token *argv[] __attribute__ ((unused)))
362
funcdecl_no_match_source_protocol;
363
DEFUN_CMD_FUNC_TEXT(no_match_source_protocol)
364
0
{
365
#if 0 /* anything to parse? */
366
  int _i;
367
#if 0 /* anything that can fail? */
368
  unsigned _fail = 0, _failcnt = 0;
369
#endif
370
371
  for (_i = 0; _i < argc; _i++) {
372
    if (!argv[_i]->varname)
373
      continue;
374
#if 0 /* anything that can fail? */
375
    _fail = 0;
376
#endif
377
378
#if 0 /* anything that can fail? */
379
    if (_fail)
380
      vty_out (vty, "%% invalid input for %s: %s\n",
381
           argv[_i]->varname, argv[_i]->arg);
382
    _failcnt += _fail;
383
#endif
384
  }
385
#if 0 /* anything that can fail? */
386
  if (_failcnt)
387
    return CMD_WARNING;
388
#endif
389
#endif
390
391
0
  return no_match_source_protocol_magic(self, vty, argc, argv);
392
0
}
393
394
/* match_source_instance => "match source-instance (0-255)$instance" */
395
DEFUN_CMD_FUNC_DECL(match_source_instance)
396
#define funcdecl_match_source_instance static int match_source_instance_magic(\
397
  const struct cmd_element *self __attribute__ ((unused)),\
398
  struct vty *vty __attribute__ ((unused)),\
399
  int argc __attribute__ ((unused)),\
400
  struct cmd_token *argv[] __attribute__ ((unused)),\
401
  long instance,\
402
  const char * instance_str __attribute__ ((unused)))
403
funcdecl_match_source_instance;
404
DEFUN_CMD_FUNC_TEXT(match_source_instance)
405
0
{
406
0
#if 1 /* anything to parse? */
407
0
  int _i;
408
0
#if 1 /* anything that can fail? */
409
0
  unsigned _fail = 0, _failcnt = 0;
410
0
#endif
411
0
  long instance = 0;
412
0
  const char *instance_str = NULL;
413
414
0
  for (_i = 0; _i < argc; _i++) {
415
0
    if (!argv[_i]->varname)
416
0
      continue;
417
0
#if 1 /* anything that can fail? */
418
0
    _fail = 0;
419
0
#endif
420
421
0
    if (!strcmp(argv[_i]->varname, "instance")) {
422
0
      instance_str = argv[_i]->arg;
423
0
      char *_end;
424
0
      instance = strtol(argv[_i]->arg, &_end, 10);
425
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
426
0
    }
427
0
#if 1 /* anything that can fail? */
428
0
    if (_fail)
429
0
      vty_out (vty, "%% invalid input for %s: %s\n",
430
0
           argv[_i]->varname, argv[_i]->arg);
431
0
    _failcnt += _fail;
432
0
#endif
433
0
  }
434
0
#if 1 /* anything that can fail? */
435
0
  if (_failcnt)
436
0
    return CMD_WARNING;
437
0
#endif
438
0
#endif
439
0
  if (!instance_str) {
440
0
    vty_out(vty, "Internal CLI error [%s]\n", "instance_str");
441
0
    return CMD_WARNING;
442
0
  }
443
444
0
  return match_source_instance_magic(self, vty, argc, argv, instance, instance_str);
445
0
}
446
447
/* no_match_source_instance => "no match source-instance [(0-255)]" */
448
DEFUN_CMD_FUNC_DECL(no_match_source_instance)
449
#define funcdecl_no_match_source_instance static int no_match_source_instance_magic(\
450
  const struct cmd_element *self __attribute__ ((unused)),\
451
  struct vty *vty __attribute__ ((unused)),\
452
  int argc __attribute__ ((unused)),\
453
  struct cmd_token *argv[] __attribute__ ((unused)),\
454
  long source_instance,\
455
  const char * source_instance_str __attribute__ ((unused)))
456
funcdecl_no_match_source_instance;
457
DEFUN_CMD_FUNC_TEXT(no_match_source_instance)
458
0
{
459
0
#if 1 /* anything to parse? */
460
0
  int _i;
461
0
#if 1 /* anything that can fail? */
462
0
  unsigned _fail = 0, _failcnt = 0;
463
0
#endif
464
0
  long source_instance = 0;
465
0
  const char *source_instance_str = NULL;
466
467
0
  for (_i = 0; _i < argc; _i++) {
468
0
    if (!argv[_i]->varname)
469
0
      continue;
470
0
#if 1 /* anything that can fail? */
471
0
    _fail = 0;
472
0
#endif
473
474
0
    if (!strcmp(argv[_i]->varname, "source_instance")) {
475
0
      source_instance_str = argv[_i]->arg;
476
0
      char *_end;
477
0
      source_instance = strtol(argv[_i]->arg, &_end, 10);
478
0
      _fail = (_end == argv[_i]->arg) || (*_end != '\0');
479
0
    }
480
0
#if 1 /* anything that can fail? */
481
0
    if (_fail)
482
0
      vty_out (vty, "%% invalid input for %s: %s\n",
483
0
           argv[_i]->varname, argv[_i]->arg);
484
0
    _failcnt += _fail;
485
0
#endif
486
0
  }
487
0
#if 1 /* anything that can fail? */
488
0
  if (_failcnt)
489
0
    return CMD_WARNING;
490
0
#endif
491
0
#endif
492
493
0
  return no_match_source_instance_magic(self, vty, argc, argv, source_instance, source_instance_str);
494
0
}
495
496
/* set_src => "set src <A.B.C.D$addrv4|X:X::X:X$addrv6>" */
497
DEFUN_CMD_FUNC_DECL(set_src)
498
#define funcdecl_set_src static int set_src_magic(\
499
  const struct cmd_element *self __attribute__ ((unused)),\
500
  struct vty *vty __attribute__ ((unused)),\
501
  int argc __attribute__ ((unused)),\
502
  struct cmd_token *argv[] __attribute__ ((unused)),\
503
  struct in_addr addrv4,\
504
  const char * addrv4_str __attribute__ ((unused)),\
505
  struct in6_addr addrv6,\
506
  const char * addrv6_str __attribute__ ((unused)))
507
funcdecl_set_src;
508
DEFUN_CMD_FUNC_TEXT(set_src)
509
0
{
510
0
#if 2 /* anything to parse? */
511
0
  int _i;
512
0
#if 1 /* anything that can fail? */
513
0
  unsigned _fail = 0, _failcnt = 0;
514
0
#endif
515
0
  struct in_addr addrv4 = { INADDR_ANY };
516
0
  const char *addrv4_str = NULL;
517
0
  struct in6_addr addrv6 = {};
518
0
  const char *addrv6_str = NULL;
519
520
0
  for (_i = 0; _i < argc; _i++) {
521
0
    if (!argv[_i]->varname)
522
0
      continue;
523
0
#if 1 /* anything that can fail? */
524
0
    _fail = 0;
525
0
#endif
526
527
0
    if (!strcmp(argv[_i]->varname, "addrv4")) {
528
0
      addrv4_str = argv[_i]->arg;
529
0
      _fail = !inet_aton(argv[_i]->arg, &addrv4);
530
0
    }
531
0
    if (!strcmp(argv[_i]->varname, "addrv6")) {
532
0
      addrv6_str = argv[_i]->arg;
533
0
      _fail = !inet_pton(AF_INET6, argv[_i]->arg, &addrv6);
534
0
    }
535
0
#if 1 /* anything that can fail? */
536
0
    if (_fail)
537
0
      vty_out (vty, "%% invalid input for %s: %s\n",
538
0
           argv[_i]->varname, argv[_i]->arg);
539
0
    _failcnt += _fail;
540
0
#endif
541
0
  }
542
0
#if 1 /* anything that can fail? */
543
0
  if (_failcnt)
544
0
    return CMD_WARNING;
545
0
#endif
546
0
#endif
547
548
0
  return set_src_magic(self, vty, argc, argv, addrv4, addrv4_str, addrv6, addrv6_str);
549
0
}
550
551
/* no_set_src => "no set src [<A.B.C.D|X:X::X:X>]" */
552
DEFUN_CMD_FUNC_DECL(no_set_src)
553
#define funcdecl_no_set_src static int no_set_src_magic(\
554
  const struct cmd_element *self __attribute__ ((unused)),\
555
  struct vty *vty __attribute__ ((unused)),\
556
  int argc __attribute__ ((unused)),\
557
  struct cmd_token *argv[] __attribute__ ((unused)),\
558
  const union sockunion * src,\
559
  const char * src_str __attribute__ ((unused)))
560
funcdecl_no_set_src;
561
DEFUN_CMD_FUNC_TEXT(no_set_src)
562
0
{
563
0
#if 1 /* anything to parse? */
564
0
  int _i;
565
0
#if 1 /* anything that can fail? */
566
0
  unsigned _fail = 0, _failcnt = 0;
567
0
#endif
568
0
  union sockunion s__src = { .sa.sa_family = AF_UNSPEC }, *src = NULL;
569
0
  const char *src_str = NULL;
570
571
0
  for (_i = 0; _i < argc; _i++) {
572
0
    if (!argv[_i]->varname)
573
0
      continue;
574
0
#if 1 /* anything that can fail? */
575
0
    _fail = 0;
576
0
#endif
577
578
0
    if (!strcmp(argv[_i]->varname, "src")) {
579
0
      src_str = argv[_i]->arg;
580
0
      if (argv[_i]->text[0] == 'X') {
581
0
        s__src.sa.sa_family = AF_INET6;
582
0
        _fail = !inet_pton(AF_INET6, argv[_i]->arg, &s__src.sin6.sin6_addr);
583
0
        src = &s__src;
584
0
      } else {
585
0
        s__src.sa.sa_family = AF_INET;
586
0
        _fail = !inet_aton(argv[_i]->arg, &s__src.sin.sin_addr);
587
0
        src = &s__src;
588
0
      }
589
0
    }
590
0
#if 1 /* anything that can fail? */
591
0
    if (_fail)
592
0
      vty_out (vty, "%% invalid input for %s: %s\n",
593
0
           argv[_i]->varname, argv[_i]->arg);
594
0
    _failcnt += _fail;
595
0
#endif
596
0
  }
597
0
#if 1 /* anything that can fail? */
598
0
  if (_failcnt)
599
0
    return CMD_WARNING;
600
0
#endif
601
0
#endif
602
603
0
  return no_set_src_magic(self, vty, argc, argv, src, src_str);
604
0
}
605
606
/* ip_protocol => "ip protocol <kernel|connected|static|rip|ospf|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric|any> $proto route-map ROUTE-MAP$rmap" */
607
DEFUN_CMD_FUNC_DECL(ip_protocol)
608
#define funcdecl_ip_protocol static int ip_protocol_magic(\
609
  const struct cmd_element *self __attribute__ ((unused)),\
610
  struct vty *vty __attribute__ ((unused)),\
611
  int argc __attribute__ ((unused)),\
612
  struct cmd_token *argv[] __attribute__ ((unused)),\
613
  const char * proto,\
614
  const char * rmap)
615
funcdecl_ip_protocol;
616
DEFUN_CMD_FUNC_TEXT(ip_protocol)
617
0
{
618
0
#if 2 /* anything to parse? */
619
0
  int _i;
620
#if 0 /* anything that can fail? */
621
  unsigned _fail = 0, _failcnt = 0;
622
#endif
623
0
  const char *proto = NULL;
624
0
  const char *rmap = NULL;
625
626
0
  for (_i = 0; _i < argc; _i++) {
627
0
    if (!argv[_i]->varname)
628
0
      continue;
629
#if 0 /* anything that can fail? */
630
    _fail = 0;
631
#endif
632
633
0
    if (!strcmp(argv[_i]->varname, "proto")) {
634
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
635
0
    }
636
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
637
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
638
0
    }
639
#if 0 /* anything that can fail? */
640
    if (_fail)
641
      vty_out (vty, "%% invalid input for %s: %s\n",
642
           argv[_i]->varname, argv[_i]->arg);
643
    _failcnt += _fail;
644
#endif
645
0
  }
646
#if 0 /* anything that can fail? */
647
  if (_failcnt)
648
    return CMD_WARNING;
649
#endif
650
0
#endif
651
0
  if (!proto) {
652
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
653
0
    return CMD_WARNING;
654
0
  }
655
0
  if (!rmap) {
656
0
    vty_out(vty, "Internal CLI error [%s]\n", "rmap");
657
0
    return CMD_WARNING;
658
0
  }
659
660
0
  return ip_protocol_magic(self, vty, argc, argv, proto, rmap);
661
0
}
662
663
/* no_ip_protocol => "no ip protocol <kernel|connected|static|rip|ospf|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric|any> $proto [route-map ROUTE-MAP$rmap]" */
664
DEFUN_CMD_FUNC_DECL(no_ip_protocol)
665
#define funcdecl_no_ip_protocol static int no_ip_protocol_magic(\
666
  const struct cmd_element *self __attribute__ ((unused)),\
667
  struct vty *vty __attribute__ ((unused)),\
668
  int argc __attribute__ ((unused)),\
669
  struct cmd_token *argv[] __attribute__ ((unused)),\
670
  const char * proto,\
671
  const char * rmap)
672
funcdecl_no_ip_protocol;
673
DEFUN_CMD_FUNC_TEXT(no_ip_protocol)
674
0
{
675
0
#if 2 /* anything to parse? */
676
0
  int _i;
677
#if 0 /* anything that can fail? */
678
  unsigned _fail = 0, _failcnt = 0;
679
#endif
680
0
  const char *proto = NULL;
681
0
  const char *rmap = NULL;
682
683
0
  for (_i = 0; _i < argc; _i++) {
684
0
    if (!argv[_i]->varname)
685
0
      continue;
686
#if 0 /* anything that can fail? */
687
    _fail = 0;
688
#endif
689
690
0
    if (!strcmp(argv[_i]->varname, "proto")) {
691
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
692
0
    }
693
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
694
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
695
0
    }
696
#if 0 /* anything that can fail? */
697
    if (_fail)
698
      vty_out (vty, "%% invalid input for %s: %s\n",
699
           argv[_i]->varname, argv[_i]->arg);
700
    _failcnt += _fail;
701
#endif
702
0
  }
703
#if 0 /* anything that can fail? */
704
  if (_failcnt)
705
    return CMD_WARNING;
706
#endif
707
0
#endif
708
0
  if (!proto) {
709
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
710
0
    return CMD_WARNING;
711
0
  }
712
713
0
  return no_ip_protocol_magic(self, vty, argc, argv, proto, rmap);
714
0
}
715
716
/* show_ip_protocol => "show ip protocol [vrf <NAME$vrf_name|all$vrf_all>]" */
717
DEFUN_CMD_FUNC_DECL(show_ip_protocol)
718
#define funcdecl_show_ip_protocol static int show_ip_protocol_magic(\
719
  const struct cmd_element *self __attribute__ ((unused)),\
720
  struct vty *vty __attribute__ ((unused)),\
721
  int argc __attribute__ ((unused)),\
722
  struct cmd_token *argv[] __attribute__ ((unused)),\
723
  const char * vrf_name,\
724
  const char * vrf_all)
725
funcdecl_show_ip_protocol;
726
DEFUN_CMD_FUNC_TEXT(show_ip_protocol)
727
0
{
728
0
#if 2 /* anything to parse? */
729
0
  int _i;
730
#if 0 /* anything that can fail? */
731
  unsigned _fail = 0, _failcnt = 0;
732
#endif
733
0
  const char *vrf_name = NULL;
734
0
  const char *vrf_all = NULL;
735
736
0
  for (_i = 0; _i < argc; _i++) {
737
0
    if (!argv[_i]->varname)
738
0
      continue;
739
#if 0 /* anything that can fail? */
740
    _fail = 0;
741
#endif
742
743
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
744
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
745
0
    }
746
0
    if (!strcmp(argv[_i]->varname, "vrf_all")) {
747
0
      vrf_all = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
748
0
    }
749
#if 0 /* anything that can fail? */
750
    if (_fail)
751
      vty_out (vty, "%% invalid input for %s: %s\n",
752
           argv[_i]->varname, argv[_i]->arg);
753
    _failcnt += _fail;
754
#endif
755
0
  }
756
#if 0 /* anything that can fail? */
757
  if (_failcnt)
758
    return CMD_WARNING;
759
#endif
760
0
#endif
761
762
0
  return show_ip_protocol_magic(self, vty, argc, argv, vrf_name, vrf_all);
763
0
}
764
765
/* ipv6_protocol => "ipv6 protocol <kernel|connected|static|ripng|ospf6|isis|bgp|nhrp|table|vnc|babel|openfabric|any> $proto route-map ROUTE-MAP$rmap" */
766
DEFUN_CMD_FUNC_DECL(ipv6_protocol)
767
#define funcdecl_ipv6_protocol static int ipv6_protocol_magic(\
768
  const struct cmd_element *self __attribute__ ((unused)),\
769
  struct vty *vty __attribute__ ((unused)),\
770
  int argc __attribute__ ((unused)),\
771
  struct cmd_token *argv[] __attribute__ ((unused)),\
772
  const char * proto,\
773
  const char * rmap)
774
funcdecl_ipv6_protocol;
775
DEFUN_CMD_FUNC_TEXT(ipv6_protocol)
776
0
{
777
0
#if 2 /* anything to parse? */
778
0
  int _i;
779
#if 0 /* anything that can fail? */
780
  unsigned _fail = 0, _failcnt = 0;
781
#endif
782
0
  const char *proto = NULL;
783
0
  const char *rmap = NULL;
784
785
0
  for (_i = 0; _i < argc; _i++) {
786
0
    if (!argv[_i]->varname)
787
0
      continue;
788
#if 0 /* anything that can fail? */
789
    _fail = 0;
790
#endif
791
792
0
    if (!strcmp(argv[_i]->varname, "proto")) {
793
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
794
0
    }
795
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
796
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
797
0
    }
798
#if 0 /* anything that can fail? */
799
    if (_fail)
800
      vty_out (vty, "%% invalid input for %s: %s\n",
801
           argv[_i]->varname, argv[_i]->arg);
802
    _failcnt += _fail;
803
#endif
804
0
  }
805
#if 0 /* anything that can fail? */
806
  if (_failcnt)
807
    return CMD_WARNING;
808
#endif
809
0
#endif
810
0
  if (!proto) {
811
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
812
0
    return CMD_WARNING;
813
0
  }
814
0
  if (!rmap) {
815
0
    vty_out(vty, "Internal CLI error [%s]\n", "rmap");
816
0
    return CMD_WARNING;
817
0
  }
818
819
0
  return ipv6_protocol_magic(self, vty, argc, argv, proto, rmap);
820
0
}
821
822
/* no_ipv6_protocol => "no ipv6 protocol <kernel|connected|static|ripng|ospf6|isis|bgp|nhrp|table|vnc|babel|openfabric|any> $proto [route-map ROUTE-MAP$rmap]" */
823
DEFUN_CMD_FUNC_DECL(no_ipv6_protocol)
824
#define funcdecl_no_ipv6_protocol static int no_ipv6_protocol_magic(\
825
  const struct cmd_element *self __attribute__ ((unused)),\
826
  struct vty *vty __attribute__ ((unused)),\
827
  int argc __attribute__ ((unused)),\
828
  struct cmd_token *argv[] __attribute__ ((unused)),\
829
  const char * proto,\
830
  const char * rmap)
831
funcdecl_no_ipv6_protocol;
832
DEFUN_CMD_FUNC_TEXT(no_ipv6_protocol)
833
0
{
834
0
#if 2 /* anything to parse? */
835
0
  int _i;
836
#if 0 /* anything that can fail? */
837
  unsigned _fail = 0, _failcnt = 0;
838
#endif
839
0
  const char *proto = NULL;
840
0
  const char *rmap = NULL;
841
842
0
  for (_i = 0; _i < argc; _i++) {
843
0
    if (!argv[_i]->varname)
844
0
      continue;
845
#if 0 /* anything that can fail? */
846
    _fail = 0;
847
#endif
848
849
0
    if (!strcmp(argv[_i]->varname, "proto")) {
850
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
851
0
    }
852
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
853
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
854
0
    }
855
#if 0 /* anything that can fail? */
856
    if (_fail)
857
      vty_out (vty, "%% invalid input for %s: %s\n",
858
           argv[_i]->varname, argv[_i]->arg);
859
    _failcnt += _fail;
860
#endif
861
0
  }
862
#if 0 /* anything that can fail? */
863
  if (_failcnt)
864
    return CMD_WARNING;
865
#endif
866
0
#endif
867
0
  if (!proto) {
868
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
869
0
    return CMD_WARNING;
870
0
  }
871
872
0
  return no_ipv6_protocol_magic(self, vty, argc, argv, proto, rmap);
873
0
}
874
875
/* show_ipv6_protocol => "show ipv6 protocol [vrf <NAME$vrf_name|all$vrf_all>]" */
876
DEFUN_CMD_FUNC_DECL(show_ipv6_protocol)
877
#define funcdecl_show_ipv6_protocol static int show_ipv6_protocol_magic(\
878
  const struct cmd_element *self __attribute__ ((unused)),\
879
  struct vty *vty __attribute__ ((unused)),\
880
  int argc __attribute__ ((unused)),\
881
  struct cmd_token *argv[] __attribute__ ((unused)),\
882
  const char * vrf_name,\
883
  const char * vrf_all)
884
funcdecl_show_ipv6_protocol;
885
DEFUN_CMD_FUNC_TEXT(show_ipv6_protocol)
886
0
{
887
0
#if 2 /* anything to parse? */
888
0
  int _i;
889
#if 0 /* anything that can fail? */
890
  unsigned _fail = 0, _failcnt = 0;
891
#endif
892
0
  const char *vrf_name = NULL;
893
0
  const char *vrf_all = NULL;
894
895
0
  for (_i = 0; _i < argc; _i++) {
896
0
    if (!argv[_i]->varname)
897
0
      continue;
898
#if 0 /* anything that can fail? */
899
    _fail = 0;
900
#endif
901
902
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
903
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
904
0
    }
905
0
    if (!strcmp(argv[_i]->varname, "vrf_all")) {
906
0
      vrf_all = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
907
0
    }
908
#if 0 /* anything that can fail? */
909
    if (_fail)
910
      vty_out (vty, "%% invalid input for %s: %s\n",
911
           argv[_i]->varname, argv[_i]->arg);
912
    _failcnt += _fail;
913
#endif
914
0
  }
915
#if 0 /* anything that can fail? */
916
  if (_failcnt)
917
    return CMD_WARNING;
918
#endif
919
0
#endif
920
921
0
  return show_ipv6_protocol_magic(self, vty, argc, argv, vrf_name, vrf_all);
922
0
}
923
924
/* ip_protocol_nht_rmap => "ip nht <kernel|connected|static|rip|ospf|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric|any> $proto route-map ROUTE-MAP$rmap" */
925
DEFUN_CMD_FUNC_DECL(ip_protocol_nht_rmap)
926
#define funcdecl_ip_protocol_nht_rmap static int ip_protocol_nht_rmap_magic(\
927
  const struct cmd_element *self __attribute__ ((unused)),\
928
  struct vty *vty __attribute__ ((unused)),\
929
  int argc __attribute__ ((unused)),\
930
  struct cmd_token *argv[] __attribute__ ((unused)),\
931
  const char * proto,\
932
  const char * rmap)
933
funcdecl_ip_protocol_nht_rmap;
934
DEFUN_CMD_FUNC_TEXT(ip_protocol_nht_rmap)
935
0
{
936
0
#if 2 /* anything to parse? */
937
0
  int _i;
938
#if 0 /* anything that can fail? */
939
  unsigned _fail = 0, _failcnt = 0;
940
#endif
941
0
  const char *proto = NULL;
942
0
  const char *rmap = NULL;
943
944
0
  for (_i = 0; _i < argc; _i++) {
945
0
    if (!argv[_i]->varname)
946
0
      continue;
947
#if 0 /* anything that can fail? */
948
    _fail = 0;
949
#endif
950
951
0
    if (!strcmp(argv[_i]->varname, "proto")) {
952
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
953
0
    }
954
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
955
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
956
0
    }
957
#if 0 /* anything that can fail? */
958
    if (_fail)
959
      vty_out (vty, "%% invalid input for %s: %s\n",
960
           argv[_i]->varname, argv[_i]->arg);
961
    _failcnt += _fail;
962
#endif
963
0
  }
964
#if 0 /* anything that can fail? */
965
  if (_failcnt)
966
    return CMD_WARNING;
967
#endif
968
0
#endif
969
0
  if (!proto) {
970
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
971
0
    return CMD_WARNING;
972
0
  }
973
0
  if (!rmap) {
974
0
    vty_out(vty, "Internal CLI error [%s]\n", "rmap");
975
0
    return CMD_WARNING;
976
0
  }
977
978
0
  return ip_protocol_nht_rmap_magic(self, vty, argc, argv, proto, rmap);
979
0
}
980
981
/* no_ip_protocol_nht_rmap => "no ip nht <kernel|connected|static|rip|ospf|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric|any> $proto route-map [ROUTE-MAP$rmap]" */
982
DEFUN_CMD_FUNC_DECL(no_ip_protocol_nht_rmap)
983
#define funcdecl_no_ip_protocol_nht_rmap static int no_ip_protocol_nht_rmap_magic(\
984
  const struct cmd_element *self __attribute__ ((unused)),\
985
  struct vty *vty __attribute__ ((unused)),\
986
  int argc __attribute__ ((unused)),\
987
  struct cmd_token *argv[] __attribute__ ((unused)),\
988
  const char * proto,\
989
  const char * rmap)
990
funcdecl_no_ip_protocol_nht_rmap;
991
DEFUN_CMD_FUNC_TEXT(no_ip_protocol_nht_rmap)
992
0
{
993
0
#if 2 /* anything to parse? */
994
0
  int _i;
995
#if 0 /* anything that can fail? */
996
  unsigned _fail = 0, _failcnt = 0;
997
#endif
998
0
  const char *proto = NULL;
999
0
  const char *rmap = NULL;
1000
1001
0
  for (_i = 0; _i < argc; _i++) {
1002
0
    if (!argv[_i]->varname)
1003
0
      continue;
1004
#if 0 /* anything that can fail? */
1005
    _fail = 0;
1006
#endif
1007
1008
0
    if (!strcmp(argv[_i]->varname, "proto")) {
1009
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1010
0
    }
1011
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
1012
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1013
0
    }
1014
#if 0 /* anything that can fail? */
1015
    if (_fail)
1016
      vty_out (vty, "%% invalid input for %s: %s\n",
1017
           argv[_i]->varname, argv[_i]->arg);
1018
    _failcnt += _fail;
1019
#endif
1020
0
  }
1021
#if 0 /* anything that can fail? */
1022
  if (_failcnt)
1023
    return CMD_WARNING;
1024
#endif
1025
0
#endif
1026
0
  if (!proto) {
1027
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
1028
0
    return CMD_WARNING;
1029
0
  }
1030
1031
0
  return no_ip_protocol_nht_rmap_magic(self, vty, argc, argv, proto, rmap);
1032
0
}
1033
1034
/* show_ip_protocol_nht => "show ip nht route-map [vrf <NAME$vrf_name|all$vrf_all>] [json]" */
1035
DEFUN_CMD_FUNC_DECL(show_ip_protocol_nht)
1036
#define funcdecl_show_ip_protocol_nht static int show_ip_protocol_nht_magic(\
1037
  const struct cmd_element *self __attribute__ ((unused)),\
1038
  struct vty *vty __attribute__ ((unused)),\
1039
  int argc __attribute__ ((unused)),\
1040
  struct cmd_token *argv[] __attribute__ ((unused)),\
1041
  const char * vrf_name,\
1042
  const char * vrf_all)
1043
funcdecl_show_ip_protocol_nht;
1044
DEFUN_CMD_FUNC_TEXT(show_ip_protocol_nht)
1045
0
{
1046
0
#if 2 /* anything to parse? */
1047
0
  int _i;
1048
#if 0 /* anything that can fail? */
1049
  unsigned _fail = 0, _failcnt = 0;
1050
#endif
1051
0
  const char *vrf_name = NULL;
1052
0
  const char *vrf_all = NULL;
1053
1054
0
  for (_i = 0; _i < argc; _i++) {
1055
0
    if (!argv[_i]->varname)
1056
0
      continue;
1057
#if 0 /* anything that can fail? */
1058
    _fail = 0;
1059
#endif
1060
1061
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
1062
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1063
0
    }
1064
0
    if (!strcmp(argv[_i]->varname, "vrf_all")) {
1065
0
      vrf_all = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1066
0
    }
1067
#if 0 /* anything that can fail? */
1068
    if (_fail)
1069
      vty_out (vty, "%% invalid input for %s: %s\n",
1070
           argv[_i]->varname, argv[_i]->arg);
1071
    _failcnt += _fail;
1072
#endif
1073
0
  }
1074
#if 0 /* anything that can fail? */
1075
  if (_failcnt)
1076
    return CMD_WARNING;
1077
#endif
1078
0
#endif
1079
1080
0
  return show_ip_protocol_nht_magic(self, vty, argc, argv, vrf_name, vrf_all);
1081
0
}
1082
1083
/* ipv6_protocol_nht_rmap => "ipv6 nht <kernel|connected|static|ripng|ospf6|isis|bgp|nhrp|table|vnc|babel|openfabric|any> $proto route-map ROUTE-MAP$rmap" */
1084
DEFUN_CMD_FUNC_DECL(ipv6_protocol_nht_rmap)
1085
#define funcdecl_ipv6_protocol_nht_rmap static int ipv6_protocol_nht_rmap_magic(\
1086
  const struct cmd_element *self __attribute__ ((unused)),\
1087
  struct vty *vty __attribute__ ((unused)),\
1088
  int argc __attribute__ ((unused)),\
1089
  struct cmd_token *argv[] __attribute__ ((unused)),\
1090
  const char * proto,\
1091
  const char * rmap)
1092
funcdecl_ipv6_protocol_nht_rmap;
1093
DEFUN_CMD_FUNC_TEXT(ipv6_protocol_nht_rmap)
1094
0
{
1095
0
#if 2 /* anything to parse? */
1096
0
  int _i;
1097
#if 0 /* anything that can fail? */
1098
  unsigned _fail = 0, _failcnt = 0;
1099
#endif
1100
0
  const char *proto = NULL;
1101
0
  const char *rmap = NULL;
1102
1103
0
  for (_i = 0; _i < argc; _i++) {
1104
0
    if (!argv[_i]->varname)
1105
0
      continue;
1106
#if 0 /* anything that can fail? */
1107
    _fail = 0;
1108
#endif
1109
1110
0
    if (!strcmp(argv[_i]->varname, "proto")) {
1111
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1112
0
    }
1113
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
1114
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1115
0
    }
1116
#if 0 /* anything that can fail? */
1117
    if (_fail)
1118
      vty_out (vty, "%% invalid input for %s: %s\n",
1119
           argv[_i]->varname, argv[_i]->arg);
1120
    _failcnt += _fail;
1121
#endif
1122
0
  }
1123
#if 0 /* anything that can fail? */
1124
  if (_failcnt)
1125
    return CMD_WARNING;
1126
#endif
1127
0
#endif
1128
0
  if (!proto) {
1129
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
1130
0
    return CMD_WARNING;
1131
0
  }
1132
0
  if (!rmap) {
1133
0
    vty_out(vty, "Internal CLI error [%s]\n", "rmap");
1134
0
    return CMD_WARNING;
1135
0
  }
1136
1137
0
  return ipv6_protocol_nht_rmap_magic(self, vty, argc, argv, proto, rmap);
1138
0
}
1139
1140
/* no_ipv6_protocol_nht_rmap => "no ipv6 nht <kernel|connected|static|ripng|ospf6|isis|bgp|nhrp|table|vnc|babel|openfabric|any> $proto [route-map ROUTE-MAP$rmap]" */
1141
DEFUN_CMD_FUNC_DECL(no_ipv6_protocol_nht_rmap)
1142
#define funcdecl_no_ipv6_protocol_nht_rmap static int no_ipv6_protocol_nht_rmap_magic(\
1143
  const struct cmd_element *self __attribute__ ((unused)),\
1144
  struct vty *vty __attribute__ ((unused)),\
1145
  int argc __attribute__ ((unused)),\
1146
  struct cmd_token *argv[] __attribute__ ((unused)),\
1147
  const char * proto,\
1148
  const char * rmap)
1149
funcdecl_no_ipv6_protocol_nht_rmap;
1150
DEFUN_CMD_FUNC_TEXT(no_ipv6_protocol_nht_rmap)
1151
0
{
1152
0
#if 2 /* anything to parse? */
1153
0
  int _i;
1154
#if 0 /* anything that can fail? */
1155
  unsigned _fail = 0, _failcnt = 0;
1156
#endif
1157
0
  const char *proto = NULL;
1158
0
  const char *rmap = NULL;
1159
1160
0
  for (_i = 0; _i < argc; _i++) {
1161
0
    if (!argv[_i]->varname)
1162
0
      continue;
1163
#if 0 /* anything that can fail? */
1164
    _fail = 0;
1165
#endif
1166
1167
0
    if (!strcmp(argv[_i]->varname, "proto")) {
1168
0
      proto = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1169
0
    }
1170
0
    if (!strcmp(argv[_i]->varname, "rmap")) {
1171
0
      rmap = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1172
0
    }
1173
#if 0 /* anything that can fail? */
1174
    if (_fail)
1175
      vty_out (vty, "%% invalid input for %s: %s\n",
1176
           argv[_i]->varname, argv[_i]->arg);
1177
    _failcnt += _fail;
1178
#endif
1179
0
  }
1180
#if 0 /* anything that can fail? */
1181
  if (_failcnt)
1182
    return CMD_WARNING;
1183
#endif
1184
0
#endif
1185
0
  if (!proto) {
1186
0
    vty_out(vty, "Internal CLI error [%s]\n", "proto");
1187
0
    return CMD_WARNING;
1188
0
  }
1189
1190
0
  return no_ipv6_protocol_nht_rmap_magic(self, vty, argc, argv, proto, rmap);
1191
0
}
1192
1193
/* show_ipv6_protocol_nht => "show ipv6 nht route-map [vrf <NAME$vrf_name|all$vrf_all>] [json]" */
1194
DEFUN_CMD_FUNC_DECL(show_ipv6_protocol_nht)
1195
#define funcdecl_show_ipv6_protocol_nht static int show_ipv6_protocol_nht_magic(\
1196
  const struct cmd_element *self __attribute__ ((unused)),\
1197
  struct vty *vty __attribute__ ((unused)),\
1198
  int argc __attribute__ ((unused)),\
1199
  struct cmd_token *argv[] __attribute__ ((unused)),\
1200
  const char * vrf_name,\
1201
  const char * vrf_all)
1202
funcdecl_show_ipv6_protocol_nht;
1203
DEFUN_CMD_FUNC_TEXT(show_ipv6_protocol_nht)
1204
0
{
1205
0
#if 2 /* anything to parse? */
1206
0
  int _i;
1207
#if 0 /* anything that can fail? */
1208
  unsigned _fail = 0, _failcnt = 0;
1209
#endif
1210
0
  const char *vrf_name = NULL;
1211
0
  const char *vrf_all = NULL;
1212
1213
0
  for (_i = 0; _i < argc; _i++) {
1214
0
    if (!argv[_i]->varname)
1215
0
      continue;
1216
#if 0 /* anything that can fail? */
1217
    _fail = 0;
1218
#endif
1219
1220
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
1221
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1222
0
    }
1223
0
    if (!strcmp(argv[_i]->varname, "vrf_all")) {
1224
0
      vrf_all = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
1225
0
    }
1226
#if 0 /* anything that can fail? */
1227
    if (_fail)
1228
      vty_out (vty, "%% invalid input for %s: %s\n",
1229
           argv[_i]->varname, argv[_i]->arg);
1230
    _failcnt += _fail;
1231
#endif
1232
0
  }
1233
#if 0 /* anything that can fail? */
1234
  if (_failcnt)
1235
    return CMD_WARNING;
1236
#endif
1237
0
#endif
1238
1239
0
  return show_ipv6_protocol_nht_magic(self, vty, argc, argv, vrf_name, vrf_all);
1240
0
}
1241