Skip to content

Commit

Permalink
ripd/ripngd: use common header for display command
Browse files Browse the repository at this point in the history
Both rip and ripng can import routes from other protocols, e.g. ISIS.
But their header doesn't list the description for these abbreviations.

Let `show ip rip` (and `show ipv6 ripng`) uses the common header.

Before:
```
Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP
Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface
```

After:
```
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface
```

Signed-off-by: anlan_cs <[email protected]>
  • Loading branch information
anlancs committed Jun 24, 2024
1 parent 87c2f10 commit 524209e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ripd/ripd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3053,8 +3053,7 @@ DEFUN (show_ip_rip,
return CMD_SUCCESS;
}

vty_out(vty,
"Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP\n"
vty_out(vty, SHOW_ROUTE_V4_HEADER
"Sub-codes:\n"
" (n) - normal, (s) - static, (d) - default, (r) - redistribute,\n"
" (i) - interface\n\n"
Expand Down
3 changes: 1 addition & 2 deletions ripngd/ripngd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,8 +2069,7 @@ DEFUN (show_ipv6_ripng,
}

/* Header of display. */
vty_out(vty,
"Codes: R - RIPng, C - connected, S - Static, O - OSPF, B - BGP\n"
vty_out(vty, SHOW_ROUTE_V6_HEADER
"Sub-codes:\n"
" (n) - normal, (s) - static, (d) - default, (r) - redistribute,\n"
" (i) - interface, (a/S) - aggregated/Suppressed\n\n"
Expand Down

0 comments on commit 524209e

Please sign in to comment.