FD.io VPP  v21.06-3-gbb25fbf28
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.1";
17 import "vnet/fib/fib_types.api";
18 import "vnet/ip/ip_types.api";
19 import "vnet/interface_types.api";
20 
21 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
22  a per-prefix label entry.
23  @param client_index - opaque cookie to identify the sender
24  @param context - sender context, to match reply w/ request
25  @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
26  @param mb_label - The MPLS label value to bind
27  @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
28  @param mb_is_bind - Bind or unbind
29  @param mb_is_ip4 - The prefix to bind to is IPv4
30  @param mb_prefix - IP prefix
31 */
32 autoreply define mpls_ip_bind_unbind
33 {
39  bool mb_is_bind;
40  vl_api_prefix_t mb_prefix;
41 };
42 
43 typedef mpls_tunnel
44 {
45  vl_api_interface_index_t mt_sw_if_index;
47  bool mt_l2_only;
49  string mt_tag[64];
51  vl_api_fib_path_t mt_paths[mt_n_paths];
52 };
53 
54 define mpls_tunnel_add_del
55 {
58  bool mt_is_add [default=true];
59  vl_api_mpls_tunnel_t mt_tunnel;
60 };
61 
62 /** \brief Reply for MPLS tunnel add / del request
63  @param context - returned sender context, to match reply w/ request
64  @param retval - return code
65  @param sw_if_index - SW interface index of the tunnel created
66 */
67 define mpls_tunnel_add_del_reply
68 {
71  vl_api_interface_index_t sw_if_index;
73 };
74 
75 /** \brief Dump mpls eth tunnel table
76  @param client_index - opaque cookie to identify the sender
77  @param sw_if_index - sw_if_index of the MPLS tunnel
78  (as returned from the create)
79 */
80 define mpls_tunnel_dump
81 {
84  vl_api_interface_index_t sw_if_index [default=0xffffffff];
85 };
86 
87 /** \brief mpls tunnel details
88 */
89 define mpls_tunnel_details
90 {
92  vl_api_mpls_tunnel_t mt_tunnel;
93 };
94 
95 /** \brief MPLS Route Add / del route
96  @param client_index - opaque cookie to identify the sender
97  @param context - sender context, to match reply w/ request
98  @param mt_table_id - The MPLS table-id the route is added in
99  @param mt_is_add - Is this a route add or delete
100  @param mt_name - A client provided name/tag for the table. If this
101  is not set by the client, then VPP will generate
102  something meaningful.
103 */
104 typedef mpls_table
105 {
106  u32 mt_table_id;
107  string mt_name[64];
108 };
109 autoreply define mpls_table_add_del
110 {
113  bool mt_is_add [default=true];
114  vl_api_mpls_table_t mt_table;
115 };
116 
117 /** \brief Dump MPLS fib table
118  @param client_index - opaque cookie to identify the sender
119 */
120 define mpls_table_dump
121 {
124 };
125 
126 define mpls_table_details
127 {
129  vl_api_mpls_table_t mt_table;
130 };
131 
132 /** \brief MPLS Route
133  @param mr_table_id - The MPLS table-id the route is added in
134  @param mr_label - The MPLS label value
135  @param mr_eos - The End of stack bit
136  @param mr_eos_proto - If EOS then this is the DPO packet's proto post pop
137  @param mr_is_multicast - Is this a multicast route
138  @param mr_n_paths - The number of paths
139  @param mr_paths - The paths
140 */
141 typedef mpls_route
142 {
143  u32 mr_table_id;
145  /* TODO: check data type */
150  vl_api_fib_path_t mr_paths[mr_n_paths];
151 };
152 
153 /** \brief MPLS Route Add / del route
154  @param client_index - opaque cookie to identify the sender
155  @param context - sender context, to match reply w/ request
156  @param mr_table_id - The MPLS table-id the route is added in
157  @param mr_is_add - Is this a route add or delete
158  @param mr_is_multipath - Is this route update a multipath - i.e. is this
159  a path addition to an existing route
160  @param mr_route - The Route
161 */
162 define mpls_route_add_del
163 {
166  bool mr_is_add;
168  vl_api_mpls_route_t mr_route;
169 };
170 
171 define mpls_route_add_del_reply
172 {
176 };
177 
178 /** \brief Dump MPLS fib table
179  @param client_index - opaque cookie to identify the sender
180 */
181 define mpls_route_dump
182 {
185  vl_api_mpls_table_t table;
186 };
187 
188 /** \brief mpls FIB table response
189  @param table_id - MPLS fib table id
190  @param s_bit - End-of-stack bit
191  @param label - MPLS label value
192  @param count - the number of fib_path in path
193  @param path - array of of fib_path structures
194 */
195 define mpls_route_details
196 {
198  vl_api_mpls_route_t mr_route;
199 };
200 
201 /** \brief Enable or Disable MPLS on and interface
202  @param client_index - opaque cookie to identify the sender
203  @param context - sender context, to match reply w/ request
204  @param sw_if_index - index of the interface
205  @param enable - if non-zero enable, else disable
206 */
207 autoreply define sw_interface_set_mpls_enable
208 {
211  vl_api_interface_index_t sw_if_index;
212  bool enable [default=true];
213 };
214 
215 /*
216  * Local Variables:
217  * eval: (c-set-style "gnu")
218  * End:
219  */
vl_api_mpls_route_add_del_t
MPLS Route Add / del route.
Definition: mpls.api:162
mr_is_multicast
bool mr_is_multicast
Definition: mpls.api:148
vl_api_mpls_table_details_t
Definition: mpls.api:126
vl_api_mpls_tunnel_dump_t::sw_if_index
vl_api_interface_index_t sw_if_index[default=0xffffffff]
Definition: mpls.api:84
vl_api_mpls_route_dump_t
Dump MPLS fib table.
Definition: mpls.api:181
mr_label
u32 mr_label
Definition: mpls.api:144
vl_api_mpls_route_add_del_t::context
u32 context
Definition: mpls.api:165
mt_name
string mt_name[64]
Definition: mpls.api:107
mt_n_paths
u8 mt_n_paths
Definition: mpls.api:50
vl_api_mpls_table_add_del_t
Definition: mpls.api:109
vl_api_mpls_route_details_t::mr_route
vl_api_mpls_route_t mr_route
Definition: mpls.api:198
vl_api_sw_interface_set_mpls_enable_t::client_index
u32 client_index
Definition: mpls.api:209
vl_api_sw_interface_set_mpls_enable_t::context
u32 context
Definition: mpls.api:210
vl_api_mpls_route_add_del_reply_t::stats_index
u32 stats_index
Definition: mpls.api:175
mpls_route
typedef mpls_route
MPLS Route.
Definition: mpls.api:142
vl_api_mpls_table_add_del_t::mt_table
vl_api_mpls_table_t mt_table
Definition: mpls.api:114
vl_api_mpls_route_add_del_reply_t
Definition: mpls.api:171
vl_api_mpls_tunnel_add_del_t
Definition: mpls.api:54
vl_api_mpls_tunnel_dump_t::client_index
u32 client_index
Definition: mpls.api:82
vl_api_mpls_table_dump_t::client_index
u32 client_index
Definition: mpls.api:122
vl_api_mpls_table_add_del_t::mt_is_add
bool mt_is_add[default=true]
Definition: mpls.api:113
i32
signed int i32
Definition: types.h:77
vl_api_mpls_ip_bind_unbind_t::mb_is_bind
bool mb_is_bind
Definition: mpls.api:39
vl_api_mpls_tunnel_add_del_reply_t::context
u32 context
Definition: mpls.api:69
vl_api_mpls_ip_bind_unbind_t
Bind/Unbind an MPLS local label to an IP prefix.
Definition: mpls.api:32
vl_api_sw_interface_set_mpls_enable_t
Enable or Disable MPLS on and interface.
Definition: mpls.api:207
vl_api_mpls_route_add_del_reply_t::context
u32 context
Definition: mpls.api:173
mt_is_multicast
bool mt_is_multicast
Definition: mpls.api:48
vl_api_mpls_table_dump_t
Dump MPLS fib table.
Definition: mpls.api:120
vl_api_mpls_route_details_t::context
u32 context
Definition: mpls.api:197
vl_api_mpls_table_add_del_t::context
u32 context
Definition: mpls.api:112
vl_api_mpls_ip_bind_unbind_t::mb_ip_table_id
u32 mb_ip_table_id
Definition: mpls.api:38
mt_paths
vl_api_fib_path_t mt_paths[mt_n_paths]
Definition: mpls.api:51
vl_api_mpls_tunnel_add_del_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: mpls.api:71
vl_api_mpls_tunnel_details_t
mpls tunnel details
Definition: mpls.api:89
mr_eos_proto
u8 mr_eos_proto
Definition: mpls.api:147
vl_api_mpls_table_dump_t::context
u32 context
Definition: mpls.api:123
vl_api_mpls_tunnel_details_t::context
u32 context
Definition: mpls.api:91
vl_api_mpls_table_details_t::context
u32 context
Definition: mpls.api:128
mr_n_paths
u8 mr_n_paths
Definition: mpls.api:149
vl_api_mpls_tunnel_add_del_reply_t::tunnel_index
u32 tunnel_index
Definition: mpls.api:72
vl_api_mpls_ip_bind_unbind_t::mb_mpls_table_id
u32 mb_mpls_table_id
Definition: mpls.api:36
vl_api_mpls_table_add_del_t::client_index
u32 client_index
Definition: mpls.api:111
vl_api_mpls_tunnel_add_del_t::client_index
u32 client_index
Definition: mpls.api:56
mt_tunnel_index
u32 mt_tunnel_index
Definition: mpls.api:46
mr_paths
vl_api_fib_path_t mr_paths[mr_n_paths]
Definition: mpls.api:150
vl_api_mpls_route_dump_t::context
u32 context
Definition: mpls.api:184
vl_api_mpls_tunnel_details_t::mt_tunnel
vl_api_mpls_tunnel_t mt_tunnel
Definition: mpls.api:92
mr_eos
u8 mr_eos
Definition: mpls.api:146
vl_api_mpls_route_add_del_t::mr_is_add
bool mr_is_add
Definition: mpls.api:166
vl_api_mpls_ip_bind_unbind_t::client_index
u32 client_index
Definition: mpls.api:34
vl_api_sw_interface_set_mpls_enable_t::enable
bool enable[default=true]
Definition: mpls.api:212
vl_api_mpls_ip_bind_unbind_t::mb_prefix
vl_api_prefix_t mb_prefix
Definition: mpls.api:40
version
option version
Definition: mpls.api:16
vl_api_mpls_tunnel_add_del_reply_t
Reply for MPLS tunnel add / del request.
Definition: mpls.api:67
vl_api_mpls_tunnel_dump_t
Dump mpls eth tunnel table.
Definition: mpls.api:80
u32
unsigned int u32
Definition: types.h:88
vl_api_mpls_route_add_del_t::mr_route
vl_api_mpls_route_t mr_route
Definition: mpls.api:168
vl_api_mpls_tunnel_dump_t::context
u32 context
Definition: mpls.api:83
vl_api_mpls_route_details_t
mpls FIB table response
Definition: mpls.api:195
u8
unsigned char u8
Definition: types.h:56
vl_api_mpls_tunnel_add_del_reply_t::retval
i32 retval
Definition: mpls.api:70
vl_api_mpls_route_dump_t::client_index
u32 client_index
Definition: mpls.api:183
mpls_table
typedef mpls_table
MPLS Route Add / del route.
Definition: mpls.api:105
mt_tag
string mt_tag[64]
Definition: mpls.api:49
vl_api_mpls_ip_bind_unbind_t::context
u32 context
Definition: mpls.api:35
vl_api_mpls_route_dump_t::table
vl_api_mpls_table_t table
Definition: mpls.api:185
vl_api_mpls_route_add_del_reply_t::retval
i32 retval
Definition: mpls.api:174
vl_api_mpls_tunnel_add_del_t::mt_tunnel
vl_api_mpls_tunnel_t mt_tunnel
Definition: mpls.api:59
vl_api_mpls_route_add_del_t::client_index
u32 client_index
Definition: mpls.api:164
vl_api_mpls_tunnel_add_del_t::context
u32 context
Definition: mpls.api:57
mt_l2_only
bool mt_l2_only
Definition: mpls.api:47
mpls_tunnel
typedef mpls_tunnel
Definition: mpls.api:44
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vl_api_mpls_route_add_del_t::mr_is_multipath
bool mr_is_multipath
Definition: mpls.api:167
vl_api_sw_interface_set_mpls_enable_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: mpls.api:211
vl_api_mpls_ip_bind_unbind_t::mb_label
u32 mb_label
Definition: mpls.api:37
vl_api_mpls_tunnel_add_del_t::mt_is_add
bool mt_is_add[default=true]
Definition: mpls.api:58
vl_api_mpls_table_details_t::mt_table
vl_api_mpls_table_t mt_table
Definition: mpls.api:129