summaryrefslogtreecommitdiff
path: root/conf/conf.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2022-09-15 01:38:18 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-10-04 13:01:21 +0200
commit333ddd4f981b90d5d3dff166b6abf9bf40bede9f (patch)
treecfe873631d254b9198d7040a7f922f65d158f15d /conf/conf.h
parente55696a4f88b63c622bb3a0360f9114d01253e53 (diff)
MPLS subsystem
The MPLS subsystem manages MPLS labels and handles their allocation to MPLS-aware routing protocols. These labels are then attached to IP or VPN routes representing label switched paths -- LSPs. There was already a preliminary MPLS support consisting of MPLS label net_addr, MPLS routing tables with static MPLS routes, remote labels in next hops, and kernel protocol support. This patch adds the MPLS domain as a basic structure representing local label space with dynamic label allocator and configurable label ranges. To represent LSPs, allocated local labels can be attached as route attributes to IP or VPN routes with local labels as attributes. There are several steps for handling LSP routes in routing protocols -- deciding to which forwarding equivalence class (FEC) the LSP route belongs, allocating labels for new FECs, announcing MPLS routes for new FECs, attaching labels to LSP routes. The FEC map structure implements basic code for managing FECs in routing protocols, therefore existing protocols can be made MPLS-aware by adding FEC map and delegating most work related to local label management to it.
Diffstat (limited to 'conf/conf.h')
-rw-r--r--conf/conf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/conf/conf.h b/conf/conf.h
index b07b417c..8fd6713e 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -21,6 +21,7 @@ struct config {
linpool *mem; /* Linear pool containing configuration data */
list protos; /* Configured protocol instances (struct proto_config) */
list tables; /* Configured routing tables (struct rtable_config) */
+ list mpls_domains; /* Configured MPLS domains (struct mpls_domain_config) */
list logfiles; /* Configured log files (sysdep) */
list tests; /* Configured unit tests (f_bt_test_suite) */
list symbols; /* Configured symbols in config order */
@@ -128,6 +129,8 @@ struct symbol {
const struct filter *filter; /* For SYM_FILTER */
struct rtable_config *table; /* For SYM_TABLE */
struct f_dynamic_attr *attribute; /* For SYM_ATTRIBUTE */
+ struct mpls_domain_config *mpls_domain; /* For SYM_MPLS_DOMAIN */
+ struct mpls_range_config *mpls_range; /* For SYM_MPLS_RANGE */
struct f_val *val; /* For SYM_CONSTANT */
uint offset; /* For SYM_VARIABLE */
const struct keyword *keyword; /* For SYM_KEYWORD */
@@ -167,6 +170,8 @@ extern linpool *global_root_scope_linpool;
#define SYM_ATTRIBUTE 6
#define SYM_KEYWORD 7
#define SYM_METHOD 8
+#define SYM_MPLS_DOMAIN 9
+#define SYM_MPLS_RANGE 10
#define SYM_VARIABLE 0x100 /* 0x100-0x1ff are variable types */
#define SYM_VARIABLE_RANGE SYM_VARIABLE ... (SYM_VARIABLE | 0xff)