ospfd: summarisation specific data structures.

Description:
Data structures definitions for summary route.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
This commit is contained in:
rgirada 2020-08-15 00:27:25 -07:00
parent d65c0a679a
commit cb2bc4cb02
3 changed files with 67 additions and 1 deletions

View File

@ -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

View File

@ -49,6 +49,7 @@
#define OSPF_DEBUG_LSA_INSTALL 0x04
#define OSPF_DEBUG_LSA_REFRESH 0x08
#define OSPF_DEBUG_LSA 0x0F
#define OSPF_DEBUG_EXTNL_LSA_AGGR 0x10
#define OSPF_DEBUG_ZEBRA_INTERFACE 0x01
#define OSPF_DEBUG_ZEBRA_REDISTRIBUTE 0x02

View File

@ -355,6 +355,22 @@ struct ospf {
/* last HELPER exit reason */
uint32_t last_exit_reason;
/* delay timer to process external routes
* with summary address.
*/
struct thread *t_external_aggr;
/* delay interval in seconds */
unsigned int aggr_delay_interval;
/* Table of configured Aggregate addresses */
struct route_table *rt_aggr_tbl;
/* used as argument for aggr delay
* timer thread.
*/
int aggr_action;
/* MPLS LDP-IGP Sync */
struct ldp_sync_info_cmd ldp_sync_cmd;