bgpd: add bits length params to the SRv6 details

This commit adds "block-length", "node-length", "func-length" and
"arg-length" to the output of "show bgp segment-routing srv6".

Output example:

rose-srv6# show bgp segment-routing srv6
locator_name: loc1
locator_chunks:
- 2001:db8:1:1::/64
  block-length: 40
  node-length: 24
  func-length: 16
  arg-length: 0
[...]

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
Carmine Scarpitta 2022-07-23 12:23:16 +02:00
parent 527588aa78
commit dccef1273d

View File

@ -9845,8 +9845,14 @@ DEFPY (show_bgp_srv6,
vty_out(vty, "locator_name: %s\n", bgp->srv6_locator_name);
vty_out(vty, "locator_chunks:\n");
for (ALL_LIST_ELEMENTS_RO(bgp->srv6_locator_chunks, node, chunk))
for (ALL_LIST_ELEMENTS_RO(bgp->srv6_locator_chunks, node, chunk)) {
vty_out(vty, "- %pFX\n", &chunk->prefix);
vty_out(vty, " block-length: %d\n", chunk->block_bits_length);
vty_out(vty, " node-length: %d\n", chunk->node_bits_length);
vty_out(vty, " func-length: %d\n",
chunk->function_bits_length);
vty_out(vty, " arg-length: %d\n", chunk->argument_bits_length);
}
vty_out(vty, "functions:\n");
for (ALL_LIST_ELEMENTS_RO(bgp->srv6_functions, node, func)) {