Coverage Report

Created: 2026-10-19 07:02

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/frr/zebra/interface_clippy.c
Line
Count
Source
1
/* show_interface => "show interface vrf NAME$vrf_name [brief$brief] [json$uj]" */
2
DEFUN_CMD_FUNC_DECL(show_interface)
3
#define funcdecl_show_interface static int show_interface_magic(\
4
  const struct cmd_element *self __attribute__ ((unused)),\
5
  struct vty *vty __attribute__ ((unused)),\
6
  int argc __attribute__ ((unused)),\
7
  struct cmd_token *argv[] __attribute__ ((unused)),\
8
  const char * vrf_name,\
9
  const char * brief,\
10
  const char * uj)
11
funcdecl_show_interface;
12
DEFUN_CMD_FUNC_TEXT(show_interface)
13
0
{
14
0
#if 3 /* anything to parse? */
15
0
  int _i;
16
#if 0 /* anything that can fail? */
17
  unsigned _fail = 0, _failcnt = 0;
18
#endif
19
0
  const char *vrf_name = NULL;
20
0
  const char *brief = NULL;
21
0
  const char *uj = NULL;
22
23
0
  for (_i = 0; _i < argc; _i++) {
24
0
    if (!argv[_i]->varname)
25
0
      continue;
26
#if 0 /* anything that can fail? */
27
    _fail = 0;
28
#endif
29
30
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
31
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
32
0
    }
33
0
    if (!strcmp(argv[_i]->varname, "brief")) {
34
0
      brief = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
35
0
    }
36
0
    if (!strcmp(argv[_i]->varname, "uj")) {
37
0
      uj = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
38
0
    }
39
#if 0 /* anything that can fail? */
40
    if (_fail)
41
      vty_out (vty, "%% invalid input for %s: %s\n",
42
           argv[_i]->varname, argv[_i]->arg);
43
    _failcnt += _fail;
44
#endif
45
0
  }
46
#if 0 /* anything that can fail? */
47
  if (_failcnt)
48
    return CMD_WARNING;
49
#endif
50
0
#endif
51
0
  if (!vrf_name) {
52
0
    vty_out(vty, "Internal CLI error [%s]\n", "vrf_name");
53
0
    return CMD_WARNING;
54
0
  }
55
56
0
  return show_interface_magic(self, vty, argc, argv, vrf_name, brief, uj);
57
0
}
58
59
/* show_interface_vrf_all => "show interface [vrf all] [brief$brief] [json$uj]" */
60
DEFUN_CMD_FUNC_DECL(show_interface_vrf_all)
61
#define funcdecl_show_interface_vrf_all static int show_interface_vrf_all_magic(\
62
  const struct cmd_element *self __attribute__ ((unused)),\
63
  struct vty *vty __attribute__ ((unused)),\
64
  int argc __attribute__ ((unused)),\
65
  struct cmd_token *argv[] __attribute__ ((unused)),\
66
  const char * brief,\
67
  const char * uj)
68
funcdecl_show_interface_vrf_all;
69
DEFUN_CMD_FUNC_TEXT(show_interface_vrf_all)
70
0
{
71
0
#if 2 /* anything to parse? */
72
0
  int _i;
73
#if 0 /* anything that can fail? */
74
  unsigned _fail = 0, _failcnt = 0;
75
#endif
76
0
  const char *brief = NULL;
77
0
  const char *uj = NULL;
78
79
0
  for (_i = 0; _i < argc; _i++) {
80
0
    if (!argv[_i]->varname)
81
0
      continue;
82
#if 0 /* anything that can fail? */
83
    _fail = 0;
84
#endif
85
86
0
    if (!strcmp(argv[_i]->varname, "brief")) {
87
0
      brief = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
88
0
    }
89
0
    if (!strcmp(argv[_i]->varname, "uj")) {
90
0
      uj = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
91
0
    }
92
#if 0 /* anything that can fail? */
93
    if (_fail)
94
      vty_out (vty, "%% invalid input for %s: %s\n",
95
           argv[_i]->varname, argv[_i]->arg);
96
    _failcnt += _fail;
97
#endif
98
0
  }
99
#if 0 /* anything that can fail? */
100
  if (_failcnt)
101
    return CMD_WARNING;
102
#endif
103
0
#endif
104
105
0
  return show_interface_vrf_all_magic(self, vty, argc, argv, brief, uj);
106
0
}
107
108
/* show_interface_name_vrf => "show interface IFNAME$ifname vrf NAME$vrf_name [json$uj]" */
109
DEFUN_CMD_FUNC_DECL(show_interface_name_vrf)
110
#define funcdecl_show_interface_name_vrf static int show_interface_name_vrf_magic(\
111
  const struct cmd_element *self __attribute__ ((unused)),\
112
  struct vty *vty __attribute__ ((unused)),\
113
  int argc __attribute__ ((unused)),\
114
  struct cmd_token *argv[] __attribute__ ((unused)),\
115
  const char * ifname,\
116
  const char * vrf_name,\
117
  const char * uj)
118
funcdecl_show_interface_name_vrf;
119
DEFUN_CMD_FUNC_TEXT(show_interface_name_vrf)
120
0
{
121
0
#if 3 /* anything to parse? */
122
0
  int _i;
123
#if 0 /* anything that can fail? */
124
  unsigned _fail = 0, _failcnt = 0;
125
#endif
126
0
  const char *ifname = NULL;
127
0
  const char *vrf_name = NULL;
128
0
  const char *uj = NULL;
129
130
0
  for (_i = 0; _i < argc; _i++) {
131
0
    if (!argv[_i]->varname)
132
0
      continue;
133
#if 0 /* anything that can fail? */
134
    _fail = 0;
135
#endif
136
137
0
    if (!strcmp(argv[_i]->varname, "ifname")) {
138
0
      ifname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
139
0
    }
140
0
    if (!strcmp(argv[_i]->varname, "vrf_name")) {
141
0
      vrf_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
142
0
    }
143
0
    if (!strcmp(argv[_i]->varname, "uj")) {
144
0
      uj = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
145
0
    }
146
#if 0 /* anything that can fail? */
147
    if (_fail)
148
      vty_out (vty, "%% invalid input for %s: %s\n",
149
           argv[_i]->varname, argv[_i]->arg);
150
    _failcnt += _fail;
151
#endif
152
0
  }
153
#if 0 /* anything that can fail? */
154
  if (_failcnt)
155
    return CMD_WARNING;
156
#endif
157
0
#endif
158
0
  if (!ifname) {
159
0
    vty_out(vty, "Internal CLI error [%s]\n", "ifname");
160
0
    return CMD_WARNING;
161
0
  }
162
0
  if (!vrf_name) {
163
0
    vty_out(vty, "Internal CLI error [%s]\n", "vrf_name");
164
0
    return CMD_WARNING;
165
0
  }
166
167
0
  return show_interface_name_vrf_magic(self, vty, argc, argv, ifname, vrf_name, uj);
168
0
}
169
170
/* show_interface_name_vrf_all => "show interface IFNAME$ifname [vrf all] [json$uj]" */
171
DEFUN_CMD_FUNC_DECL(show_interface_name_vrf_all)
172
#define funcdecl_show_interface_name_vrf_all static int show_interface_name_vrf_all_magic(\
173
  const struct cmd_element *self __attribute__ ((unused)),\
174
  struct vty *vty __attribute__ ((unused)),\
175
  int argc __attribute__ ((unused)),\
176
  struct cmd_token *argv[] __attribute__ ((unused)),\
177
  const char * ifname,\
178
  const char * uj)
179
funcdecl_show_interface_name_vrf_all;
180
DEFUN_CMD_FUNC_TEXT(show_interface_name_vrf_all)
181
0
{
182
0
#if 2 /* anything to parse? */
183
0
  int _i;
184
#if 0 /* anything that can fail? */
185
  unsigned _fail = 0, _failcnt = 0;
186
#endif
187
0
  const char *ifname = NULL;
188
0
  const char *uj = NULL;
189
190
0
  for (_i = 0; _i < argc; _i++) {
191
0
    if (!argv[_i]->varname)
192
0
      continue;
193
#if 0 /* anything that can fail? */
194
    _fail = 0;
195
#endif
196
197
0
    if (!strcmp(argv[_i]->varname, "ifname")) {
198
0
      ifname = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
199
0
    }
200
0
    if (!strcmp(argv[_i]->varname, "uj")) {
201
0
      uj = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
202
0
    }
203
#if 0 /* anything that can fail? */
204
    if (_fail)
205
      vty_out (vty, "%% invalid input for %s: %s\n",
206
           argv[_i]->varname, argv[_i]->arg);
207
    _failcnt += _fail;
208
#endif
209
0
  }
210
#if 0 /* anything that can fail? */
211
  if (_failcnt)
212
    return CMD_WARNING;
213
#endif
214
0
#endif
215
0
  if (!ifname) {
216
0
    vty_out(vty, "Internal CLI error [%s]\n", "ifname");
217
0
    return CMD_WARNING;
218
0
  }
219
220
0
  return show_interface_name_vrf_all_magic(self, vty, argc, argv, ifname, uj);
221
0
}
222
223
/* mpls => "[no] mpls enable" */
224
DEFUN_CMD_FUNC_DECL(mpls)
225
#define funcdecl_mpls static int mpls_magic(\
226
  const struct cmd_element *self __attribute__ ((unused)),\
227
  struct vty *vty __attribute__ ((unused)),\
228
  int argc __attribute__ ((unused)),\
229
  struct cmd_token *argv[] __attribute__ ((unused)),\
230
  const char * no)
231
funcdecl_mpls;
232
DEFUN_CMD_FUNC_TEXT(mpls)
233
0
{
234
0
#if 1 /* anything to parse? */
235
0
  int _i;
236
#if 0 /* anything that can fail? */
237
  unsigned _fail = 0, _failcnt = 0;
238
#endif
239
0
  const char *no = NULL;
240
241
0
  for (_i = 0; _i < argc; _i++) {
242
0
    if (!argv[_i]->varname)
243
0
      continue;
244
#if 0 /* anything that can fail? */
245
    _fail = 0;
246
#endif
247
248
0
    if (!strcmp(argv[_i]->varname, "no")) {
249
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
250
0
    }
251
#if 0 /* anything that can fail? */
252
    if (_fail)
253
      vty_out (vty, "%% invalid input for %s: %s\n",
254
           argv[_i]->varname, argv[_i]->arg);
255
    _failcnt += _fail;
256
#endif
257
0
  }
258
#if 0 /* anything that can fail? */
259
  if (_failcnt)
260
    return CMD_WARNING;
261
#endif
262
0
#endif
263
264
0
  return mpls_magic(self, vty, argc, argv, no);
265
0
}
266
267
/* link_params_admin_grp => "admin-grp BITPATTERN" */
268
DEFUN_CMD_FUNC_DECL(link_params_admin_grp)
269
#define funcdecl_link_params_admin_grp static int link_params_admin_grp_magic(\
270
  const struct cmd_element *self __attribute__ ((unused)),\
271
  struct vty *vty __attribute__ ((unused)),\
272
  int argc __attribute__ ((unused)),\
273
  struct cmd_token *argv[] __attribute__ ((unused)),\
274
  const char * bitpattern)
275
funcdecl_link_params_admin_grp;
276
DEFUN_CMD_FUNC_TEXT(link_params_admin_grp)
277
0
{
278
0
#if 1 /* anything to parse? */
279
0
  int _i;
280
#if 0 /* anything that can fail? */
281
  unsigned _fail = 0, _failcnt = 0;
282
#endif
283
0
  const char *bitpattern = NULL;
284
285
0
  for (_i = 0; _i < argc; _i++) {
286
0
    if (!argv[_i]->varname)
287
0
      continue;
288
#if 0 /* anything that can fail? */
289
    _fail = 0;
290
#endif
291
292
0
    if (!strcmp(argv[_i]->varname, "bitpattern")) {
293
0
      bitpattern = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
294
0
    }
295
#if 0 /* anything that can fail? */
296
    if (_fail)
297
      vty_out (vty, "%% invalid input for %s: %s\n",
298
           argv[_i]->varname, argv[_i]->arg);
299
    _failcnt += _fail;
300
#endif
301
0
  }
302
#if 0 /* anything that can fail? */
303
  if (_failcnt)
304
    return CMD_WARNING;
305
#endif
306
0
#endif
307
0
  if (!bitpattern) {
308
0
    vty_out(vty, "Internal CLI error [%s]\n", "bitpattern");
309
0
    return CMD_WARNING;
310
0
  }
311
312
0
  return link_params_admin_grp_magic(self, vty, argc, argv, bitpattern);
313
0
}
314
315
/* no_link_params_admin_grp => "no admin-grp" */
316
DEFUN_CMD_FUNC_DECL(no_link_params_admin_grp)
317
#define funcdecl_no_link_params_admin_grp static int no_link_params_admin_grp_magic(\
318
  const struct cmd_element *self __attribute__ ((unused)),\
319
  struct vty *vty __attribute__ ((unused)),\
320
  int argc __attribute__ ((unused)),\
321
  struct cmd_token *argv[] __attribute__ ((unused)))
322
funcdecl_no_link_params_admin_grp;
323
DEFUN_CMD_FUNC_TEXT(no_link_params_admin_grp)
324
0
{
325
#if 0 /* anything to parse? */
326
  int _i;
327
#if 0 /* anything that can fail? */
328
  unsigned _fail = 0, _failcnt = 0;
329
#endif
330
331
  for (_i = 0; _i < argc; _i++) {
332
    if (!argv[_i]->varname)
333
      continue;
334
#if 0 /* anything that can fail? */
335
    _fail = 0;
336
#endif
337
338
#if 0 /* anything that can fail? */
339
    if (_fail)
340
      vty_out (vty, "%% invalid input for %s: %s\n",
341
           argv[_i]->varname, argv[_i]->arg);
342
    _failcnt += _fail;
343
#endif
344
  }
345
#if 0 /* anything that can fail? */
346
  if (_failcnt)
347
    return CMD_WARNING;
348
#endif
349
#endif
350
351
0
  return no_link_params_admin_grp_magic(self, vty, argc, argv);
352
0
}
353
354
/* link_params_affinity => "[no] affinity NAME..." */
355
DEFUN_CMD_FUNC_DECL(link_params_affinity)
356
#define funcdecl_link_params_affinity static int link_params_affinity_magic(\
357
  const struct cmd_element *self __attribute__ ((unused)),\
358
  struct vty *vty __attribute__ ((unused)),\
359
  int argc __attribute__ ((unused)),\
360
  struct cmd_token *argv[] __attribute__ ((unused)),\
361
  const char * no)
362
funcdecl_link_params_affinity;
363
DEFUN_CMD_FUNC_TEXT(link_params_affinity)
364
0
{
365
0
#if 1 /* anything to parse? */
366
0
  int _i;
367
#if 0 /* anything that can fail? */
368
  unsigned _fail = 0, _failcnt = 0;
369
#endif
370
0
  const char *no = NULL;
371
372
0
  for (_i = 0; _i < argc; _i++) {
373
0
    if (!argv[_i]->varname)
374
0
      continue;
375
#if 0 /* anything that can fail? */
376
    _fail = 0;
377
#endif
378
379
0
    if (!strcmp(argv[_i]->varname, "no")) {
380
0
      no = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
381
0
    }
382
#if 0 /* anything that can fail? */
383
    if (_fail)
384
      vty_out (vty, "%% invalid input for %s: %s\n",
385
           argv[_i]->varname, argv[_i]->arg);
386
    _failcnt += _fail;
387
#endif
388
0
  }
389
#if 0 /* anything that can fail? */
390
  if (_failcnt)
391
    return CMD_WARNING;
392
#endif
393
0
#endif
394
395
0
  return link_params_affinity_magic(self, vty, argc, argv, no);
396
0
}
397
398
/* link_params_affinity_mode => "affinity-mode <standard|extended|both>$affmode" */
399
DEFUN_CMD_FUNC_DECL(link_params_affinity_mode)
400
#define funcdecl_link_params_affinity_mode static int link_params_affinity_mode_magic(\
401
  const struct cmd_element *self __attribute__ ((unused)),\
402
  struct vty *vty __attribute__ ((unused)),\
403
  int argc __attribute__ ((unused)),\
404
  struct cmd_token *argv[] __attribute__ ((unused)),\
405
  const char * affmode)
406
funcdecl_link_params_affinity_mode;
407
DEFUN_CMD_FUNC_TEXT(link_params_affinity_mode)
408
0
{
409
0
#if 1 /* anything to parse? */
410
0
  int _i;
411
#if 0 /* anything that can fail? */
412
  unsigned _fail = 0, _failcnt = 0;
413
#endif
414
0
  const char *affmode = NULL;
415
416
0
  for (_i = 0; _i < argc; _i++) {
417
0
    if (!argv[_i]->varname)
418
0
      continue;
419
#if 0 /* anything that can fail? */
420
    _fail = 0;
421
#endif
422
423
0
    if (!strcmp(argv[_i]->varname, "affmode")) {
424
0
      affmode = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
425
0
    }
426
#if 0 /* anything that can fail? */
427
    if (_fail)
428
      vty_out (vty, "%% invalid input for %s: %s\n",
429
           argv[_i]->varname, argv[_i]->arg);
430
    _failcnt += _fail;
431
#endif
432
0
  }
433
#if 0 /* anything that can fail? */
434
  if (_failcnt)
435
    return CMD_WARNING;
436
#endif
437
0
#endif
438
0
  if (!affmode) {
439
0
    vty_out(vty, "Internal CLI error [%s]\n", "affmode");
440
0
    return CMD_WARNING;
441
0
  }
442
443
0
  return link_params_affinity_mode_magic(self, vty, argc, argv, affmode);
444
0
}
445
446
/* no_link_params_affinity_mode => "no affinity-mode [<standard|extended|both>]" */
447
DEFUN_CMD_FUNC_DECL(no_link_params_affinity_mode)
448
#define funcdecl_no_link_params_affinity_mode static int no_link_params_affinity_mode_magic(\
449
  const struct cmd_element *self __attribute__ ((unused)),\
450
  struct vty *vty __attribute__ ((unused)),\
451
  int argc __attribute__ ((unused)),\
452
  struct cmd_token *argv[] __attribute__ ((unused)))
453
funcdecl_no_link_params_affinity_mode;
454
DEFUN_CMD_FUNC_TEXT(no_link_params_affinity_mode)
455
0
{
456
#if 0 /* anything to parse? */
457
  int _i;
458
#if 0 /* anything that can fail? */
459
  unsigned _fail = 0, _failcnt = 0;
460
#endif
461
462
  for (_i = 0; _i < argc; _i++) {
463
    if (!argv[_i]->varname)
464
      continue;
465
#if 0 /* anything that can fail? */
466
    _fail = 0;
467
#endif
468
469
#if 0 /* anything that can fail? */
470
    if (_fail)
471
      vty_out (vty, "%% invalid input for %s: %s\n",
472
           argv[_i]->varname, argv[_i]->arg);
473
    _failcnt += _fail;
474
#endif
475
  }
476
#if 0 /* anything that can fail? */
477
  if (_failcnt)
478
    return CMD_WARNING;
479
#endif
480
#endif
481
482
0
  return no_link_params_affinity_mode_magic(self, vty, argc, argv);
483
0
}
484