lib,zebra: Send SRv6 locator flags over the ZAPI

In this commit, we extend the ZAPI to support encoding and decoding the
locator flags contained in the messages exchanged between zebra and the
routing daemons.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
Carmine Scarpitta 2022-10-27 18:58:39 +02:00
parent 02b1544a5c
commit d537287a48
2 changed files with 3 additions and 0 deletions

View File

@ -1088,6 +1088,7 @@ int zapi_srv6_locator_chunk_encode(struct stream *s,
stream_putc(s, c->node_bits_length);
stream_putc(s, c->function_bits_length);
stream_putc(s, c->argument_bits_length);
stream_putc(s, c->flags);
return 0;
}
@ -1109,6 +1110,7 @@ int zapi_srv6_locator_chunk_decode(struct stream *s,
STREAM_GETC(s, c->node_bits_length);
STREAM_GETC(s, c->function_bits_length);
STREAM_GETC(s, c->argument_bits_length);
STREAM_GETC(s, c->flags);
return 0;
stream_failure:

View File

@ -2709,6 +2709,7 @@ int zsend_srv6_manager_get_locator_chunk_response(struct zserv *client,
chunk.keep = 0;
chunk.proto = client->proto;
chunk.instance = client->instance;
chunk.flags = loc->flags;
zclient_create_header(s, ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK, vrf_id);
zapi_srv6_locator_chunk_encode(s, &chunk);