]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: add setters for distance, instance 4415/head
authorMark Stapp <mjs@voltanet.io>
Fri, 17 May 2019 18:41:01 +0000 (14:41 -0400)
committerMark Stapp <mjs@voltanet.io>
Wed, 29 May 2019 15:47:58 +0000 (11:47 -0400)
Add a few more 'setters' for dplane context objects.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_dplane.c
zebra/zebra_dplane.h

index c7f0b26b319a669d1ff8d28b6b826041db2b7e34..1707d3a68b6dff3751de6d6606fb31a8efe96379 100644 (file)
@@ -811,6 +811,13 @@ route_tag_t dplane_ctx_get_tag(const struct zebra_dplane_ctx *ctx)
        return ctx->u.rinfo.zd_tag;
 }
 
+void dplane_ctx_set_tag(struct zebra_dplane_ctx *ctx, route_tag_t tag)
+{
+       DPLANE_CTX_VALID(ctx);
+
+       ctx->u.rinfo.zd_tag = tag;
+}
+
 route_tag_t dplane_ctx_get_old_tag(const struct zebra_dplane_ctx *ctx)
 {
        DPLANE_CTX_VALID(ctx);
@@ -825,6 +832,13 @@ uint16_t dplane_ctx_get_instance(const struct zebra_dplane_ctx *ctx)
        return ctx->u.rinfo.zd_instance;
 }
 
+void dplane_ctx_set_instance(struct zebra_dplane_ctx *ctx, uint16_t instance)
+{
+       DPLANE_CTX_VALID(ctx);
+
+       ctx->u.rinfo.zd_instance = instance;
+}
+
 uint16_t dplane_ctx_get_old_instance(const struct zebra_dplane_ctx *ctx)
 {
        DPLANE_CTX_VALID(ctx);
@@ -867,6 +881,13 @@ uint8_t dplane_ctx_get_distance(const struct zebra_dplane_ctx *ctx)
        return ctx->u.rinfo.zd_distance;
 }
 
+void dplane_ctx_set_distance(struct zebra_dplane_ctx *ctx, uint8_t distance)
+{
+       DPLANE_CTX_VALID(ctx);
+
+       ctx->u.rinfo.zd_distance = distance;
+}
+
 uint8_t dplane_ctx_get_old_distance(const struct zebra_dplane_ctx *ctx)
 {
        DPLANE_CTX_VALID(ctx);
index b3fbb3672dd1457d9990fce669250cceb983a8b0..6238026bcfcf542979da3a9695fd9b957426918c 100644 (file)
@@ -218,14 +218,17 @@ safi_t dplane_ctx_get_safi(const struct zebra_dplane_ctx *ctx);
 void dplane_ctx_set_table(struct zebra_dplane_ctx *ctx, uint32_t table);
 uint32_t dplane_ctx_get_table(const struct zebra_dplane_ctx *ctx);
 route_tag_t dplane_ctx_get_tag(const struct zebra_dplane_ctx *ctx);
+void dplane_ctx_set_tag(struct zebra_dplane_ctx *ctx, route_tag_t tag);
 route_tag_t dplane_ctx_get_old_tag(const struct zebra_dplane_ctx *ctx);
 uint16_t dplane_ctx_get_instance(const struct zebra_dplane_ctx *ctx);
+void dplane_ctx_set_instance(struct zebra_dplane_ctx *ctx, uint16_t instance);
 uint16_t dplane_ctx_get_old_instance(const struct zebra_dplane_ctx *ctx);
 uint32_t dplane_ctx_get_metric(const struct zebra_dplane_ctx *ctx);
 uint32_t dplane_ctx_get_old_metric(const struct zebra_dplane_ctx *ctx);
 uint32_t dplane_ctx_get_mtu(const struct zebra_dplane_ctx *ctx);
 uint32_t dplane_ctx_get_nh_mtu(const struct zebra_dplane_ctx *ctx);
 uint8_t dplane_ctx_get_distance(const struct zebra_dplane_ctx *ctx);
+void dplane_ctx_set_distance(struct zebra_dplane_ctx *ctx, uint8_t distance);
 uint8_t dplane_ctx_get_old_distance(const struct zebra_dplane_ctx *ctx);
 
 void dplane_ctx_set_nexthops(struct zebra_dplane_ctx *ctx, struct nexthop *nh);