#include "pbr_map.h"
+#define PBR_NHC_NAMELEN PBR_MAP_NAMELEN + 10
+
struct pbr_nexthop_group_cache {
- char name[PBR_MAP_NAMELEN];
+ char name[PBR_NHC_NAMELEN];
uint32_t table_id;
extern void pbr_nht_set_tableid_range(uint32_t low, uint32_t high);
/*
- * Get the next tableid to use for installation
+ * Get the next tableid to use for installation.
+ *
+ * peek
+ * If set to true, retrieves the next ID without marking it used. The next
+ * call will return the same ID.
*/
-extern uint32_t pbr_nht_get_next_tableid(void);
+extern uint32_t pbr_nht_get_next_tableid(bool peek);
/*
* Get the next rule number to use for installation
*/
*/
extern void pbr_nht_nexthop_update(struct zapi_route *nhr);
+/*
+ * When we get a callback from zebra about an interface status update.
+ */
+extern void pbr_nht_nexthop_interface_update(struct interface *ifp);
+
extern void pbr_nht_init(void);
#endif