summaryrefslogtreecommitdiff
path: root/lib/flex_algo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/flex_algo.h')
-rw-r--r--lib/flex_algo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/flex_algo.h b/lib/flex_algo.h
index e012f46862..e617e7cae8 100644
--- a/lib/flex_algo.h
+++ b/lib/flex_algo.h
@@ -83,6 +83,11 @@ struct flex_algo {
#define FLEX_ALGO_IP 0x04
uint8_t dataplanes;
+ /* True if the Algorithm is locally enabled (ie. a definition has been
+ * found and is supported).
+ */
+ bool state;
+
/*
* This property can be freely extended among different routing
* protocols. Since Flex-Algo is an IGP protocol agnostic, both IS-IS
@@ -107,6 +112,7 @@ struct flex_algos {
*/
struct flex_algos *flex_algos_alloc(flex_algo_allocator_t allocator,
flex_algo_releaser_t releaser);
+void flex_algos_free(struct flex_algos *flex_algos);
struct flex_algo *flex_algo_alloc(struct flex_algos *flex_algos,
uint8_t algorithm, void *arg);
struct flex_algo *flex_algo_lookup(struct flex_algos *flex_algos,
@@ -118,4 +124,8 @@ bool flex_algo_id_valid(uint16_t algorithm);
char *flex_algo_metric_type_print(char *type_str, size_t sz,
enum flex_algo_metric_type metric_type);
+bool flex_algo_get_state(struct flex_algos *flex_algos, uint8_t algorithm);
+
+void flex_algo_set_state(struct flex_algos *flex_algos, uint8_t algorithm,
+ bool state);
#endif /* _FRR_FLEX_ALGO_H */