+// 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 "lib/linklist.h"
#include "lib/thread.h"
+#include "lib/ns.h"
+
+#include "zebra/zserv.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* Table chunk struct
*/
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);
-int release_daemon_table_chunks(uint8_t proto, uint16_t instance);
-void table_manager_disable(ns_id_t ns_id);
+ uint32_t end, struct zebra_vrf *zvrf);
+int release_daemon_table_chunks(struct zserv *client);
+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 */