File: segment_routing.c

package info (click to toggle)
frr 10.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 77,024 kB
  • sloc: ansic: 687,126; python: 226,152; perl: 6,379; sh: 2,685; cpp: 1,883; makefile: 670; yacc: 397; lex: 363; lisp: 66; xml: 35; javascript: 8
file content (30 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: GPL-2.0-or-later
/*********************************************************************
 * Copyright 2022 Hiroki Shirokura, LINE Corporation
 * Copyright 2022 Masakazu Asama
 * Copyright 2022 6WIND S.A.
 *
 * segment_routing.c: Segment-Routing Library
 *
 * Authors
 * -------
 * Hiroki Shirokura
 * Masakazu Asama
 * Louis Scalbert
 */

#include "segment_routing.h"

const char *sr_algorithm_string(uint8_t algo)
{
	switch (algo) {
	case SR_ALGORITHM_SPF:
		return "SPF";
	case SR_ALGORITHM_STRICT_SPF:
		return "Strict SPF";
	case SR_ALGORITHM_UNSET:
		return "Unset";
	default:
		return algo >= SR_ALGORITHM_FLEX_MIN ? "Flex-Algo" : "Unknown";
	}
}