summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2018-10-17 21:54:53 +0200
committerMark Stapp <mjs@voltanet.io>2019-01-22 18:02:20 +0100
commitd4cb23d7bcb876f6022dd7fe65265a38ed0ddcda (patch)
treed2fa23c03156125985b74f9712c1fd2169642370 /zebra/zebra_mpls.h
parentzebra: reorg dataplane context to support lsp info (diff)
downloadfrr-d4cb23d7bcb876f6022dd7fe65265a38ed0ddcda.tar.xz
frr-d4cb23d7bcb876f6022dd7fe65265a38ed0ddcda.zip
zebra: add apis to add and delete NHLFEs
Add public versions of zebra apis that add NHLFEs to an LSP, and that free NHLFEs. The dataplane code needs to capture/copy NHLFEs in order to do async LSP programming. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_mpls.h')
-rw-r--r--zebra/zebra_mpls.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h
index c250fc405..2c95d22c4 100644
--- a/zebra/zebra_mpls.h
+++ b/zebra/zebra_mpls.h
@@ -191,6 +191,17 @@ int zebra_mpls_lsp_install(struct zebra_vrf *zvrf, struct route_node *rn,
int zebra_mpls_lsp_uninstall(struct zebra_vrf *zvrf, struct route_node *rn,
struct route_entry *re);
+/* Add an NHLFE to an LSP, return the newly-added object */
+zebra_nhlfe_t *zebra_mpls_lsp_add_nhlfe(zebra_lsp_t *lsp,
+ enum lsp_types_t lsp_type,
+ enum nexthop_types_t gtype,
+ union g_addr *gate,
+ ifindex_t ifindex,
+ mpls_label_t out_label);
+
+/* Free an allocated NHLFE */
+void zebra_mpls_nhlfe_del(zebra_nhlfe_t *nhlfe);
+
int zebra_mpls_fec_register(struct zebra_vrf *zvrf, struct prefix *p,
uint32_t label, uint32_t label_index,
struct zserv *client);