summaryrefslogtreecommitdiff
path: root/zebra/zebra_dplane.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_dplane.c')
-rw-r--r--zebra/zebra_dplane.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 278e894d06..4bd95ba963 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -896,6 +896,7 @@ void dplane_ctx_set_notif_provider(struct zebra_dplane_ctx *ctx,
ctx->zd_notif_provider = id;
}
+
const char *dplane_ctx_get_ifname(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -903,6 +904,16 @@ const char *dplane_ctx_get_ifname(const struct zebra_dplane_ctx *ctx)
return ctx->zd_ifname;
}
+void dplane_ctx_set_ifname(struct zebra_dplane_ctx *ctx, const char *ifname)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ if (!ifname)
+ return;
+
+ strlcpy(ctx->zd_ifname, ifname, sizeof(ctx->zd_ifname));
+}
+
ifindex_t dplane_ctx_get_ifindex(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -1310,6 +1321,13 @@ int dplane_ctx_get_pw_status(const struct zebra_dplane_ctx *ctx)
return ctx->u.pw.status;
}
+void dplane_ctx_set_pw_status(struct zebra_dplane_ctx *ctx, int status)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ ctx->u.pw.status = status;
+}
+
const union g_addr *dplane_ctx_get_pw_dest(
const struct zebra_dplane_ctx *ctx)
{