blob: 5371696c3396a3bca5b6a128c43e3ba3b73ccbf3 [file] [log] [blame]
Dave Barachb5e8a772016-12-06 12:04:42 -05001/*
2 * Copyright (c) 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/** \file
17
18 This file defines vpp IP control-plane API messages which are generally
19 called through a shared memory interface.
20*/
21
22/** \brief Dump IP fib table
23 @param client_index - opaque cookie to identify the sender
24*/
25define ip_fib_dump
26{
27 u32 client_index;
28 u32 context;
29};
30
31/** \brief FIB path
32 @param sw_if_index - index of the interface
33 @param weight - The weight, for UCMP
34 @param is_local - local if non-zero, else remote
35 @param is_drop - Drop the packet
36 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
37 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
38 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
39 @param next_hop[16] - the next hop address
40
41 WARNING: this type is replicated, pending cleanup completion
42*/
43typeonly manual_print manual_endian define fib_path
44{
45 u32 sw_if_index;
46 u32 weight;
47 u8 is_local;
48 u8 is_drop;
49 u8 is_unreach;
50 u8 is_prohibit;
51 u8 afi;
52 u8 next_hop[16];
53};
54
55/** \brief IP FIB table response
56 @param table_id - IP fib table id
57 @address_length - mask length
58 @address - ip4 prefix
59 @param count - the number of fib_path in path
60 @param path - array of of fib_path structures
61*/
62manual_endian manual_print define ip_fib_details
63{
64 u32 context;
65 u32 table_id;
66 u8 address_length;
67 u8 address[4];
68 u32 count;
69 vl_api_fib_path_t path[count];
70};
71
72/** \brief Dump IP6 fib table
73 @param client_index - opaque cookie to identify the sender
74*/
75define ip6_fib_dump
76{
77 u32 client_index;
78 u32 context;
79};
80
81/** \brief IP6 FIB table response
82 @param table_id - IP6 fib table id
83 @address_length - mask length
84 @address - ip6 prefix
85 @param count - the number of fib_path in path
86 @param path - array of of fib_path structures
87*/
88manual_endian manual_print define ip6_fib_details
89{
90 u32 context;
91 u32 table_id;
92 u8 address_length;
93 u8 address[16];
94 u32 count;
95 vl_api_fib_path_t path[count];
96};
97
98/** \brief Dump IP neighboors
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param sw_if_index - the interface to dump neighboors
102 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
103*/
104define ip_neighbor_dump
105{
106 u32 client_index;
107 u32 context;
108 u32 sw_if_index;
109 u8 is_ipv6;
110};
111
112/** \brief IP neighboors dump response
113 @param context - sender context which was passed in the request
114 @param is_static - [1|0] to indicate if neighbor is statically configured
115 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
116*/
117define ip_neighbor_details {
118 u32 context;
Pavel Kotucek8cb07c92017-01-11 10:13:54 +0100119 u8 is_static;
Dave Barachb5e8a772016-12-06 12:04:42 -0500120 u8 is_ipv6;
121 u8 mac_address[6];
122 u8 ip_address[16];
123};
124
125/** \brief IP neighbor add / del request
126 @param client_index - opaque cookie to identify the sender
127 @param context - sender context, to match reply w/ request
128 @param vrf_id - vrf_id, only for IP4
129 @param sw_if_index - interface used to reach neighbor
130 @param is_add - 1 to add neighbor, 0 to delete
131 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
132 @param is_static -
133 @param mac_address - l2 address of the neighbor
134 @param dst_address - ip4 or ip6 address of the neighbor
135*/
136define ip_neighbor_add_del
137{
138 u32 client_index;
139 u32 context;
140 u32 vrf_id; /* only makes sense for ip4 */
141 u32 sw_if_index;
142 /* 1 = add, 0 = delete */
143 u8 is_add;
144 u8 is_ipv6;
145 u8 is_static;
146 u8 mac_address[6];
147 u8 dst_address[16];
148};
149
150/** \brief Reply for IP Neighbor add / delete request
151 @param context - returned sender context, to match reply w/ request
152 @param retval - return code
153*/
154define ip_neighbor_add_del_reply
155{
156 u32 context;
157 i32 retval;
158};
159
160/** \brief Set the ip flow hash config for a fib request
161 @param client_index - opaque cookie to identify the sender
162 @param context - sender context, to match reply w/ request
163 @param vrf_id - vrf/fib id
164 @param is_ipv6 - if non-zero the fib is ip6, else ip4
165 @param src - if non-zero include src in flow hash
166 @param dst - if non-zero include dst in flow hash
167 @param sport - if non-zero include sport in flow hash
168 @param dport - if non-zero include dport in flow hash
169 @param proto -if non-zero include proto in flow hash
170 @param reverse - if non-zero include reverse in flow hash
171*/
172define set_ip_flow_hash
173{
174 u32 client_index;
175 u32 context;
176 u32 vrf_id;
177 u8 is_ipv6;
178 u8 src;
179 u8 dst;
180 u8 sport;
181 u8 dport;
182 u8 proto;
183 u8 reverse;
184};
185
186/** \brief Set the ip flow hash config for a fib response
187 @param context - sender context, to match reply w/ request
188 @param retval - return code for the request
189*/
190define set_ip_flow_hash_reply
191{
192 u32 context;
193 i32 retval;
194};
195
196/** \brief IPv6 router advertisement config request
197 @param client_index - opaque cookie to identify the sender
198 @param context - sender context, to match reply w/ request
199 @param suppress -
200 @param managed -
201 @param other -
202 @param ll_option -
203 @param send_unicast -
204 @param cease -
205 @param is_no -
206 @param default_router -
207 @param max_interval -
208 @param min_interval -
209 @param lifetime -
210 @param initial_count -
211 @param initial_interval -
212*/
213define sw_interface_ip6nd_ra_config
214{
215 u32 client_index;
216 u32 context;
217 u32 sw_if_index;
218 u8 suppress;
219 u8 managed;
220 u8 other;
221 u8 ll_option;
222 u8 send_unicast;
223 u8 cease;
224 u8 is_no;
225 u8 default_router;
226 u32 max_interval;
227 u32 min_interval;
228 u32 lifetime;
229 u32 initial_count;
230 u32 initial_interval;
231};
232
233/** \brief IPv6 router advertisement config response
234 @param context - sender context, to match reply w/ request
235 @param retval - return code for the request
236*/
237define sw_interface_ip6nd_ra_config_reply
238{
239 u32 context;
240 i32 retval;
241};
242
243/** \brief IPv6 router advertisement prefix config request
244 @param client_index - opaque cookie to identify the sender
245 @param context - sender context, to match reply w/ request
246 @param sw_if_index -
247 @param address[] -
248 @param address_length -
249 @param use_default -
250 @param no_advertise -
251 @param off_link -
252 @param no_autoconfig -
253 @param no_onlink -
254 @param is_no -
255 @param val_lifetime -
256 @param pref_lifetime -
257*/
258define sw_interface_ip6nd_ra_prefix
259{
260 u32 client_index;
261 u32 context;
262 u32 sw_if_index;
263 u8 address[16];
264 u8 address_length;
265 u8 use_default;
266 u8 no_advertise;
267 u8 off_link;
268 u8 no_autoconfig;
269 u8 no_onlink;
270 u8 is_no;
271 u32 val_lifetime;
272 u32 pref_lifetime;
273};
274
275/** \brief IPv6 router advertisement prefix config response
276 @param context - sender context, to match reply w/ request
277 @param retval - return code for the request
278*/
279define sw_interface_ip6nd_ra_prefix_reply
280{
281 u32 context;
282 i32 retval;
283};
284
285/** \brief IPv6 interface enable / disable request
286 @param client_index - opaque cookie to identify the sender
287 @param context - sender context, to match reply w/ request
288 @param sw_if_index - interface used to reach neighbor
289 @param enable - if non-zero enable ip6 on interface, else disable
290*/
291define sw_interface_ip6_enable_disable
292{
293 u32 client_index;
294 u32 context;
295 u32 sw_if_index;
296 u8 enable; /* set to true if enable */
297};
298
299/** \brief IPv6 interface enable / disable response
300 @param context - sender context, to match reply w/ request
301 @param retval - return code for the request
302*/
303define sw_interface_ip6_enable_disable_reply
304{
305 u32 context;
306 i32 retval;
307};
308
309/** \brief IPv6 set link local address on interface request
310 @param client_index - opaque cookie to identify the sender
311 @param context - sender context, to match reply w/ request
312 @param sw_if_index - interface to set link local on
313 @param address[] - the new link local address
Dave Barachb5e8a772016-12-06 12:04:42 -0500314*/
315define sw_interface_ip6_set_link_local_address
316{
317 u32 client_index;
318 u32 context;
319 u32 sw_if_index;
320 u8 address[16];
Dave Barachb5e8a772016-12-06 12:04:42 -0500321};
322
323/** \brief IPv6 set link local address on interface response
324 @param context - sender context, to match reply w/ request
325 @param retval - error code for the request
326*/
327define sw_interface_ip6_set_link_local_address_reply
328{
329 u32 context;
330 i32 retval;
331};
332
333/** \brief Add / del route request
334 @param client_index - opaque cookie to identify the sender
335 @param context - sender context, to match reply w/ request
336 @param sw_if_index - software index of the new vlan's parent interface
337 @param vrf_id - fib table /vrf associated with the route
338 @param lookup_in_vrf -
339 @param classify_table_index -
340 @param create_vrf_if_needed -
341 @param is_add - 1 if adding the route, 0 if deleting
342 @param is_drop - Drop the packet
343 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
344 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
345 @param is_ipv6 - 0 if an ip4 route, else ip6
346 @param is_local -
347 @param is_classify -
348 @param is_multipath - Set to 1 if this is a multipath route, else 0
349 @param not_last - Is last or not last msg in group of multiple add/del msgs
350 @param next_hop_weight -
351 @param dst_address_length -
352 @param dst_address[16] -
353 @param next_hop_address[16] -
354 @param next_hop_n_out_labels - the number of labels in the label stack
355 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
356 @param next_hop_via_label - The next-hop is a resolved via a local label
357*/
358define ip_add_del_route
359{
360 u32 client_index;
361 u32 context;
362 u32 next_hop_sw_if_index;
363 u32 table_id;
364 u32 classify_table_index;
365 u32 next_hop_table_id;
366 u8 create_vrf_if_needed;
367 u8 is_add;
368 u8 is_drop;
369 u8 is_unreach;
370 u8 is_prohibit;
371 u8 is_ipv6;
372 u8 is_local;
373 u8 is_classify;
374 u8 is_multipath;
375 u8 is_resolve_host;
376 u8 is_resolve_attached;
377 /* Is last/not-last message in group of multiple add/del messages. */
378 u8 not_last;
379 u8 next_hop_weight;
380 u8 dst_address_length;
381 u8 dst_address[16];
382 u8 next_hop_address[16];
383 u8 next_hop_n_out_labels;
384 u32 next_hop_via_label;
385 u32 next_hop_out_label_stack[next_hop_n_out_labels];
386};
387
388/** \brief Reply for add / del route request
389 @param context - returned sender context, to match reply w/ request
390 @param retval - return code
391*/
392define ip_add_del_route_reply
393{
394 u32 context;
395 i32 retval;
396};
397
398define ip_address_details
399{
400 u32 client_index;
401 u32 context;
402 u8 ip[16];
403 u8 prefix_length;
404};
405
406define ip_address_dump
407{
408 u32 client_index;
409 u32 context;
410 u32 sw_if_index;
411 u8 is_ipv6;
412};
413
414define ip_details
415{
416 u32 sw_if_index;
417 u32 context;
418};
419
420define ip_dump
421{
422 u32 client_index;
423 u32 context;
424 u8 is_ipv6;
425};
426
427
428/*
429 * Local Variables:
430 * eval: (c-set-style "gnu")
431 * End:
432 */