16 #ifndef __MPLS_TUNNEL_H__ 17 #define __MPLS_TUNNEL_H__ 36 #define MPLS_TUNNEL_ATTRIBUTES { \ 37 [MPLS_TUNNEL_ATTRIBUTE_MCAST] = "multicast", \ 38 [MPLS_TUNNEL_ATTRIBUTE_L2] = "L2", \ 40 #define FOR_EACH_MPLS_TUNNEL_ATTRIBUTE(_item) \ 41 for (_item = MPLS_TUNNEL_ATTRIBUTE_FIRST; \ 42 _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.
void(* mpls_tunnel_walk_cb_t)(u32 index, void *ctx)
Callback function invoked while walking MPLS tunnels.
vl_api_interface_index_t sw_if_index
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.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
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.
int vnet_mpls_tunnel_get_index(u32 sw_if_index)
return the tunnel index from the sw_if_index
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 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.
dpo_id_t mt_l2_lb
If the tunnel is an L2 tunnel, this is the link type ETHERNET load-balance.
enum mpls_tunnel_attribute_t_ mpls_tunnel_attribute_t