diff options
author | Mark Stapp <mjs@voltanet.io> | 2019-05-17 20:41:01 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2019-05-29 17:47:58 +0200 |
commit | 6a91ae986081b6da071464f5dc5923cd698212cd (patch) | |
tree | 4e19afaf49ddcf0a247ef2a1a0cb88276ee16168 /zebra | |
parent | Merge pull request #4414 from opensourcerouting/feature/fix-isis-warnings (diff) | |
download | frr-6a91ae986081b6da071464f5dc5923cd698212cd.tar.xz frr-6a91ae986081b6da071464f5dc5923cd698212cd.zip |
zebra: add setters for distance, instance
Add a few more 'setters' for dplane context objects.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zebra_dplane.c | 21 | ||||
-rw-r--r-- | zebra/zebra_dplane.h | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index c7f0b26b3..1707d3a68 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -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); diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h index b3fbb3672..6238026bc 100644 --- a/zebra/zebra_dplane.h +++ b/zebra/zebra_dplane.h @@ -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); |