FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
ip.api
Go to the documentation of this file.
1 /*
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 Add / del table request
23  A table can be added multiple times, but need be deleted only once.
24  @param client_index - opaque cookie to identify the sender
25  @param context - sender context, to match reply w/ request
26  @param is_ipv6 - V4 or V6 table
27  @param table_id - table ID associated with the route
28  This table ID will apply to both the unicats
29  and mlticast FIBs
30  @param name - A client provided name/tag for the table. If this is
31  not set by the client, then VPP will generate something
32  meaningfull.
33 */
34 autoreply define ip_table_add_del
35 {
41  u8 name[64];
42 };
43 
44 /** \brief Dump IP fib table
45  @param client_index - opaque cookie to identify the sender
46 */
47 define ip_fib_dump
48 {
51 };
52 
53 /** \brief FIB path
54  @param sw_if_index - index of the interface
55  @param weight - The weight, for UCMP
56  @param preference - The preference of the path. lowest preference is prefered
57  @param is_local - local if non-zero, else remote
58  @param is_drop - Drop the packet
59  @param is_unreach - Drop the packet and rate limit send ICMP unreachable
60  @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
61  @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
62  @param next_hop[16] - the next hop address
63 
64  WARNING: this type is replicated, pending cleanup completion
65 */
66 typeonly manual_print manual_endian define fib_path
67 {
76  u8 next_hop[16];
77 };
78 
79 /** \brief IP FIB table response
80  @param table_id - IP fib table id
81  @address_length - mask length
82  @address - ip4 prefix
83  @param count - the number of fib_path in path
84  @param path - array of of fib_path structures
85 */
86 manual_endian manual_print define ip_fib_details
87 {
90  u8 table_name[64];
92  u8 address[4];
95 };
96 
97 /** \brief Dump IP6 fib table
98  @param client_index - opaque cookie to identify the sender
99 */
100 define ip6_fib_dump
101 {
104 };
105 
106 /** \brief IP6 FIB table entry response
107  @param table_id - IP6 fib table id
108  @param address_length - mask length
109  @param address - ip6 prefix
110  @param count - the number of fib_path in path
111  @param path - array of of fib_path structures
112 */
113 manual_endian manual_print define ip6_fib_details
114 {
117  u8 table_name[64];
119  u8 address[16];
122 };
123 
124 /** \brief Dump IP neighboors
125  @param client_index - opaque cookie to identify the sender
126  @param context - sender context, to match reply w/ request
127  @param sw_if_index - the interface to dump neighboors
128  @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
129 */
130 define ip_neighbor_dump
131 {
136 };
137 
138 /** \brief IP neighboors dump response
139  @param context - sender context which was passed in the request
140  @param is_static - [1|0] to indicate if neighbor is statically configured
141  @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
142 */
143 define ip_neighbor_details {
147  u8 mac_address[6];
148  u8 ip_address[16];
149 };
150 
151 /** \brief IP neighbor add / del request
152  @param client_index - opaque cookie to identify the sender
153  @param context - sender context, to match reply w/ request
154  @param sw_if_index - interface used to reach neighbor
155  @param is_add - 1 to add neighbor, 0 to delete
156  @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
157  @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
158  @param is_static - A static neighbor Entry - there are not flushed
159  If the interface goes down.
160  @param is_no_adj_fib - Do not create a corresponding entry in the FIB
161  table for the neighbor.
162  @param mac_address - l2 address of the neighbor
163  @param dst_address - ip4 or ip6 address of the neighbor
164 */
165 autoreply define ip_neighbor_add_del
166 {
170  /* 1 = add, 0 = delete */
175  u8 mac_address[6];
176  u8 dst_address[16];
177 };
178 
179 /** \brief Set the ip flow hash config for a fib request
180  @param client_index - opaque cookie to identify the sender
181  @param context - sender context, to match reply w/ request
182  @param vrf_id - vrf/fib id
183  @param is_ipv6 - if non-zero the fib is ip6, else ip4
184  @param src - if non-zero include src in flow hash
185  @param dst - if non-zero include dst in flow hash
186  @param sport - if non-zero include sport in flow hash
187  @param dport - if non-zero include dport in flow hash
188  @param proto -if non-zero include proto in flow hash
189  @param reverse - if non-zero include reverse in flow hash
190 */
191 autoreply define set_ip_flow_hash
192 {
203 };
204 
205 /** \brief IPv6 router advertisement config request
206  @param client_index - opaque cookie to identify the sender
207  @param context - sender context, to match reply w/ request
208  @param suppress -
209  @param managed -
210  @param other -
211  @param ll_option -
212  @param send_unicast -
213  @param cease -
214  @param is_no -
215  @param default_router -
216  @param max_interval -
217  @param min_interval -
218  @param lifetime -
219  @param initial_count -
220  @param initial_interval -
221 */
222 autoreply define sw_interface_ip6nd_ra_config
223 {
240 };
241 
242 /** \brief IPv6 router advertisement prefix config request
243  @param client_index - opaque cookie to identify the sender
244  @param context - sender context, to match reply w/ request
245  @param sw_if_index - The interface the RA prefix information is for
246  @param address[] - The prefix to advertise
247  @param address_length - the prefix length
248  @param use_default - Revert to default settings
249  @param no_advertise - Do not advertise this prefix
250  @param off_link - The prefix is off link (it is not configured on the interface)
251  Configures the L-flag, When set, indicates that this
252  prefix can be used for on-link determination.
253  @param no_autoconfig - Setting for the A-flag. When
254  set indicates that this prefix can be used for
255  stateless address configuration.
256  @param no_onlink - The prefix is not on link. Make sure this is consistent
257  with the off_link parameter else YMMV
258  @param is_no - add/delete
259  @param val_lifetime - The length of time in
260  seconds (relative to the time the packet is sent)
261  that the prefix is valid for the purpose of on-link
262  determination. A value of all one bits
263  (0xffffffff) represents infinity
264  @param pref_lifetime - The length of time in
265  seconds (relative to the time the packet is sent)
266  that addresses generated from the prefix via
267  stateless address autoconfiguration remain
268  preferred [ADDRCONF]. A value of all one bits
269  (0xffffffff) represents infinity.
270 */
271 autoreply define sw_interface_ip6nd_ra_prefix
272 {
276  u8 address[16];
286 };
287 
288 /** \brief IPv6 ND proxy config
289  @param client_index - opaque cookie to identify the sender
290  @param context - sender context, to match reply w/ request
291  @param sw_if_index - The interface the host is on
292  @param address - The address of the host for which to proxy for
293  @param is_add - Adding or deleting
294 */
295 autoreply define ip6nd_proxy_add_del
296 {
301  u8 address[16];
302 };
303 
304 /** \brief IPv6 ND proxy details returned after request
305  @param context - sender context, to match reply w/ request
306  @param retval - return code for the request
307 */
308 define ip6nd_proxy_details
309 {
313  u8 address[16];
314 };
315 
316 /** \brief IPv6 ND proxy dump request
317  @param context - sender context, to match reply w/ request
318  @param retval - return code for the request
319  @param sw_if_index - The interface the host is on
320  @param address - The address of the host for which to proxy for
321 */
322 define ip6nd_proxy_dump
323 {
326 };
327 
328 /** \brief IPv6 interface enable / disable request
329  @param client_index - opaque cookie to identify the sender
330  @param context - sender context, to match reply w/ request
331  @param sw_if_index - interface used to reach neighbor
332  @param enable - if non-zero enable ip6 on interface, else disable
333 */
334 autoreply define sw_interface_ip6_enable_disable
335 {
339  u8 enable; /* set to true if enable */
340 };
341 
342 /** \brief IPv6 set link local address on interface request
343  @param client_index - opaque cookie to identify the sender
344  @param context - sender context, to match reply w/ request
345  @param sw_if_index - interface to set link local on
346  @param address[] - the new link local address
347 */
348 autoreply define sw_interface_ip6_set_link_local_address
349 {
353  u8 address[16];
354 };
355 
356 /** \brief Add / del route request
357  @param client_index - opaque cookie to identify the sender
358  @param context - sender context, to match reply w/ request
359  @param sw_if_index - software index of the new vlan's parent interface
360  @param vrf_id - fib table /vrf associated with the route
361  @param lookup_in_vrf -
362  @param classify_table_index -
363  @param create_vrf_if_needed -
364  @param is_add - 1 if adding the route, 0 if deleting
365  @param is_drop - Drop the packet
366  @param is_unreach - Drop the packet and rate limit send ICMP unreachable
367  @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
368  @param is_ipv6 - 0 if an ip4 route, else ip6
369  @param is_local -
370  @param is_classify -
371  @param is_multipath - Set to 1 if this is a multipath route, else 0
372  @param not_last - Is last or not last msg in group of multiple add/del msgs
373  @param next_hop_weight -
374  @param dst_address_length -
375  @param dst_address[16] -
376  @param next_hop_address[16] -
377  @param next_hop_n_out_labels - the number of labels in the label stack
378  @param next_hop_out_label_stack - the next-hop output label stack, outer most first
379  @param next_hop_via_label - The next-hop is a resolved via a local label
380 */
381 autoreply define ip_add_del_route
382 {
400  /* Is last/not-last message in group of multiple add/del messages. */
405  u8 dst_address[16];
406  u8 next_hop_address[16];
409  u32 next_hop_out_label_stack[next_hop_n_out_labels];
410 };
411 
412 /** \brief Add / del route request
413  @param client_index - opaque cookie to identify the sender
414  @param context - sender context, to match reply w/ request
415  @param sw_if_index - software index of the new vlan's parent interface
416  @param vrf_id - fib table /vrf associated with the route
417 
418  FIXME
419 */
420 autoreply define ip_mroute_add_del
421 {
434  u8 grp_address[16];
435  u8 src_address[16];
436 };
437 
438 /** \brief Dump IP multicast fib table
439  @param client_index - opaque cookie to identify the sender
440 */
441 define ip_mfib_dump
442 {
445 };
446 
447 /** \brief IP Multicast FIB table response
448  @param table_id - IP fib table id
449  @address_length - mask length
450  @grp_address - Group address/prefix
451  @src_address - Source address
452  @param count - the number of fib_path in path
453  @param path - array of of fib_path structures
454 */
455 manual_endian manual_print define ip_mfib_details
456 {
462  u8 grp_address[4];
463  u8 src_address[4];
466 };
467 
468 /** \brief Dump IP6 multicast fib table
469  @param client_index - opaque cookie to identify the sender
470 */
471 define ip6_mfib_dump
472 {
475 };
476 
477 /** \brief IP6 Multicast FIB table response
478  @param table_id - IP fib table id
479  @address_length - mask length
480  @grp_address - Group address/prefix
481  @src_address - Source address
482  @param count - the number of fib_path in path
483  @param path - array of of fib_path structures
484 */
485 manual_endian manual_print define ip6_mfib_details
486 {
490  u8 grp_address[16];
491  u8 src_address[16];
494 };
495 
496 define ip_address_details
497 {
500  u8 ip[16];
504 };
505 
506 define ip_address_dump
507 {
512 };
513 
514 define ip_details
515 {
519 };
520 
521 define ip_dump
522 {
526 };
527 
528 define mfib_signal_dump
529 {
532 };
533 
534 define mfib_signal_details
535 {
541  u8 grp_address[16];
542  u8 src_address[16];
544  u8 ip_packet_data[256];
545 };
546 
547 /*
548  * Local Variables:
549  * eval: (c-set-style "gnu")
550  * End:
551  */
u32 sw_if_index
Definition: ip.api:68
unsigned int u32
Definition: types.h:88
FIB path.
Definition: ip.api:66
size_t count
Definition: vapi.c:40
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
u32 client_index
Definition: ip.api:523
u8 is_prohibit
Definition: ip.api:74