summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_asbr.h
diff options
context:
space:
mode:
authorrgirada <rgirada@vmware.com>2020-08-15 09:27:25 +0200
committerrgirada <rgirada@vmware.com>2020-11-02 06:10:31 +0100
commitcb2bc4cb0293fca15794c67726a87c699553cf10 (patch)
tree4fe0affd737c602a55cafe82c4189083ed398265 /ospfd/ospf_asbr.h
parentMerge pull request #7429 from opensourcerouting/rpm-subpkgs (diff)
downloadfrr-cb2bc4cb0293fca15794c67726a87c699553cf10.tar.xz
frr-cb2bc4cb0293fca15794c67726a87c699553cf10.zip
ospfd: summarisation specific data structures.
Description: Data structures definitions for summary route. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd/ospf_asbr.h')
-rw-r--r--ospfd/ospf_asbr.h51
1 files changed, 50 insertions, 1 deletions
diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h
index ede6c4790..ec02fa15a 100644
--- a/ospfd/ospf_asbr.h
+++ b/ospfd/ospf_asbr.h
@@ -50,8 +50,57 @@ struct external_info {
route_tag_t orig_tag;
struct route_map_set_values route_map_set;
-#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric
+#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric
#define ROUTEMAP_METRIC_TYPE(E) (E)->route_map_set.metric_type
+
+ /* Back pointer to summary address */
+ struct ospf_external_aggr_rt *aggr_route;
+
+ /* To identify the routes to be originated
+ * after a summary address deletion.
+ */
+ bool to_be_processed;
+};
+
+#define OSPF_EXTL_AGGR_DEFAULT_DELAY 5
+
+#define OSPF_EXTERNAL_RT_COUNT(aggr) \
+ (((struct ospf_external_aggr_rt *)aggr)->match_extnl_hash->count)
+
+enum ospf_aggr_action_t {
+ OSPF_ROUTE_AGGR_NONE = 0,
+ OSPF_ROUTE_AGGR_ADD,
+ OSPF_ROUTE_AGGR_DEL,
+ OSPF_ROUTE_AGGR_MODIFY
+};
+
+#define OSPF_SUCCESS 1
+#define OSPF_FAILURE 0
+#define OSPF_INVALID -1
+
+#define OSPF_EXTERNAL_AGGRT_NO_ADVERTISE 0x1
+#define OSPF_EXTERNAL_AGGRT_ORIGINATED 0x2
+
+/* Data structures for external route aggregator */
+struct ospf_external_aggr_rt {
+ /* Prefix. */
+ struct prefix_ipv4 p;
+
+ /* Bit 1 : Dont advertise.
+ * Bit 2 : Originated as Type-5
+ */
+ uint8_t flags;
+
+ /* Tag for summary route */
+ route_tag_t tag;
+
+ /* Action to be done at the delay
+ * timer expairy.
+ */
+ enum ospf_aggr_action_t action;
+
+ /* Hash Table of external routes */
+ struct hash *match_extnl_hash;
};
#define OSPF_ASBR_CHECK_DELAY 30