diff options
| author | GalaxyGorilla <sascha@netdef.org> | 2020-08-05 08:44:21 +0000 | 
|---|---|---|
| committer | GalaxyGorilla <sascha@netdef.org> | 2021-01-19 15:32:13 +0000 | 
| commit | 7fd0729f762d96ca78057ed126afdaacc0dd1fd9 (patch) | |
| tree | 0a536202b8ca9e77796d6d1ab661445e970c589d /ospfd/ospf_spf.h | |
| parent | 6351ea6ebf64524583e7a54b4af25e140109d790 (diff) | |
ospfd: TI-LFA basic infrastructure and algorithms
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
Diffstat (limited to 'ospfd/ospf_spf.h')
| -rw-r--r-- | ospfd/ospf_spf.h | 20 | 
1 files changed, 14 insertions, 6 deletions
diff --git a/ospfd/ospf_spf.h b/ospfd/ospf_spf.h index 2dc0f8b886..c679e5e71d 100644 --- a/ospfd/ospf_spf.h +++ b/ospfd/ospf_spf.h @@ -47,15 +47,15 @@ struct vertex {  	struct list *children;  /* list of children in SPF tree*/  }; -/* A nexthop taken on the root node to get to this (parent) vertex */  struct vertex_nexthop {  	struct in_addr router;     /* router address to send to */  	int lsa_pos; /* LSA position for resolving the interface */  };  struct vertex_parent { -	struct vertex_nexthop *nexthop; /* nexthop address for this parent */ -	struct vertex *parent;		/* parent vertex */ +	struct vertex_nexthop *nexthop; /* nexthop taken on the root node */ +	struct vertex_nexthop *local_nexthop; /* local nexthop of the parent */ +	struct vertex *parent;		      /* parent vertex */  	int backlink; /* index back to parent for router-lsa's */  }; @@ -77,12 +77,20 @@ extern void ospf_spf_calculate(struct ospf_area *area,  			       struct route_table *new_table,  			       struct route_table *new_rtrs, bool is_dry_run,  			       bool is_root_node); -extern int ospf_spf_calculate_areas(struct ospf *ospf, +extern void ospf_spf_calculate_area(struct ospf *ospf, struct ospf_area *area,  				    struct route_table *new_table, -				    struct route_table *new_rtrs, -				    bool is_dry_run, bool is_root_node); +				    struct route_table *new_rtrs); +extern void ospf_spf_calculate_areas(struct ospf *ospf, +				     struct route_table *new_table, +				     struct route_table *new_rtrs);  extern void ospf_rtrs_free(struct route_table *);  extern void ospf_spf_cleanup(struct vertex *spf, struct list *vertex_list); +extern void ospf_spf_copy(struct vertex *vertex, struct list *vertex_list); +extern int ospf_spf_remove_link(struct vertex *vertex, struct list *vertex_list, +				struct router_lsa_link *link); +extern struct vertex *ospf_spf_vertex_find(struct in_addr id, +					   struct list *vertex_list); +extern int vertex_parent_cmp(void *aa, void *bb);  extern void ospf_spf_print(struct vty *vty, struct vertex *v, int i);  | 
