summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c24
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();