FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
mpls.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 option version = "1.1.0";
17 import "vnet/fib/fib_types.api";
18 import "vnet/ip/ip_types.api";
19 
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_prefix - IP prefix
30 */
31 autoreply define mpls_ip_bind_unbind
32 {
39  vl_api_prefix_t mb_prefix;
40 };
41 
42 typeonly define mpls_tunnel
43 {
49  vl_api_fib_path_t mt_paths[mt_n_paths];
50 };
51 define mpls_tunnel_add_del
52 {
57 };
58 
59 /** \brief Reply for MPLS tunnel add / del request
60  @param context - returned sender context, to match reply w/ request
61  @param retval - return code
62  @param sw_if_index - SW interface index of the tunnel created
63 */
64 define mpls_tunnel_add_del_reply
65 {
70 };
71 
72 /** \brief Dump mpls eth tunnel table
73  @param client_index - opaque cookie to identify the sender
74  @param sw_if_index - sw_if_index of the MPLS tunnel
75  (as returned from the create)
76 */
77 define mpls_tunnel_dump
78 {
82 };
83 
84 /** \brief mpls tunnel details
85 */
86 manual_endian manual_print define mpls_tunnel_details
87 {
90 };
91 
92 /** \brief MPLS Route Add / del route
93  @param client_index - opaque cookie to identify the sender
94  @param context - sender context, to match reply w/ request
95  @param mt_table_id - The MPLS table-id the route is added in
96  @param mt_is_add - Is this a route add or delete
97  @param mt_name - A client provided name/tag for the table. If this
98  is not set by the client, then VPP will generate
99  something meaningfull.
100 */
101 typeonly define mpls_table
102 {
104  u8 mt_name[64];
105 };
106 autoreply define mpls_table_add_del
107 {
112 };
113 
114 /** \brief Dump MPLS fib table
115  @param client_index - opaque cookie to identify the sender
116 */
117 define mpls_table_dump
118 {
121 };
122 
123 define mpls_table_details
124 {
127 };
128 
129 /** \brief MPLS Route
130  @param mr_label - The MPLS label value
131  @param mr_eos - The End of stack bit
132  @param mr_eos_proto - If EOS then this is the DPO packect's proto post pop
133  @param mr_table_id - The MPLS table-id the route is added in
134  @param mr_is_add - Is this a route add or delete
135  @param mr_is_multicast - Is this a multicast route
136  @param mr_n_paths - The number of paths
137  @param mr_paths - The paths
138 */
139 typeonly define mpls_route
140 {
147  vl_api_fib_path_t mr_paths[mr_n_paths];
148 };
149 
150 /** \brief MPLS Route Add / del route
151  @param client_index - opaque cookie to identify the sender
152  @param context - sender context, to match reply w/ request
153  @param mr_table_id - The MPLS table-id the route is added in
154  @param mr_is_add - Is this a route add or delete
155  @param mr_is_multipath - Is this route update a multipath - i.e. is this
156  a path addition to an existing route
157  @param mr_route - The Route
158 */
159 define mpls_route_add_del
160 {
166 };
167 
168 define mpls_route_add_del_reply
169 {
173 };
174 
175 /** \brief Dump MPLS fib table
176  @param client_index - opaque cookie to identify the sender
177 */
178 define mpls_route_dump
179 {
183 };
184 
185 /** \brief mpls FIB table response
186  @param table_id - MPLS fib table id
187  @param s_bit - End-of-stack bit
188  @param label - MPLS label value
189  @param count - the number of fib_path in path
190  @param path - array of of fib_path structures
191 */
192 manual_endian manual_print define mpls_route_details
193 {
196 };
197 
198 /** \brief Enable or Disable MPLS on and interface
199  @param client_index - opaque cookie to identify the sender
200  @param context - sender context, to match reply w/ request
201  @param sw_if_index - index of the interface
202  @param enable - if non-zero enable, else disable
203 */
204 autoreply define sw_interface_set_mpls_enable
205 {
210 };
211 
212 /*
213  * Local Variables:
214  * eval: (c-set-style "gnu")
215  * End:
216  */
217 
vl_api_mpls_tunnel_t mt_tunnel
Definition: mpls.api:89
MPLS Route Add / del route.
Definition: mpls.api:101
vl_api_mpls_route_t mr_route
Definition: mpls.api:195
unsigned char u8
Definition: types.h:56
unsigned int u32
Definition: types.h:88
vl_api_prefix_t mb_prefix
Definition: mpls.api:39
vl_api_mpls_route_t mr_route
Definition: mpls.api:165
option version
Definition: mpls.api:16
vl_api_mpls_table_t table
Definition: mpls.api:182
signed int i32
Definition: types.h:77
MPLS Route.
Definition: mpls.api:139
vl_api_mpls_table_t mt_table
Definition: mpls.api:111
vl_api_mpls_table_t mt_table
Definition: mpls.api:126
vl_api_mpls_tunnel_t mt_tunnel
Definition: mpls.api:56