2022-11-28 10:34:10 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
/*
|
|
|
|
* This is an implementation of Segment Routing over IPv6 (SRv6) for IS-IS
|
|
|
|
* as per RFC 9352
|
|
|
|
* https://datatracker.ietf.org/doc/html/rfc9352
|
|
|
|
*
|
|
|
|
* Copyright (C) 2023 Carmine Scarpitta - University of Rome Tor Vergata
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FRR_ISIS_SRV6_H
|
|
|
|
#define _FRR_ISIS_SRV6_H
|
|
|
|
|
2023-01-18 12:21:16 +01:00
|
|
|
/* Maximum SRv6 SID Depths supported by the router */
|
|
|
|
#define SRV6_MAX_SEG_LEFT 3
|
|
|
|
#define SRV6_MAX_END_POP 3
|
|
|
|
#define SRV6_MAX_H_ENCAPS 2
|
|
|
|
#define SRV6_MAX_END_D 5
|
|
|
|
|
2023-01-16 11:14:52 +01:00
|
|
|
/* Per-area IS-IS SRv6 Data Base (SRv6 DB) */
|
|
|
|
struct isis_srv6_db {
|
2022-11-28 11:11:22 +01:00
|
|
|
|
|
|
|
/* Area SRv6 configuration. */
|
|
|
|
struct {
|
|
|
|
/* Administrative status of SRv6 */
|
|
|
|
bool enabled;
|
2023-01-18 12:21:16 +01:00
|
|
|
|
|
|
|
/* Maximum Segments Left Depth supported by the router */
|
|
|
|
uint8_t max_seg_left_msd;
|
|
|
|
|
|
|
|
/* Maximum Maximum End Pop Depth supported by the router */
|
|
|
|
uint8_t max_end_pop_msd;
|
|
|
|
|
|
|
|
/* Maximum H.Encaps supported by the router */
|
|
|
|
uint8_t max_h_encaps_msd;
|
|
|
|
|
|
|
|
/* Maximum End D MSD supported by the router */
|
|
|
|
uint8_t max_end_d_msd;
|
2022-11-28 11:11:22 +01:00
|
|
|
} config;
|
2023-01-16 11:14:52 +01:00
|
|
|
};
|
|
|
|
|
2023-01-16 11:24:29 +01:00
|
|
|
extern void isis_srv6_area_init(struct isis_area *area);
|
2022-11-28 10:59:35 +01:00
|
|
|
extern void isis_srv6_area_term(struct isis_area *area);
|
2023-01-16 11:24:29 +01:00
|
|
|
|
2022-11-30 15:06:42 +01:00
|
|
|
void isis_srv6_init(void);
|
2022-11-30 15:09:00 +01:00
|
|
|
void isis_srv6_term(void);
|
2022-11-30 15:06:42 +01:00
|
|
|
|
2022-11-28 10:34:10 +01:00
|
|
|
#endif /* _FRR_ISIS_SRV6_H */
|