blob: 535bcea2b60ace4e7a6a149854e8568a4315a649 [file] [log] [blame]
Pavel Kotucek0f971d82017-01-03 10:48:54 +01001/*
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
Neale Ranns31ed7442018-02-23 05:29:09 -080016option version = "1.1.0";
17import "vnet/fib/fib_types.api";
Neale Ranns097fa662018-05-01 05:17:55 -070018import "vnet/ip/ip_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040019
Pavel Kotucek0f971d82017-01-03 10:48:54 +010020/** \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.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010027 @param mb_is_bind - Bind or unbind
28 @param mb_is_ip4 - The prefix to bind to is IPv4
Ole Troan75761b92019-09-11 17:49:08 +020029 @param mb_prefix - IP prefix
Pavel Kotucek0f971d82017-01-03 10:48:54 +010030*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040031autoreply define mpls_ip_bind_unbind
Pavel Kotucek0f971d82017-01-03 10:48:54 +010032{
33 u32 client_index;
34 u32 context;
35 u32 mb_mpls_table_id;
36 u32 mb_label;
37 u32 mb_ip_table_id;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010038 u8 mb_is_bind;
Neale Ranns097fa662018-05-01 05:17:55 -070039 vl_api_prefix_t mb_prefix;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010040};
41
Paul Vinciguerrae7174822019-08-07 00:05:59 -040042typedef mpls_tunnel
Neale Ranns097fa662018-05-01 05:17:55 -070043{
44 u32 mt_sw_if_index;
45 u32 mt_tunnel_index;
46 u8 mt_l2_only;
47 u8 mt_is_multicast;
48 u8 mt_n_paths;
49 vl_api_fib_path_t mt_paths[mt_n_paths];
50};
Pavel Kotucek0f971d82017-01-03 10:48:54 +010051define mpls_tunnel_add_del
52{
53 u32 client_index;
54 u32 context;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010055 u8 mt_is_add;
Neale Ranns097fa662018-05-01 05:17:55 -070056 vl_api_mpls_tunnel_t mt_tunnel;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010057};
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*/
64define mpls_tunnel_add_del_reply
65{
66 u32 context;
67 i32 retval;
68 u32 sw_if_index;
Neale Rannsf5fa5ae2018-09-26 05:07:25 -070069 u32 tunnel_index;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010070};
71
72/** \brief Dump mpls eth tunnel table
73 @param client_index - opaque cookie to identify the sender
Neale Rannsf5fa5ae2018-09-26 05:07:25 -070074 @param sw_if_index - sw_if_index of the MPLS tunnel
75 (as returned from the create)
Pavel Kotucek0f971d82017-01-03 10:48:54 +010076*/
77define mpls_tunnel_dump
78{
79 u32 client_index;
80 u32 context;
Neale Rannsf5fa5ae2018-09-26 05:07:25 -070081 u32 sw_if_index;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010082};
83
Neale Ranns0f26c5a2017-03-01 15:12:11 -080084/** \brief mpls tunnel details
85*/
86manual_endian manual_print define mpls_tunnel_details
87{
88 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -070089 vl_api_mpls_tunnel_t mt_tunnel;
Neale Ranns0f26c5a2017-03-01 15:12:11 -080090};
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
Neale Ranns28ab9cc2017-08-14 07:18:42 -070095 @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
Neale Ranns2297af02017-09-12 09:45:04 -070097 @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.
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700100*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400101typedef mpls_table
Neale Ranns097fa662018-05-01 05:17:55 -0700102{
103 u32 mt_table_id;
104 u8 mt_name[64];
105};
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700106autoreply define mpls_table_add_del
107{
108 u32 client_index;
109 u32 context;
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700110 u8 mt_is_add;
Neale Ranns097fa662018-05-01 05:17:55 -0700111 vl_api_mpls_table_t mt_table;
112};
113
114/** \brief Dump MPLS fib table
115 @param client_index - opaque cookie to identify the sender
116*/
117define mpls_table_dump
118{
119 u32 client_index;
120 u32 context;
121};
122
123define mpls_table_details
124{
125 u32 context;
126 vl_api_mpls_table_t mt_table;
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*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -0400139typedef mpls_route
Neale Ranns097fa662018-05-01 05:17:55 -0700140{
141 u32 mr_table_id;
142 u32 mr_label;
143 u8 mr_eos;
144 u8 mr_eos_proto;
145 u8 mr_is_multicast;
146 u8 mr_n_paths;
147 vl_api_fib_path_t mr_paths[mr_n_paths];
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700148};
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
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800153 @param mr_table_id - The MPLS table-id the route is added in
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800154 @param mr_is_add - Is this a route add or delete
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800155 @param mr_is_multipath - Is this route update a multipath - i.e. is this
156 a path addition to an existing route
Neale Ranns097fa662018-05-01 05:17:55 -0700157 @param mr_route - The Route
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800158*/
Neale Ranns008dbe12018-09-07 09:32:36 -0700159define mpls_route_add_del
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800160{
161 u32 client_index;
162 u32 context;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800163 u8 mr_is_add;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800164 u8 mr_is_multipath;
Neale Ranns097fa662018-05-01 05:17:55 -0700165 vl_api_mpls_route_t mr_route;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800166};
167
Neale Ranns008dbe12018-09-07 09:32:36 -0700168define mpls_route_add_del_reply
169{
170 u32 context;
171 i32 retval;
172 u32 stats_index;
173};
174
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100175/** \brief Dump MPLS fib table
176 @param client_index - opaque cookie to identify the sender
177*/
Neale Ranns097fa662018-05-01 05:17:55 -0700178define mpls_route_dump
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100179{
180 u32 client_index;
181 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700182 vl_api_mpls_table_t table;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100183};
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*/
Neale Ranns097fa662018-05-01 05:17:55 -0700192manual_endian manual_print define mpls_route_details
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100193{
194 u32 context;
Neale Ranns097fa662018-05-01 05:17:55 -0700195 vl_api_mpls_route_t mr_route;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100196};
197
Neale Rannsb8d44812017-11-10 06:53:54 -0800198/** \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*/
204autoreply define sw_interface_set_mpls_enable
205{
206 u32 client_index;
207 u32 context;
208 u32 sw_if_index;
209 u8 enable;
210};
211
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100212/*
213 * Local Variables:
214 * eval: (c-set-style "gnu")
215 * End:
216 */
Dave Barach11b8dbf2017-04-24 10:46:54 -0400217