0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-19 11:55:21 +00:00
bird/proto/l3vpn/l3vpn.h
Ondrej Zajicek bcff3ae79a L3VPN: BGP/MPLS VPNs using MPLS backbone
The L3VPN protocol implements RFC 4364 BGP/MPLS VPNs using MPLS backbone.
It works similarly to pipe. It connects IP table (one per VRF) with (global)
VPN table. Routes passed from VPN table to IP table are stripped of RD and
filtered by import targets, routes passed in the other direction are extended
with RD, MPLS labels and export targets in extended communities. A separate
MPLS channel is used to announce MPLS routes for the labels.
2023-10-04 13:07:28 +02:00

37 lines
726 B
C

/*
* BIRD -- BGP/MPLS IP Virtual Private Networks (L3VPN)
*
* (c) 2022 Ondrej Zajicek <santiago@crfreenet.org>
* (c) 2022 CZ.NIC z.s.p.o.
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#ifndef _BIRD_L3VPN_H_
#define _BIRD_L3VPN_H_
struct l3vpn_config {
struct proto_config c;
u64 rd;
struct f_tree *import_target;
struct f_tree *export_target;
};
struct l3vpn_proto {
struct proto p;
struct channel *ip4_channel;
struct channel *ip6_channel;
struct channel *vpn4_channel;
struct channel *vpn6_channel;
u64 rd;
struct f_tree *import_target;
struct f_tree *export_target;
u32 *export_target_data;
uint export_target_length;
uint import_target_one;
};
#endif