16 #ifndef __MPLS_TUNNEL_H__ 17 #define __MPLS_TUNNEL_H__ 32 #define MPLS_TUNNEL_ATTRIBUTES { \ 33 [MPLS_TUNNEL_ATTRIBUTE_MCAST] = "multicast", \ 35 #define FOR_EACH_MPLS_TUNNEL_ATTRIBUTE(_item) \ 36 for (_item = MPLS_TUNNEL_ATTRIBUTE_FIRST; \ 37 _item <= MPLS_TUNNEL_ATTRIBUTE_LAST; \
int vnet_mpls_tunnel_path_remove(u32 sw_if_index, fib_route_path_t *rpath)
remove a path from a tunnel.
A representation of a path as described by a route producer.
fib_node_index_t mt_path_list
The path-list over which the tunnel's destination is reachable.
mpls_tunnel_flags_t mt_flags
Tunnel flags.
A uni-directional MPLS tunnel.
const mpls_tunnel_t * mpls_tunnel_get(u32 index)
fib_node_t mt_node
The tunnel hooks into the FIB control plane graph.
u8 mt_l2_only
Flag to indicate the tunnel is only for L2 traffic, that is this tunnel belongs in a bridge domain...
void(* mpls_tunnel_walk_cb_t)(u32 index, void *ctx)
Callback function invoked while walking MPLS tunnels.
adj_index_t mt_l2_adj
If the tunnel is an L2 tunnel, this is the link type ETHERNET adjacency.
void vnet_mpls_tunnel_path_add(u32 sw_if_index, fib_route_path_t *rpath)
Add a path to an MPLS tunnel.
fib_path_ext_list_t mt_path_exts
A vector of path extensions o hold the label stack for each path.
u32 mt_l2_tx_arc
on a L2 tunnel this is the VLIB arc from the L2-tx to the l2-midchain
void vnet_mpls_tunnel_del(u32 sw_if_index)
Delete an MPLS tunnel.
u32 mt_sibling_index
sibling index on the path-list so notifications are received.
A list of path-extensions.
The tunnel has an underlying multicast LSP.
An node in the FIB graph.
struct mpls_tunnel_t_ mpls_tunnel_t
A uni-directional MPLS tunnel.
void mpls_tunnel_walk(mpls_tunnel_walk_cb_t cb, void *ctx)
Walk all the MPLS tunnels.
u32 fib_node_index_t
A typedef of a node index.
u32 adj_index_t
An index for adjacencies.
u32 mt_hw_if_index
The HW interface index of the tunnel interfaces.
u32 vnet_mpls_tunnel_create(u8 l2_only, u8 is_multicast)
Create a new MPLS tunnel.
enum mpls_tunnel_flag_t_ mpls_tunnel_flags_t
u32 mt_sw_if_index
The SW interface index of the tunnel interfaces.
enum mpls_tunnel_attribute_t_ mpls_tunnel_attribute_t