]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/table_manager.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / table_manager.h
index 5196162c4c549e2c6cfc9fd93a5a75f6863317f9..deed4fa30b5c997c0f53c50f691ba17d520f6cd7 100644 (file)
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* zebra table Manager for routing table identifier management
  * Copyright (C) 2018 6WIND
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of 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 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 _TABLE_MANAGER_H
 
 #include "zebra/zserv.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Table chunk struct
  * Client daemon which the chunk belongs to can be identified by either
@@ -53,14 +44,23 @@ struct table_manager_chunk {
  */
 struct table_manager {
        struct list *lc_list;
+       uint32_t start;
+       uint32_t end;
 };
 
-void table_manager_enable(ns_id_t ns_id);
+void table_manager_enable(struct zebra_vrf *zvrf);
 struct table_manager_chunk *assign_table_chunk(uint8_t proto, uint16_t instance,
-                                              uint32_t size);
+                                              uint32_t size,
+                                              struct zebra_vrf *zvrf);
 int release_table_chunk(uint8_t proto, uint16_t instance, uint32_t start,
-                       uint32_t end);
+                       uint32_t end, struct zebra_vrf *zvrf);
 int release_daemon_table_chunks(struct zserv *client);
-void table_manager_disable(ns_id_t ns_id);
+void table_manager_disable(struct zebra_vrf *zvrf);
+int table_manager_range(struct vty *vty, bool add, struct zebra_vrf *zvrf,
+                       const char *min, const char *max);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _TABLE_MANAGER_H */