]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_nht.h
bgpd: Cleanup warnings issued by CI system from these changes
[mirror_frr.git] / bgpd / bgp_nht.h
index 4fc45e88d0bece39ad922bcdd1649ada898ebf57..7b29fa818fb566c1c4eb5f7ae4ee9e01b2e2e0f5 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING.  If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef _BGP_NHT_H
 #define _BGP_NHT_H
 
-extern void bgp_nht_register_all (vrf_id_t);
-
 /**
  * bgp_parse_nexthop_update() - parse a nexthop update message from Zebra.
  */
@@ -35,28 +32,32 @@ extern void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id);
  *   p - path for which the nexthop object is being looked up
  *   connected - True if NH MUST be a connected route
  */
-extern int bgp_find_nexthop(struct bgp_info *p, int connected);
+extern int bgp_find_nexthop(struct bgp_path_info *p, int connected);
 
 /**
  * bgp_find_or_add_nexthop() - lookup the nexthop cache table for the bnc
  *  object. If not found, create a new object and register with ZEBRA for
  *  nexthop notification.
  * ARGUMENTS:
- *   bgp - BGP instance
+ *   bgp_route - BGP instance of route
+ *   bgp_nexthop - BGP instance of nexthop
  *   a - afi: AFI_IP or AF_IP6
  *   p - path for which the nexthop object is being looked up
  *   peer - The BGP peer associated with this NHT
  *   connected - True if NH MUST be a connected route
  */
-extern int bgp_find_or_add_nexthop(struct bgp *bgp, afi_t a,
-                       struct bgp_info *p, struct peer *peer, int connected);
+extern int bgp_find_or_add_nexthop(struct bgp *bgp_route,
+                                  struct bgp *bgp_nexthop, afi_t a,
+                                  struct bgp_path_info *p, struct peer *peer,
+                                  int connected);
 
 /**
  * bgp_unlink_nexthop() - Unlink the nexthop object from the path structure.
  * ARGUMENTS:
  *   p - path structure.
  */
-extern void bgp_unlink_nexthop(struct bgp_info *p);
+extern void bgp_unlink_nexthop(struct bgp_path_info *p);
+void bgp_unlink_nexthop_by_peer(struct peer *peer);
 
 /**
  * bgp_delete_connected_nexthop() - Reset the 'peer' pointer for a connected
@@ -66,6 +67,12 @@ extern void bgp_unlink_nexthop(struct bgp_info *p);
  *   afi - afi: AFI_IP or AF_IP6
  *   peer - Ptr to peer
  */
-extern void bgp_delete_connected_nexthop (afi_t afi, struct peer *peer);
+extern void bgp_delete_connected_nexthop(afi_t afi, struct peer *peer);
+
+/*
+ * Cleanup nexthop registration and status information for BGP nexthops
+ * pertaining to this VRF. This is invoked upon VRF deletion.
+ */
+extern void bgp_cleanup_nexthops(struct bgp *bgp);
 
 #endif /* _BGP_NHT_H */