diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2024-05-06 17:53:18 +0200 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2024-06-13 14:54:16 +0200 |
| commit | b90cb00974ef84beff603fb0e91a7a38b3a1b6a4 (patch) | |
| tree | ebd6187bca1391904f92d351df3cc6f2805e309b /lib/zclient.c | |
| parent | 84dd482cb929d522cf12c91c2e7ec1faead848ea (diff) | |
lib: Add ZAPI command `ZEBRA_SRV6_SID_NOTIFY`
Add a new ZAPI command `ZEBRA_SRV6_SID_NOTIFY` used by zebra to send
asynchronous SRv6 SIDs notifications to zclients.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index b0e97b0f12..e4d02d743a 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -2133,6 +2133,30 @@ stream_failure: return false; } +bool zapi_srv6_sid_notify_decode(struct stream *s, struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, uint32_t *func, + uint32_t *wide_func, + enum zapi_srv6_sid_notify *note) +{ + uint32_t f, wf; + + STREAM_GET(note, s, sizeof(*note)); + STREAM_GET(ctx, s, sizeof(struct srv6_sid_ctx)); + STREAM_GET(sid_value, s, sizeof(struct in6_addr)); + STREAM_GETL(s, f); + STREAM_GETL(s, wf); + + if (func) + *func = f; + if (wide_func) + *wide_func = wf; + + return true; + +stream_failure: + return false; +} + struct nexthop *nexthop_from_zapi_nexthop(const struct zapi_nexthop *znh) { struct nexthop *n = nexthop_new(); |
