diff options
| author | Hiroki Shirokura <hiroki.shirokura@linecorp.com> | 2021-12-12 09:43:37 +0000 | 
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-04-18 10:14:28 +0200 | 
| commit | 7f198e063c77f1be8273d0449ddf1d1caa21f368 (patch) | |
| tree | 07f579c68b3462a270f31585431cb9fe7baef4a2 /isisd/isis_flex_algo.h | |
| parent | 72eae2c3cb771b7010f3f07b6c638e9ae078bbdf (diff) | |
isisd: add isis flex-algo base interface
Adds basic functionality to Flex-Algo for IS-IS wrapping lib/flex_algo.
The configuration interface will be added in the next commit.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isis_flex_algo.h')
| -rw-r--r-- | isisd/isis_flex_algo.h | 51 | 
1 files changed, 51 insertions, 0 deletions
diff --git a/isisd/isis_flex_algo.h b/isisd/isis_flex_algo.h new file mode 100644 index 0000000000..0a0e337e01 --- /dev/null +++ b/isisd/isis_flex_algo.h @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/********************************************************************* + * Copyright 2022 Hiroki Shirokura, LINE Corporation + * Copyright 2022 Masakazu Asama + * Copyright 2022 6WIND S.A. + * + * isis_flex_algo.h: IS-IS Flexible Algorithm + * + * Authors + * ------- + * Hiroki Shirokura + * Masakazu Asama + * Louis Scalbert + */ + +#ifndef ISIS_FLEX_ALGO_H +#define ISIS_FLEX_ALGO_H + +#include "flex_algo.h" +#include "isisd/isis_constants.h" + +#ifndef FABRICD + +struct isis_flex_algo_data { +	struct isis_spftree *spftree[SPFTREE_COUNT][ISIS_LEVELS]; +	struct isis_area *area; +}; + +struct isis_flex_algo_alloc_arg { +	uint8_t algorithm; +	struct isis_area *area; +}; + +void *isis_flex_algo_data_alloc(void *arg); +void isis_flex_algo_data_free(void *data); + +struct isis_router_cap_fad * +isis_flex_algo_elected(int algorithm, const struct isis_area *area); +bool isis_flex_algo_supported(struct flex_algo *fad); +struct isis_router_cap_fad * +isis_flex_algo_elected_supported(int algorithm, const struct isis_area *area); +struct isis_router_cap_fad * +isis_flex_algo_elected_supported_local_fad(int algorithm, +					   const struct isis_area *area, +					   struct isis_router_cap_fad **fad); +struct isis_lsp; +bool sr_algorithm_participated(const struct isis_lsp *lsp, uint8_t algorithm); + +#endif /* ifndef FABRICD */ + +#endif /* ISIS_FLEX_ALGO_H */  | 
