]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_damp.h
Merge pull request #5717 from pguibert6WIND/flowspec_issue_redistribute
[mirror_frr.git] / bgpd / bgp_damp.h
index 8326bae697731b55ef76097423b40a8c199594ec..3dd860a29d64a0a928dd9266c0436148b0f35197 100644 (file)
@@ -43,8 +43,8 @@ struct bgp_damp_info {
        /* Time of route start to be suppressed.  */
        time_t suppress_time;
 
-       /* Back reference to bgp_info. */
-       struct bgp_info *binfo;
+       /* Back reference to bgp_path_info. */
+       struct bgp_path_info *path;
 
        /* Back reference to bgp_node. */
        struct bgp_node *rn;
@@ -106,6 +106,9 @@ struct bgp_damp_config {
 
        /* Reuse timer thread per-set base. */
        struct thread *t_reuse;
+
+       afi_t afi;
+       safi_t safi;
 };
 
 #define BGP_DAMP_NONE           0
@@ -130,20 +133,22 @@ struct bgp_damp_config {
 extern int bgp_damp_enable(struct bgp *, afi_t, safi_t, time_t, unsigned int,
                           unsigned int, time_t);
 extern int bgp_damp_disable(struct bgp *, afi_t, safi_t);
-extern int bgp_damp_withdraw(struct bgp_info *, struct bgp_node *, afi_t,
-                            safi_t, int);
-extern int bgp_damp_update(struct bgp_info *, struct bgp_node *, afi_t, safi_t);
-extern int bgp_damp_scan(struct bgp_info *, afi_t, safi_t);
-extern void bgp_damp_info_free(struct bgp_damp_info *, int);
-extern void bgp_damp_info_clean(void);
-extern int bgp_damp_decay(time_t, int);
-extern void bgp_config_write_damp(struct vty *);
-extern void bgp_damp_info_vty(struct vty *, struct bgp_info *,
-                             json_object *json_path);
+extern int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_node *rn,
+                            afi_t afi, safi_t safi, int attr_change);
+extern int bgp_damp_update(struct bgp_path_info *path, struct bgp_node *rn,
+                          afi_t afi, safi_t saff);
+extern void bgp_damp_info_free(struct bgp_damp_info *path, int withdraw,
+                              afi_t afi, safi_t safi);
+extern void bgp_damp_info_clean(afi_t afi, safi_t safi);
+extern int bgp_damp_decay(time_t, int, struct bgp_damp_config *damp);
+extern void bgp_config_write_damp(struct vty *, afi_t afi, safi_t safi);
+extern void bgp_damp_info_vty(struct vty *vty, struct bgp_path_info *path,
+                             afi_t afi, safi_t safi, json_object *json_path);
 extern const char *bgp_damp_reuse_time_vty(struct vty *vty,
-                                          struct bgp_info *binfo,
-                                          char *timebuf, size_t len,
-                                          bool use_json, json_object *json);
+                                          struct bgp_path_info *path,
+                                          char *timebuf, size_t len, afi_t afi,
+                                          safi_t safi, bool use_json,
+                                          json_object *json);
 extern int bgp_show_dampening_parameters(struct vty *vty, afi_t, safi_t);
 
 #endif /* _QUAGGA_BGP_DAMP_H */