blob: 6047d255aa7153d05b95867c45e4f6aab8036c18 [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";
Dave Barach0d056e52017-09-28 15:11:16 -040018
Pavel Kotucek0f971d82017-01-03 10:48:54 +010019/** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
20 a per-prefix label entry.
21 @param client_index - opaque cookie to identify the sender
22 @param context - sender context, to match reply w/ request
23 @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
24 @param mb_label - The MPLS label value to bind
25 @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010026 @param mb_is_bind - Bind or unbind
27 @param mb_is_ip4 - The prefix to bind to is IPv4
28 @param mb_address_length - Length of IP prefix
29 @param mb_address[16] - IP prefix/
30*/
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;
39 u8 mb_is_ip4;
40 u8 mb_address_length;
41 u8 mb_address[16];
42};
43
Pavel Kotucek0f971d82017-01-03 10:48:54 +010044define mpls_tunnel_add_del
45{
46 u32 client_index;
47 u32 context;
48 u32 mt_sw_if_index;
49 u8 mt_is_add;
50 u8 mt_l2_only;
Neale Ranns0f26c5a2017-03-01 15:12:11 -080051 u8 mt_is_multicast;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010052 u8 mt_next_hop_proto_is_ip4;
53 u8 mt_next_hop_weight;
Neale Ranns57b58602017-07-15 07:37:25 -070054 u8 mt_next_hop_preference;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010055 u8 mt_next_hop[16];
56 u8 mt_next_hop_n_out_labels;
57 u32 mt_next_hop_sw_if_index;
58 u32 mt_next_hop_table_id;
Neale Ranns31ed7442018-02-23 05:29:09 -080059 vl_api_fib_mpls_label_t mt_next_hop_out_label_stack[mt_next_hop_n_out_labels];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010060};
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*/
67define mpls_tunnel_add_del_reply
68{
69 u32 context;
70 i32 retval;
71 u32 sw_if_index;
72};
73
74/** \brief Dump mpls eth tunnel table
75 @param client_index - opaque cookie to identify the sender
76 @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
77*/
78define mpls_tunnel_dump
79{
80 u32 client_index;
81 u32 context;
82 i32 tunnel_index;
83};
84
Neale Ranns0f26c5a2017-03-01 15:12:11 -080085/** \brief mpls tunnel details
86*/
87manual_endian manual_print define mpls_tunnel_details
88{
89 u32 context;
90 u8 mt_sw_if_index;
91 u8 mt_tunnel_index;
92 u8 mt_l2_only;
93 u8 mt_is_multicast;
94 u32 mt_count;
Neale Ranns31ed7442018-02-23 05:29:09 -080095 vl_api_fib_path_t mt_paths[mt_count];
Neale Ranns0f26c5a2017-03-01 15:12:11 -080096};
97
98/** \brief MPLS Route Add / del route
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700101 @param mt_table_id - The MPLS table-id the route is added in
102 @param mt_is_add - Is this a route add or delete
Neale Ranns2297af02017-09-12 09:45:04 -0700103 @param mt_name - A client provided name/tag for the table. If this
104 is not set by the client, then VPP will generate
105 something meaningfull.
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700106*/
107autoreply define mpls_table_add_del
108{
109 u32 client_index;
110 u32 context;
111 u32 mt_table_id;
112 u8 mt_is_add;
Neale Ranns2297af02017-09-12 09:45:04 -0700113 u8 mt_name[64];
Neale Ranns28ab9cc2017-08-14 07:18:42 -0700114};
115
116/** \brief MPLS Route Add / del route
117 @param client_index - opaque cookie to identify the sender
118 @param context - sender context, to match reply w/ request
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800119 @param mr_label - The MPLS label value
120 @param mr_eos - The End of stack bit
121 @param mr_table_id - The MPLS table-id the route is added in
122 @param mr_classify_table_index - If this is a classify route,
123 this is the classify table index
Florin Corasd0a59722017-10-15 17:41:21 +0000124 create them
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800125 @param mr_is_add - Is this a route add or delete
126 @param mr_is_classify - Is this route result a classify
127 @param mr_is_multicast - Is this a multicast route
128 @param mr_is_multipath - Is this route update a multipath - i.e. is this
129 a path addition to an existing route
130 @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
131 @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
132 @param mr_is_interface_rx - Interface Receive path
133 @param mr_is_interface_rx - RPF-ID Receive path. The next-hop interface
134 is used as the RPF-ID
Neale Rannsda78f952017-05-24 09:15:43 -0700135 @param mr_next_hop_proto - The next-hop protocol, of type dpo_proto_t
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800136 @param mr_next_hop_weight - The weight, for UCMP
137 @param mr_next_hop[16] - the nextop address
138 @param mr_next_hop_sw_if_index - the next-hop SW interface
139 @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
140 @param mr_next_hop_n_out_labels - the number of labels in the label stack
141 @param mr_next_hop_out_label_stack - the next-hop output label stack, outer most first
142 @param next_hop_via_label - The next-hop is a resolved via a local label
143*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400144autoreply define mpls_route_add_del
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800145{
146 u32 client_index;
147 u32 context;
148 u32 mr_label;
149 u8 mr_eos;
150 u32 mr_table_id;
151 u32 mr_classify_table_index;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800152 u8 mr_is_add;
153 u8 mr_is_classify;
154 u8 mr_is_multicast;
155 u8 mr_is_multipath;
156 u8 mr_is_resolve_host;
157 u8 mr_is_resolve_attached;
158 u8 mr_is_interface_rx;
159 u8 mr_is_rpf_id;
Neale Rannsda78f952017-05-24 09:15:43 -0700160 u8 mr_next_hop_proto;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800161 u8 mr_next_hop_weight;
Neale Ranns57b58602017-07-15 07:37:25 -0700162 u8 mr_next_hop_preference;
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800163 u8 mr_next_hop[16];
164 u8 mr_next_hop_n_out_labels;
165 u32 mr_next_hop_sw_if_index;
166 u32 mr_next_hop_table_id;
167 u32 mr_next_hop_via_label;
Neale Ranns31ed7442018-02-23 05:29:09 -0800168 vl_api_fib_mpls_label_t mr_next_hop_out_label_stack[mr_next_hop_n_out_labels];
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800169};
170
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100171/** \brief Dump MPLS fib table
172 @param client_index - opaque cookie to identify the sender
173*/
174define mpls_fib_dump
175{
176 u32 client_index;
177 u32 context;
178};
179
180/** \brief mpls FIB table response
181 @param table_id - MPLS fib table id
182 @param s_bit - End-of-stack bit
183 @param label - MPLS label value
184 @param count - the number of fib_path in path
185 @param path - array of of fib_path structures
186*/
187manual_endian manual_print define mpls_fib_details
188{
189 u32 context;
190 u32 table_id;
Neale Ranns2297af02017-09-12 09:45:04 -0700191 u8 table_name[64];
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100192 u8 eos_bit;
193 u32 label;
194 u32 count;
Neale Ranns31ed7442018-02-23 05:29:09 -0800195 vl_api_fib_path_t path[count];
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