summaryrefslogtreecommitdiff
path: root/ospfd/ospf_te.h
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_te.h')
-rw-r--r--ospfd/ospf_te.h47
1 files changed, 33 insertions, 14 deletions
diff --git a/ospfd/ospf_te.h b/ospfd/ospf_te.h
index 06c17f07fe..fc9ca20780 100644
--- a/ospfd/ospf_te.h
+++ b/ospfd/ospf_te.h
@@ -74,25 +74,29 @@
#define GMPLS 0x02
#define INTER_AS 0x04
#define PSEUDO_TE 0x08
-#define FLOOD_AREA 0x10
-#define FLOOD_AS 0x20
-#define EMULATED 0x80
+#define EMULATED 0x10
-#define IS_STD_TE(x) (x & STD_TE)
+#define IS_STD_TE(x) (x & STD_TE)
#define IS_PSEUDO_TE(x) (x & PSEUDO_TE)
#define IS_INTER_AS(x) (x & INTER_AS)
#define IS_EMULATED(x) (x & EMULATED)
-#define IS_FLOOD_AREA(x) (x & FLOOD_AREA)
-#define IS_FLOOD_AS(x) (x & FLOOD_AS)
-#define IS_INTER_AS_EMU(x) (x & INTER_AS & EMULATED)
-#define IS_INTER_AS_AS(x) (x & INTER_AS & FLOOD_AS)
/* Flags to manage TE Link LSA */
-#define LPFLG_LSA_INACTIVE 0x0
-#define LPFLG_LSA_ACTIVE 0x1
-#define LPFLG_LSA_ENGAGED 0x2
-#define LPFLG_LOOKUP_DONE 0x4
-#define LPFLG_LSA_FORCED_REFRESH 0x8
+#define LPFLG_LSA_INACTIVE 0x00
+#define LPFLG_LSA_ACTIVE 0x01
+#define LPFLG_LSA_ENGAGED 0x02
+#define LPFLG_LOOKUP_DONE 0x04
+#define LPFLG_LSA_FORCED_REFRESH 0x08
+#define LPFLG_LSA_FLOOD_AS 0x10
+
+#define IS_FLOOD_AS(x) (x & LPFLG_LSA_FLOOD_AS)
+
+/* Macro to log debug message */
+#define ote_debug(...) \
+ do { \
+ if (IS_DEBUG_OSPF_TE) \
+ zlog_debug(__VA_ARGS__); \
+ } while (0)
/*
* Following section defines TLV body parts.
@@ -336,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;
@@ -414,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 */