2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 option version = "1.1.0";
17 import "vnet/fib/fib_types.api";
18 import "vnet/ip/ip_types.api";
20 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
21 a per-prefix label entry.
22 @param client_index - opaque cookie to identify the sender
23 @param context - sender context, to match reply w/ request
24 @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
25 @param mb_label - The MPLS label value to bind
26 @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
27 @param mb_is_bind - Bind or unbind
28 @param mb_is_ip4 - The prefix to bind to is IPv4
29 @param mb_address_length - Length of IP prefix
30 @param mb_address[16] - IP prefix/
32 autoreply define mpls_ip_bind_unbind
40 vl_api_prefix_t mb_prefix;
43 typeonly define mpls_tunnel
50 vl_api_fib_path_t mt_paths[mt_n_paths];
52 define mpls_tunnel_add_del
57 vl_api_mpls_tunnel_t mt_tunnel;
60 /** \brief Reply for MPLS tunnel add / del request
61 @param context - returned sender context, to match reply w/ request
62 @param retval - return code
63 @param sw_if_index - SW interface index of the tunnel created
65 define mpls_tunnel_add_del_reply
73 /** \brief Dump mpls eth tunnel table
74 @param client_index - opaque cookie to identify the sender
75 @param sw_if_index - sw_if_index of the MPLS tunnel
76 (as returned from the create)
78 define mpls_tunnel_dump
85 /** \brief mpls tunnel details
87 manual_endian manual_print define mpls_tunnel_details
90 vl_api_mpls_tunnel_t mt_tunnel;
93 /** \brief MPLS Route Add / del route
94 @param client_index - opaque cookie to identify the sender
95 @param context - sender context, to match reply w/ request
96 @param mt_table_id - The MPLS table-id the route is added in
97 @param mt_is_add - Is this a route add or delete
98 @param mt_name - A client provided name/tag for the table. If this
99 is not set by the client, then VPP will generate
100 something meaningfull.
102 typeonly define mpls_table
107 autoreply define mpls_table_add_del
112 vl_api_mpls_table_t mt_table;
115 /** \brief Dump MPLS fib table
116 @param client_index - opaque cookie to identify the sender
118 define mpls_table_dump
124 define mpls_table_details
127 vl_api_mpls_table_t mt_table;
130 /** \brief MPLS Route
131 @param mr_label - The MPLS label value
132 @param mr_eos - The End of stack bit
133 @param mr_eos_proto - If EOS then this is the DPO packect's proto post pop
134 @param mr_table_id - The MPLS table-id the route is added in
135 @param mr_is_add - Is this a route add or delete
136 @param mr_is_multicast - Is this a multicast route
137 @param mr_n_paths - The number of paths
138 @param mr_paths - The paths
140 typeonly define mpls_route
148 vl_api_fib_path_t mr_paths[mr_n_paths];
151 /** \brief MPLS Route Add / del route
152 @param client_index - opaque cookie to identify the sender
153 @param context - sender context, to match reply w/ request
154 @param mr_table_id - The MPLS table-id the route is added in
155 @param mr_is_add - Is this a route add or delete
156 @param mr_is_multipath - Is this route update a multipath - i.e. is this
157 a path addition to an existing route
158 @param mr_route - The Route
160 define mpls_route_add_del
166 vl_api_mpls_route_t mr_route;
169 define mpls_route_add_del_reply
176 /** \brief Dump MPLS fib table
177 @param client_index - opaque cookie to identify the sender
179 define mpls_route_dump
183 vl_api_mpls_table_t table;
186 /** \brief mpls FIB table response
187 @param table_id - MPLS fib table id
188 @param s_bit - End-of-stack bit
189 @param label - MPLS label value
190 @param count - the number of fib_path in path
191 @param path - array of of fib_path structures
193 manual_endian manual_print define mpls_route_details
196 vl_api_mpls_route_t mr_route;
199 /** \brief Enable or Disable MPLS on and interface
200 @param client_index - opaque cookie to identify the sender
201 @param context - sender context, to match reply w/ request
202 @param sw_if_index - index of the interface
203 @param enable - if non-zero enable, else disable
205 autoreply define sw_interface_set_mpls_enable
215 * eval: (c-set-style "gnu")