summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_te.h
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2021-01-05 16:05:09 +0100
committerOlivier Dugeon <olivier.dugeon@orange.com>2021-03-23 15:39:29 +0100
commitf173deb35206a09e8dc22828cb08638e289b72a5 (patch)
tree36f4e4bc522b4310510b4c3f1eed02eeebc37a38 /ospfd/ospf_te.h
parentospfd: Correct Opaque Inter-AS LSA management (diff)
downloadfrr-f173deb35206a09e8dc22828cb08638e289b72a5.tar.xz
frr-f173deb35206a09e8dc22828cb08638e289b72a5.zip
ospfd: Add Link-State support
This patch allows to store Link State Information received through the various LSAs into a dedicated Traffic Engineering Database (TED). This feature is automatically activated once mpls-te is enabled. A new CLI command `mpls-te export` permits to export the TED to other daemons through the new ZAPI Opaque Link State messages. In complement, a new CLI command `show ip ospf mpls-te database ...` output the contains of the TED to the console. Major modifications take place in ospf_te.[c, h]. File ospf_zebra.c has been modified to handle TED synchronisation request. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_te.h')
-rw-r--r--ospfd/ospf_te.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/ospfd/ospf_te.h b/ospfd/ospf_te.h
index b3a85dff6..fc9ca2078 100644
--- a/ospfd/ospf_te.h
+++ b/ospfd/ospf_te.h
@@ -340,9 +340,13 @@ struct te_link_subtlv {
/* Following structure are internal use only. */
struct ospf_mpls_te {
- /* Status of MPLS-TE: enable or disbale */
+ /* Status of MPLS-TE: enable or disable */
bool enabled;
+ /* Traffic Engineering Database i.e. Link State */
+ struct ls_ted *ted;
+ bool export;
+
/* RFC5392 */
enum inter_as_mode inter_as;
struct in_addr interas_areaid;
@@ -418,4 +422,15 @@ extern void set_linkparams_llri(struct mpls_te_link *, uint32_t, uint32_t);
extern void set_linkparams_lrrid(struct mpls_te_link *, struct in_addr,
struct in_addr);
+struct zapi_opaque_reg_info;
+/**
+ * Call when a client send a Link State Sync message. In turn, OSPF will send
+ * the contain of the Link State Data base.
+ *
+ * @param info ZAPI Opaque message information
+ *
+ * @return 0 on success, -1 otherwise
+ */
+extern int ospf_te_sync_ted(struct zapi_opaque_reg_info dst);
+
#endif /* _ZEBRA_OSPF_MPLS_TE_H */