diff options
Diffstat (limited to 'zebra/zebra_dplane.h')
-rw-r--r-- | zebra/zebra_dplane.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h index 30dfdafdf..fede3bfcc 100644 --- a/zebra/zebra_dplane.h +++ b/zebra/zebra_dplane.h @@ -30,6 +30,7 @@ #include "zebra/rib.h" #include "zebra/zserv.h" #include "zebra/zebra_mpls.h" +#include "zebra/zebra_nhg.h" #ifdef __cplusplus extern "C" { @@ -108,6 +109,11 @@ enum dplane_op_e { DPLANE_OP_ROUTE_DELETE, DPLANE_OP_ROUTE_NOTIFY, + /* Nexthop update */ + DPLANE_OP_NH_INSTALL, + DPLANE_OP_NH_UPDATE, + DPLANE_OP_NH_DELETE, + /* LSP update */ DPLANE_OP_LSP_INSTALL, DPLANE_OP_LSP_UPDATE, @@ -269,6 +275,17 @@ const struct nexthop_group *dplane_ctx_get_ng( const struct nexthop_group *dplane_ctx_get_old_ng( const struct zebra_dplane_ctx *ctx); +/* Accessors for nexthop information */ +uint32_t dplane_ctx_get_nhe_id(const struct zebra_dplane_ctx *ctx); +afi_t dplane_ctx_get_nhe_afi(const struct zebra_dplane_ctx *ctx); +vrf_id_t dplane_ctx_get_nhe_vrf_id(const struct zebra_dplane_ctx *ctx); +int dplane_ctx_get_nhe_type(const struct zebra_dplane_ctx *ctx); +const struct nexthop_group * +dplane_ctx_get_nhe_ng(const struct zebra_dplane_ctx *ctx); +const struct nh_grp * +dplane_ctx_get_nhe_nh_grp(const struct zebra_dplane_ctx *ctx); +uint8_t dplane_ctx_get_nhe_nh_grp_count(const struct zebra_dplane_ctx *ctx); + /* Accessors for LSP information */ mpls_label_t dplane_ctx_get_in_label(const struct zebra_dplane_ctx *ctx); void dplane_ctx_set_in_label(struct zebra_dplane_ctx *ctx, @@ -373,6 +390,16 @@ enum zebra_dplane_result dplane_route_notif_update( enum dplane_op_e op, struct zebra_dplane_ctx *ctx); + +/* Forward ref of nhg_hash_entry */ +struct nhg_hash_entry; +/* + * Enqueue a nexthop change operation for the dataplane. + */ +enum zebra_dplane_result dplane_nexthop_add(struct nhg_hash_entry *nhe); +enum zebra_dplane_result dplane_nexthop_update(struct nhg_hash_entry *nhe); +enum zebra_dplane_result dplane_nexthop_delete(struct nhg_hash_entry *nhe); + /* * Enqueue LSP change operations for the dataplane. */ @@ -455,6 +482,7 @@ uint32_t dplane_get_in_queue_len(void); */ int dplane_show_helper(struct vty *vty, bool detailed); int dplane_show_provs_helper(struct vty *vty, bool detailed); +int dplane_config_write_helper(struct vty *vty); /* * Dataplane providers: modules that process or consume dataplane events. |