summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls.h
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-04-15 19:51:56 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-23 15:30:54 +0200
commit7758e3f31396019344d495946ba2bdd22e2544e9 (patch)
treed920ba8b03f3652b54cd280054bdecb125806836 /zebra/zebra_mpls.h
parentQuagga: Definitions for static LSPs (diff)
downloadfrr-7758e3f31396019344d495946ba2bdd22e2544e9.tar.xz
frr-7758e3f31396019344d495946ba2bdd22e2544e9.zip
Quagga: Static LSP configuration
Add support for statically configuring MPLS transit LSPs. This allows the configuration of ILM to one or more NHLFE, as defined in RFC 3031. The currently supported nexthop types are IPv4 or IPv6. The two label operations supported are swap and PHP; the latter is configured by specifying the out-label as "implicit-null". Note that the operation is against the label, so it should be the same for all NHLFEs. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-4804, ... Reviewed By: CCR-3085 Testing Done: In combination with other patches
Diffstat (limited to 'zebra/zebra_mpls.h')
-rw-r--r--zebra/zebra_mpls.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h
index b24a58e16..b62230ead 100644
--- a/zebra/zebra_mpls.h
+++ b/zebra/zebra_mpls.h
@@ -152,4 +152,60 @@ struct zebra_lsp_t_
};
+/* Function declarations. */
+
+/*
+ * Check that the label values used in LSP creation are consistent. The
+ * main criteria is that if there is ECMP, the label operation must still
+ * be consistent - i.e., all paths either do a swap or do PHP. This is due
+ * to current HW restrictions.
+ */
+int
+zebra_mpls_lsp_label_consistent (struct zebra_vrf *zvrf, mpls_label_t in_label,
+ mpls_label_t out_label, enum nexthop_types_t gtype,
+ union g_addr *gate, char *ifname, ifindex_t ifindex);
+
+/*
+ * Add static LSP entry. This may be the first entry for this incoming label
+ * or an additional nexthop; an existing entry may also have outgoing label
+ * changed.
+ * Note: The label operation (swap or PHP) is common for the LSP entry (all
+ * NHLFEs).
+ */
+int
+zebra_mpls_static_lsp_add (struct zebra_vrf *zvrf, mpls_label_t in_label,
+ mpls_label_t out_label, enum nexthop_types_t gtype,
+ union g_addr *gate, char *ifname, ifindex_t ifindex);
+
+/*
+ * Delete static LSP entry. This may be the delete of one particular
+ * NHLFE for this incoming label or the delete of the entire entry (i.e.,
+ * all NHLFEs).
+ * NOTE: Delete of the only NHLFE will also end up deleting the entire
+ * LSP configuration.
+ */
+int
+zebra_mpls_static_lsp_del (struct zebra_vrf *zvrf, mpls_label_t in_label,
+ enum nexthop_types_t gtype, union g_addr *gate,
+ char *ifname, ifindex_t ifindex);
+
+/*
+ * Display MPLS LSP configuration of all static LSPs (VTY command handler).
+ */
+int
+zebra_mpls_write_lsp_config (struct vty *vty, struct zebra_vrf *zvrf);
+
+/*
+ * Allocate MPLS tables for this VRF.
+ * NOTE: Currently supported only for default VRF.
+ */
+void
+zebra_mpls_init_tables (struct zebra_vrf *zvrf);
+
+/*
+ * Global MPLS initialization.
+ */
+void
+zebra_mpls_init (void);
+
#endif /*_ZEBRA_MPLS_H */